/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-white: #ffffff;
    --text-main: #1a1a1a;
    --text-grey: #555555;
    --brand-accent: #C0A062; /* Gold */
    --font-main: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --header-height: 80px; 
}

* { box-sizing: border-box; }

/* =========================================
   2. MAIN HEADER LAYOUT
   ========================================= */
.announcement-bar {
    background-color: #1a1a1a;
    color: #ffffff;
    text-align: center;
    font-size: 10px;
    padding: 8px 10px;
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.4;
}

.main-header {
    background: #ffffff;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0; 
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.3s ease;
}

.header-container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%; 
}

.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%; 
}

.header-center {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 20px; 
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.header-right {
    justify-content: flex-end;
    gap: 20px;
}

/* Navigation */
.desktop-menu { display: flex; gap: 25px; height: 100%; align-items: center; }
.nav-link {
    text-decoration: none;
    color: #1a1a1a;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    height: 100%; 
}
.nav-link:hover { color: var(--brand-accent); }

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-width: 250px;
}

.logo-img { 
    display: block;
    width: auto; 
    height: auto;
    max-height: 50px !important;
    max-width: 100%;
    object-fit: contain; 
    margin: 0;
}

/* Icons */
.icon-group { display: flex; align-items: center; gap: 18px; }
.icon-link {
    color: #1a1a1a;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px; 
    width: 40px;
    position: relative;
    cursor: pointer;
}
.icon-link:hover { color: var(--brand-accent); transform: scale(1.05); }

/* Badges */
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.pop-anim { animation: pop 0.3s ease; }

.cart-count, .wishlist-count {
    position: absolute;
    top: 2px; right: 0;
    background: var(--brand-accent);
    color: white;
    font-size: 9px; font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
}
.wishlist-count { background: #1a1a1a; } 

.search-wrapper {
    display: flex; align-items: center;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 2px;
    margin-right: 10px;
}
.search-wrapper input {
    border: none; outline: none;
    font-family: var(--font-main); font-size: 13px; width: 130px;
    background: transparent;
}
.search-wrapper button { background: none; border: none; cursor: pointer; color: #555; padding: 0;}

/* =========================================
   3. MOBILE MENU STYLES (RESPONSIVE)
   ========================================= */
/* Mobile Toggle (Hamburger) */
.mobile-toggle { 
    display: none; /* Hidden on Desktop */
    cursor: pointer; 
    flex-direction: column; 
    gap: 5px; 
    padding: 10px; 
    z-index: 1001;
}
.bar { width: 25px; height: 2px; background: #1a1a1a; transition: 0.3s; }

.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 1100; opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-slide-menu {
    position: fixed; top: 0; left: -100%; /* Hidden by default */
    width: 85%; max-width: 320px; height: 100%;
    background: #ffffff; z-index: 1200; 
    transition: cubic-bezier(0.77, 0, 0.175, 1) 0.4s;
    padding: 25px; 
    display: flex; flex-direction: column;
    box-shadow: 5px 0 20px rgba(0,0,0,0.1);
}
.mobile-slide-menu.active { left: 0; }

.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.mobile-menu-logo { max-height: 40px; width: auto; object-fit: contain; display: block; }

.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; transition: 0.3s; padding: 0;}
.close-btn:hover { transform: rotate(90deg); color: var(--brand-accent); }

.mobile-links { display: flex; flex-direction: column; gap: 5px; }
.mobile-links a { 
    display: block; padding: 12px 0; border-bottom: 1px solid #f5f5f5; 
    text-decoration: none; color: #1a1a1a; font-weight: 600; font-size: 14px; 
    text-transform: uppercase; letter-spacing: 1px;
}
.mobile-links a:last-child { border-bottom: none; }

/* =========================================
   4. SIDE DRAWERS (CART & WISHLIST)
   ========================================= */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1998; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; backdrop-filter: blur(2px); }
.cart-overlay.open { opacity: 1; visibility: visible; }

.side-cart, .side-wishlist { 
    position: fixed; top: 0; right: -100%; 
    width: 100%; max-width: 380px; height: 100vh; 
    background: white; z-index: 1999; 
    box-shadow: -10px 0 30px rgba(0,0,0,0.1); 
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1); 
    display: flex; flex-direction: column; 
}
.side-cart.open, .side-wishlist.open { right: 0; }

