/* =============================================================
   TechZone BD — Custom Stylesheet
   Bootstrap 5.3 + Custom CSS
   Mobile-first, modern e-commerce design
============================================================= */

:root {
    --primary:       #1d4ed8;
    --primary-dark:  #1e3a8a;
    --primary-light: #dbeafe;
    --accent:        #f97316;
    --accent-dark:   #ea580c;
    --success:       #16a34a;
    --danger:        #dc2626;
    --warning:       #d97706;
    --dark:          #0f172a;
    --gray-900:      #111827;
    --gray-800:      #1f2937;
    --gray-700:      #374151;
    --gray-600:      #4b5563;
    --gray-400:      #9ca3af;
    --gray-200:      #e5e7eb;
    --gray-100:      #f3f4f6;
    --gray-50:       #f9fafb;
    --white:         #ffffff;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
    --shadow-xl: 0 20px 50px rgba(0,0,0,.15);
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------------------
   BASE
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* ----------------------------------------------------------------
   TOPBAR
---------------------------------------------------------------- */
.topbar {
    background: var(--gray-900);
    color: var(--gray-400);
    font-size: .78rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--gray-800);
}

.topbar-link {
    color: var(--gray-400);
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
    transition: color var(--transition);
}
.topbar-link:hover { color: var(--white); }

.topbar-divider { color: var(--gray-700); font-size: .7rem; }
.topbar-text { color: var(--gray-500, #6b7280); font-size: .78rem; display: flex; align-items: center; gap: .3rem; }

.social-link {
    color: var(--gray-400);
    font-size: .9rem;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
}
.social-link:hover { color: var(--white); background: var(--primary); }

/* ----------------------------------------------------------------
   ANNOUNCEMENT BAR
---------------------------------------------------------------- */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary) 50%, var(--primary-dark));
    color: var(--white);
    font-size: .8rem;
    padding: .45rem 0;
    overflow: hidden;
    width: 100%;
}

.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    /* single flex row ensures both original and cloned spans stay on one line */
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

/* All spans rendered inline; JS appends duplicate spans inside same <p> */
.marquee-text {
    display: flex;
    flex-shrink: 0;
    gap: 0;
    animation: marquee 32s linear infinite;
    white-space: nowrap;
    min-width: max-content;
}

.marquee-text span {
    padding: 0 2.5rem;
    font-weight: 500;
    opacity: .92;
}

/* Scrolls exactly one copy of the text (the clone creates the seamless loop) */
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Pause on hover */
.announcement-bar:hover .marquee-text { animation-play-state: paused; }

/* ----------------------------------------------------------------
   HEADER
---------------------------------------------------------------- */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    z-index: 1040;
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.12); }

/* Logo */
.logo-link { display: flex; align-items: center; }

.logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

/* Header brand mark: same box on every screen so the image cannot blow up the bar */
.site-header .header-logo-img {
    display: block;
    width: auto;
    height: 68px;
    max-width: 180px;
    object-fit: contain;
    object-position: left center;
}

.logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -.5px;
}
.logo-accent { color: var(--primary); }

/* Search */
.search-col { min-width: 0; }

.search-form { width: 100%; max-width: 680px; }

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 50px;
    overflow: hidden;
    transition: all var(--transition);
}
.search-wrapper:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}

/* Remove leftover category select styles */
.search-category, .search-divider { display: none; }

/* Search wrapper fills full width now that select is gone */
.search-wrapper { border-radius: 50px; }

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: .6rem 1rem;
    font-size: .88rem;
    color: var(--gray-800);
    outline: none;
    min-width: 0;
}
.search-input::placeholder { color: var(--gray-400); }

.search-btn {
    flex-shrink: 0;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: .6rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.search-btn:hover { background: var(--primary-dark); }

/* Header Actions */
.header-actions { gap: .5rem !important; }

.header-action-btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .75rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: .82rem;
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.header-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}
.header-action-btn i { font-size: 1.2rem; }

.btn-label {
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.1;
    display: block;
}

.cart-total {
    display: block;
    font-weight: 700;
    font-size: .82rem;
    color: var(--primary);
}

.action-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--accent);
    color: var(--white);
    font-size: .6rem;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.cart-btn {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}
.cart-btn:hover { background: var(--primary); color: var(--white); }

/* Header row column order — keeps the hamburger trailing (its original spot)
   on tablet/desktop even though it's now the first element in the DOM;
   the 767.98px query below flips it to a mobile-app-style layout. */
.mobile-logo-col     { order: 1; }
.search-col          { order: 2; }
.header-actions-col  { order: 3; }
.mobile-menu-col     { order: 4; }

/* ----------------------------------------------------------------
   MOBILE SEARCH — animated slide-down
---------------------------------------------------------------- */
.mobile-search-bar {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .28s ease, opacity .22s ease, padding .28s ease;
    padding: 0;
}
.mobile-search-bar.open {
    max-height: 80px;
    opacity: 1;
    padding-bottom: .75rem;
}

