/* ========================================
   TOKO DONAT - Main Stylesheet
   Theme: Coklat, Krem, Pink
   ======================================== */

:root {
    --brown-900: #3E2723;
    --brown-800: #4E342E;
    --brown-700: #5D4037;
    --brown-600: #6D4C41;
    --brown-500: #795548;
    --brown-400: #8D6E63;
    --brown-300: #A1887F;
    --brown-200: #BCAAA4;
    --brown-100: #D7CCC8;
    --brown-50: #EFEBE9;

    --cream-100: #FFF8E1;
    --cream-200: #FFECB3;
    --cream-50: #FFFDF5;

    --pink-600: #D81B60;
    --pink-500: #E91E63;
    --pink-400: #EC407A;
    --pink-300: #F06292;
    --pink-200: #F48FB1;
    --pink-100: #F8BBD0;
    --pink-50: #FCE4EC;

    --white: #ffffff;
    --black: #1a1a1a;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-500: #9e9e9e;
    --gray-700: #616161;

    --gradient-primary: linear-gradient(135deg, var(--brown-700), var(--pink-500));
    --gradient-warm: linear-gradient(135deg, #FFB74D, var(--pink-400));
    --gradient-hero: linear-gradient(135deg, var(--brown-900) 0%, var(--brown-700) 50%, var(--pink-600) 100%);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 30px rgba(233,30,99,0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50%;

    --font-main: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    color: var(--brown-900);
    background: var(--cream-50);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}
.navbar.scrolled { background: rgba(255,255,255,0.95); box-shadow: var(--shadow-md); }

.nav-container { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.4rem; }
.logo-icon { font-size: 1.8rem; animation: bounce-gentle 3s ease-in-out infinite; }
.logo-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

@keyframes bounce-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-link {
    padding: 8px 18px; border-radius: var(--radius-xl); font-weight: 500; font-size: 0.95rem;
    color: var(--brown-700); transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    background: var(--pink-50); color: var(--pink-600);
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.nav-toggle span { width: 25px; height: 2.5px; background: var(--brown-700); border-radius: 3px; transition: var(--transition); }

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: 70px; left: 0; width: 100%; background: var(--white);
        flex-direction: column; padding: 20px; gap: 5px;
        transform: translateY(-120%); opacity: 0; transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.open { transform: translateY(0); opacity: 1; }
    .nav-link { width: 100%; text-align: center; padding: 12px; }
}

/* ========================================
   HERO / BANNER CAROUSEL
   ======================================== */
.hero-section { margin-top: 70px; position: relative; overflow: hidden; }

.banner-carousel { position: relative; height: 500px; }
.banner-slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
    display: flex; align-items: center; justify-content: center;
}
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(62,39,35,0.8) 0%, rgba(216,27,96,0.4) 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 20px; color: var(--white);
}
.banner-overlay h1 {
    font-family: var(--font-display); font-size: 3rem; margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease;
}
.banner-overlay p { font-size: 1.2rem; max-width: 600px; opacity: 0.9; animation: fadeInUp 0.8s ease 0.2s both; }