.side-cart-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.side-cart-header h3 { margin: 0; font-family: var(--font-serif); font-size: 16px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;}
.close-cart-btn { background: none; border: none; font-size: 20px; cursor: pointer; transition: 0.3s; color: #333; }
.close-cart-btn:hover { transform: rotate(90deg); color: var(--brand-accent); }

.side-cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.empty-cart-msg, .empty-wish-state { text-align: center; color: #999; margin-top: 60px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-wish-state i { font-size: 24px; color: #ccc; }

.cart-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #f9f9f9; padding-bottom: 20px; }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; }
.cart-item-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cart-item-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; display: block; text-transform: uppercase; line-height: 1.3; color: #111; }
.cart-item-price { font-size: 13px; color: #555; font-weight: 600; font-family: var(--font-serif); }

.cart-qty-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn-mini { width: 24px; height: 24px; background: #f4f4f4; border: none; font-size: 14px; font-weight: 600; cursor: pointer; color: #333; display: flex; align-items: center; justify-content: center; border-radius: 2px; transition: 0.2s; }
.qty-btn-mini:hover { background: #e0e0e0; }
.qty-val { font-size: 12px; font-weight: 600; min-width: 20px; text-align: center; color: #111; }
.remove-btn-mini { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 12px; margin-left: auto; padding: 5px; opacity: 0.7; transition: 0.2s; }
.remove-btn-mini:hover { opacity: 1; transform: scale(1.1); }

/* Wishlist Item */
.wish-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #f9f9f9; padding-bottom: 20px; align-items: center; }
.wish-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; }
.wish-details { flex: 1; }
.wish-title { font-size: 12px; font-weight: 700; color: #111; text-decoration: none; text-transform: uppercase; display: block; margin-bottom: 5px; transition: color 0.2s;}
.wish-title:hover { color: var(--brand-accent); }
.wish-price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wish-price { font-size: 12px; font-weight: 600; }
.stock-in { font-size: 9px; color: #27ae60; font-weight: 700; background: #eafaf1; padding: 2px 5px; border-radius: 3px; }
.stock-out { font-size: 9px; color: #e74c3c; font-weight: 700; background: #fdeded; padding: 2px 5px; border-radius: 3px; }

.wish-actions { display: flex; gap: 10px; }
.wish-cart-btn { background: #111; color: white; border: none; font-size: 10px; padding: 6px 12px; cursor: pointer; font-weight: 700; border-radius: 2px; flex: 1; transition: background 0.3s; }
.wish-cart-btn:hover { background: var(--brand-accent); }
.wish-notify-btn { background: #f4f4f4; color: #888; border: none; font-size: 10px; padding: 6px 12px; cursor: default; font-weight: 600; border-radius: 2px; flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; }
.wish-remove { background: none; border: 1px solid #eee; color: #999; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; }
.wish-remove:hover { color: #e74c3c; border-color: #e74c3c; }

.side-cart-footer { padding: 25px 20px; border-top: 1px solid #eee; background: #fdfdfd; }
.subtotal { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 20px; font-size: 14px; letter-spacing: 1px; color: #111; }
.checkout-btn { display: block; width: 100%; background: #111; color: white; text-align: center; padding: 14px; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; font-size: 12px; border: none; cursor: pointer; }
.checkout-btn:hover { background: var(--brand-accent); letter-spacing: 3px; }

/* :::: RESPONSIVE MEDIA QUERIES :::: */

/* Tablet (iPad, < 991px) */
@media (max-width: 991px) {
    .desktop-menu, .desktop-search, .search-wrapper { display: none; }
    .mobile-toggle { display: flex; }
    
    .header-container { width: 100%; padding: 0 15px; }
    .main-header { height: 60px; /* Compact header */ }
    
    .header-left { justify-content: flex-start; flex: 0 0 50px; }
    .header-right { justify-content: flex-end; flex: 0 0 auto; gap: 15px; }
    .header-center { flex: 1; padding: 0; }
    
    .logo-img { max-height: 35px !important; width: auto !important; transform: none !important; }
    .icon-link { font-size: 20px; width: 30px; }
    
    .side-cart, .side-wishlist { width: 100%; max-width: 100%; right: -100%; }
}

/* Mobile (iPhone, < 480px) */
@media (max-width: 480px) {
    .main-header { height: 55px; }
    .logo-img { max-height: 30px !important; }
    .icon-group { gap: 12px; }
    .icon-link { font-size: 18px; width: 25px; }
    .announcement-bar { font-size: 9px; padding: 6px; }

    /* ============ MOBILE LOGO CENTERING FIX ============ */
    .header-container {
        position: relative; /* Allows absolute positioning inside */
    }
    .header-center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        padding: 0;
        margin: 0;
        z-index: 10;
        flex: 0 0 auto;
    }

    /* :::: NEW: MOBILE LOGO OVERRIDES (LEFT/RIGHT) :::: */
    
    /* 1. LEFT ALIGNMENT */
    .header-center.mob-logo-left {
        left: 50px; /* Offset for hamburger */
        right: auto;
        transform: translateY(-50%);
        justify-content: flex-start;
        padding-left: 10px; /* Slight buffer from menu icon */
    }

    /* 2. RIGHT ALIGNMENT */
    /* Note: Can overlap with icons if too wide, use caution */
    .header-center.mob-logo-right {
        left: auto;
        right: 80px; /* Offset for cart/wishlist/profile icons */
        transform: translateY(-50%);
        justify-content: flex-end;
        padding-right: 10px;
    }
}