.navbar-toggler-custom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px; height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 6px;
    transition: background var(--transition);
}
.navbar-toggler-custom:hover { background: var(--primary-light); }
.toggler-icon {
    display: block;
    width: 20px; height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition);
}
.navbar-toggler-custom.active .toggler-icon:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar-toggler-custom.active .toggler-icon:nth-child(2) { opacity: 0; }
.navbar-toggler-custom.active .toggler-icon:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ----------------------------------------------------------------
   MAIN NAV
---------------------------------------------------------------- */
.main-nav {
    background: var(--primary-dark);
    border-top: 1px solid rgba(255,255,255,.08);
}

/* Fill the full container width so nav doesn't bunch left */
.nav-inner {
    gap: 0 !important;
    width: 100%;
}

/* Categories Trigger Button */
.categories-trigger {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 0;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition);
    min-width: 200px;
}
.categories-trigger:hover, .categories-trigger[aria-expanded="true"] {
    background: var(--accent-dark);
    color: var(--white);
}
.categories-trigger .bi-chevron-down {
    margin-left: auto;
    font-size: .7rem;
    transition: transform var(--transition);
}
.categories-trigger[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

/* Mega Menu */
.mega-menu {
    width: min(900px, 95vw);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
    margin-top: 0 !important;
    top: 100% !important;
}

.mega-sidebar {
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
}

.mega-sidebar-list li {
    border-bottom: 1px solid var(--gray-200);
}

.mega-sidebar-list li a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1.1rem;
    font-size: .84rem;
    color: var(--gray-700);
    transition: all var(--transition);
}
.mega-sidebar-list li:hover a,
.mega-sidebar-list li.active a {
    background: var(--primary);
    color: var(--white);
}

.mega-content { padding: 1.25rem; background: var(--white); }

.mega-panel { display: none; }
.mega-panel.active { display: block; }

.mega-panel-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary-light);
}

.mega-sub-title {
    font-size: .76rem;
    font-weight: 700;
    color: var(--gray-500, #6b7280);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .5rem;
}

.mega-links li a {
    display: block;
    font-size: .83rem;
    color: var(--gray-700);
    padding: .2rem 0;
    transition: color var(--transition);
}
.mega-links li a:hover { color: var(--primary); }

.mega-promo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    text-align: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: .82rem;
    transition: all var(--transition);
    height: 100%;
    min-height: 120px;
}
.mega-promo-card i { font-size: 2rem; }
.mega-promo-card strong { font-size: .9rem; }
.mega-promo-card span { font-size: .76rem; opacity: .8; }
.mega-promo-card:hover { background: var(--primary); color: var(--white); }

/* Main Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-links li { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .75rem .9rem;
    font-size: .84rem;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,.12);
}
.nav-link.nav-link-offer { color: #fcd34d; }
.nav-link.nav-link-offer:hover { color: var(--white); background: rgba(249,115,22,.2); }
.nav-link.nav-link-builder { color: #86efac; }
.nav-link.nav-link-builder:hover { color: var(--white); background: rgba(22,163,74,.2); }

/* Nav Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: .5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition);
    z-index: 100;
    border: 1px solid var(--gray-200);
}
.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown li a {
    display: block;
    padding: .5rem 1rem;
    font-size: .84rem;
    color: var(--gray-700);
    transition: all var(--transition);
}
.nav-dropdown li a:hover { background: var(--primary-light); color: var(--primary); }

/* ----------------------------------------------------------------
   MOBILE NAV
---------------------------------------------------------------- */
.mobile-nav {
    position: fixed;
    top: 0; left: -300px;
    width: 300px; height: 100vh;
    background: var(--white);
    z-index: 2000;
    overflow-y: auto;
    transition: left .3s ease;
    box-shadow: var(--shadow-xl);
}
.mobile-nav.open { left: 0; }

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--primary-dark);
    color: var(--white);
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: .25rem;
    display: flex; align-items: center;
}

.mobile-nav-list li a,
.mobile-nav-toggle {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
    color: var(--gray-800);
    width: 100%;
    background: none;
    border-left: none; border-right: none; border-top: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}
.mobile-nav-list li a:hover, .mobile-nav-toggle:hover { background: var(--gray-50); color: var(--primary); }
.mobile-nav-toggle .bi-chevron-down { margin-left: auto; transition: transform var(--transition); }
.mobile-nav-toggle.open .bi-chevron-down { transform: rotate(180deg); }

.mobile-sub-list { display: none; background: var(--gray-50); }
.mobile-sub-list.open { display: block; }
.mobile-sub-list li a {
    padding-left: 2.5rem;
    font-size: .85rem;
    border-bottom-color: var(--gray-200);
}

.mobile-nav-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: auto;
}
.mobile-nav-footer a {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    color: var(--gray-700);
    padding: .4rem 0;
}