.banner-dots { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.banner-dot {
    width: 12px; height: 12px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition); border: none;
}
.banner-dot.active { background: var(--white); width: 35px; border-radius: 6px; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .banner-carousel { height: 350px; }
    .banner-overlay h1 { font-size: 1.8rem; }
    .banner-overlay p { font-size: 1rem; }
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-title {
    font-family: var(--font-display); font-size: 2.5rem; color: var(--brown-800); margin-bottom: 12px;
}
.section-subtitle { color: var(--gray-700); font-size: 1.1rem; max-width: 550px; margin: 0 auto; }
.section-divider {
    width: 60px; height: 4px; background: var(--gradient-warm); border-radius: 2px;
    margin: 15px auto 0; display: block;
}

/* ========================================
   PRODUCT CARDS
   ======================================== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }

.product-card {
    background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition); position: relative;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.product-card .card-image { position: relative; overflow: hidden; height: 220px; }
.product-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .card-image img { transform: scale(1.08); }

.product-badge {
    position: absolute; top: 15px; left: 15px;
    background: var(--gradient-warm); color: var(--white);
    padding: 5px 14px; border-radius: var(--radius-xl); font-size: 0.78rem; font-weight: 600;
}
.product-badge.unavailable { background: var(--gray-500); }

.card-body { padding: 20px; }
.card-category { color: var(--pink-500); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.card-title { font-size: 1.15rem; font-weight: 700; margin: 6px 0 8px; color: var(--brown-800); }
.card-desc { color: var(--gray-700); font-size: 0.88rem; line-height: 1.5; margin-bottom: 15px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-size: 1.2rem; font-weight: 700; color: var(--brown-700); }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-xl); font-weight: 600;
    font-size: 0.95rem; cursor: pointer; border: none; transition: var(--transition);
    font-family: var(--font-main);
}
.btn-primary { background: var(--gradient-primary); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.btn-pink { background: var(--pink-500); color: var(--white); }
.btn-pink:hover { background: var(--pink-600); transform: translateY(-2px); }

.btn-outline {
    background: transparent; border: 2px solid var(--brown-500); color: var(--brown-700);
}
.btn-outline:hover { background: var(--brown-700); color: var(--white); }

.btn-wa { background: #25D366; color: var(--white); }
.btn-wa:hover { background: #128C7E; transform: translateY(-2px); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.btn-icon { padding: 10px; border-radius: var(--radius-full); width: 42px; height: 42px; justify-content: center; }

/* ========================================
   ARTICLES / BLOG CARDS
   ======================================== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }

.article-card {
    background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition);
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.article-card .card-image { height: 200px; overflow: hidden; }
.article-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.article-card:hover .card-image img { transform: scale(1.05); }
.article-card .card-body { padding: 20px; }
.article-card .card-date { color: var(--gray-500); font-size: 0.82rem; margin-bottom: 6px; }
.article-card .card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.article-card .card-title a:hover { color: var(--pink-500); }

/* ========================================
   PRODUCT DETAIL
   ======================================== */
.detail-section { padding: 100px 0 60px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.detail-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.detail-image img { width: 100%; height: 400px; object-fit: cover; }
.detail-info { padding-top: 10px; }
.detail-category { color: var(--pink-500); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.detail-title { font-family: var(--font-display); font-size: 2.2rem; color: var(--brown-800); margin: 10px 0; }
.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--brown-700); margin-bottom: 20px; }
.detail-desc { color: var(--gray-700); line-height: 1.8; margin-bottom: 30px; }
.detail-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: var(--radius-xl); font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.detail-status.available { background: #E8F5E9; color: #2E7D32; }
.detail-status.unavailable { background: #FFEBEE; color: #C62828; }

.qty-selector { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.qty-selector label { font-weight: 600; color: var(--brown-700); }
.qty-input { display: flex; align-items: center; gap: 0; }
.qty-btn { width: 40px; height: 40px; border: 2px solid var(--brown-200); background: var(--white); cursor: pointer; font-size: 1.2rem; color: var(--brown-700); transition: var(--transition); }
.qty-btn:hover { background: var(--brown-50); }
.qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-value { width: 60px; height: 40px; border: 2px solid var(--brown-200); border-left: none; border-right: none; text-align: center; font-size: 1rem; font-weight: 600; font-family: var(--font-main); }

@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; gap: 25px; }
    .detail-title { font-size: 1.6rem; }
}

/* ========================================
   PAGE CONTENT
   ======================================== */
.page-header {
    background: var(--gradient-hero); padding: 120px 20px 60px; text-align: center; color: var(--white);
}
.page-header h1 { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 10px; }
.page-header p { opacity: 0.85; font-size: 1.1rem; }

.page-content { padding: 60px 0; }
.page-content .content-wrap { max-width: 800px; margin: 0 auto; }
.page-content .content-wrap h2, .page-content .content-wrap h3 { color: var(--brown-800); margin: 25px 0 12px; font-family: var(--font-display); }
.page-content .content-wrap p { margin-bottom: 15px; color: var(--gray-700); }
.page-content .content-wrap ul, .page-content .content-wrap ol { margin: 10px 0 15px 20px; color: var(--gray-700); }
.page-content .content-wrap li { margin-bottom: 5px; list-style: disc; }
.page-content .content-wrap ol li { list-style: decimal; }

/* ========================================
   POPUP
   ======================================== */
.popup-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; opacity: 0; visibility: hidden; transition: var(--transition);
}
.popup-overlay.show { opacity: 1; visibility: visible; }

.popup-content {
    background: var(--white); border-radius: var(--radius-lg); max-width: 480px; width: 100%;
    overflow: hidden; position: relative; transform: scale(0.9); transition: var(--transition);
    box-shadow: var(--shadow-xl);
}
.popup-overlay.show .popup-content { transform: scale(1); }

.popup-close {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    width: 36px; height: 36px; border-radius: var(--radius-full);
    background: rgba(0,0,0,0.5); color: var(--white); border: none;
    font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.popup-close:hover { background: var(--pink-500); }
.popup-image img { width: 100%; height: 220px; object-fit: cover; }
.popup-body { padding: 25px; text-align: center; }
.popup-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--brown-800); margin-bottom: 12px; }
.popup-text { color: var(--gray-700); line-height: 1.7; }
.popup-text strong { color: var(--pink-500); }

