/* ==========================================================================
   SANGHAMITRA DAIRY - DESIGN SYSTEM & CART DRAWER (assets/css/main.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Strict Hidden Utility Rule */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

:root {
    --primary: #00ADEF;
    --primary-dark: #0088C8;
    --primary-light: rgba(0, 173, 239, 0.08);
    --gamosa: #BE3A34;
    --gamosa-dark: #9C2E29;
    --leaf: #22C55E;
    --leaf-dark: #15803D;
    --leaf-light: #F0FDF4;
    --ink: #0B2530;
    --ink-muted: #526874;
    --cream: #FAF7F2;
    --cream-deep: #F2ECE1;
    --surface: #FFFFFF;
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(11, 37, 48, 0.05);
    --shadow-md: 0 8px 24px rgba(11, 37, 48, 0.08);
    --shadow-lg: 0 16px 40px rgba(11, 37, 48, 0.14);
    --transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.5;
    overflow-x: hidden;
    text-rendering: optimizeSpeed;
    padding-bottom: 70px; /* Space for mobile sticky cart bar */
}

@media (min-width: 769px) {
    body { padding-bottom: 0; }
}

.heading-font { font-family: var(--font-heading); }

/* Layout Utilities */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* Header & Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(250, 247, 242, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(11, 37, 48, 0.06);
    padding: 10px 0;
}

.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-logo img { height: 40px; width: auto; border-radius: 6px; display: block; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-link {
    text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.9rem;
    position: relative; transition: color 0.2s ease;
}
.nav-link:hover { color: var(--primary-dark); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.cart-trigger {
    position: relative; cursor: pointer; font-size: 1.3rem; color: var(--ink);
    background: none; border: none; padding: 8px; min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
}

.floating-mobile-cart{

position:fixed;

bottom:20px;

right:20px;

width:60px;

height:60px;

border-radius:50%;

z-index:99999;

}

/* Mobile Hamburger Toggle */
.nav-toggle {
    display: none; position: relative;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer;
    align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: ''; display: block; width: 22px; height: 2px;
    background: var(--ink); border-radius: 2px; transition: transform 0.25s ease;
}
.nav-toggle span::before { position: absolute; transform: translateY(-7px); }
.nav-toggle span::after { position: absolute; transform: translateY(7px); }
.nav-toggle.active span { background: transparent; }
.nav-toggle.active span::before { transform: rotate(45deg); }
.nav-toggle.active span::after { transform: rotate(-45deg); }

.cart-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--primary); color: white;
    font-size: 0.7rem; font-weight: 800;
    width: 20px; height: 20px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    background: linear-gradient(rgba(11, 37, 48, 0.72), rgba(11, 37, 48, 0.88)),
                url('https://i.ibb.co/SDLx8dwz/group.jpg') center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white; padding: 110px 0 60px 0;
}

.hero-badge {
    display: inline-block; background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 18px; border-radius: var(--radius-full);
    font-size: 0.75rem; letter-spacing: 0.12em; font-weight: 600; margin-bottom: 20px;
}

.hero-title { font-size: 3.5rem; line-height: 1.1; margin-bottom: 12px; }
.hero-subtitle { font-size: 1.6rem; color: #7FDBFF; margin-bottom: 20px; }
.hero-desc { max-width: 600px; margin: 0 auto 28px; opacity: 0.92; font-size: 1rem; }

@media (max-width: 768px) {
    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .hero { min-height: auto; padding-top: 100px; padding-bottom: 50px; }

    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: fixed; top: 61px; left: 0; right: 0;
        flex-direction: column; gap: 0;
        background: var(--surface);
        box-shadow: var(--shadow-md);
        max-height: 0; overflow: hidden;
        transition: max-height 0.3s ease-out; z-index: 999;
    }
    .nav-links.open { max-height: 70vh; overflow-y: auto; }
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(11,37,48,0.06); }
    .nav-link { display: block; padding: 14px 20px; font-size: 1rem; }

    .section { padding: 40px 0; }
    .section-title { font-size: 1.8rem; }
    .section-header { margin-bottom: 28px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1.05rem; }
    .container { padding: 0 14px; }
    .product-img { height: 150px; }
}