/* ----------------------------------------------------------------
   HERO SECTION
---------------------------------------------------------------- */
.hero-section {
    background: var(--gray-100);
    padding: 1.25rem 0;
}

.hero-swiper {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-slide {
    display: block;
    padding: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.hero-slide img {
    display: block;
    width: 100%;
    height: auto;
}

.slide-gaming {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: var(--white);
}

.slide-laptop {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #1e40af 100%);
    color: var(--white);
}

.slide-build {
    background: linear-gradient(135deg, #14532d 0%, #15803d 50%, #166534 100%);
    color: var(--white);
}

.slide-content {
    flex: 1;
    z-index: 2;
    max-width: 55%;
}

.slide-badge {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--white);
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .75rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.sale-badge { background: #ef4444; }

.slide-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: .75rem;
}

.slide-subtitle {
    font-size: .9rem;
    opacity: .8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.slide-price {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    margin-bottom: 1.25rem;
}
.price-from { font-size: .8rem; opacity: .7; }
.price-value { font-size: 1.6rem; font-weight: 800; color: #fcd34d; }

.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--white);
    color: var(--primary-dark);
    padding: .7rem 1.5rem;
    border-radius: 50px;
    font-size: .88rem;
    font-weight: 700;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.slide-btn:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.slide-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.slide-img-placeholder {
    width: clamp(100px, 18vw, 220px);
    height: clamp(100px, 18vw, 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 8vw, 7rem);
    opacity: .18;
    color: var(--white);
}

/* Swiper controls */
.hero-prev, .hero-next,
.cat-prev, .cat-next,
.flash-prev, .flash-next,
.latest-prev, .latest-next {
    --swiper-navigation-size: 16px;
    width: 36px !important; height: 36px !important;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    color: var(--primary) !important;
    transition: all var(--transition);
    border: 2px solid var(--gray-200);
}
.hero-prev:hover, .hero-next:hover,
.cat-prev:hover, .cat-next:hover,
.flash-prev:hover, .flash-next:hover,
.latest-prev:hover, .latest-next:hover {
    background: var(--primary);
    color: var(--white) !important;
    border-color: var(--primary);
}
.swiper-button-disabled { opacity: .35 !important; }

.hero-pagination {
    --swiper-pagination-bullet-inactive-color: rgba(255,255,255,.4);
    --swiper-pagination-color: var(--white);
    --swiper-pagination-bullet-size: 8px;
}

/* Side Banners */
.side-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: transform var(--transition);
    color: var(--white);
}
.side-banner:hover { transform: translateY(-3px); }

.side-banner-mobile {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
}
.side-banner-offer {
    background: linear-gradient(135deg, #b45309, #f97316);
    display: block;
    padding: 0;
}

.side-banner-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
}

.side-banner-content { z-index: 2; }
.side-badge {
    display: inline-block;
    background: rgba(255,255,255,.25);
    color: var(--white);
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 50px;
    margin-bottom: .5rem;
    text-transform: uppercase;
}
.offer-badge { background: #ef4444; }

.side-banner h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .25rem;
    color: var(--white);
}

.side-banner p {
    font-size: .8rem;
    opacity: .85;
    margin-bottom: .75rem;
    color: rgba(255,255,255,.9);
}

.side-link {
    font-size: .8rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.side-banner-icon {
    font-size: 4rem;
    opacity: .18;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* ----------------------------------------------------------------
   FEATURES STRIP
---------------------------------------------------------------- */
.features-strip {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: .75rem 0;
}

.features-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 1;
    min-width: 160px;
    padding: .4rem;
}

.feature-icon {
    width: 40px; height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.feature-text strong { display: block; font-size: .82rem; font-weight: 700; color: var(--gray-800); }
.feature-text span { font-size: .75rem; color: var(--gray-500, #6b7280); }

.feature-divider { width: 1px; height: 36px; background: var(--gray-200); flex-shrink: 0; }

/* ----------------------------------------------------------------
   SECTION COMMONS
---------------------------------------------------------------- */
/* Ensure flex headers always push 'View All' to the right edge */
.section-header {
    width: 100%;
}

.section-title {
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: .25rem;
    letter-spacing: -.3px;
}

.section-subtitle {
    font-size: .85rem;
    color: var(--gray-500, #6b7280);
    margin-bottom: 0;
}

.section-view-all {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .83rem;
    font-weight: 600;
    color: var(--primary);
    padding: .45rem .9rem;
    border: 2px solid var(--primary-light);
    border-radius: 50px;
    transition: all var(--transition);
    white-space: nowrap;
}
.section-view-all:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ----------------------------------------------------------------
   TOP CATEGORIES — responsive multi-line grid
---------------------------------------------------------------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

@media (max-width: 1199.98px) { .categories-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 991.98px)  { .categories-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 767.98px)  { .categories-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
@media (max-width: 479px)     { .categories-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; } }

/* CATEGORY SWIPER — keep styles for card but remove old swiper padding rules */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.25rem .75rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(29,78,216,.12);
    transform: translateY(-4px);
    color: var(--primary);
}

.cat-icon-wrap {
    width: 56px; height: 56px;
    background: color-mix(in srgb, var(--cat-color) 12%, transparent);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: var(--cat-color);
    transition: all var(--transition);
}
.category-card:hover .cat-icon-wrap {
    background: var(--cat-color);
    color: var(--white);
}

.cat-name {
    font-size: .82rem;
    font-weight: 700;
    color: var(--gray-800);
}
.cat-count {
    font-size: .72rem;
    color: var(--gray-400);
}

/* ----------------------------------------------------------------
   FLASH SALE
---------------------------------------------------------------- */
.section-flash-sale {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    position: relative;
    overflow: hidden;
}
.section-flash-sale::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(239,68,68,.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(249,115,22,.1) 0%, transparent 60%);
}

.flash-icon {
    width: 48px; height: 48px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
    animation: pulse-icon 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius);
    padding: .4rem .8rem;
}

.countdown-unit { display: flex; flex-direction: column; align-items: center; min-width: 34px; }

.countdown-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fcd34d;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label { font-size: .62rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .5px; }
.countdown-sep { font-size: 1.2rem; font-weight: 800; color: rgba(255,255,255,.5); align-self: flex-start; padding-top: .1rem; }

.flash-swiper { padding: .5rem .25rem 1.5rem !important; overflow: visible !important; }

/* ----------------------------------------------------------------
   PRODUCT CARD — redesigned
---------------------------------------------------------------- */
.product-card {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(29,78,216,.14);
    transform: translateY(-5px);
}

/* --- Badges (top-left) --- */
.product-badges {
    position: absolute;
    top: .6rem;
    left: .6rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    z-index: 3;
}

.badge-new, .badge-sale, .badge-hot {
    display: inline-flex;
    align-items: center;
    font-size: .65rem;
    font-weight: 800;
    padding: .2rem .55rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.badge-new  { background: var(--success); color: var(--white); }
.badge-sale { background: var(--danger);  color: var(--white); }
.badge-hot  { background: var(--accent);  color: var(--white); }

/* --- Action buttons (top-right, slide in on hover) --- */
.product-actions {
    position: absolute;
    top: .6rem;
    right: .6rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    z-index: 3;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity .2s ease, transform .2s ease;
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }

.action-btn {
    width: 30px; height: 30px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 50%;
    color: var(--gray-600);
    font-size: .8rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .18s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.action-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.action-btn.is-compared,
.pd-text-action.is-compared { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pd-text-action.is-compared { border-radius: 6px; padding: .2rem .5rem; }

/* --- Image zone --- */
.product-img-link { display: block; }

.product-img-wrap {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f0f5ff 0%, #f8faff 50%, #eef2ff 100%);
    overflow: hidden;
    padding: 1.25rem;
    position: relative;
    transition: background .2s ease;
}
.product-card:hover .product-img-wrap {
    background: linear-gradient(160deg, #dbeafe 0%, #eff6ff 50%, #e0e7ff 100%);
}

/* Subtle shine sweep on hover */
.product-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .55s ease;
}
.product-card:hover .product-img-wrap::after { transform: translateX(100%); }

.product-img-placeholder {
    font-size: 5.5rem;
    opacity: .22;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: opacity .2s ease, transform .2s ease;
}
.product-card:hover .product-img-placeholder { opacity: .35; transform: scale(1.07); }

.product-img-wrap img {
    max-height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
    position: relative;
    z-index: 1;
}

.product-stock-overlay {
    align-items: center;
    background: rgba(15, 23, 42, .48);
    display: flex;
    inset: 0;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    z-index: 4;
}
.product-stock-overlay span {
    background: #dc2626;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .28);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .7px;
    padding: .42rem .8rem;
    text-transform: uppercase;
    transform: rotate(-8deg);
}
.product-card:hover .product-img-wrap img { transform: scale(1.07); }

/* --- Info zone --- */
.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex: 1;
    border-top: 1px solid var(--gray-100);
}

.product-brand {
    display: inline-flex;
    align-items: center;
    font-size: .66rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .6px;
    background: var(--primary-light);
    padding: .15rem .55rem;
    border-radius: 50px;
    width: fit-content;
}

.product-title {
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray-800);
}
.product-title a { color: inherit; }
.product-title a:hover { color: var(--primary); }

.product-rating {
    display: flex;
    align-items: center;
    gap: .2rem;
    font-size: .72rem;
    color: #f59e0b;
}
.rating-count { color: var(--gray-400); font-size: .7rem; margin-left: .15rem; }

/* --- Price block --- */
.product-price-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: auto;
    padding-top: .3rem;
}
.product-price {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.3px;
}
.product-old-price {
    font-size: .78rem;
    color: var(--gray-400);
    text-decoration: line-through;
}
.product-save {
    font-size: .68rem;
    font-weight: 700;
    color: var(--success);
    background: #dcfce7;
    padding: .1rem .4rem;
    border-radius: 50px;
}

.product-stock {
    font-size: .73rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* --- Add to Cart button --- */
.btn-add-cart {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 600;
    padding: .6rem;
    margin-top: .5rem;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    cursor: pointer;
}
.btn-add-cart:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(29,78,216,.3);
}
.btn-add-cart:active { transform: translateY(0); box-shadow: none; }

/* ----------------------------------------------------------------
   PRODUCTS GRID
---------------------------------------------------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

/* Product Tabs */
.product-tabs {
    display: flex;
    gap: .25rem;
    background: var(--gray-100);
    border-radius: 50px;
    padding: .25rem;
}

.tab-btn {
    padding: .4rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------------------
   PROMO BANNERS
---------------------------------------------------------------- */
.promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    color: var(--white);
    overflow: hidden;
    position: relative;
    min-height: 140px;
    transition: all var(--transition);
}
.promo-banner:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.promo-gaming {
    background: linear-gradient(135deg, #0f172a, #7c3aed);
}
.promo-build {
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
}
.promo-deals {
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.promo-tag {
    display: inline-block;
    background: rgba(255,255,255,.2);
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 50px;
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.promo-banner h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: .5rem;
    line-height: 1.3;
    color: var(--white);
}

.promo-cta {
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.promo-icon {
    font-size: 4rem;
    opacity: .2;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* ----------------------------------------------------------------
   LATEST SWIPER
---------------------------------------------------------------- */
.latest-swiper { padding: .5rem .25rem 1.5rem !important; overflow: visible !important; }

/* ----------------------------------------------------------------
   BRANDS
---------------------------------------------------------------- */
/* brands-swiper restored; old marquee styles removed */

/* Wrapper clips slides strictly inside the container */
.brands-swiper-wrap {
    position: relative;
    overflow: hidden;
    padding: .25rem 0 .5rem;
    /* room for prev/next arrows on the sides */
    margin: 0 44px;
}

.brands-swiper { overflow: hidden !important; }

.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    height: 90px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all var(--transition);
    padding: .75rem .5rem;
}
.brand-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 4px 16px rgba(29,78,216,.12);
    transform: translateY(-3px);
}

.brand-ico {
    font-size: 1.35rem;
    color: var(--gray-400);
    transition: color var(--transition);
}
.brand-card:hover .brand-ico { color: var(--primary); }

.brand-name {
    font-size: .78rem;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: -.2px;
    transition: color var(--transition);
}
.brand-card:hover .brand-name { color: var(--primary); }

/* Prev/next arrows outside the swiper, inside the wrapper */
.brands-prev,
.brands-next {
    --swiper-navigation-size: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px !important; height: 36px !important;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    box-shadow: var(--shadow);
    color: var(--primary) !important;
    transition: all var(--transition);
    z-index: 10;
}
.brands-prev { left: -44px; }
.brands-next { right: -44px; }
.brands-prev:hover, .brands-next:hover {
    background: var(--primary);
    color: var(--white) !important;
    border-color: var(--primary);
}

@media (max-width: 575.98px) {
    .brands-swiper-wrap { margin: 0; }
    .brands-prev, .brands-next { display: none; }
}

/* ----------------------------------------------------------------
   WHY CHOOSE US
---------------------------------------------------------------- */
.why-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 100%;
    transition: all var(--transition);
}
.why-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(29,78,216,.1);
    transform: translateY(-4px);
}

.why-icon {
    width: 56px; height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    --why-color: var(--primary);
}

.why-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: .5rem;
}
.why-text {
    font-size: .84rem;
    color: var(--gray-500, #6b7280);
    margin: 0;
    line-height: 1.7;
}

/* ----------------------------------------------------------------
   NEWSLETTER
---------------------------------------------------------------- */
.section-newsletter {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.newsletter-inner {
    padding: 1rem 0;
}

.newsletter-content {
    color: var(--white);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.newsletter-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.15);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: #fcd34d;
    flex-shrink: 0;
}

.newsletter-content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: .35rem;
}
.newsletter-content p { font-size: .85rem; opacity: .85; margin: 0; }

.newsletter-input-wrap {
    display: flex;
    background: var(--white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.newsletter-input {
    flex: 1;
    border: none;
    outline: none;
    padding: .75rem 1.25rem;
    font-size: .88rem;
    min-width: 0;
    background: transparent;
}

.newsletter-btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: .75rem 1.5rem;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition);
    border-radius: 0 50px 50px 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.newsletter-btn:hover { background: var(--accent-dark); }

.newsletter-note {
    font-size: .76rem;
    color: rgba(255,255,255,.65);
    margin-top: .6rem;
    margin-bottom: 0;
}

/* ----------------------------------------------------------------
   FOOTER
---------------------------------------------------------------- */
.site-footer { background: var(--gray-900); }

.footer-top {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--gray-800);
}

/* Footer logo text is dark by default; override to white on dark background */
.site-footer .logo-text { color: var(--white); }

.footer-about {
    font-size: .83rem;
    color: var(--gray-400);
    line-height: 1.75;
    margin: 0;
}

.footer-contact { display: flex; flex-direction: column; gap: .5rem; }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .82rem;
    color: var(--gray-400);
    transition: color var(--transition);
}
.footer-contact-item i { color: var(--primary); font-size: .9rem; margin-top: .1rem; flex-shrink: 0; }
a.footer-contact-item:hover { color: var(--white); }

.footer-social { display: flex; gap: .5rem; }

.footer-social-link {
    width: 36px; height: 36px;
    background: var(--gray-800);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400);
    font-size: .9rem;
    transition: all var(--transition);
}
.footer-social-link:hover { background: var(--primary); color: var(--white); }

.footer-widget-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gray-800);
}

.footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-links li a {
    font-size: .82rem;
    color: var(--gray-400);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.footer-links li a::before {
    content: '›';
    color: var(--primary);
    font-weight: 700;
}
.footer-links li a:hover { color: var(--white); padding-left: .3rem; }

.app-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    color: var(--white);
    font-size: .8rem;
    transition: all var(--transition);
}
.app-badge i { font-size: 1.4rem; flex-shrink: 0; }
.app-badge small { display: block; font-size: .65rem; color: var(--gray-400); }
.app-badge strong { display: block; font-weight: 700; }
.app-badge:hover { background: var(--primary); border-color: var(--primary); }

.payment-badge {
    background: var(--gray-800);
    color: var(--gray-300, #d1d5db);
    font-size: .7rem;
    font-weight: 700;
    padding: .25rem .5rem;
    border-radius: 4px;
    border: 1px solid var(--gray-700);
}

.footer-bottom {
    padding: 1rem 0;
    background: var(--dark);
}
.footer-copy, .footer-note {
    font-size: .78rem;
    color: var(--gray-500, #6b7280);
}

/* ----------------------------------------------------------------
   BACK TO TOP
---------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px; height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ----------------------------------------------------------------
   CART TOAST
---------------------------------------------------------------- */
.cart-toast {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    background: var(--success);
    color: var(--white);
    padding: .75rem 1.25rem;
    border-radius: var(--radius);
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(100% + 2rem));
    transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    max-width: 280px;
}
.cart-toast.show { transform: translateX(0); }

/* ----------------------------------------------------------------
   FLASH CARD
---------------------------------------------------------------- */
.flash-card .product-img-wrap { height: 170px; }

/* Compact product card on very small screens */
@media (max-width: 400px) {
    .product-img-wrap { height: 140px; padding: .75rem; }
    .product-info     { padding: .75rem; gap: .25rem; }
    .product-price    { font-size: .95rem; }
    .btn-add-cart     { font-size: .76rem; padding: .5rem; }
}

/* ----------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
---------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .features-inner { gap: .5rem; }
    .feature-divider { display: none; }
    .feature-item { min-width: 130px; }
}

@media (max-width: 991.98px) {
    .slide-title { font-size: 1.5rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .newsletter-content { flex-direction: column; gap: .75rem; }
    .logo-text { font-size: 1.1rem; }
    .side-banners { margin-top: .25rem; }
}

@media (max-width: 767.98px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .product-img-wrap { height: 140px; }
    .features-inner { justify-content: flex-start; }
    .feature-item { min-width: 44%; }
    .promo-banner { min-height: 110px; padding: 1.25rem; }
    .promo-banner h3 { font-size: .9rem; }
    .promo-icon { font-size: 2.5rem; }
    .footer-top { padding: 2rem 0 1.5rem; }
    .newsletter-input-wrap { flex-direction: column; border-radius: var(--radius); }
    .newsletter-btn { border-radius: 0 0 var(--radius) var(--radius); padding: .75rem 1.25rem; justify-content: center; }

    /* Mobile header: hamburger left, centered logo, search + cart on the right */
    .mobile-menu-col { order: 1; }
    .mobile-logo-col { order: 2; flex: 1; display: flex; justify-content: center; }
    .site-header .header-logo-img {
        height: 52px;
        max-width: 140px;
        object-position: center;
    }
    .header-actions-col { order: 3; }
    .header-actions { gap: .15rem !important; }

    /* Room for the fixed bottom nav so page content/footer isn't hidden behind it */
    body { padding-bottom: 64px; }
    .back-to-top { bottom: calc(64px + 1rem); }
    .cart-toast { bottom: calc(64px + 4.5rem); }
}