/* ========================================
   PAGINATION
   ======================================== */
.pagination-nav { display: flex; justify-content: center; margin-top: 50px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.page-link {
    padding: 10px 16px; border-radius: var(--radius-sm); background: var(--white);
    color: var(--brown-700); font-weight: 500; box-shadow: var(--shadow-sm);
    transition: var(--transition); font-size: 0.9rem;
}
.page-link:hover, .page-link.active { background: var(--brown-700); color: var(--white); }

/* ========================================
   WHATSAPP FLOAT
   ======================================== */
.wa-float {
    position: fixed; bottom: 25px; right: 25px; z-index: 999;
    width: 60px; height: 60px; border-radius: var(--radius-full);
    background: #25D366; color: var(--white); font-size: 1.8rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    animation: pulse-wa 2s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.1); }

@keyframes pulse-wa {
    0%, 100% { box-shadow: 0 4px 15px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

/* Hide WA float on mobile (replaced by bottom nav) */
@media (max-width: 768px) {
    .wa-float { display: none; }
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    align-items: flex-end;
    justify-content: space-around;
    padding: 6px 4px 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav.hidden {
    transform: translateY(100%);
}

@media (max-width: 768px) {
    .bottom-nav { display: flex; }
    /* Add padding to body so footer content isn't hidden behind bottom nav */
    body { padding-bottom: 72px; }
    .footer { padding-bottom: 20px; }
}

/* Nav Item */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    padding: 4px 0;
    color: var(--gray-500);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    transition: var(--transition);
    line-height: 1;
}

.bottom-nav-item span {
    line-height: 1;
    white-space: nowrap;
}

/* Active indicator */
.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--gradient-primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav-item.active {
    color: var(--pink-500);
}

.bottom-nav-item.active i {
    transform: translateY(-1px);
}

/* Active ripple effect on tap */
.bottom-nav-item:active {
    transform: scale(0.92);
}

/* Center WhatsApp Button (raised) */
.bottom-nav-wa {
    position: relative;
    color: var(--gray-500);
}

.bottom-nav-wa-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
    margin-top: -22px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    transition: var(--transition);
    position: relative;
}

/* Pulse ring around WA icon */
.bottom-nav-wa-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.2);
    animation: wa-ring-pulse 2.5s ease-in-out infinite;
}

@keyframes wa-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: 0; }
}

.bottom-nav-wa:active .bottom-nav-wa-icon {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}