/* Gamosa Signature Motif */
.gamosa-stripe {
    height: 10px; width: 100%;
    background: repeating-linear-gradient(90deg, var(--gamosa) 0, var(--gamosa) 4px, transparent 4px, transparent 18px);
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-md); font-weight: 700;
    font-size: 0.95rem; text-decoration: none; cursor: pointer; border: none;
    min-height: 44px; transition: var(--transition);
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-leaf { background: var(--leaf); color: white; }
.btn-leaf:hover { background: var(--leaf-dark); }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.4); color: white; background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm); min-height: 38px; }
.btn-block { width: 100%; }

/* Toast Notification (Item Added Message) */
.toast-box {
    position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%);
    background: #0F172A; color: #FFFFFF; padding: 12px 22px;
    border-radius: var(--radius-full); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 10005; font-size: 0.9rem; font-weight: 700; display: flex;
    align-items: center; gap: 10px; border: 1px solid rgba(255, 255, 255, 0.15);
    animation: toastSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap; pointer-events: none;
}

@keyframes toastSlideUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@media (min-width: 769px) {
    .toast-box { bottom: 30px; }
}

/* Zomato-Style Mobile Bottom Sticky Cart Bar */
.mobile-cart-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cart-bar {
        display: flex; align-items: center; justify-content: space-between;
        position: fixed; bottom: 0; left: 0; right: 0;
        background: var(--leaf); color: #FFFFFF;
        padding: 12px 18px; z-index: 9998;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
        animation: slideUpBar 0.25s ease-out;
        cursor: pointer;
    }
    
    @keyframes slideUpBar {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .mobile-cart-info { display: flex; flex-direction: column; }
    .mobile-cart-count { font-size: 0.75rem; text-transform: uppercase; font-weight: 800; letter-spacing: 0.05em; opacity: 0.9; }
    .mobile-cart-total { font-size: 1.15rem; font-weight: 800; }
    .mobile-cart-btn {
        display: inline-flex; align-items: center; gap: 6px;
        font-weight: 800; font-size: 0.95rem; background: rgba(255, 255, 255, 0.2);
        padding: 8px 16px; border-radius: var(--radius-sm); backdrop-filter: blur(4px);
    }
}

/* Sections */
.section { padding: 64px 0; }
.section-cream { background: var(--cream); }
.section-deep { background: var(--cream-deep); }
.section-leaf { background: var(--leaf-light); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-tag { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.14em; font-weight: 700; color: var(--primary-dark); }
.section-title { font-size: 2.2rem; margin-top: 6px; font-family: var(--font-heading); }

/* Products Grid & Cards */
.product-card {
    background: var(--surface); border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid rgba(11, 37, 48, 0.05);
    display: flex; flex-direction: column; justify-content: space-between; 
    transition: var(--transition); position: relative;
    content-visibility: auto; contain-intrinsic-size: 1px 320px;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-img { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 12px; cursor: pointer; }
.product-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--ink-muted); }
.product-name { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 2px 0; cursor: pointer; }
.product-desc { font-size: 0.8rem; color: var(--ink-muted); height: 38px; overflow: hidden; margin-bottom: 12px; line-height: 1.4; }
.product-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(11, 37, 48, 0.06); }
.product-price { font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); }
.product-unit { font-size: 0.75rem; color: var(--ink-muted); display: block; }
.featured-badge {
    position: absolute; top: 12px; left: 12px; background: #FFC107; color: #000;
    font-size: 0.65rem; font-weight: 800; padding: 4px 10px; border-radius: var(--radius-full); text-transform: uppercase; z-index: 2;
}

/* Modal Overlay Dialogs */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; background: rgba(11, 37, 48, 0.75);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    padding: 16px;
}

