/* Global Reset for Header */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* =========================================
   TOP BAR
   ========================================= */

.top-bar {
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    padding: 12px 0 !important;
    position: relative;
    z-index: 1001;
    display: block !important;
}

.top-bar .container {
    max-width: 1440px !important;
    /* Match home.html */
    margin: 0 auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    /* Enforce standardized header padding */
    padding: 0 16px !important;
    position: relative !important;
}

.top-center-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    text-align: center;
}

.shop-now-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 5px;
}

.lang-selector {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   MAIN HEADER
   ========================================= */
.main-header {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    top: 0;
    margin-top: 0;
    z-index: 10;
    height: auto;
    /* Allow auto height */
    padding: 20px 0;
    /* Vertical padding */
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1440px !important;
    /* Match home.html */
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    /* Enforce standardized header padding */
    padding: 0 16px !important;
}

/* Logo */
.logo {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* Navigation Menu (Desktop) */
.nav-menu {
    display: flex;
    gap: 48px;
}

/* Navigation Links */
.nav-link {
    color: #000000;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    text-decoration: underline;
    text-underline-offset: 4px;
    /* font-weight: 500; - Optional */
}

/* Icons Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Search Box (Desktop) */
.search-box-container {
    position: relative;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    width: 243px;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12px;
    width: 100%;
    color: #000;
}

.search-input::placeholder {
    color: #7d8184;
    opacity: 1;
}

.search-icon-btn {
    color: #000;
    cursor: pointer;
    font-size: 16px;
}

/* 🔍 Search Suggestions Dropdown */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 1005;
    display: none;
    overflow: hidden;
    animation: slideDown 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-suggestions-dropdown.active {
    display: block;
}

.suggestion-section {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-title {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

/* Brands Section */
.brand-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brand-chip {
    background: #f0edff;
    color: #6347ff;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s;
}

.brand-chip:hover {
    background: #e1dbff;
    transform: scale(1.05);
}

/* Product Suggestions */
.product-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none !important;
    transition: background 0.2s;
}

.product-suggestion-item:hover {
    background: #fafafa;
}

.suggestion-thumb {
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    border-radius: 8px;
    object-fit: cover;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggestion-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.suggestion-price {
    font-size: 13px;
    font-weight: 700;
    color: #008a5b; /* Modern Green */
}

/* Bottom Action Bar */
.see-all-results {
    background: #1a1a1a;
    color: #fff;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s;
}

.see-all-results:hover {
    background: #000;
}

.see-all-results i {
    font-size: 12px;
}

/* Hide mobile search icon on desktop */
.mobile-search-icon {
    display: none;
}

/* Header Icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon-link {
    color: #000000;
    font-size: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Ensure badge is positioned relative to icon */
}

.icon-badge {
    position: absolute;
    top: -5px;
    right: -8px; /* Standard adjustment for cart */
    background-color: #db4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    z-index: 10;
}

/* Wishlist specific badge positioning shift if needed */
.nav-icon-link[href="wishlist.html"] .icon-badge {
    right: -5px;
}

/* Red User Icon */
.user-icon-red {
    background-color: #db4444;
    color: #ffffff !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.3s;
}

.user-icon-red:hover {
    background-color: #c13e3e;
}

/* User Icon Button (Reset default button styles) */
.user-icon-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}

.user-icon-btn i {
    font-size: 20px; /* Match other icons */
    color: #000;
}

.user-icon-btn:hover i {
    color: #db4444; /* Match hover effect */
}

/* Mobile Toggle (Hidden on Desktop) */
.menu-icon, .mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
}

/* Mobile Search Icon & Inline Search Tracker (Hidden on Desktop) */
.mobile-search-trigger, .mobile-inline-search {
    display: none;
}

/* User Dropdown */
.user-dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    /* 10px gap below icon */
    right: 0;
    background: #fff;
    /* faint blur black backdrop */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 10px 0;
    border-radius: 6px;
    z-index: 1002;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.dropdown-menu i {
    font-size: 16px;
    width: 20px;
    /* Fixed width for alignment */
    text-align: center;
}

/* =========================================
   RESPONSIVE STYLES
   ========================================= */

/* Hide mobile search bar by default on desktop */
.mobile-search-bar {
    display: none;
}

/* Tablet (768px - 1199px) */
@media (max-width: 1200px) {

    .nav-container,
    .top-bar .container {
        padding: 0 32px;
        /* Standard Tablet Padding */
    }
}

/* Mobile (max-width: 767px) */
/* Mobile (max-width: 767px) */
/* Mobile (max-width: 767px) */
@media (max-width: 767px) {

    .nav-container,
    .top-bar .container {
        padding: 0 16px;
        /* Balanced Mobile Padding */
    }

    /* Top Bar adjustments */
    .top-bar {
        justify-content: center;
        height: auto !important;
        /* Allow growing */
        min-height: 48px;
    }

    .top-bar .container {
        justify-content: center;
        flex-wrap: nowrap;
        /* Prevent wrapping if possible, or handle overflow */
    }

    .top-center-text {
        position: static;
        transform: none;
        text-align: center;
        font-size: 10px;
        /* Reduced font size for mobile fit */
        white-space: normal !important;
        /* Allow wrapping */
        width: 100%;
        overflow: visible;
        text-overflow: clip;
        height: auto;
        padding: 4px 0;
        line-height: 1.4;
    }

    .lang-selector {
        display: none;
    }

    /* Main Header Mobile Layout */
    .main-header {
        height: 60px;
        position: relative;
        /* Ensure z-index works */
        overflow: visible;
        /* Allow dropdowns */
    }

    .nav-container {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* Hamburger Left, Icons Right */
        position: relative;
        /* For absolute logo */
    }

    /* 1. Toggle Left */
    .menu-icon, .mobile-toggle {
        display: flex;
        align-items: center;
        background: none;
        border: none;
        font-size: 20px;
        /* Reduced size */
        color: #000;
        cursor: pointer;
        z-index: 20;
        /* Above logo if needed, but should be far left */
        order: 1;
    }

    /* 2. Logo Center */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 22px;
        /* Optimized for Mobile */
        font-weight: 700;
        z-index: 10;
        white-space: nowrap;
        order: 2;
        /* Visual order doesn't matter with absolute, but good for logic */
    }

    @media (max-width: 360px) {
        .logo {
            font-size: 18px;
            /* Further reduce for very small screens */
        }
    }

    /* 3. Icons Right */
    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        order: 3;
        z-index: 20;
        /* Ensure clickable */
    }

    .nav-icons {
        display: flex;
        align-items: center;
        gap: 8px;
        /* Reduced gap to 8px */
    }

    .nav-icons a,
    .nav-icons i {
        font-size: 16px;
        /* Reduced icon size to 16px */
        display: flex;
        align-items: center;
    }

    /* Ensure User Icon Size */
    .user-icon-red {
        width: 24px;
        /* Reduced to 24px */
        height: 24px;
        font-size: 12px;
    }

    /* Hide Desktop Search and Search Box */
    .search-box-container {
        display: none;
    }

    /* Hide Mobile Search Trigger */
    .mobile-search-trigger {
        display: none !important;
    }
    
    /* Ensure search icon is visible on mobile */
    .mobile-search-icon {
        display: flex !important;
    }

    /* Hide Wishlist on Mobile to prevent collision */
    /* Wishlist enabled on Mobile */
    .nav-icons a[href="wishlist.html"] {
        display: flex;
    }

    /* Tighter Mobile Spacing */
    .nav-icons {
        gap: 16px;
        /* Uniform spacing per requirements */
    }

    .nav-icons a,
    .nav-icons i {
        font-size: 15px;
        /* Unified reduced size */
    }

    .logo {
        max-width: none;
        /* Prevent wide logo pushing icons */
        overflow: visible;
        text-overflow: clip;
    }

    /* Mobile Dropdown Navigation */
    .nav-dropdown {
        display: none;
        position: absolute;
        top: 100%; /* always below header */
        left: 0;
        width: 100%;
        background: white;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        padding: 10px 20px;
        z-index: 10;
    }

    .nav-dropdown.show {
        display: block;
    }

    .nav-dropdown a {
        display: block;
        width: 100%;
        padding: 15px 0;
        text-align: left;
        font-weight: 500;
        font-size: 16px;
        letter-spacing: 0.2px;
        color: #000;
        text-transform: capitalize;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .nav-dropdown.show a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-link.active {
        font-weight: 700;
        text-underline-offset: 4px;
        text-decoration: underline;
    }

    /* Target modal search styling */
    .mobile-inline-search {
        display: block;
        width: 100%;
        padding: 10px 0 20px 0;
        border-bottom: 1px solid #eee;
        margin-bottom: 10px;
    }

    .mobile-inline-search-form {
        display: flex;
        align-items: center;
        background: #f5f5f5;
        border-radius: 50px;
        padding: 10px 20px;
    }

    .mobile-inline-search-input {
        flex: 1;
        border: none;
        background: transparent;
        outline: none;
        font-size: 14px;
        color: #333;
    }

    .mobile-inline-search-btn {
        background: none;
        border: none;
        color: #000;
        font-size: 16px;
        cursor: pointer;
        padding-left: 10px;
    }

    /* 
     * MOBILE SEARCH BAR STYLES (Injected via JS)
     */
    .mobile-search-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: #fff;
        z-index: 2005;
        display: flex;
        align-items: center;
        padding: 0 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid #eee;
    }

    .mobile-search-bar.active {
        transform: translateY(0);
    }

    .mobile-search-form {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-search-input {
        flex: 1;
        border: none;
        outline: none;
        font-size: 15px;
        font-weight: 500;
        padding: 10px 0;
        font-family: 'Inter', sans-serif;
        color: #000;
    }

    .mobile-search-input::placeholder {
        color: #999;
    }

    .mobile-search-icons {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .mobile-search-submit,
    .mobile-search-close {
        background: none;
        border: none;
        font-size: 18px;
        color: #333;
        cursor: pointer;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-search-close {
        color: #666;
    }

    /* Mobile Suggestions Dropdown Positioning */
    .mobile-search-bar ~ #searchSuggestions {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        height: auto;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        z-index: 2004;
    }

    .mobile-search-bar.active ~ #searchSuggestions.active {
        display: block;
    }
}

