/* ===== ROOT VARIABLES ===== */
:root {
    --espresso: #241812;
    --dark-brown: #3A261D;
    --brown: #6F4E37;
    --caramel: #B8895B;
    --cream: #F5EFE6;
    --ivory: #FFFDF8;
    --white: #FFFFFF;
    --soft-gray: #8D857D;
    --black: #111111;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    
    --transition: all 0.3s ease-in-out;
    --shadow-sm: 0 2px 10px rgba(36, 24, 18, 0.05);
    --shadow-md: 0 5px 20px rgba(36, 24, 18, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--espresso);
    background-color: var(--ivory);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6, .logo-font {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--espresso);
    line-height: 1.2;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-gray { color: var(--soft-gray); font-size: 0.85rem; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-4 { margin-top: 4rem; }
.w-100 { width: 100%; }
.flex-between { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }

/* ===== UTILITIES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section { padding: 80px 0; }
.bg-cream { background-color: var(--cream); }
.bg-ivory { background-color: var(--ivory); }
.bg-espresso { background-color: var(--espresso); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    gap: 8px;
}
.btn-primary {
    background-color: var(--espresso);
    color: var(--white);
    border: 1px solid var(--espresso);
}
.btn-primary:hover {
    background-color: var(--caramel);
    border-color: var(--caramel);
}
.btn-outline {
    background-color: transparent;
    color: var(--espresso);
    border: 1px solid var(--espresso);
}
.btn-outline:hover {
    background-color: var(--espresso);
    color: var(--white);
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--ivory); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}
.loader-content { text-align: center; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* ===== NAVBAR ===== */
#navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 20px 0; z-index: 1000;
    transition: var(--transition);
    background: transparent;
}
#navbar.scrolled {
    background: rgba(255, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.logo-area { display: flex; flex-direction: column; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; letter-spacing: 2px; }
.sub-logo { font-size: 0.6rem; letter-spacing: 3px; color: var(--soft-gray); font-weight: 500; }
.nav-menu { display: flex; gap: 30px; }
.nav-menu a {
    font-size: 0.9rem; font-weight: 500;
    position: relative; transition: color 0.3s;
}
.nav-menu a::after {
    content: ''; position: absolute; width: 0; height: 1px;
    bottom: -4px; left: 0; background-color: var(--caramel);
    transition: width 0.3s ease;
}
.nav-menu a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.cart-icon {
    font-size: 1.2rem; cursor: pointer; position: relative;
    color: var(--espresso); transition: var(--transition);
}
.cart-icon:hover { color: var(--caramel); }
.cart-badge {
    position: absolute; top: -8px; right: -12px;
    background-color: var(--caramel); color: var(--white);
    font-size: 0.7rem; font-weight: 600;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding-top: 80px; overflow: hidden;
}
.hero-container {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 50px; align-items: center;
}
.hero-subtitle { font-size: 0.8rem; letter-spacing: 2px; color: var(--caramel); font-weight: 600; display: block; margin-bottom: 1rem; }
.hero-desc { font-size: 1.1rem; color: var(--soft-gray); margin-bottom: 2rem; max-width: 450px; }
.hero-cta { display: flex; gap: 15px; margin-bottom: 2rem; }
.hero-small-info { font-size: 0.85rem; color: var(--soft-gray); }
.hero-image-wrapper { position: relative; }
.image-box { position: relative; border-radius: 200px 200px 0 0; overflow: hidden; box-shadow: var(--shadow-md); }
.hero-img { width: 100%; height: 600px; object-fit: cover; }
.floating-badge {
    position: absolute; top: 30px; right: 30px;
    background: var(--caramel); color: var(--white);
    width: 90px; height: 90px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-align: center; font-size: 0.8rem; font-weight: 600;
    font-family: var(--font-heading);
    animation: float 4s ease-in-out infinite;
}
.floating-card {
    position: absolute; bottom: 30px; left: -30px;
    background: var(--white); padding: 15px 20px;
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    display: flex; flex-direction: column; gap: 5px;
    animation: float 5s ease-in-out infinite reverse;
}
.fc-title { font-size: 0.7rem; color: var(--caramel); font-weight: 600; text-transform: uppercase; }
.fc-name { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; }
.fc-price { font-size: 0.9rem; color: var(--soft-gray); }

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* ===== TRUST BAR ===== */
.trust-bar {
    display: flex; justify-content: space-between;
    padding: 40px 20px; border-top: 1px solid rgba(36,24,18,0.1);
    border-bottom: 1px solid rgba(36,24,18,0.1);
}
.trust-item { display: flex; align-items: flex-start; gap: 15px; }
.trust-item i { font-size: 1.5rem; color: var(--caramel); margin-top: 3px; }
.trust-item h4 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 5px; }
.trust-item p { font-size: 0.85rem; color: var(--soft-gray); }

/* ===== PRODUCT CATALOG ===== */
.category-filters {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 15px;
    margin: 30px 0 40px;
}
.filter-btn {
    padding: 8px 20px; font-size: 0.9rem;
    border: 1px solid var(--soft-gray); border-radius: 30px;
    color: var(--soft-gray); transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
    background: var(--espresso); color: var(--white); border-color: var(--espresso);
}
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.product-card {
    background: var(--white); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: var(--transition); position: relative;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-img-wrapper { position: relative; overflow: hidden; padding-top: 100%; }
.product-img-wrapper img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.5s ease;
}
.product-card:hover .product-img-wrapper img { transform: scale(1.05); }
.quick-view-overlay {
    position: absolute; bottom: -50px; left: 0; width: 100%;
    background: rgba(36, 24, 18, 0.9); color: white;
    text-align: center; padding: 12px; cursor: pointer;
    transition: var(--transition); font-size: 0.9rem;
}
.product-card:hover .quick-view-overlay { bottom: 0; }
.product-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.p-cat { font-size: 0.75rem; color: var(--caramel); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.p-name { font-size: 1.2rem; margin-bottom: 8px; }
.p-desc { font-size: 0.85rem; color: var(--soft-gray); margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.p-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.p-price { font-weight: 600; font-size: 1.1rem; }
.btn-add { background: var(--cream); color: var(--espresso); padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.btn-add:hover { background: var(--caramel); color: var(--white); }

/* ===== CUSTOM CAKE ===== */
.custom-cake-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.custom-list { margin: 20px 0; }
.custom-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: var(--soft-gray); }
.custom-list i { color: var(--caramel); }
.custom-cake-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; height: 500px; object-fit: cover;}

/* ===== ABOUT & STATS ===== */
.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image img { border-radius: 200px 200px 0 0; width: 100%; height: 550px; object-fit: cover; box-shadow: var(--shadow-md); }
.stats-container { display: flex; gap: 30px; margin-top: 30px; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 20px; }
.stat-item h3 { font-size: 2rem; color: var(--caramel); margin-bottom: 5px; }
.stat-item p { font-size: 0.85rem; color: var(--soft-gray); font-weight: 500; }

/* ===== INGREDIENTS ===== */
.ingredients-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; margin-top: 40px; }
.ing-item { text-align: center; }
.ing-item i { font-size: 2.5rem; color: var(--caramel); margin-bottom: 15px; }
.ing-item p { font-family: var(--font-heading); font-size: 1.2rem; }

/* ===== HOW TO ORDER & TIMELINE ===== */
.timeline { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; position: relative; }
.timeline::before { content: ''; position: absolute; top: 25px; left: 0; width: 100%; height: 1px; background: rgba(0,0,0,0.1); z-index: 1; }
.timeline-step { flex: 1; text-align: center; position: relative; z-index: 2; }
.step-num { width: 50px; height: 50px; background: var(--ivory); border: 2px solid var(--espresso); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem; }
.timeline-step h4 { margin-bottom: 10px; }
.timeline-step p { font-size: 0.85rem; color: var(--soft-gray); }

.info-cards-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.info-card { background: var(--white); padding: 30px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.info-card h3 { color: var(--caramel); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.info-card ul { margin-top: 15px; }
.info-card li { font-size: 0.9rem; margin-bottom: 8px; color: var(--soft-gray); }

/* ===== TESTIMONIALS ===== */
.testimonial-carousel { max-width: 800px; margin: 40px auto 0; position: relative; text-align: center; }
.testi-slide { display: none; padding: 0 20px; }
.testi-slide.active { display: block; animation: fadeIn 0.8s; }
.testi-text { font-family: var(--font-heading); font-size: 1.5rem; font-style: italic; margin-bottom: 20px; color: var(--espresso); }
.testi-author { font-size: 0.9rem; font-weight: 600; color: var(--caramel); text-transform: uppercase; letter-spacing: 1px; }

/* ===== FAQ ===== */
.faq-container { max-width: 800px; margin: 40px auto 0; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); margin-bottom: 10px; }
.faq-question { width: 100%; text-align: left; padding: 20px 0; font-size: 1.1rem; font-family: var(--font-heading); font-weight: 600; display: flex; justify-content: space-between; align-items: center; color: var(--espresso); }
.faq-question i { transition: var(--transition); color: var(--caramel); }
.faq-question.active i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-answer p { padding-bottom: 20px; color: var(--soft-gray); font-size: 0.95rem; }

/* ===== INSTAGRAM ===== */
.ig-link { font-family: var(--font-heading); font-size: 1.5rem; color: var(--caramel); font-style: italic; }
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ig-grid img { width: 100%; height: 200px; object-fit: cover; transition: var(--transition); border-radius: var(--radius-sm); cursor: pointer; }
.ig-grid img:hover { transform: scale(1.03); filter: brightness(0.8); }

/* ===== FOOTER ===== */
.footer { background: var(--espresso); color: var(--ivory); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer p, .footer a { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 10px; }
.footer a:hover { color: var(--caramel); }
.footer h4 { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 20px; color: var(--white); }
.social-links a { display: inline-block; font-size: 1.2rem; margin-right: 15px; color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ===== FLOATING ELEMENTS ===== */
.floating-wa { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #25D366; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: var(--shadow-md); z-index: 900; transition: var(--transition); }
.floating-wa:hover { transform: scale(1.1); }
.floating-wa .tooltip { position: absolute; right: 75px; background: var(--espresso); color: white; padding: 5px 12px; border-radius: 4px; font-size: 0.8rem; opacity: 0; pointer-events: none; transition: var(--transition); white-space: nowrap; }
.floating-wa:hover .tooltip { opacity: 1; }

.back-to-top { position: fixed; bottom: 100px; right: 30px; width: 45px; height: 45px; background: var(--espresso); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none; transition: var(--transition); z-index: 900; }
.back-to-top.show { opacity: 1; pointer-events: auto; }

#toast-container { position: fixed; bottom: 30px; left: 30px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--espresso); color: var(--white); padding: 12px 20px; border-radius: var(--radius-sm); font-size: 0.9rem; box-shadow: var(--shadow-md); animation: slideInLeft 0.3s forwards; }
@keyframes slideInLeft { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== MODALS & SIDEBARS ===== */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1001; opacity: 0; pointer-events: none; transition: var(--transition); }
.overlay.active { opacity: 1; pointer-events: auto; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1002; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: var(--transition); padding: 20px; }
.modal.active { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--white); width: 100%; max-width: 800px; border-radius: var(--radius-lg); position: relative; overflow: hidden; transform: translateY(20px); transition: var(--transition); max-height: 90vh; overflow-y: auto; }
.modal.active .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: var(--soft-gray); z-index: 10; }

/* Quick View */
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; }
.qv-img img { width: 100%; height: 100%; object-fit: cover; }
.qv-details { padding: 40px; }
.qv-price { font-size: 1.5rem; color: var(--caramel); font-weight: 600; margin: 10px 0 20px; }
.qv-variant { margin-bottom: 20px; }
.qv-variant label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; }
.qv-variant select { width: 100%; padding: 10px; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-sm); outline: none; }
.qty-control { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.qty-btn { width: 35px; height: 35px; border: 1px solid var(--espresso); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.qty-input { width: 40px; text-align: center; border: none; font-size: 1.1rem; font-weight: 600; background: transparent; pointer-events: none;}

/* Cart Sidebar */
.cart-sidebar { position: fixed; top: 0; right: -400px; width: 100%; max-width: 400px; height: 100%; background: var(--white); z-index: 1002; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right 0.4s ease; display: flex; flex-direction: column; }
.cart-sidebar.active { right: 0; }
.cart-header { padding: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.cart-header h3 { font-family: var(--font-heading); margin: 0; }
.close-cart { font-size: 1.5rem; color: var(--soft-gray); }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; }
.cart-item-details { flex: 1; }
.cart-item-title { font-weight: 600; font-size: 0.95rem; }
.cart-item-var { font-size: 0.8rem; color: var(--soft-gray); margin-bottom: 5px; }
.cart-item-price { font-weight: 500; color: var(--caramel); font-size: 0.9rem; }
.cart-item-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.cart-qty-mini { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(0,0,0,0.1); padding: 2px 8px; border-radius: 20px; }
.cart-qty-mini button { font-size: 1rem; color: var(--espresso); }
.cart-remove { color: red; font-size: 0.8rem; text-decoration: underline; }
.cart-empty { text-align: center; margin-top: 50px; color: var(--soft-gray); }
.cart-empty i { font-size: 3rem; color: rgba(0,0,0,0.1); margin-bottom: 15px; }
.cart-footer { padding: 20px; border-top: 1px solid rgba(0,0,0,0.05); background: var(--ivory); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 1.1rem; margin-bottom: 15px; }

/* Checkout Forms */
.checkout-content { max-width: 600px; padding: 40px; }
.checkout-form .form-group { margin-bottom: 15px; text-align: left; }
.checkout-form label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 5px; }
.checkout-form input, .checkout-form select, .checkout-form textarea { width: 100%; padding: 12px; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-sm); font-family: inherit; }
.checkout-summary { background: var(--cream); padding: 15px; border-radius: var(--radius-sm); }
.total-line { border-top: 1px solid rgba(0,0,0,0.1); padding-top: 10px; margin-top: 5px; font-size: 1.2rem; color: var(--caramel); }
.success-content { padding: 50px; }

