/* ================= PREMIUM RESET & VARIABLES ================= */
:root {
    --primary: #e92020;
    --dark: #121212;
    --light: #ffffff;
    --border: #f0f0f0;
    --text-main: #222;
    --text-muted: #666;
    --shadow: 0 10px 30px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    background: var(--light); 
    color: var(--text-main);
    overflow-x: hidden;
}

/* Background Lock (JS toggles this) */
body.no-scroll { overflow: hidden !important; }

/* OVERLAY - Is par click karne se menu/cart band hoga */
.overlay {
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    visibility: hidden; opacity: 0; 
    transition: 0.3s ease; z-index: 998;
}
.overlay.active { visibility: visible; opacity: 1; }

/* ================= HEADER STRUCTURE ================= */
.header { 
    background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner { 
    max-width: 1400px; margin: auto; 
    padding: 0 20px; height: 80px;
    display: flex; align-items: center; justify-content: space-between; 
}

.logo { flex: 0 0 auto; display: flex; align-items: center; padding-left: 30px; }
.logo img { height: 45px; width: auto; transition: 0.3s; }

.nav-container { flex: 1; display: flex; justify-content: center; height: 100%; }
.menu { list-style: none; display: flex; gap: 5px; align-items: center; height: 100%; margin: 0; padding: 0; }

.icons { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 15px; align-items: center; padding-right: 15px; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.hamburger span { width: 22px; height: 2px; background: #000; transition: 0.3s; }

/* ================= DESKTOP MENU & MEGA MENU ================= */
.menu-btn, .menu a {
    background: none; 
    border: none; 
    font-size: 13px; 
    font-weight: 700;
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
    color: var(--dark);
    padding: 0 15px; 
    
    /* FIX: Height ko hata kar flex aur line-height ka istemal */
    height: 80px;           /* Header ki height ke barabar */
    display: inline-flex;   /* Behtar alignment ke liye */
    align-items: center;    /* Vertical Center */
    justify-content: center;/* Horizontal Center */
    line-height: 1;         /* Extra space khatam karne ke liye */
    margin: 0;              /* Kisi bhi kism ka margin khatam */
    
    cursor: pointer; 
    transition: 0.3s; 
    text-decoration: none;
    vertical-align: middle;
}
.menu-btn:hover, .menu a:hover { color: var(--primary); }

.has-mega { position: static !important; }

.mega-menu {
    position: absolute; left: 0; right: 0; top: 80px; 
    width: 100%; background: #fff; padding: 40px 10%;
    display: none; 
    flex-direction: row; 
    
    /* --- YE DO LINES ADD/CHANGE KAREIN --- */
    justify-content: flex-start; /* Space-between ki jagah flex-start karein */
    align-items: flex-start;     /* Taake columns niche ki taraf stretch na hon */
    gap: 80px;                   /* Columns ke darmayan barabar fasla dene ke liye */
    /* -------------------------------------- */
    
    box-shadow: var(--shadow); border-top: 1px solid var(--border);
    opacity: 0; transform: translateY(10px);
    transition: 0.3s ease; z-index: 1001; pointer-events: none;
}
@media (min-width: 993px) {
    .has-mega:hover .mega-menu { display: flex; opacity: 1; transform: translateY(0); pointer-events: auto; }
}

.mega-column h4 {
    font-size: 14px; color: var(--dark); margin-bottom: 15px;
    text-transform: uppercase; border-bottom: 2px solid var(--primary);
    display: inline-block; padding-bottom: 5px;
}
.mega-column a { display: block; font-size: 13px; color: var(--text-muted); padding: 6px 0; height: auto; font-weight: 400; text-transform: none; }

/* ================= CART DRAWER (ADDED) ================= */
.cart-drawer {
    position: fixed; right: -100%; top: 0;
    width: 400px; height: 100vh; background: #fff;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2001; display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
}
.cart-drawer.active { right: 0; }

.cart-header { padding: 25px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-footer { padding: 25px; border-top: 1px solid var(--border); }
.checkout-btn { width: 100%; padding: 18px; background: var(--dark); color: #fff; border: none; font-weight: bold; cursor: pointer; }

/* ================= MOBILE VIEW (FIXED) ================= */
@media(max-width: 992px) {
    .hamburger { display: flex; }
    .nav-container { display: none; }

    .menu {
        position: fixed; top: 0; left: -100%; width: 280px; 
        height: 100vh; background: #fff; flex-direction: column;
        padding-top: 80px; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
        display: block; overflow-y: auto; z-index: 999;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    .menu.active { left: 0; }
    
    .menu li { width: 100%; border-bottom: 1px solid #f9f9f9; }
    .menu-btn, .menu a { width: 100%; height: auto; padding: 20px 25px; justify-content: space-between; font-size: 15px; }

    .mega-menu { position: static; display: none; opacity: 1; transform: none; padding: 0 25px 20px 40px; background: #fcfcfc; box-shadow: none; border: none; pointer-events: auto; }
    .has-mega.open .mega-menu { display: block !important; }
    

    .cart-drawer { width: 100%; }
}

.icon-item { cursor: pointer; position: relative; font-size: 22px; }
.cart-count { position: absolute; top: -8px; right: -12px; background: var(--primary); color: #fff; font-size: 10px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
/* Container */
.sizes {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: nowrap;       /* Hamesha ek line */
    overflow-x: auto;        /* Space kam ho to scroll */
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar hide (optional) */
.sizes::-webkit-scrollbar {
    display: none;
}

/* Pill Buttons */
.sizes button {
    flex: 0 0 auto;          /* Shrink na kare */
    padding: 6px 14px;       /* Compact height + thora horizontal space */
    font-size: 13px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 50px;     /* Ye pill shape banata hai */
    cursor: pointer;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
}

/* Hover */
.sizes button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Active */
.sizes button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
/* Mobile Specific (Media Query) */
@media (max-width: 480px) {
    .sizes {
        gap: 8px;
    }
    .sizes button {
        font-size: 14px; /* Mobile par thora chota font */
        padding: 12px 5px; /* Touch karne mein asani ho */
    }
}
/* ===== CART DRAWER ===== */

#cartDrawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: 0.4s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

#cartDrawer.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: #b71c1c;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
}

.cart-item h4 {
    margin: 0 0 5px;
    font-size: 15px;
}

.cart-item p {
    margin: 2px 0;
    font-size: 13px;
    color: #666;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.qty-control button {
    width: 26px;
    height: 26px;
    border: none;
    background: #eee;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.qty-control button:hover {
    background: #d32f2f;
    color: white;
}

.item-total {
    font-weight: bold;
    font-size: 14px;
}
/* ===== MOBILE RESPONSIVE STYLES ===== */

@media screen and (max-width: 768px) {
    #cartDrawer {
        width: 100%;        /* Mobile par full width */
        right: -100%;       /* Hide karne ke liye screen ke bahar */
        border-radius: 0;   /* Mobile par corners remove kar diye taaki clean lage */
    }

    #cartDrawer.active {
        right: 0;
    }

    .cart-header {
        padding: 15px;      /* Thoda space kam kiya mobile ke liye */
        font-size: 18px;
    }

    .cart-items {
        padding: 15px;
    }

    .checkout-btn {
        padding: 16px;      /* Mobile par button bada rakha taaki click karne mein aasani ho */
        font-size: 16px;
    }
}