/* DESKTOP SAFETY */
@media (min-width: 768px) {
    .menu-icon, .mobile-toggle {
        display: none !important;
    }

    .nav-dropdown {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        background: transparent;
        flex-direction: row;
        padding: 0;
        gap: 48px;
    }
    
    .nav-dropdown a {
        opacity: 1;
        transform: none;
        padding: 0;
        display: inline-block;
        width: auto;
    }
}

/* =========================================================
   GLOBAL PAGE CONTENT & WISHLIST LAYOUT FIXES
   ========================================================= */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

.main-content > *:first-child {
    margin-top: 20px;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.wishlist-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.empty-wishlist {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* =========================================================
   PREMIUM UI ANIMATIONS
   ========================================================= */

/* 1. Global Smooth Page Transition (Layered Fade + Blur) */
body {
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

body.loaded {
  opacity: 1 !important;
  filter: none !important;
}

/* 3. Product Card 3D Hover Effect */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.product-card:hover {
  transform: rotateX(5deg) rotateY(-5deg) scale(1.03);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* 4. Button Click Animation */
button:active {
  transform: scale(0.95);
}

/* 5. Scroll-Based Reveal (Stagger) */
.reveal, .fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.reveal.show, .fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* 6. Smooth Modal Animation */
.modal {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
  pointer-events: none;
}

.modal.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.modal-content {
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* 7. Image Hover Zoom + Parallax */
.product-card img {
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.15);
}

/* 8. Loader Animation */
#loader {
  position: fixed;
  inset: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 9. Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #eee, #ddd, #eee);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