@media (max-width: 575.98px) {
    .topbar { display: none !important; }
    .logo-text { font-size: 1rem; }
    .logo-icon { width: 36px; height: 36px; font-size: 1rem; }
    .site-header .header-logo-img {
        height: 46px;
        max-width: 120px;
    }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
    .product-title { font-size: .8rem; }
    .product-price { font-size: .9rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
    .product-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .countdown-num { font-size: 1.1rem; }
    .flash-sale-header { flex-direction: column; align-items: flex-start !important; gap: 1rem !important; }
    .features-inner { flex-direction: column; }
    .feature-divider { display: none; }
    .feature-item { min-width: 0; width: 100%; }
}

/* ----------------------------------------------------------------
   MOBILE BOTTOM NAV — fixed quick-links bar (phones only, <768px)
---------------------------------------------------------------- */
.mobile-bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1050;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: var(--gray-900);
    box-shadow: 0 -4px 16px rgba(0,0,0,.18);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    padding: .55rem .25rem .5rem;
    color: var(--gray-400);
    text-decoration: none;
    text-align: center;
    transition: color var(--transition);
}
.mobile-bottom-nav-item i { font-size: 1.15rem; line-height: 1; }
.mobile-bottom-nav-item span {
    font-size: .62rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
}
.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item:active,
.mobile-bottom-nav-item.active { color: var(--white); }
.mobile-bottom-nav-item.active i { color: var(--accent); }