.bottom-nav-wa span {
    color: #128C7E;
    font-weight: 600;
}

/* ========================================
   FLASH MESSAGE
   ======================================== */
.flash-message {
    padding: 15px 20px; border-radius: var(--radius-md); margin-bottom: 20px;
    font-weight: 500; animation: fadeInUp 0.4s ease;
}
.flash-message.success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid #4CAF50; }
.flash-message.error { background: #FFEBEE; color: #C62828; border-left: 4px solid #F44336; }

/* ========================================
   FEATURED SECTION BG
   ======================================== */
.section-alt { background: var(--brown-50); }

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablets & small desktops */
@media (max-width: 768px) {
    .banner-carousel { height: 300px; }
    .banner-overlay h1 { font-size: 1.6rem; padding: 0 10px; }
    .banner-overlay p { font-size: 0.92rem; }
    .banner-overlay .btn { padding: 12px 24px; font-size: 0.9rem; }
    .section { padding: 50px 0; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.95rem; }
    .page-header { padding: 100px 16px 45px; }
    .page-header h1 { font-size: 1.8rem; }
    .page-header p { font-size: 0.95rem; }
}

/* Mobile phones */
@media (max-width: 640px) {
    .container { padding: 0 14px; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.5rem; }
    .section-subtitle { font-size: 0.88rem; }
    .section-header { margin-bottom: 30px; }

    /* Product grid: 2 columns optimized */
    .product-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 12px; 
    }

    .product-card {
        border-radius: 14px;
    }
    .product-card:hover { transform: none; } /* disable hover lift on touch */

    .product-card .card-image { 
        height: 140px; 
    }

    .product-badge {
        top: 8px; left: 8px;
        padding: 3px 8px;
        font-size: 0.65rem;
        border-radius: 6px;
    }

    .card-body { 
        padding: 10px 10px 12px; 
    }

    .card-category { 
        font-size: 0.65rem; 
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    .card-title { 
        font-size: 0.85rem; 
        font-weight: 600;
        margin: 3px 0 4px;
        line-height: 1.3;
        /* Clamp to 2 lines */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .card-title a { display: block; }

    .card-desc { display: none; }

    /* Stack the card footer vertically */
    .card-footer { 
        flex-direction: column; 
        align-items: stretch;
        gap: 8px;
    }

    .card-price { 
        font-size: 0.95rem; 
        font-weight: 700;
        white-space: nowrap;
        color: var(--brown-800);
    }

    /* Compact add-to-cart button on mobile */
    .card-footer .btn-add-cart {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.75rem;
        border-radius: 10px;
        gap: 5px;
    }
    .card-footer .btn-add-cart i {
        font-size: 0.8rem;
    }

    .card-footer .btn-pink {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.78rem;
        border-radius: 10px;
    }

    /* Article grid */
    .article-grid { grid-template-columns: 1fr; gap: 16px; }
    .article-card .card-image { height: 170px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer { padding: 40px 0 0; }

    /* Page header */
    .page-header { padding: 90px 14px 40px; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header p { font-size: 0.88rem; }

    /* Hero / Banner */
    .banner-carousel { height: 260px; }
    .banner-overlay h1 { font-size: 1.35rem; }
    .banner-overlay p { font-size: 0.85rem; }
    .banner-overlay .btn { 
        padding: 10px 20px; 
        font-size: 0.82rem; 
    }
    .banner-dots { bottom: 14px; gap: 6px; }
    .banner-dot { width: 8px; height: 8px; }
    .banner-dot.active { width: 24px; }

    /* Detail page */
    .detail-section { padding: 80px 0 40px; }
    .detail-grid { grid-template-columns: 1fr; gap: 20px; }
    .detail-title { font-size: 1.4rem; }
    .detail-price { font-size: 1.5rem; }
    .detail-image img { height: 280px; }

    /* General buttons */
    .btn { font-size: 0.88rem; padding: 10px 22px; }
    .btn-lg { padding: 14px 28px; font-size: 0.95rem; }
    .btn-sm { padding: 7px 14px; font-size: 0.78rem; }

    /* Category filters */
    .section > .container > div[style*="flex"] {
        gap: 6px !important;
        margin-bottom: 25px !important;
    }

    /* Pagination */
    .page-link { padding: 8px 12px; font-size: 0.82rem; }
}

/* Very small phones */
@media (max-width: 380px) {
    .product-grid { 
        grid-template-columns: 1fr 1fr;
        gap: 8px; 
    }
    .product-card .card-image { height: 120px; }
    .card-body { padding: 8px 8px 10px; }
    .card-category { display: none; }
    .card-title { font-size: 0.8rem; }
    .card-price { font-size: 0.88rem; }
    .card-footer .btn-add-cart {
        padding: 7px 6px;
        font-size: 0.7rem;
    }
    .banner-carousel { height: 220px; }
    .banner-overlay h1 { font-size: 1.15rem; }
}

/* ========================================
   FOOTER
   ======================================== */
.footer { background: var(--brown-900); color: var(--brown-200); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.footer-logo .logo-text { color: var(--white); font-size: 1.3rem; font-weight: 700; background: none; -webkit-text-fill-color: var(--white); }
.footer-desc { font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: var(--transition);
}
.footer-social a:hover { background: var(--pink-500); color: var(--white); transform: translateY(-3px); }
.footer h4 { color: var(--white); margin-bottom: 18px; font-size: 1.05rem; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a:hover { color: var(--pink-300); padding-left: 5px; }
.footer ul li i { margin-right: 8px; color: var(--pink-300); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding: 20px 0; text-align: center; font-size: 0.85rem; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ========================================
   CART DRAWER PANEL
   ======================================== */
.cart-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.cart-overlay.show {
    opacity: 1; visibility: visible;
}

.cart-panel {
    position: fixed; top: 0; right: 0; bottom: 0;
    z-index: 2001;
    width: 400px; max-width: 92vw;
    background: var(--white);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.cart-panel.open {
    transform: translateX(0);
}

.cart-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}
.cart-panel-header h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--brown-800);
    display: flex; align-items: center; gap: 10px;
}
.cart-panel-header h3 i {
    color: var(--pink-500);
}
.cart-panel-close {
    width: 38px; height: 38px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    border: none; cursor: pointer;
    font-size: 1.3rem; color: var(--gray-700);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.cart-panel-close:hover {
    background: var(--pink-50); color: var(--pink-500);
    transform: rotate(90deg);
}

/* Cart Items List */
.cart-items-list {
    flex: 1; overflow-y: auto;
    padding: 16px 24px;
}
.cart-items-list::-webkit-scrollbar { width: 4px; }
.cart-items-list::-webkit-scrollbar-thumb { background: var(--brown-200); border-radius: 4px; }

.cart-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    animation: cartItemIn 0.3s ease both;
}
@keyframes cartItemIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.cart-item-image {
    width: 68px; height: 68px;
    border-radius: var(--radius-md);
    overflow: hidden; flex-shrink: 0;
    background: var(--gray-100);
}
.cart-item-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1; min-width: 0;
}
.cart-item-name {
    font-weight: 600; font-size: 0.92rem;
    color: var(--brown-800);
    margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-price {
    font-size: 0.82rem; color: var(--gray-500);
    margin-bottom: 8px;
}

.cart-item-qty {
    display: flex; align-items: center; gap: 0;
}
.cart-qty-btn {
    width: 30px; height: 30px;
    border: 1.5px solid var(--gray-300);
    background: var(--white); cursor: pointer;
    font-size: 1rem; color: var(--brown-700);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.cart-qty-btn:first-child { border-radius: 6px 0 0 6px; }
.cart-qty-btn:last-child { border-radius: 0 6px 6px 0; }
.cart-qty-btn:hover:not(:disabled) {
    background: var(--pink-50); border-color: var(--pink-300);
    color: var(--pink-500);
}
.cart-qty-btn:disabled {
    opacity: 0.4; cursor: not-allowed;
}
.cart-qty-val {
    width: 36px; height: 30px;
    border-top: 1.5px solid var(--gray-300);
    border-bottom: 1.5px solid var(--gray-300);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.88rem; color: var(--brown-800);
}

.cart-item-actions {
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 8px;
    flex-shrink: 0;
}
.cart-item-subtotal {
    font-weight: 700; font-size: 0.92rem;
    color: var(--brown-700);
    white-space: nowrap;
}
.cart-item-remove {
    background: none; border: none; cursor: pointer;
    color: var(--gray-500); font-size: 0.85rem;
    padding: 4px 6px; border-radius: 6px;
    transition: var(--transition);
}
.cart-item-remove:hover {
    color: #e53935; background: #FFEBEE;
}

/* Cart Empty State */
.cart-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 20px; text-align: center;
    flex: 1;
}
.cart-empty-icon {
    font-size: 4rem; margin-bottom: 16px;
    opacity: 0.6;
}
.cart-empty h4 {
    color: var(--brown-800); font-size: 1.15rem;
    margin-bottom: 8px;
}
.cart-empty p {
    color: var(--gray-500); font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Cart Footer */
.cart-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--cream-50);
    flex-shrink: 0;
}
.cart-total-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 16px;
}
.cart-total-label {
    font-weight: 600; font-size: 1rem;
    color: var(--brown-700);
}
.cart-total-value {
    font-weight: 800; font-size: 1.3rem;
    color: var(--brown-900);
}
.cart-checkout-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; width: 100%;
    padding: 15px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: var(--white); font-weight: 700;
    font-size: 1rem; font-family: var(--font-main);
    border: none; cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}
.cart-checkout-btn i {
    font-size: 1.25rem;
}

/* ========================================
   CART TOAST NOTIFICATION
   ======================================== */
.cart-toast {
    position: fixed;
    bottom: 100px; left: 50%;
    transform: translateX(-50%) translateY(30px);
    z-index: 3000;
    background: var(--brown-900);
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius-xl);
    font-size: 0.9rem; font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex; align-items: center; gap: 8px;
}
.cart-toast i {
    color: #4CAF50; font-size: 1.1rem;
}
.cart-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .cart-toast {
        bottom: 90px;
        font-size: 0.82rem;
        padding: 12px 18px;
    }
}