.modal-box {
    background: var(--surface); border-radius: var(--radius-lg);
    width: 100%; max-width: 480px; padding: 24px; box-shadow: var(--shadow-lg);
    max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-shrink: 0; }
.modal-close { 
    background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink-muted); 
    padding: 6px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}

.modal-scroll-body { overflow-y: auto; flex: 1 1 auto; padding-right: 2px; }
.modal-sticky-footer {
    flex-shrink: 0; margin: 16px -24px -24px; padding: 16px 24px;
    background: var(--surface); border-top: 1px solid rgba(11, 37, 48, 0.08);
}

@media (max-width: 576px) {
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box {
        max-width: 100%; width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 92vh; padding: 20px;
    }
    .modal-sticky-footer { margin: 16px -20px -20px; padding: 14px 20px; }
}

/* Zomato-Style Cart Drawer */
.cart-drawer-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; background: rgba(11, 37, 48, 0.65);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    z-index: 10000; display: flex; justify-content: flex-end;
}

.cart-drawer-box {
    width: 100%; max-width: 420px; height: 100vh; background: #F8FAFC;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column;
    z-index: 10001; animation: slideDrawer 0.25s ease-out;
}

@keyframes slideDrawer {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-drawer-header {
    padding: 16px 20px; background: #FFFFFF; border-bottom: 1px solid #E2E8F0;
    display: flex; justify-content: space-between; align-items: center;
}

.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }


/* Zomato Free Delivery Progress Bar */
.delivery-progress-card {
    background: #FFFFFF;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid #E2E8F0;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.delivery-progress-card:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}
.delivery-progress-text { font-size: 0.8rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; display: flex; justify-content: space-between; }
.delivery-progress-bar-bg { width: 100%; height: 6px; background: #E2E8F0; border-radius: 10px; overflow: hidden; }
.delivery-progress-bar-fill { height: 100%; background: var(--leaf); transition: width 0.3s ease; }

/* Zomato Cart Item Card */
.zomato-cart-card {
    background: #FFFFFF; border-radius: var(--radius-md); border: 1px solid #E2E8F0;
    padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
    display: flex; gap: 12px; align-items: center;
}

.zomato-item-img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.zomato-item-details { flex: 1; min-width: 0; }
.zomato-item-name { font-size: 0.9rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.zomato-item-meta { font-size: 0.75rem; color: var(--ink-muted); margin-bottom: 6px; }

.zomato-stepper {
    display: inline-flex; align-items: center; background: #F0FDF4;
    border: 1px solid var(--leaf); border-radius: 8px; overflow: hidden;
}
.zomato-stepper button {
    width: 28px; height: 28px; background: none; border: none;
    color: var(--leaf-dark); font-weight: 800; font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.zomato-stepper span { padding: 0 8px; font-size: 0.85rem; font-weight: 800; color: var(--leaf-dark); }

/* Zomato Bill Summary Card */
.zomato-bill-card {
    background: #FFFFFF; border-radius: var(--radius-md); border: 1px solid #E2E8F0;
    padding: 16px; margin-top: 16px; box-shadow: var(--shadow-sm);
}

.zomato-bill-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; }
.zomato-bill-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 8px; color: var(--ink); }
.zomato-bill-total { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 800; border-top: 1px dashed #CBD5E1; padding-top: 10px; margin-top: 6px; color: var(--ink); }

/* Sticky Cart Drawer Footer */
.cart-drawer-footer {
    padding: 16px 20px; background: #FFFFFF; border-top: 1px solid #E2E8F0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* Forms & Validation Highlight */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.form-control {
    width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
    border: 1px solid rgba(11, 37, 48, 0.2); font-size: 0.9rem; font-family: inherit;
    min-height: 44px; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control.invalid { border-color: var(--gamosa) !important; background-color: #FEF2F2 !important; }

/* Footer */
footer { background: var(--ink); color: rgba(255, 255, 255, 0.7); padding: 36px 0; text-align: center; font-size: 0.85rem; }