/* ----------------------------------------------------------------
   JQUERY UI AUTOCOMPLETE — custom styled dropdown
   jQuery UI appends this to <body> and sets top/left in pixels itself;
   do NOT override top/left/width here or positioning breaks.
---------------------------------------------------------------- */
.ui-autocomplete {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
    z-index: 99999 !important;
    padding: .4rem !important;
    list-style: none;
    margin-top: .4rem;
    font-family: var(--font-sans);
}
.ui-autocomplete .ui-menu-item { margin: 0; }
.ui-autocomplete .ui-menu-item + .ui-menu-item { margin-top: 2px; }
.ui-autocomplete .ui-menu-item-wrapper {
    padding: 0;
    border: none !important;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete .ui-menu-item-wrapper:hover { background: var(--primary-light) !important; }

/* Higher specificity than jQuery UI's own .ui-menu-item-wrapper rule so the
   flex row layout actually wins instead of silently falling back to block */
.ui-autocomplete a.ac-item { color: inherit; text-decoration: none; }
.ui-autocomplete .ac-item.ui-menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .5rem .6rem;
}

/* Child elements must ignore the mouse so hover doesn't flicker as the
   cursor crosses icon/text/price sub-elements inside the item */
.ac-icon, .ac-text, .ac-label, .ac-cat, .ac-price { pointer-events: none; }