/* ========================================
   CART BADGE COUNTER
   ======================================== */
.cart-badge {
    display: none;
    align-items: center; justify-content: center;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--pink-500);
    color: var(--white);
    font-size: 0.68rem; font-weight: 700;
    line-height: 1;
    position: absolute;
}

/* Badge on bottom nav cart icon */
.bottom-nav-cart .cart-badge {
    top: -2px; right: 50%;
    transform: translateX(16px);
}
.bottom-nav-cart-icon .cart-badge {
    top: -4px; right: -6px;
}

/* ========================================
   ADD TO CART BUTTON STYLE
   ======================================== */
.btn-add-cart {
    background: var(--gradient-warm);
    color: var(--white);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 183, 77, 0.4);
}
.btn-add-cart:active {
    transform: scale(0.95);
}

/* ========================================
   BOTTOM NAV - CART CENTER BUTTON
   ======================================== */
.bottom-nav-cart {
    position: relative;
    color: var(--gray-500);
}

.bottom-nav-cart-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    margin-top: -22px;
    box-shadow: 0 4px 15px rgba(255, 183, 77, 0.35);
    transition: var(--transition);
    position: relative;
}

/* Pulse ring around cart icon */
.bottom-nav-cart-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 183, 77, 0.2);
    animation: cart-ring-pulse 2.5s ease-in-out infinite;
}

@keyframes cart-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: 0; }
}

.bottom-nav-cart:active .bottom-nav-cart-icon {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(255, 183, 77, 0.4);
}

.bottom-nav-cart span {
    color: var(--brown-600);
    font-weight: 600;
}
