/* ==========================================================================
   PRODUCTION MODERN DESIGN TOKENS
   ========================================================================== */
:root {
    --brand-primary: #2563eb;
    --brand-dark: #0f172a;
    --brand-light: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-pill: 50px;
    --radius-card: 16px;
    --radius-inner: 8px;
    --shadow-soft: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-header: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f1f5f9;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   NAVIGATION LAYER (Desktop Mega Menu & Mobile Drawer)
   ========================================================================== */
.main-header {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-header);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-logo { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); text-decoration: none; }
.brand-logo span { color: var(--brand-primary); }

/* Unified Desktop Navigation Menu */
.desktop-menu { display: flex; gap: 2rem; list-style: none; align-items: center; }
.menu-item { position: relative; padding: 0.5rem 0; }
.menu-link { font-weight: 600; color: var(--text-primary); text-decoration: none; font-size: 0.95rem; cursor: pointer; }
.menu-link:hover { color: var(--brand-primary); }

/* Mega Menu Dropdown Blueprint */
.mega-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 600px;
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}
.menu-item:hover .mega-menu-wrapper {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.mega-column h4 { font-size: 0.9rem; color: var(--brand-dark); margin-bottom: 0.75rem; border-bottom: 2px solid var(--border); padding-bottom: 0.25rem; }
.mega-column a { display: block; font-size: 0.85rem; color: var(--text-muted); text-decoration: none; margin-bottom: 0.5rem; }
.mega-column a:hover { color: var(--brand-primary); }

/* Mobile Menu Controls */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.75rem; cursor: pointer; color: var(--brand-dark); }
.mobile-drawer {
    position: fixed; top: 0; left: -100%; width: 85%; max-width: 320px; height: 100vh;
    background: var(--surface); z-index: 2000; box-shadow: var(--shadow-soft);
    padding: 2rem 1.5rem; transition: var(--transition-smooth); display: flex; flex-direction: column; gap: 1.5rem;
}
.mobile-drawer.active { left: 0; }
.drawer-close { align-self: flex-end; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 1.25rem; list-style: none; }
.backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15,23,42,0.4); z-index: 1999; display: none; }
.backdrop.active { display: block; }

/* ==========================================================================
   HERO SLIDER COMPONENT
   ========================================================================== */
.slider-viewport {
    width: 100%; max-width: 1400px; margin: 1.5rem auto; padding: 0 1rem; position: relative; overflow: hidden;
}
.slider-container { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); width: 100%; }
.slide { min-width: 100%; width: 100%; border-radius: var(--radius-card); background-size: cover; background-position: center; display: flex; align-items: center; padding: 4rem 3rem; min-height: 400px; color: white; position: relative; overflow: hidden; }
.slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.3) 100%); z-index: 1; }
.slide-content { position: relative; z-index: 2; max-width: 600px; }
.slide-content h2 { font-size: 2.75rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.slide-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 1.5rem; }
.slide-btn { background: var(--brand-primary); color: white; border: none; padding: 0.75rem 1.75rem; border-radius: var(--radius-pill); font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: var(--transition-smooth); }
.slide-btn:hover { background: #1d4ed8; transform: translateY(-2px); }
.slider-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); border: none; width: 45px; height: 45px; border-radius: 50%; color: white; font-size: 1.25rem; cursor: pointer; z-index: 10; backdrop-filter: blur(8px); transition: var(--transition-smooth); }
.slider-nav-btn:hover { background: var(--surface); color: var(--brand-dark); }
.prev-btn { left: 25px; } .next-btn { right: 25px; }

/* ==========================================================================
   UNIFIED INTERACTIVE SEARCH FILTERS
   ========================================================================== */
.search-hub { max-width: 900px; margin: -2.5rem auto 3rem auto; padding: 0 1rem; position: relative; z-index: 20; }
.search-bar-card {
    background: var(--surface); padding: 0.75rem; border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft); display: flex; gap: 0.5rem; align-items: center; border: 1px solid var(--border);
}
.search-input-group { flex: 1; display: flex; align-items: center; padding: 0 1rem; border-right: 1px solid var(--border); }
.search-input-group input { width: 100%; border: none; outline: none; font-size: 1rem; color: var(--text-primary); }
.select-group { display: flex; align-items: center; padding: 0 1rem; background: transparent; }
.select-group select { border: none; outline: none; font-size: 0.95rem; color: var(--text-primary); font-weight: 600; background: transparent; cursor: pointer; padding-right: 1rem; }
.search-submit-btn { background: var(--brand-primary); color: white; border: none; height: 48px; padding: 0 2rem; border-radius: var(--radius-pill); font-weight: 600; cursor: pointer; transition: var(--transition-smooth); }
.search-submit-btn:hover { background: #1d4ed8; }

/* Horizontal Scrollable Categories */
.category-scroller { max-width: 1400px; margin: 0 auto 3rem auto; padding: 0 1.5rem; }
.scroller-title { font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 1rem; }
.category-flex-container { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.75rem; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.category-flex-container::-webkit-scrollbar { height: 6px; }
.category-flex-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.category-chip { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); padding: 0.6rem 1.25rem; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: var(--transition-smooth); }
.category-chip.active, .category-chip:hover { background: var(--brand-dark); color: white; border-color: var(--brand-dark); }

/* ==========================================================================
   PRODUCT & MEDIA CATALOG GRID LAYOUT
   ========================================================================== */
.catalog-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem 4rem 1.5rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.product-card { background: var(--surface); border-radius: var(--radius-card); border: 1px solid var(--border); overflow: hidden; transition: var(--transition-smooth); display: flex; flex-direction: column; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.product-media-container { width: 100%; height: 200px; background: #e2e8f0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-media-container img { width: 100%; height: 100%; object-fit: cover; }
.category-badge { position: absolute; top: 12px; left: 12px; background: rgba(15, 23, 42, 0.75); color: white; padding: 0.25rem 0.75rem; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 700; backdrop-filter: blur(4px); }
.product-details { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.product-details h3 { font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); line-height: 1.3; }
.product-meta-text { font-size: 0.85rem; color: var(--text-muted); margin-top: -0.5rem; }
.product-action-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-size: 1.25rem; font-weight: 800; color: var(--brand-primary); }
.action-btn { background: #eff6ff; color: var(--brand-primary); border: none; padding: 0.5rem 1rem; border-radius: var(--radius-inner); font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: var(--transition-smooth); }
.action-btn:hover { background: var(--brand-primary); color: white; }

/* ==========================================================================
   MOBILE MEDIA QUERY LAYOUT REWRITES
   ========================================================================== */
@media (max-width: 991px) {
    .desktop-menu { display: none; }
    .mobile-toggle { display: block; }
    .slide { padding: 3rem 1.5rem; min-height: 320px; }
    .slide-content h2 { font-size: 2rem; }
    .search-bar-card { border-radius: 24px; padding: 1rem; flex-direction: column; width: 100%; }
    .search-input-group { border-right: none; border-bottom: 1px solid var(--border); width: 100%; padding: 0.5rem 0; }
    .select-group { width: 100%; padding: 0.5rem 0; }
    .search-submit-btn { width: 100%; border-radius: var(--radius-inner); }
    .search-hub { margin-top: 1.5rem; }
}