.ac-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.ac-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.ac-label {
    font-size: .84rem;
    color: var(--gray-800);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-cat {
    font-size: .68rem;
    color: var(--gray-500, #6b7280);
    font-weight: 500;
}
.ac-price {
    flex-shrink: 0;
    font-size: .82rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.ac-icon img { width: 100%; height: 100%; object-fit: contain; }
.ac-show-all {
    justify-content: space-between;
    border-top: 1px solid var(--gray-200);
    margin-top: .25rem;
    color: var(--primary);
    font-weight: 700;
}
.ac-show-all .ac-label { color: var(--primary); }
.ac-empty { color: var(--gray-500, #6b7280); cursor: default; }
a.pd-brand-tag { text-decoration: none; }

@media (max-width: 575.98px) {
    .ui-autocomplete { max-height: 340px; }
    .ac-icon { width: 30px; height: 30px; font-size: .9rem; }
    .ac-label { font-size: .8rem; }
    .ac-price { font-size: .78rem; }
}

/* ----------------------------------------------------------------
   UTILITY
---------------------------------------------------------------- */
/* overflow:visible kept for card shadows/transforms; clipped at section level below */
.swiper { overflow: visible; }
.swiper-wrapper { align-items: stretch; }

/* Hero banners should keep their uploaded aspect ratio instead of stretching. */
.hero-swiper {
    overflow: hidden;
}
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
    height: auto;
    align-items: flex-start;
}

/* Prevent swiper slides bleeding right and creating blank-space on the page */
.section-categories,
.section-flash-sale,
.section-latest,
.section-brands,
.section-featured,
.section-promo-banners {
    overflow-x: clip;
}

.section-latest .product-card,
.flash-swiper .product-card { height: 100%; }

/* Print */
@media print {
    .topbar, .announcement-bar, .main-nav,
    .back-to-top, .cart-toast, .mobile-nav { display: none !important; }
}

/* ----------------------------------------------------------------
   COMPARE — 2 or 3 products, side by side on every screen
---------------------------------------------------------------- */
.compare-page { background: var(--gray-50); padding: 1.25rem 0 3rem; }
.compare-breadcrumb { align-items: center; color: var(--gray-400); display: flex; font-size: .82rem; gap: .4rem; margin-bottom: 1rem; }
.compare-breadcrumb a { color: var(--gray-600); text-decoration: none; }
.compare-heading { align-items: flex-end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.compare-heading h1 { font-size: 1.55rem; font-weight: 800; margin: 0; }
.compare-heading p { color: var(--gray-600); margin: .2rem 0 0; }
.compare-clear,
.compare-remove {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: .78rem;
    font-weight: 700;
    padding: .45rem .75rem;
}
.compare-clear:hover,
.compare-remove:hover { border-color: var(--danger); color: var(--danger); }
.compare-empty-state,
.compare-single {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem 1.25rem;
    text-align: center;
}
.compare-empty-state i { color: var(--primary); font-size: 2rem; }
.compare-empty-state h2,
.compare-single h2 { font-size: 1.15rem; margin: .75rem 0 .35rem; }
.compare-empty-state p,
.compare-single p { color: var(--gray-600); }
.compare-empty-state .btn-add-cart { display: inline-flex; margin-top: .75rem; width: auto; }
.compare-product-solo { display: grid; gap: 1rem; margin: 0 auto; max-width: 560px; text-align: left; }
@media (min-width: 576px) {
    .compare-product-solo { grid-template-columns: 140px 1fr; align-items: center; }
}
.compare-board {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}
.compare-sticky,
.compare-row {
    display: grid;
    grid-template-columns: 168px repeat(var(--compare-cols), minmax(0, 1fr));
}
.compare-sticky {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: var(--site-header-height, 128px);
    z-index: 20;
}
.compare-product { min-width: 0; padding: .85rem; }
.compare-product + .compare-product,
.compare-value + .compare-value { border-left: 1px solid var(--gray-100); }
.compare-thumb {
    align-items: center;
    background: var(--gray-50);
    border-radius: var(--radius);
    display: flex;
    height: 92px;
    justify-content: center;
    margin-bottom: .55rem;
    overflow: hidden;
}
.compare-thumb img { height: 100%; object-fit: contain; width: 100%; }
.compare-thumb i { color: var(--gray-400); font-size: 1.8rem; }
.compare-product h2 { font-size: .88rem; font-weight: 700; line-height: 1.35; margin: 0 0 .35rem; }
.compare-product h2 a { color: var(--dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; }
.compare-product h2 a:hover { color: var(--primary); }
.compare-price { align-items: baseline; display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .55rem; }
.compare-price strong { color: var(--primary); font-size: 1rem; }
.compare-price del { color: var(--gray-400); font-size: .75rem; }
.compare-product-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.compare-product-actions .btn-add-cart { flex: 1; font-size: .75rem; margin: 0; min-width: 0; padding: .4rem .5rem; width: auto; }
.compare-label {
    background: var(--gray-50);
    color: var(--gray-700);
    font-size: .78rem;
    font-weight: 700;
    padding: .75rem .85rem;
}
.compare-value {
    color: var(--dark);
    font-size: .84rem;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: .75rem .85rem;
}
.compare-row { border-top: 1px solid var(--gray-100); }
.compare-row.is-diff .compare-value { background: #eff6ff; }
.compare-row.is-diff .compare-label { color: var(--primary-dark); }
.compare-blank { color: var(--gray-400); font-weight: 500; }
.compare-features { margin: 0; padding-left: 1rem; }
.compare-features li + li { margin-top: .25rem; }
.compare-value table,
.compare-desc-body table { max-width: 100%; width: 100%; }
.compare-value img,
.compare-desc-body img { height: auto; max-width: 100%; }
.compare-descriptions { margin-top: 1.25rem; }
.compare-descriptions h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: .75rem; }
.compare-desc-grid { display: grid; gap: .75rem; grid-template-columns: repeat(var(--compare-cols), minmax(0, 1fr)); }
.compare-desc-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); min-width: 0; padding: .9rem; }
.compare-desc-card h3 { font-size: .88rem; margin-bottom: .5rem; }
.compare-desc-body { color: var(--gray-700); font-size: .86rem; line-height: 1.55; overflow-wrap: anywhere; }

@media (max-width: 767.98px) {
    .compare-heading h1 { font-size: 1.25rem; }
    .compare-sticky,
    .compare-row { grid-template-columns: repeat(var(--compare-cols), minmax(0, 1fr)); }
    .compare-label { grid-column: 1 / -1; padding: .45rem .65rem; }
    .compare-label-spacer { display: none; }
    .compare-product { padding: .55rem; }
    .compare-thumb { height: 64px; }
    .compare-product h2 { font-size: .72rem; }
    .compare-price strong { font-size: .82rem; }
    .compare-value { font-size: .75rem; padding: .55rem; }
    .compare-product-actions { flex-direction: column; }
    .compare-desc-card { max-height: 240px; overflow: auto; }
    .compare-desc-body { font-size: .78rem; }
}