/* ===== ANIMATIONS ===== */
.animate-up { opacity: 0; transform: translateY(30px); transition: 0.8s ease-out; }
.animate-fade { opacity: 0; transition: 1s ease-out; }
.animate-up.visible, .animate-fade.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .animate-up, .animate-fade { transition: none; opacity: 1; transform: none; } }

/* ===== MEDIA QUERIES ===== */
@media (max-width: 991px) {
    .hero-container, .about-container, .custom-cake-container { grid-template-columns: 1fr; text-align: center; }
    .hero-text { order: 2; } .hero-image-wrapper { order: 1; margin-bottom: 20px; }
    .hero-cta { justify-content: center; }
    .image-box, .about-image img, .custom-cake-image img { border-radius: var(--radius-lg); height: 400px; }
    .floating-card { left: 10px; bottom: 10px; }
    .trust-bar { flex-wrap: wrap; justify-content: center; gap: 20px; text-align: center; }
    .trust-item { flex-direction: column; align-items: center; width: 45%; }
    .timeline { flex-direction: column; gap: 30px; }
    .timeline::before { width: 1px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); }
    .info-cards-container, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { text-align: center; }
    .qv-grid { grid-template-columns: 1fr; }
    .qv-img img { height: 300px; }
    .ig-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    h1 { font-size: 2.5rem; }
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--white); flex-direction: column; padding: 20px; box-shadow: var(--shadow-md); text-align: center; }
    .nav-menu.active { display: flex; }
    .hamburger { display: block; }
    .d-none-mobile { display: none; }
    .trust-item { width: 100%; }
    .ig-grid { grid-template-columns: repeat(2, 1fr); }
    .checkout-content { padding: 20px; }
}