/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --range-accent: #f0522f; /* Slider accent color to match provided design */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Responsive Container Widths */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1350px;
    }
}

.navbar .container {
    max-width: 1600px;
    padding: 0 15px;
    overflow: visible;
}

/* Navbar container matches main container at each breakpoint */
@media (min-width: 1200px) {
    .navbar .container {
        max-width: 1400px;
        width: 100%;
        padding: 0 15px;
    }
}

@media (min-width: 1400px) {
    .navbar .container {
        max-width: 1350px;
        width: 100%;
        padding: 0 15px;
    }
}

@media (min-width: 1600px) {
    .navbar .container {
        max-width: 1600px;
        width: 100%;
        padding: 0 15px;
    }
}

/* Removed empty navbar media blocks to avoid lint errors */

/* Header */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1200; /* Keep header above mobile sidebar */
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: visible;
}

/* Topbar */
.topbar {
    background: #0e162d;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Only hide topbar on scroll in desktop view */
@media (min-width: 768px) {
    .header.scrolled .topbar {
        display: none;
        height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

/* Topbar icons: force white for contrast */
.topbar .icon-link {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 10px;
    border-radius: 9999px;
    line-height: 1;
    gap: 0.4rem;
}
.topbar .icon-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}
.topbar .icon-link svg {
    color: #ffffff !important;
    width: 18px;
    height: 18px;
}
.topbar .icon-link svg * {
    fill: currentColor !important;
    stroke: currentColor !important;
}
/* Ensure topbar icon labels are readable but subtle */
.topbar .icon-link span {
    color: #ffffff !important;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Tighten spacing between topbar icons on desktop */
@media (min-width: 1200px) {
    .topbar .header-icons {
        gap: 0.75rem;
    }
}

/* Hide offer icon on screens smaller than xl */
.offer-icon {
    display: none !important;
}

/* Show offer icon only on xl and xxl screens (1200px and above) */
@media (min-width: 1200px) {
    .offer-icon {
        display: flex !important;
    }
}

/* Customer name in account button - hide by default */
.customer-name {
    display: none;
}

/* Show customer name and hide "Account" label on xl and xxl screens (1200px and above) */
@media (min-width: 1200px) {
    .account-icon .account-label {
        display: none;
    }

    .account-icon .customer-name {
        display: inline;
        font-weight: 500;
    }
}

/* Hide cart icon on topbar */
.topbar .cart-icon { display: none !important; }
/* Hamburger bars on dark topbar */
.topbar .hamburger span {
    background: #ffffff !important;
}

.topbar-content .hamburger {
    margin-right: 1rem;
}

.topbar-content .logo {
    margin-right: 1rem;
}

.topbar-content .search-bar {
    margin-right: auto;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 220px;
    display: block;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 800px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* XL Screens - Larger search bar */
@media (min-width: 1200px) {
    .search-bar {
        max-width: 900px;
    }

    .search-bar input {
        padding: 0.85rem 3.5rem 0.85rem 1.25rem;
        font-size: 1rem;
    }
}

/* XXL Screens - Even larger search bar */
@media (min-width: 1400px) {
    .search-bar {
        max-width: 1000px;
    }

    .search-bar input {
        padding: 0.9rem 3.5rem 0.9rem 1.5rem;
        font-size: 1.05rem;
    }
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--secondary-color);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hide mobile search toggle on desktop */
.mobile-search-toggle {
    display: none;
}

/* Hide mobile search overlay on desktop */
.mobile-search-overlay {
    display: none !important;
}

.icon-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.icon-link:hover {
    color: var(--primary-color);
}

.icon-link svg {
    width: 24px;
    height: 24px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

.wishlist-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

/* Navbar */
.navbar {
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1050;
}

/* Only apply scrolled navbar behavior on desktop */
@media (min-width: 768px) {
    .header.scrolled .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: var(--shadow);
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    overflow: visible;
}

.nav-item {
    margin: 0;
    flex: 0 1 auto;
    position: relative;
    text-align: center;
    white-space: nowrap;
    min-width: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.15rem;
    text-decoration: none;
    color: #000000 !important;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.3s;
    position: relative;
    white-space: nowrap;
    min-width: 0;
}

/* Navigation responsive adjustments for 18 items */
@media (min-width: 576px) and (max-width: 767px) {
    .nav-link {
        padding: 0.5rem 0.15rem;
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .nav-link {
        padding: 0.75rem 0.2rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .nav-menu {
        justify-content: space-between;
    }

    .nav-item {
        flex: 1 1 auto;
    }
}

@media (min-width: 1400px) {
    .nav-link {
        padding: 0.875rem 0.65rem !important;
        font-size: 0.95rem !important;
    }

    .nav-menu {
        justify-content: space-between;
    }

    .nav-item {
        flex: 1 1 auto;
    }
}

.nav-link:hover {
        padding: 0.5rem 0.2rem !important;
        line-height: 1.1 !important;
    background: #f2f4f7;
    color: #000000 !important;
}

.nav-link.active {
    color: #000000 !important;
    background: #eef1f6;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
        padding: 0.55rem 0.22rem !important;
        line-height: 1.1 !important;
    height: 3px;
    background: #000000;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    overflow: visible;
    pointer-events: none;
}

/* Desktop dropdown style to match reference (XL & XXL) */
@media (min-width: 1200px) {
    /* Active tab underline uses accent color */
    .nav-link.active::after {
        background: var(--primary-color) !important;
    }

    /* Dropdown panel: flat white with subtle border and soft shadow */
    .dropdown-menu {
        border: 1px solid #eeeeee;
        border-top: 3px solid var(--primary-color);
        border-radius: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    /* Separators are applied via a later final override */

    .dropdown-menu a {
        padding: 0.35rem 0.75rem; /* tighter */
        line-height: .50; /* XL & XXL: ultra-compact */
        font-size: 0.85rem;
        color: #1f2937;
        background: #ffffff;
    }

    .dropdown-menu a:hover {
        background: #f6f7fb;
        color: var(--primary-color);
    }

    /* Right-arrow indicator for nested items */
    .dropdown-menu .has-nested > a::after {
        content: '›';
        position: absolute;
        right: 0.85rem;
        color: #9ca3af;
        font-weight: 600;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .dropdown-menu .has-nested:hover > a::after {
        transform: translateX(3px);
        color: var(--primary-color);
    }

    /* Nested dropdown panels inherit the same flat style */
    .nested-dropdown {
        border: 1px solid #eeeeee;
        border-top: 3px solid var(--primary-color);
        border-radius: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        background: #ffffff;
    }

    /* Separators for nested items are also applied later */

    .nested-dropdown a {
        padding: 0.35rem 0.75rem; /* tighter */
        line-height: .50;
        font-size: 0.85rem;
        color: #1f2937;
        background: #ffffff;
    }

    .nested-dropdown a:hover {
        background: #f6f7fb;
        color: var(--primary-color);
    }

    /* Override earlier gradient-on-hover for nested parent link */
    .has-nested:hover > a,
    .has-nested:focus-within > a {
        background: #f6f7fb !important;
        color: var(--primary-color) !important;
    }
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Keep parent nav-link active when dropdown is hovered */
.has-dropdown:hover > .nav-link {
    color: #000000 !important;
    background: #f2f4f7;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    background: var(--white);
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 1) 100%);
    color: var(--white);
}

/* Multi-Column Dropdown Support */
.dropdown-menu.col-1 {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.dropdown-menu.col-2 {
    /* Default: single column on small & medium screens */
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.dropdown-menu.col-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-width: 600px;
    column-gap: 0.5rem;
}

.dropdown-menu.col-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-width: 800px;
    column-gap: 0.5rem;
}

.dropdown-menu.col-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-width: 1000px;
    column-gap: 0.5rem;
}

/* Responsive two-column behavior for col-2 only on XL and above */
@media (min-width: 1200px) {
    .dropdown-menu.col-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        min-width: 420px;
        column-gap: 0.75rem;
    }
}

@media (min-width: 1400px) {
    .dropdown-menu.col-2 {
        min-width: 460px;
        column-gap: 1rem;
    }
}

/* Reduce horizontal padding for multicolumn dropdowns */
.dropdown-menu.col-2 a,
.dropdown-menu.col-3 a,
.dropdown-menu.col-4 a,
.dropdown-menu.col-5 a {
    padding: 0.5rem 0.75rem;
}

/* Prevent column break inside items */
.dropdown-menu li {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

/* Prevent nested dropdown from showing on non-hovered items - DESKTOP ONLY */
@media (min-width: 768px) {
    .dropdown-menu .has-nested:not(:hover) > .nested-dropdown {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateX(-10px) !important;
        pointer-events: none !important;
    }

    /* Ensure nested dropdown shows on hover */
    .dropdown-menu .has-nested:hover > .nested-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
        display: block !important;
    }
}

/* Nested Dropdown Styles */
.has-nested {
    position: relative;
}

.has-nested > a {
    position: relative;
    display: block;
}

/* Create an invisible bridge between parent item and nested dropdown */
.has-nested::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    width: 10px;
    height: 100%;
    z-index: 149;
    display: none;
}

.has-nested:hover::before {
    display: block;
}

/* Invisible bridge for left-side nested dropdown */
.has-nested.left::before,
.has-nested:has(> .nested-dropdown.left)::before {
    left: auto;
    right: 100%;
}

/* Add arrow indicator for nested items in desktop */
@media (min-width: 768px) {
    .dropdown-menu .has-nested > a::after {
        content: '→';
        position: absolute;
        right: 1rem;
        color: var(--text-dark);
        font-weight: bold;
        transition: transform 0.2s ease;
    }

    .dropdown-menu .has-nested:hover > a::after {
        transform: translateX(3px);
        color: var(--white);
    }

    /* Left arrow for left-side nested dropdown */
    .dropdown-menu .has-nested.left > a::after,
    .dropdown-menu .has-nested:has(> .nested-dropdown.left) > a::after {
        content: '←';
        right: auto;
        left: 1rem;
    }

    .dropdown-menu .has-nested.left:hover > a::after,
    .dropdown-menu .has-nested:has(> .nested-dropdown.left):hover > a::after {
        transform: translateX(-3px);
    }
}

.nested-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1150;
    overflow: visible;
    pointer-events: none;
    display: none;
}

/* Left-side nested dropdown - support both .has-nested.left and .nested-dropdown.left */
.has-nested.left > .nested-dropdown,
.dropdown-menu.left .has-nested > .nested-dropdown,
.nested-dropdown.left {
    left: auto;
    right: 100%;
    transform: translateX(10px);
}

.has-nested.left:hover > .nested-dropdown,
.dropdown-menu.left .has-nested:hover > .nested-dropdown,
.has-nested:hover > .nested-dropdown.left {
    transform: translateX(0) !important;
}

.has-nested:hover > .nested-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    pointer-events: auto;
    display: block !important;
}

/* Keep parent dropdown item active when nested dropdown is hovered */
.has-nested:hover > a,
.has-nested:focus-within > a {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 1) 100%);
    color: var(--white);
}

/* Keep nested dropdown visible when hovering over it */
.nested-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    pointer-events: auto;
    display: block !important;
}

.nested-dropdown li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

.nested-dropdown li:last-child {
    border-bottom: none;
}

.nested-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    background: var(--white);
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.nested-dropdown a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 1) 100%);
    color: var(--white);
}

/* Layout offset for fixed header: push content below header */
body {
    padding-top: var(--header-height, 90px);
}

/* Ensure hero slider doesn't add extra offset */
.hero-slider {
    margin-top: 0 !important;
}

/* Hamburger Menu - Hide on desktop by default */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

/* Sidebar Header & Close Button - Hide on desktop by default */
.sidebar-header {
    display: none !important;
}

.sidebar-close {
    display: none !important;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Slider Section */
.hero-slider {
    margin-top: 60px; /* Gap for mobile header */
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

@media (min-width: 576px) and (max-width: 767px) {
    .hero-slider {
        margin-top: 75px; /* Gap for small screens */
    }
}

@media (min-width: 768px) {
    .hero-slider {
        margin-top: 85px;
    }
}

/* XL Screens - Taller hero slider */
@media (min-width: 1200px) {
    .hero-slider {
        margin-top: 130px;
    }

    .slide img {
        max-height: 500px;
        border-radius: 16px;
    }
}

/* XXL Screens - Maximum height hero slider */
@media (min-width: 1400px) {
    .hero-slider {
        margin-top: 120px;
    }

    .slide img {
        max-height: 550px;
        border-radius: 20px;
    }
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1600px;
    padding: 0 15px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Slider container matches main container widths */
@media (min-width: 1200px) {
    .slider-container {
        max-width: 1400px;
    }
}

@media (min-width: 1400px) {
    .slider-container {
        max-width: 1350px;
    }
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn svg {
    width: 24px;
    height: 24px;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* XL Screens - Larger slider controls */
@media (min-width: 1200px) {
    .slider-btn {
        width: 60px;
        height: 60px;
    }

    .slider-btn svg {
        width: 28px;
        height: 28px;
    }

    .prev-btn {
        left: 30px;
    }

    .next-btn {
        right: 30px;
    }

    .dot {
        width: 14px;
        height: 14px;
    }

    .slider-dots {
        bottom: 30px;
        gap: 12px;
    }
}

/* XXL Screens - Maximum slider controls */
@media (min-width: 1400px) {
    .slider-btn {
        width: 70px;
        height: 70px;
    }

    .slider-btn svg {
        width: 32px;
        height: 32px;
    }

    .prev-btn {
        left: 40px;
    }

    .next-btn {
        right: 40px;
    }

    .dot {
        width: 16px;
        height: 16px;
    }

    .slider-dots {
        bottom: 40px;
        gap: 14px;
    }
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* Advertisement Banners */
.ad-banners {
    padding: 2rem 0;
    background: var(--bg-light);
}

.ad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.ad-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.ad-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Featured Categories Section */
.featured-categories {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
}

/* XL Screens - 6-8 categories per row */
@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 2.25rem;
    }
}

/* XXL Screens - 8 categories per row */
@media (min-width: 1400px) {
    .categories-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 2.5rem;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scale(1.1) rotate(5deg);
}

.category-card:hover .category-icon svg {
    color: var(--white);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.category-icon svg {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    margin: 0;
}

/* Featured Brands Section */
.featured-brands {
    padding: 4rem 0;
    background: var(--bg-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

/* XL Screens - 5-6 brands per row */
@media (min-width: 1200px) {
    .brands-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2.25rem;
    }
}

/* XXL Screens - 6 brands per row */
@media (min-width: 1400px) {
    .brands-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 2.5rem;
    }
}

.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
    min-height: 80px;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.brand-logo {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Featured Products Section */
.featured-products {
    padding: 4rem 0;
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* XL Screens - 4 products per row */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.75rem;
    }
}

/* XXL Screens - 4 products per row */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
}

.product-badge.sale {
    background: #ef4444;
}

.product-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio for square images */
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}


.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.product-features li {
    font-size: 0.8rem;
    color: #6b7280;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Product Actions (Wishlist, Compare, Select) */
.product-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Show product actions only on category page */
.category-page .product-actions {
    display: flex;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.wishlist-btn:hover svg {
    color: #ef4444;
    fill: #ef4444;
}

.compare-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
}

.compare-btn svg {
    color: var(--white);
}

.compare-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    border-color: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.compare-btn:hover svg {
    color: var(--white);
}

.product-select {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-select:hover {
    border-color: var(--primary-color);
}

.product-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Product Buttons (Add to Cart & Buy Now) */
.product-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.buy-now-btn {
    display: none;
    flex: 1;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Show buy now button only on category page for XL & XXL */
@media (min-width: 1200px) {
    .category-page .buy-now-btn { display: flex; }
    .category-page .product-buttons { flex-direction: row; gap: 0.5rem; flex-wrap: wrap; }
    /* Prefer side-by-side; wrap only if too tight */
    .category-page .add-to-cart-btn,
    .category-page .buy-now-btn { order: initial; flex: 1 1 160px; min-width: 0; width: auto; padding: 0.65rem 0.75rem; font-size: 0.8rem; }
}

.buy-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.buy-now-btn:active {
    transform: translateY(0);
}

.buy-now-btn svg {
    width: 18px;
    height: 18px;
}

.add-to-cart-btn {
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: 2px;
}

.rating-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.product-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.add-to-cart-btn {
    display: flex;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn svg {
    width: 18px;
    height: 18px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 150px 0 100px;
    margin-top: 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.about-text ul li {
    padding: 0.5rem 0;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.about-full-content {
    display: none;
}

.about-text.expanded .about-full-content {
    display: block;
}

.about-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.about-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.about-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.about-text.expanded .about-toggle-btn svg {
    transform: rotate(180deg);
}

.about-toggle-btn .read-less {
    display: none;
}

.about-text.expanded .about-toggle-btn .read-more {
    display: none;
}

.about-text.expanded .about-toggle-btn .read-less {
    display: inline;
}

/* Show full content on desktop, hide button */
@media (min-width: 768px) {
    .about-toggle-btn {
        display: none !important;
    }

    .about-full-content {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Mobile: Keep content hidden initially */
@media (max-width: 768px) {
    .about-toggle-btn {
        display: inline-flex !important;
    }

    .about-full-content {
        display: none !important;
    }

    .about-text.expanded .about-full-content {
        display: block !important;
    }
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: #0e162d; /* Match topbar background */
    color: var(--white);
    padding: 2rem 0 5rem;
}

/* Footer layout: three columns on desktop */
@media (min-width: 1200px) {
    .footer > .container {
        display: grid;
        grid-template-columns: 1.1fr 1.2fr 1.1fr;
        gap: 2.5rem;
        align-items: start;
    }

    /* About links as two neat columns */
    .footer-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 2rem;
        row-gap: 0.5rem;
        justify-items: start;
        text-align: left;
    }

    .footer-links a {
        display: block;
        padding: 0;
        border: 0;
    }

    .footer .link-separator {
        display: none;
    }
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Support Section */
.footer-support {
    margin-bottom: 2rem;
}

.support-phone,
.support-store {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.support-phone:hover,
.support-store:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.support-phone svg,
.support-store svg {
    width: 24px;
    height: 24px;
    color: var(--white);
    flex-shrink: 0;
}

.phone-info,
.store-info {
    display: flex;
    flex-direction: column;
}

.phone-time,
.store-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.phone-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.store-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

/* About Us Section */
.footer-about {
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.link-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Desktop: force About links into three columns (override later flex rule) */
@media (min-width: 1200px) {
    .footer-links {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 2rem;
        row-gap: 0.5rem;
        justify-items: start;
        text-align: left;
    }

    .footer .link-separator {
        display: none !important;
    }
}

/* Stay Connected Section */
.footer-connect {
    margin-bottom: 2rem;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.company-address {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.company-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.company-email,
.company-phone {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.email-label,
.phone-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.email-link,
.phone-link {
    font-size: 0.875rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.email-link:hover,
.phone-link:hover {
    text-decoration: underline;
    color: #f0f9ff;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.app-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-badge {
    display: block;
    transition: transform 0.3s;
}

.app-badge:hover {
    transform: translateY(-2px);
}

.app-badge img {
    height: 40px;
    border-radius: 6px;
}

.footer-rights {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
/* Ensure mobile search elements are hidden on desktop and larger screens */
@media (min-width: 768px) {
    .mobile-search-toggle {
        display: none !important;
    }

    .mobile-search-overlay {
        display: none !important;
    }
}

/* These redundant media queries have been removed to prevent conflicts.
   Product grid is now controlled by the main responsive rules:
   - Mobile: 2 products per row
   - Tablet (768px-1199px): 3 products per row
   - XL (1200px+): 4 products per row
   - XXL (1400px+): 4 products per row
*/

/* Tablet Portrait (768px - 1199px) - 3 products per row */
@media (min-width: 768px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .container {
        padding: 0 20px;
    }

    /* Header optimizations for tablets */
    .topbar-content {
        padding: 0.75rem 0;
        gap: 0.75rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo img {
        height: 28px;
        max-width: 180px;
    }

    .search-bar {
        max-width: 500px;
    }

    .search-bar input {
        padding: 0.65rem 3rem 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .header-icons {
        gap: 1rem;
    }

    .icon-link {
        font-size: 0.85rem;
    }

    .icon-link svg {
        width: 22px;
        height: 22px;
    }

    .navbar .container {
        padding: 0 15px;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        min-width: 220px;
    }

    .hero-slider {
        margin-top: 120px;
    }

    .slide img {
        max-height: 450px;
    }

    .section-title {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1.5rem;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .product-info {
        padding: 1.25rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-description {
        font-size: 0.85rem;
    }
}

/* Keep a small gap below the header (body already offsets content) */
.hero-slider {
    margin-top: 8px !important;
}

/* Large Phones (600px - 767px) - 3 products per row */
@media (min-width: 576px) and (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Medium Phones (480px - 599px) - 2 products per row */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    /* Force ensure the mobile filter toggle shows on small screens */
    .category-page .mobile-filter-toggle {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    }
}

/* Small Phones (375px - 479px) - 2 products per row */
@media (max-width: 575px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Very Small Phones (320px - 374px) - 2 products per row */
@media (max-width: 575px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 767px) {
    /* Show hamburger menu on mobile */
    .hamburger {
        display: flex;
    }

    .search-bar {
        display: none;
    }

    .icon-link span {
        display: none;
    }

    .header-icons {
        gap: 0.5rem;
    }

    /* Hide Account and Cart icons on mobile, show only Search and Wishlist */
    .account-icon,
    .cart-icon {
        display: none !important;
    }

    /* Mobile Search Toggle Button - Only show on mobile */
    .mobile-search-toggle {
        display: flex !important;
        background: transparent;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
    }

    .mobile-search-toggle svg {
        width: 22px;
        height: 22px;
        color: var(--text-dark);
    }

    /* Wishlist icon on mobile */
    .wishlist-icon {
        display: flex !important;
        padding: 0.5rem;
    }

    .wishlist-icon svg {
        width: 22px;
        height: 22px;
        color: var(--text-dark);
    }

    /* Mobile Search Overlay */
    .mobile-search-overlay {
        display: none !important;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

    .mobile-search-overlay.active {
        display: block !important;
    }

    .mobile-search-header {
        display: none;
    }

    .mobile-search-close {
        display: none;
    }

    .mobile-search-close:hover {
        display: none;
    }

    .mobile-search-close:active {
        display: none;
    }

    .mobile-search-close svg {
        display: none;
    }

    .mobile-search-content {
        padding: 0.5rem 0.75rem;
    }

    .mobile-search-bar {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .mobile-search-bar input {
        width: 100%;
        padding: 0.6rem 3rem 0.6rem 0.9rem;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        font-size: 0.875rem;
        transition: all 0.3s;
        margin: 0;
        box-sizing: border-box;
    }

    .mobile-search-bar input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
    }

    .mobile-search-btn {
        position: absolute;
        right: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        background: var(--primary-color);
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
    }

    .mobile-search-btn:hover {
        background: var(--secondary-color);
    }

    .mobile-search-btn svg {
        width: 17px;
        height: 17px;
        color: var(--white);
    }

    /* Push content down when search is active */
    body.search-active .hero-slider {
        margin-top: 120px;
    }

    .navbar {
        position: fixed;
        top: var(--header-height, 90px); /* start below fixed header */
        left: -100%;
        width: 300px;
        height: calc(100vh - var(--header-height, 90px));
        background: var(--white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: scroll;
        transition: left 0.3s ease;
        z-index: 1000; /* Below fixed header (z-index:1200) */
        display: flex;
        flex-direction: column;
    }

    /* Scrollbar styling for mobile navbar */
    .navbar::-webkit-scrollbar {
        width: 6px;
    }

    .navbar::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .navbar::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }

    .navbar::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    /* Sidebar Header - Show on mobile */
    .sidebar-header {
        position: sticky !important;
        top: 0;
        width: 100%;
        display: flex !important;
        justify-content: flex-end;
        padding: 0 0.5rem;
        background: var(--bg-light);
        backdrop-filter: blur(10px);
        z-index: 1005;
        flex-shrink: 0;
        border-bottom: none;
        margin: 0;
    }

    .navbar .container {
        position: relative;
        max-width: 100%;
        padding: 0;
        margin: 0;
        margin-top: -0.5rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        gap: 0;
    }

    .sidebar-close {
        display: flex !important;
        background: var(--white);
        border: 2px solid var(--border-color);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 0;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar-close:hover {
        background: var(--bg-light);
        border-color: var(--primary-color);
        transform: rotate(90deg) scale(1.05);
    }

    .sidebar-close:active {
        background: var(--primary-color);
        transform: scale(0.95) rotate(90deg);
    }

    .sidebar-close svg {
        width: 22px;
        height: 22px;
        color: var(--text-dark);
        stroke-width: 2.5;
    }

    .navbar.active {
        left: 0;
    }

    /* Sidebar overlay - only show when sidebar is active */
    .navbar.active::before {
        content: '';
        position: fixed;
        top: var(--header-height, 90px); /* overlay starts below header */
        left: 300px;
        right: 0;
        height: calc(100vh - var(--header-height, 90px));
        background: rgba(0, 0, 0, 0.7);
        z-index: 999; /* Keep overlay below header */
    }

    .nav-menu {
        flex-direction: column;
        padding: 0;
        margin: 0;
        flex: 1;
        gap: 0;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 0;
        margin-top: 0;
    }

    .nav-item:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .nav-item:first-child .nav-link {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .nav-link {
        padding: 0.45rem 0.75rem;
        border-bottom: none;
        justify-content: space-between;
        position: relative;
        background: transparent;
        font-size: 0.875rem;
        color: var(--text-dark) !important;
        border-radius: 0;
        border: none;
        transition: all 0.2s ease;
    }

    .nav-link:hover {
        background: #f8f9fa;
        color: var(--primary-color) !important;
        border: none;
        box-shadow: none;
    }

    .nav-link.active {
        background: #f0f4ff;
        color: var(--primary-color) !important;
        font-weight: 600;
        border: none;
        border-left: 3px solid var(--primary-color);
    }

    .has-dropdown.active > .nav-link {
        background: #f8f9fa;
        color: var(--text-dark) !important;
        border: none;
    }

    .nav-link.active::after {
        display: none;
    }

    /* Add + icon for dropdown items in mobile */
    .has-dropdown > .nav-link::after {
        content: '+';
        font-size: 1.5rem;
        font-weight: 300;
        color: #999;
        margin-left: auto;
    }

    .has-dropdown > .nav-link:hover::after {
        color: var(--primary-color);
    }

    .has-dropdown.active > .nav-link::after {
        content: '−';
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #fafafa;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        border-top: none;
        margin-top: 0;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 0;
        background: #fafafa;
    }

    .dropdown-menu li {
        border-bottom: 1px solid #e5e7eb;
        background: transparent !important;
        margin-bottom: 0;
    }

    .dropdown-menu li:last-child {
        border-bottom: 1px solid #e5e7eb;
    }

    .dropdown-menu a {
        padding: 0.4rem 0.75rem;
        padding-left: 1.75rem;
        font-size: 0.85rem;
        background: transparent !important;
        display: block;
        text-align: left;
        color: #555 !important;
        border-radius: 0;
        border: none;
        transition: all 0.2s ease;
    }

    .dropdown-menu a:hover {
        background: #f0f0f0 !important;
        color: var(--primary-color) !important;
        border: none;
        transform: none;
        padding-left: 2rem;
    }

    /* Add + icon for nested dropdown items in mobile */
    .dropdown-menu .has-nested > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .dropdown-menu .has-nested > a::after {
        content: '+';
        font-size: 1.2rem;
        font-weight: 300;
        color: #999;
        margin-left: 0.5rem;
    }

    .dropdown-menu .has-nested.active > a::after {
        content: '−';
        color: var(--primary-color);
    }

    /* Mobile Nested Dropdown */
    .nested-dropdown {
        position: static;
        box-shadow: none;
        background: #f0f0f0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        border-top: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
    }

    .has-nested.active > .nested-dropdown {
        max-height: 1000px !important;
        overflow: visible !important;
        padding: 0 !important;
        background: #f0f0f0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    .nested-dropdown li {
        border-bottom: 1px solid #e5e7eb !important;
        background: transparent !important;
        display: block !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 0 !important;
    }

    .nested-dropdown li:last-child {
        border-bottom: 1px solid #e5e7eb !important;
    }

    .nested-dropdown a {
        padding: 0.35rem 0.75rem !important;
        padding-left: 2.5rem !important;
        font-size: 0.8rem !important;
        background: transparent !important;
        text-align: left !important;
        color: #666 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        line-height: 1.3 !important;
        border-radius: 0 !important;
        border: none !important;
        transition: all 0.2s ease !important;
    }

    .nested-dropdown a:hover {
        background: #e5e5e5 !important;
        color: var(--primary-color) !important;
        border: none !important;
        transform: none !important;
        padding-left: 2.75rem !important;
    }

    /* Multi-column dropdowns should be single column on mobile */
    .dropdown-menu.col-2,
    .dropdown-menu.col-3,
    .dropdown-menu.col-4,
    .dropdown-menu.col-5 {
        display: flex;
        flex-direction: column;
        min-width: auto;
    }

    .hero-slider {
        margin-top: 80px;
    }

    .slide img {
        max-height: 300px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
    }

    .slider-btn svg {
        width: 20px;
        height: 20px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .ad-banners {
        display: none;
    }

    .featured-categories {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.7rem;
    }

    .category-card {
        padding: 1rem 0.25rem;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }

    .category-icon svg {
        width: 24px;
        height: 24px;
    }

    .category-card h3 {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .featured-brands {
        padding: 2rem 0;
    }

    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .brand-card {
        padding: 0.75rem;
        min-height: 70px;
    }

    .featured-products {
        padding: 2rem 0;
    }

    .product-image {
        padding-bottom: 100%; /* Keep 1:1 ratio on mobile */
    }

    .product-info {
        padding: 1rem;
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-description {
        font-size: 0.8rem;
    }

    .product-rating {
        margin-bottom: 0.75rem;
    }

    .stars {
        font-size: 0.875rem;
    }

    .rating-count {
        font-size: 0.75rem;
    }

    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .current-price {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--primary-color);
    }

    .old-price {
        font-size: 0.90rem;
        color: var(--text-light);
        text-decoration: line-through;
    }

    .add-to-cart-btn {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 0.75rem;
        font-size: 0.8rem;
    }

    .add-to-cart-btn svg {
        width: 16px;
        height: 16px;
    }

    .quick-view-btn {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }

    .product-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .product-features li {
        font-size: 0.75rem;
        padding: 0.1rem 0;
        padding-left: 1.3rem;
    }

    /* Brands grid set earlier in this block; avoid duplicate */

    .product-features li::before {
        font-size: 1rem;
        left: 0.1rem;
    }

    .product-actions {
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .action-btn {
        width: 32px;
        height: 32px;
    }

    .action-btn svg {
        width: 16px;
        height: 16px;
    }

    .product-select {
        font-size: 0.75rem;
        padding: 0.5rem 0.6rem;
    }

    .product-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .add-to-cart-btn,
    .buy-now-btn {
        width: 100%;
        padding: 0.65rem 0.75rem;
        font-size: 0.8rem;
    }

    .add-to-cart-btn svg,
    .buy-now-btn svg {
        width: 16px;
        height: 16px;
    }

    .hero {
        margin-top: 0;
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Footer Mobile Styles */
    .footer {
        padding: 1.5rem 0 5rem;
    }

    .footer-title {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .footer-support {
        margin-bottom: 1.5rem;
    }

    .support-phone,
    .support-store {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .phone-number {
        font-size: 1.1rem;
    }

    .store-link {
        font-size: 0.9rem;
    }

    /* Clean up About Us links on mobile */
    .footer-about {
        margin-bottom: 1.5rem;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
        line-height: 1.6;
        text-align: center;
    }

    .footer-links a {
        padding: 0.25rem 0;
        border-bottom: none;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .link-separator {
        display: inline;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.4);
        margin: 0 0.15rem;
    }

    .footer-connect {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .company-name {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .company-address {
        font-size: 0.75rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .company-contact {
        gap: 0.5rem;
        align-items: center;
    }

    .company-email,
    .company-phone {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
    }

    .email-label,
    .phone-label {
        font-size: 0.75rem;
        font-weight: 500;
    }

    .email-link,
    .phone-link {
        font-size: 0.75rem;
        font-weight: 400;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .footer-rights {
        font-size: 0.7rem;
    }
}

@media (max-width: 575px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .logo img {
        height: 20px;
        max-width: 200px;
    }

    .product-title {
        font-size: 0.90rem;
    }

    .current-price {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--primary-color);
    }

    .old-price {
        font-size: 0.90rem;
        color: var(--text-light);
        text-decoration: line-through;
    }

    .product-features li {
        font-size: .90rem;
        padding: 0.1rem 0;
        padding-left: 1.3rem;
    }

    /* Ensure brands show 4 columns on very small phones */
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .topbar-content {
        gap: 0.5rem;
        padding: 0.6rem 0;
    }

    .header-icons {
        gap: 0.5rem;
    }

    .icon-link svg {
        width: 20px;
        height: 20px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Samsung Galaxy S8+ and similar small screens (360px) */
@media (max-width: 575px) {
    .logo img {
        height: 20px;
        max-width: 200px;
    }

    /* Keep only layout tweaks here to avoid duplicate style rules */
    .topbar-content {
        gap: 0.4rem;
        padding: 0.5rem 0;
    }

    .hamburger {
        padding: 0.3rem;
    }

    .hamburger span {
        width: 22px;
    }

    .header-icons {
        gap: 0.4rem;
    }

    .icon-link svg {
        width: 18px;
        height: 18px;
    }

    .container {
        padding: 0 10px;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Add padding to body to prevent content from being hidden behind bottom nav */
    body {
        padding-bottom: 70px;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.7rem;
    padding: 4px 8px;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    stroke: var(--text-light);
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    font-weight: 500;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active svg {
    stroke: var(--primary-color);
    transform: scale(1.1);
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-badge {
    position: absolute;
    top: 0;
    right: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.bottom-nav-cart-wrapper {
    position: relative;
}

.bottom-nav-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

.compare-count-badge {
    position: absolute;
    top: -4px;
    right: 4px;
    background: #059669;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* Announcement Bar - Scrolling Text Only */
.announcement-bar {
    background: var(--white);
    color: var(--text-dark);
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.announcement-bar .container {
    overflow: hidden;
}

.announcement-scroll {
    overflow: hidden;
    position: relative;
    padding: 12px 0;
    width: 100%;
}

.announcement-text {
    display: flex;
    gap: 100px;
    animation: scroll 20s linear infinite;
    white-space: nowrap;
}

.announcement-text span {
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
    color: var(--text-dark);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.announcement-bar:hover .announcement-text {
    animation-play-state: paused;
}

/* XL Screens - Larger announcement text */
@media (min-width: 1200px) {
    .announcement-text {
        gap: 120px;
    }

    .announcement-text span {
        font-size: 1.0625rem;
    }

    .announcement-scroll {
        padding: 14px 0;
    }
}

/* XXL Screens - Maximum announcement text */
@media (min-width: 1400px) {
    .announcement-text {
        gap: 150px;
    }

    .announcement-text span {
        font-size: 1.125rem;
    }

    .announcement-scroll {
        padding: 16px 0;
    }
}

@media (max-width: 768px) {
    .announcement-text span {
        font-size: 0.8rem;
        color: var(--text-dark);
    }

    .announcement-scroll {
        padding: 10px 0;
    }
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.3s ease;
}

.cart-sidebar.active {
    pointer-events: auto;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar.active .cart-overlay {
    opacity: 1;
    visibility: visible;
}

.cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active .cart-content {
    transform: translateX(0);
}

/* Cart Header */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0;
}

.cart-close {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-close:hover {
    transform: rotate(90deg);
}

.cart-close svg {
    width: 24px;
    height: 24px;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    padding-right: 2rem;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
}

.cart-item-price {
    font-weight: 600;
    color: var(--text-dark);
}

.cart-multiply,
.cart-equals {
    color: #999;
    font-size: 0.75rem;
}

.cart-item-quantity {
    color: var(--text-dark);
}

.cart-item-quantity-value {
    color: var(--text-dark);
    font-weight: 500;
}

.cart-item-total {
    font-weight: 600;
    color: var(--text-dark);
}

.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

.cart-item-remove svg {
    width: 18px;
    height: 18px;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.cart-promo {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.promo-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.promo-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.promo-apply {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.promo-apply:hover {
    background: var(--secondary-color);
}

.cart-totals {
    margin-bottom: 1rem;
}

.cart-subtotal,
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.cart-subtotal {
    font-size: 0.875rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.cart-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.subtotal-amount,
.total-amount {
    font-weight: 700;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-content {
        max-width: calc(100% - 60px);
        width: calc(100% - 60px);
    }
}

@media (max-width: 575px) {
    .cart-content {
        max-width: calc(100% - 40px);
        width: calc(100% - 40px);
    }

    .cart-header {
        padding: 1rem 1.25rem;
    }

    .cart-items {
        padding: 0.75rem;
    }

    .cart-footer {
        padding: 1.25rem;
    }
}

/* ========================================
   CATEGORY PAGE STYLES
   ======================================== */

.breadcrumb-section {
    background: var(--bg-light);
    padding: 1rem 0;
    margin-top: 48px; /* Minimal gap - exact mobile header height */
}

/* Product details page: remove breadcrumb gap on smallest mobile */
.product-details-page .breadcrumb-section {
    margin-top: 0; /* no gap under header on product details mobile */
}

@media (min-width: 576px) and (max-width: 767px) {
    .breadcrumb-section {
        margin-top: 60px; /* Adjusted for small screens */
    }
    /* Product details page: also remove gap for small landscape mobiles */
    .product-details-page .breadcrumb-section {
        margin-top: 0;
    }
}

@media (min-width: 768px) {
    .breadcrumb-section {
        margin-top: 23px;
    }
}

/* XL Screens: increase offset so breadcrumb clears fixed header (topbar + navbar) */
@media (min-width: 1200px) {
    .breadcrumb-section {
        margin-top: 115px; /* approximate combined header height */
        padding-bottom: 0.5rem; /* reduce gap below breadcrumb */
    }
    /* When header enters scrolled state (topbar hidden), reduce gap */
    .header.scrolled + .breadcrumb-section {
        margin-top: 65px; /* navbar only */
    }

    /* Product details: tighter clearance under fixed header */
    .product-details-page .breadcrumb-section {
        margin-top: 80px;
        padding: 0.5rem 0; /* reduce visible white space */
    }
    .product-details-page .header.scrolled + .breadcrumb-section {
        margin-top: 58px;
    }
}

/* XXL Screens: slight adjustment if header spacing changes */
@media (min-width: 1400px) {
    .breadcrumb-section {
        margin-top: 112px;
        padding-bottom: 0.5rem; /* reduce gap below breadcrumb */
    }
    .header.scrolled + .breadcrumb-section {
        margin-top: 70px;
    }

    /* Product details: tighter clearance under fixed header */
    .product-details-page .breadcrumb-section {
        margin-top: 4px;
        padding: 0.5rem 0; /* reduce visible white space */
    }
    .product-details-page .header.scrolled + .breadcrumb-section {
        margin-top: 56px;
    }
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Category Page Layout */
.category-page {
    padding: 2rem 0;
    background: var(--white);
}

/* Reduce top padding between breadcrumb and category-header on XL screens */
@media (min-width: 1200px) {
    .category-page { padding-top: 0.5rem; }
}
/* Further reduce on XXL screens */
@media (min-width: 1400px) {
    .category-page { padding-top: 0.5rem; }
}

.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* XL Screens - Wider layout */
@media (min-width: 1200px) {
    .category-layout {
        display: grid;
        grid-template-columns: 240px 1fr; /* Narrower sidebar */
        /* Rows: header, toolbar, products, pagination */
        grid-template-rows: auto auto 1fr auto;
        /* Remove vertical gap below category-header; keep horizontal gap */
        column-gap: 2.25rem;
        row-gap: 0;
    }

    /* Make category-main use display: contents to break out its children */
    .category-layout .category-main {
        display: contents;
    }

    /* Category header spans both columns in first row */
    .category-layout .category-header {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    /* Sidebar in second row, first column, spans multiple rows */
    .category-layout .category-sidebar {
        grid-column: 1;
        grid-row: 2 / -1;
    }

    /* Toolbar in second row, second column */
    .category-layout .products-toolbar {
        grid-column: 2;
        grid-row: 2;
    }

    /* Products grid in third row, second column */
    .category-layout .products-grid {
        grid-column: 2;
        grid-row: 3;
    }

    /* Pagination in fourth row, second column */
    .category-layout .pagination {
        grid-column: 2;
        grid-row: 4;
        margin-top: 2rem;
        justify-self: center;
    }
}

/* XXL Screens - Maximum width layout */
@media (min-width: 1400px) {
    .category-layout {
        grid-template-columns: 250px 1fr; /* Slightly wider than XL but still reduced */
        /* Rows: header, toolbar, products, pagination */
        grid-template-rows: auto auto 1fr auto;
        column-gap: 1rem;
        row-gap: 0;
    }

    /* Category header spans both columns in first row */
    .category-layout .category-header {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    /* Sidebar in second row, first column, spans multiple rows */
    .category-layout .category-sidebar {
        grid-column: 1;
        grid-row: 2 / -1;
    }

    /* Toolbar in second row, second column */
    .category-layout .products-toolbar {
        grid-column: 2;
        grid-row: 2;
    }

    /* Products grid in third row, second column */
    .category-layout .products-grid {
        grid-column: 2;
        grid-row: 3;
    }

    /* Pagination in fourth row, second column */
    .category-layout .pagination {
        grid-column: 2;
        grid-row: 4;
        margin-top: 2.5rem;
        justify-self: center;
    }
}

/* XL Screens - Enhanced filter styling */
@media (min-width: 1200px) {
    .category-sidebar {
        padding: 1.70rem; /* Adjust padding for reduced width */
        border-radius: 16px;
    }

    .filter-header h3 {
        font-size: 1.35rem;
    }

    .clear-filters {
        font-size: 0.95rem;
    }

    .filter-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .filter-group {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    .price-input {
        padding: 0.65rem 0.75rem;
        font-size: 0.95rem;
        border-radius: 8px;
        max-width: calc(50% - 1rem);
    }

    .apply-price-btn {
        padding: 0.65rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .filter-option {
        gap: 0.65rem;
        font-size: 0.95rem;
        padding: 0.25rem 0;
    }

    .filter-option input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .filter-option .count {
        font-size: 0.875rem;
    }
}

/* XXL Screens - Even larger filter elements */
@media (min-width: 1400px) {
    .category-sidebar {
        padding: 2rem; /* Slight reduction to fit narrower column */
        border-radius: 18px;
    }

    .filter-header h3 {
        font-size: 1.5rem;
    }

    .clear-filters {
        font-size: 1rem;
    }

    .filter-title {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }

    .filter-group {
        margin-bottom: 2.25rem;
        padding-bottom: 2.25rem;
    }

    .price-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
        max-width: calc(50% - 1rem);
    }

    .apply-price-btn {
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 10px;
    }

    .filter-option {
        gap: 0.75rem;
        font-size: 1rem;
        padding: 0.3rem 0;
    }

    .filter-option input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .filter-option .count {
        font-size: 0.9rem;
    }
}

/* Category Sidebar */
.category-sidebar {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 150px;
}

/* On XL and XXL screens, let the sidebar scroll with the page */
@media (min-width: 1200px) {
    .category-sidebar {
        position: static;
        top: auto;
        max-width: 270px; /* Ensure sidebar doesn't exceed intended width */
    }
    /* Hide filter counts on XL */
    .category-sidebar .filter-option .count { display: none !important; }
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.filter-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.clear-filters {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.clear-filters:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.7rem 0;
}

/* Price Filter */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.price-inputs span {
    flex-shrink: 0;
    color: var(--text-light);
    font-weight: 500;
}

.price-input {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 0.5rem);
    padding: 0.35rem 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    box-sizing: border-box;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.apply-price-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.apply-price-btn:hover {
    background: var(--secondary-color);
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.30rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.filter-option span {
    color: var(--text-dark);
}

.filter-option .count {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Category Main Content */
.category-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Products Toolbar: Mobile version (simplified) */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

/* Toolbar left side */
.products-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Filter toggle button */
.toolbar-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.toolbar-filter-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-filter-btn:active {
    transform: translateY(0);
}

.toolbar-filter-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Hide title and show dropdown on mobile */
.products-toolbar .toolbar-title,
.products-toolbar .show-dropdown,
.products-toolbar .toolbar-view {
    display: none;
}

/* Mobile: Show only sort dropdown */
.products-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    flex: 1;
}

.products-toolbar .sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.products-toolbar .sort-dropdown label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}

.products-toolbar .sort-select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    font-size: 0.875rem;
    cursor: pointer;
}

.products-toolbar .sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Tablet and up: Show title and show dropdown */
@media (min-width: 768px) {
    .products-toolbar .toolbar-title {
        display: block;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-dark);
        margin: 0;
    }

    .products-toolbar .show-dropdown {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .products-toolbar .show-dropdown label {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-dark);
        white-space: nowrap;
    }

    .products-toolbar .show-select {
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--white);
        font-size: 0.875rem;
        cursor: pointer;
    }

    .products-toolbar .show-select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .products-toolbar .toolbar-right {
        width: auto;
    }

    .products-toolbar .sort-dropdown {
        width: auto;
    }

    .products-toolbar .sort-select {
        flex: 0;
    }
}

/* Desktop (1200px+): Show all elements including view toggle */
@media (min-width: 1200px) {
    .products-toolbar {
        padding: 0.75rem 1.25rem;
        border-radius: 12px;
        width: 100%;
        max-width: none;
        /* Align left items naturally and let .toolbar-right push itself
           to the far right via margin-left:auto */
        justify-content: flex-start;
        /* Small intentional gap before products grid on desktop */
        margin-bottom: 0.375rem; /* ~6px */
    }

    /* Hide filter button on desktop - sidebar is always visible */
    .toolbar-filter-btn {
        display: none;
    }

    .products-toolbar .toolbar-title {
        font-size: 1.05rem;
        flex-shrink: 0;
    }

    .products-toolbar .toolbar-left {
        flex-shrink: 0;
    }

    .products-toolbar .toolbar-right {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
        /* Stop stretching and pack items to the far right */
        justify-content: flex-end;
        flex: 0 0 auto;
        /* Ensure no accidental right gap on wide screens */
        margin-right: 0;
    }

    .products-toolbar .toolbar-view {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .products-toolbar .show-dropdown,
    .products-toolbar .sort-dropdown {
        flex-shrink: 0;
    }
}

/* XXL Screens - Enhanced toolbar spacing */
@media (min-width: 1400px) {
    .products-toolbar {
        padding: 0.75rem 1.5rem;
        margin-bottom: 1.375rem; /* keep same subtle gap on XXL */
    }

    .products-toolbar .toolbar-right {
        gap: 1.25rem;
    }
}

/* Category page: give product cards more breathing room on desktop */
@media (min-width: 1200px) {
    .category-page .products-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
@media (min-width: 1600px) {
    .category-page .products-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}
/* Remove top margin of products grid on XL and above to eliminate space under toolbar */
@media (min-width: 1200px) {
    .category-page .products-grid { margin-top: 0; }
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Full width category-header on XL screens (1200px+) */
@media (min-width: 1200px) {
    .category-header {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding-left: max(15px, calc((100vw - 1400px) / 2 + 15px));
        padding-right: max(15px, calc((100vw - 1400px) / 2 + 15px));
        margin-bottom: 2.25rem; /* Add bottom margin to separate from content below */
    }
}

/* Full width category-header on XXL screens (1400px+) */
@media (min-width: 1400px) {
    .category-header {
        padding-left: max(15px, calc((100vw - 1350px) / 2 + 15px));
        padding-right: max(15px, calc((100vw - 1350px) / 2 + 15px));
        margin-bottom: 1.5rem; /* Match the gap from layout */
    }
}

/* When filters are placed inside the header on XL/XXL, add spacing */
@media (min-width: 1200px) {
    .category-header .active-filters {
        margin-top: 0.75rem;
    }
    /* Chip style to match reference: subtle outline pills */
    .category-header .filter-tag {
        background: var(--white);
        color: var(--text-dark);
        border: 1px solid var(--border-color);
        border-radius: 999px;
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }
    .category-header .filter-tag button {
        color: var(--text-light);
        font-size: 1rem;
    }
}

.category-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
}

.results-count {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

/* Category: hide results summary text */
.category-page .results-count { display: none !important; }

/* Category description under H1 */
.category-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

@media (max-width: 768px) {
    .category-description {
        font-size: 0.875rem;
    }
}

.category-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.mobile-filter-toggle svg {
    width: 20px;
    height: 20px;
}

.mobile-filter-toggle:hover {
    background: var(--secondary-color);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 36px;
    height: 36px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.view-btn.active svg,
.view-btn:hover svg {
    color: var(--white);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-tag button:hover {
    opacity: 0.8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn svg {
    width: 18px;
    height: 18px;
}

.page-dots {
    color: var(--text-light);
    padding: 0 0.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .category-layout {
        grid-template-columns: 240px 1fr;
        gap: 1.5rem;
    }

    .category-sidebar {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .breadcrumb-section {
        margin-top: 40px;
        padding: 0.75rem 0;
        margin-bottom: 0;
    }

    /* Remove gap between breadcrumb and category content */
    .category-page {
        padding-top: 0.75rem;
        padding-bottom: 2rem;
    }

    /* Remove gap between products toolbar and grid */
    .products-toolbar {
        margin-bottom: 0;
    }

    /* Category page: show 1 product per row on mobile */
    .category-page .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Category page: mobile card polish for single-column layout */
    .category-page .product-card {
        border-radius: 10px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    }

    /* Use 4:3 image ratio and contain to avoid awkward crops */
    .category-page .product-image {
        padding-bottom: 75%;
        background: var(--white);
    }
    .category-page .product-image img {
        object-fit: contain;
    }

    .category-page .product-info {
        padding: 0.875rem;
    }

    /* Keep titles compact on mobile */
    .category-page .product-title {
        font-size: 1.1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0.5rem;
    }

    /* Show only the first 3 features to reduce height */
    .category-page .product-features li:nth-child(n+4) {
        display: none;
    }

    .category-page .product-footer {
        padding-top: 0.75rem;
    }

    /* Ensure Buy Now is visible on mobile category cards */
    .category-page .buy-now-btn {
        display: flex !important;
    }

    .category-page .add-to-cart-btn,
    .category-page .buy-now-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Category mobile: place action buttons side-by-side */
    .category-page .product-buttons {
        flex-direction: row;
    }
    .category-page .add-to-cart-btn,
    .category-page .buy-now-btn {
        width: auto;
        flex: 1;
    }

    /* Mobile category controls bar styling */
    .category-page .category-controls {
        width: 100%;
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 0.5rem 0.75rem;
        justify-content: space-between;
    }

    .category-page .mobile-filter-toggle {
        display: inline-flex;
        background: var(--white);
        color: var(--text-dark);
        border: none;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        box-shadow: none;
    }

    .category-page .mobile-filter-toggle svg {
        color: var(--text-dark);
    }

    .category-page .sort-dropdown {
        margin-left: auto;
        align-items: center;
        gap: 0.5rem;
    }

    .category-page .sort-select {
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.45rem 0.75rem;
    }

    /* Hide grid/list toggle on mobile for a cleaner UI */
    .category-page .view-toggle { display: none; }

    /* Active filters on mobile: place after the category description */
    .category-page .category-header { display: contents; }
    .category-page .category-info { order: 0; }
    .category-page .active-filters {
        gap: 0.5rem;
        margin-top: 0.5rem;
        order: 1 !important; /* immediately after description */
    }
    .category-page .category-controls { order: 2; }
    /* Ensure product grid follows the controls */
    .category-page .products-grid { order: 3; }
    /* Pagination should appear after products */
    .category-page .pagination { order: 4; }
    .category-page .filter-tag {
        background: var(--white);
        color: var(--text-dark);
        border: 1px solid var(--border-color);
        border-radius: 999px;
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }
    .category-page .filter-tag button {
        color: var(--text-light);
        font-size: 1rem;
    }

    /* Featured Products: disable hover/tap lift & zoom on mobile */
    .featured-products .product-card:hover,
    .featured-products .product-card:active {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .featured-products .product-card:hover .product-image img,
    .featured-products .product-card:active .product-image img {
        transform: none;
    }


/* Touch devices generally: also neutralize hover lift */
@media (hover: none) {
    .featured-products .product-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .featured-products .product-card:hover .product-image img {
        transform: none;
    }
}
    .category-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85vw;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        z-index: 1000;
        transition: left 0.3s;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .category-sidebar.active {
        left: 0;
    }

    /* Filter Overlay */
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .filter-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Filter Close Button */
    .filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--white);
        border: 2px solid var(--border-color);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .filter-close:hover {
        background: var(--bg-light);
        border-color: var(--primary-color);
        transform: rotate(90deg) scale(1.05);
    }

    .filter-close svg {
        width: 20px;
        height: 20px;
        color: var(--text-dark);
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-info h1 {
        font-size: 1.5rem;
    }

    .category-controls {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-filter-toggle {
        display: flex;
    }

    .view-toggle {
        display: none;
    }

    .sort-dropdown {
        flex: 1;
    }

    .sort-select {
        width: 100%;
    }

    /* Mobile Price Filter Improvements */
    .price-inputs {
        gap: 0.5rem;
    }

    .price-input {
        padding: 0.65rem 0.5rem;
        font-size: 0.9375rem;
        min-width: 0;
    }

    .apply-price-btn {
        padding: 0.65rem;
        font-size: 0.9375rem;
    }

    .filter-title {
        font-size: 0.9375rem;
    }
}

@media (max-width: 575px) {
    .category-sidebar {
        width: 90vw;
        max-width: 280px;
    }

    .category-info h1 {
        font-size: 1.25rem;
    }

    .results-count {
        font-size: 0.8rem;
    }

    .sort-dropdown label {
        display: none;
    }

    /* Extra small screen price filter */
    .price-input {
        padding: 0.6rem 0.4rem;
        font-size: 0.875rem;
    }

/* =========================================
   Price Range Single Slider (XL & XXL Only)
   ========================================= */
.range-slider { display: none; margin-top: 0.5rem; }
.range-slider .range-values { display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; gap: 0.2rem; color: var(--text-dark); }
.range-slider .slider-inputs { position: relative; height: 8px; margin: 0.6rem 0 0.5rem; }
.range-slider input[type="range"] { width: 100%; height: 8px; margin: 0; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: var(--white); cursor: pointer; border: 2px solid var(--range-accent); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.range-slider input[type="range"]::-moz-range-thumb { height: 16px; width: 16px; border-radius: 50%; background: var(--white); cursor: pointer; border: 2px solid var(--range-accent); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.range-slider input[type="range"]::-ms-thumb { height: 16px; width: 16px; border-radius: 50%; background: var(--white); cursor: pointer; border: 2px solid var(--range-accent); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.range-slider input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--range-accent); border-radius: 4px; }
.range-slider input[type="range"]::-moz-range-track { height: 6px; background: var(--range-accent); border-radius: 4px; }
.range-slider input[type="range"]::-ms-track { height: 6px; background: var(--range-accent); border-radius: 4px; border-color: transparent; color: transparent; }
.range-slider .slider-track { display: none; }
.range-slider .min-value, .range-slider .max-value { font-weight: 600; }

/* XL & up: show slider; hide manual inputs & apply button */
@media (min-width: 1200px) {
    .range-slider { display: block; }
    .category-sidebar .apply-price-btn { display: none !important; }
    .range-slider .range-values { font-size: 0.8rem; }
    .price-inputs { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
    .price-inputs .price-input { flex: 1; padding: 0.4rem 0.5rem; font-size: 0.75rem; border: 1px solid var(--border-color); border-radius: 4px; }
    .price-inputs .price-input:focus { outline: none; border-color: var(--range-accent); box-shadow: 0 0 0 2px rgba(240,82,47,0.2); }
}

@media (min-width: 1400px) {
    .range-slider .range-values { font-size: 0.85rem; }
    .price-inputs .price-input { padding: 0.45rem 0.55rem; font-size: 0.8rem; }
}

/* Accessibility focus state */
.range-slider input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid rgba(240,82,47,0.35); }
.range-slider input[type="range"]:focus-visible { outline: none; }

/* Force hide Apply button on XL & XXL regardless of earlier rules */
@media (min-width:1200px){
    .category-sidebar .filter-group .apply-price-btn{display:none !important;}
}

/* Refined dual slider appearance override (placed later for priority) */
@media (min-width:1200px){
    .range-slider{position:relative;padding-top:6px;}
    .range-slider .slider-inputs{height:32px;margin:0;}
    .range-slider input[type="range"]{top:50%;transform:translateY(-50%);}
    .range-slider .slider-track{top:50%;transform:translateY(-50%);height:6px;border-radius:3px;}
    .range-slider input[type="range"]::-webkit-slider-thumb{height:18px;width:18px;border:3px solid var(--range-accent);background:#fff;}
    .range-slider input[type="range"]::-moz-range-thumb{height:18px;width:18px;border:3px solid var(--range-accent);background:#fff;}
    .range-slider input[type="range"]::-ms-thumb{height:18px;width:18px;border:3px solid var(--range-accent);background:#fff;}
    /* Hide native tracks leaving only custom gradient track */
    .range-slider input[type="range"]::-webkit-slider-runnable-track{background:transparent;}
    .range-slider input[type="range"]::-moz-range-track{background:transparent;}
}

    .price-inputs span {
        font-size: 0.875rem;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }
}

/* FORCE FIX: Ensure logo and header icons are visible on mobile */
@media (max-width: 768px) {
    .topbar-content .logo {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .topbar-content .logo img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header-icons .mobile-search-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header-icons .wishlist-icon {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ============================================
   PRODUCT DETAILS PAGE STYLES - MOBILE FIRST
   ============================================ */

/* Product Details Container */
.product-details-container {
    padding: 1.5rem 0;
    min-height: 100vh;
    margin-top: 5px; /* Minimal gap - exact mobile header height */
}

@media (min-width: 576px) and (max-width: 767px) {
    .product-details-container {
        margin-top: 60px; /* Adjusted for small screens */
    }
}

@media (min-width: 768px) {
    .product-details-container {
        margin-top: 0; /* Breadcrumb handles spacing on desktop */
    }
}

/* Product Gallery */
.product-gallery {
    margin-bottom: 0.5rem;
}

.main-image {
    position: relative;
    width: 100%;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.wishlist-btn-gallery {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    z-index: 10;
}

.wishlist-btn-gallery svg {
    width: 20px;
    height: 20px;
    color: var(--text-dark);
    transition: all 0.3s;
}

.wishlist-btn-gallery:hover,
.wishlist-btn-gallery:active {
    transform: scale(1.1);
}

.wishlist-btn-gallery:hover svg {
    fill: #ef4444;
    color: #ef4444;
}

/* Thumbnail Images */
.thumbnail-images {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

.thumbnail-images::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-images::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.thumbnail {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

/* Product Info Main */
.product-info-main {
    margin-bottom: 2rem;
}

.product-title-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-rating-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.product-rating-main .stars {
    color: #fbbf24;
    font-size: 1rem;
}

.rating-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.rating-separator {
    color: var(--border-color);
}

.stock-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.stock-status.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.stock-status.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Brand + Model styling */
.product-rating-main .product-brand,
.product-rating-main .product-model {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

@media (min-width: 1200px) {
    .product-rating-main {
        flex-wrap: nowrap;
    }
    .product-rating-main .xl-visible {
        display: inline-flex;
        align-items: center;
        font-size: 0.875rem;
        color: var(--text-light);
    }
}

/* Product Price */
.product-price-main {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: .90rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    background: #ef4444;
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Product Details – Mobile price sizing (placed after base to win cascade) */
@media (max-width: 767px) {
    .product-price-main .current-price {
        font-size: 1.2rem;
    }
    .product-price-main .old-price {
        font-size: 0.90rem;
    }
}

/* Key Features */
.key-features {
    margin-bottom: 1.5rem;
}

.features-title {
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.features-list li svg {
    width: 20px;
    height: 20px;
    color: #10b981;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Product Variants */
.product-variants {
    margin-bottom: 1.5rem;
    display: block; /* Visible on all screen sizes */
}

.variant-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.variant-group {
    margin-bottom: 1.25rem;
    flex: 1;
}

.variant-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
    color: #6b7280;
    text-transform: capitalize;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.variant-option {
    padding: 0.3rem 0.5rem;
    border: 1.5px solid #d1d5db;
    background: var(--white);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.variant-option.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

/* Adjust variants layout on larger screens */
@media (min-width: 768px) {
    .variant-row {
        flex-direction: row;
        gap: 2rem;
        margin-bottom: 1.5rem;
    }
}

/* Additional variant styling for XL screens (1200px+) */
@media (min-width: 1200px) {
    /* Color variant keeps inline layout */
    .variant-group:not(.variant-row .variant-group) {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .variant-group:not(.variant-row .variant-group) .variant-label {
        margin-bottom: 0;
        white-space: nowrap;
        min-width: fit-content;
        flex-shrink: 0;
    }

    .variant-group:not(.variant-row .variant-group) .variant-options {
        flex: 1;
    }
}

/* Quantity Section */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    margin-top:15px;
}

.quantity-label {
    font-weight: 600;
    color: var(--text-dark);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 44px;
}

.qty-btn {
    background: var(--white);
    border: none;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: var(--bg-light);
}

.qty-btn:active {
    background: var(--border-color);
}

.qty-input {
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    width: 60px;
    height: 42px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Mobile Action Icons - Wishlist and Compare */
.mobile-action-icons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.mobile-icon-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-dark);
}

.mobile-icon-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.mobile-icon-btn:hover svg {
    stroke: var(--primary-color);
}

.mobile-icon-btn:active {
    background: var(--primary-color);
}

.mobile-icon-btn:active svg {
    stroke: var(--white);
}

/* Hide mobile action icons on XL screens */
@media (min-width: 1200px) {
    .mobile-action-icons {
        display: none;
    }
}

/* Product Actions Main */
.product-actions-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Action icon buttons: hidden by default (mobile/tablet) */
.action-icon-group {
    display: none;
    gap: 0.75rem;
}

.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--white);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.25s ease;
}

.action-icon-btn svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

.action-icon-btn:hover {
    background: var(--primary-color);
}

.action-icon-btn:hover svg {
    color: var(--white);
}

.compare-action {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
}

.compare-action svg {
    color: var(--white);
}

.compare-action:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    border-color: #047857;
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.compare-action:hover svg {
    color: var(--white);
}

.add-to-cart-btn-main,
.buy-now-btn-main {
    width: 100%;
    padding: 0.625rem 1rem;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-cart-btn-main {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.add-to-cart-btn-main:hover,
.add-to-cart-btn-main:active {
    background: var(--primary-color);
    color: var(--white);
}

.buy-now-btn-main {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: var(--white);
}

.buy-now-btn-main:hover,
.buy-now-btn-main:active {
    background: rgb(220, 38, 38);
}

.add-to-cart-btn-main svg,
.buy-now-btn-main svg {
    width: 20px;
    height: 20px;
}

/* Delivery Info */
.delivery-info {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Base (mobile/tablet) layout for tabs + related (stacked) */
.product-details-page .tabs-related-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.product-details-page .related-products {
    margin-top: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}
.product-details-page .related-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-dark);
}
.product-details-page .related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.product-details-page .related-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f9fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    transition: all .2s ease;
}
.product-details-page .related-item:active {
    background: #f0f4ff;
    border-color: var(--primary-color);
}
.product-details-page .related-thumb {
    width: 85px;
    height: 85px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-details-page .related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-details-page .related-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}
.product-details-page .related-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.product-details-page .related-meta {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.4;
}
.product-details-page .related-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: auto;
}
.product-details-page .price-current {
    color: #dc2626;
    font-weight: 700;
    font-size: 0.875rem;
}
.product-details-page .price-old {
    color: #6b7280;
    text-decoration: line-through;
    font-size: 0.75rem;
}
.product-details-page .related-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.product-details-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: .2s ease;
}
.product-details-page .btn-sm {
    height: 26px;
    padding: 0 8px;
    font-size: 0.7rem;
}
.product-details-page .btn-light {
    background: #ffffff;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}
.product-details-page .btn-light:active {
    background: #f3f4f6;
}
.product-details-page .btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}
.product-details-page .btn-primary:active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Tablet screens: slightly larger sizing */
@media (min-width: 576px) and (max-width: 991px) {
    .product-details-page .related-thumb {
        width: 95px;
        height: 95px;
    }
    .product-details-page .related-name {
        font-size: 0.9rem;
    }
    .product-details-page .related-meta {
        font-size: 0.72rem;
    }
    .product-details-page .price-current {
        font-size: 0.9rem;
    }
}

/* Mobile enhancement: very small screens keep 2-column layout but adjust sizing */
@media (max-width: 575px) {
    .product-details-page .tabs-related-layout {
        gap: 1.25rem;
    }
    .product-details-page .related-products {
        padding: 0.875rem;
    }
    .product-details-page .related-title {
        font-size: 0.95rem;
        margin-bottom: 0.65rem;
    }
    .product-details-page .related-grid {
        gap: 0.65rem;
    }
    .product-details-page .related-item {
        padding: 0.65rem;
        gap: 0.65rem;
    }
    .product-details-page .related-thumb {
        width: 75px;
        height: 75px;
    }
    .product-details-page .related-name {
        font-size: 0.8rem;
    }
    .product-details-page .related-meta {
        font-size: 0.65rem;
    }
    .product-details-page .price-current {
        font-size: 0.8rem;
    }
    .product-details-page .price-old {
        font-size: 0.7rem;
    }
    .product-details-page .btn-sm {
        height: 24px;
        padding: 0 7px;
        font-size: 0.65rem;
    }
}

.delivery-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.delivery-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.delivery-item:first-child {
    padding-top: 0;
}

.delivery-item svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.delivery-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.delivery-text strong {
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.delivery-text span {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Product Tabs */
.product-tabs {
    margin-bottom: 2rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.tabs-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.tab-btn {
    background: #f7f8fb;
    color: #111827;
    padding: 0.9rem 1rem;
    font-weight: 600;
    border: none;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.875rem;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background: #e5e7eb;
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary-color);
}

.tabs-content {
    padding: 1.25rem;
}

.tab-panel {
    display: block;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: 20px;
}

.tab-panel:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tab-panel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tab-panel h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.tab-panel p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Specifications Grid (baseline) */
.specs-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Grouped spec sections to mirror reference design */
.spec-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.spec-section-title {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.spec-section-body { display: block; }

.spec-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.35rem; /* আরও কম gap */
    padding: 0.45rem 0.65rem; /* আরও কমানো হয়েছে */
    border-bottom: 1px solid var(--border-color);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row:nth-child(even) { background: var(--bg-light); }

.spec-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.spec-value {
    color: var(--text-dark);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Reviews Section */
.reviews-summary {
    margin-bottom: 2rem;
}

.rating-overview {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.overall-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stars-large {
    font-size: 1.5rem;
    color: #fbbf24;
}

.review-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reviewer-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.review-stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

.review-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.review-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.review-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.review-helpful span {
    font-size: 0.875rem;
    color: var(--text-light);
}

.helpful-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.helpful-btn:hover {
    background: var(--border-color);
}

.load-more-reviews {
    width: 100%;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.load-more-reviews:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Image Zoom Button */
.image-zoom-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    z-index: 10;
}

.image-zoom-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-dark);
}

.image-zoom-btn:hover,
.image-zoom-btn:active {
    transform: scale(1.1);
    background: var(--primary-color);
}

.image-zoom-btn:hover svg {
    color: var(--white);
}

.main-image {
    cursor: zoom-in;
}

/* Image Popup Modal */
.image-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.image-popup-modal.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.image-popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-popup-content img {
    max-width: 90%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
}

.image-popup-close svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

.image-popup-close:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

.image-popup-close:hover svg {
    color: var(--white);
}

.image-popup-prev,
.image-popup-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
}

.image-popup-prev {
    left: 1rem;
}

.image-popup-next {
    right: 1rem;
}

.image-popup-prev svg,
.image-popup-next svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

.image-popup-prev:hover,
.image-popup-next:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.image-popup-prev:active,
.image-popup-next:active {
    transform: translateY(-50%) scale(0.95);
}

.image-popup-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    z-index: 10001;
}

/* Mobile adjustments for image popup */
@media (max-width: 768px) {
    .image-popup-content {
        padding: 1rem;
    }

    .image-popup-content img {
        max-width: 95%;
        max-height: 80vh;
    }

    .image-popup-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 44px;
        height: 44px;
    }

    .image-popup-prev,
    .image-popup-next {
        width: 44px;
        height: 44px;
    }

    .image-popup-prev {
        left: 0.5rem;
    }

    .image-popup-next {
        right: 0.5rem;
    }

    .image-popup-counter {
        bottom: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Remove gap between products-toolbar and products-grid on mobile */
@media (max-width: 768px) {
    .products-grid {
        margin-top: 0;
    }
}

/* Desktop Navigation - Reset mobile sidebar styles */
@media (min-width: 768px) {
    .navbar {
        position: relative !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: visible !important;
        transition: all 0.3s ease !important;
        z-index: 1050 !important;
        display: block !important;
        flex-direction: row !important;
    }

    .navbar .container {
        max-width: 1600px !important;
        padding: 0 15px !important;
        overflow: visible !important;
        margin: 0 auto !important;
        flex-direction: row !important;
        display: block !important;
    }

    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        padding: 0 !important;
        margin: 0 !important;
        justify-content: space-evenly !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .nav-item {
        margin: 0 !important;
        flex: 0 1 auto !important;
        width: auto !important;
        border-bottom: none !important;
        position: relative !important;
        text-align: center !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .nav-item.has-dropdown {
        position: relative !important;
        overflow: visible !important;
    }

    .nav-link {
        color: #000000 !important;
        background: transparent !important;
        border: none !important;
    }

    .nav-link:hover {
        background: #f2f4f7 !important;
        color: #000000 !important;
    }

    .nav-link.active {
        background: #eef1f6 !important;
        color: #000000 !important;
        border-left: none !important;
    }

    .has-dropdown > .nav-link::after {
        content: none !important;
    }

    /* Reset dropdown for desktop */
    .dropdown-menu {
        position: absolute !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-10px) !important;
        transition: all 0.3s ease !important;
        background: var(--white) !important;
        box-shadow: var(--shadow-lg) !important;
        border-radius: 4px !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
        top: 100% !important;
        left: 0 !important;
        padding: 0 !important;
        min-width: 200px !important;
        z-index: 2000 !important;
        pointer-events: auto !important;
    }

    .has-dropdown:hover .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    .dropdown-menu li {
        border-bottom: none !important;
        background: transparent !important;
    }

    .dropdown-menu li a {
        color: var(--text-dark) !important;
        padding: 0.75rem 1rem !important;
        display: block !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .dropdown-menu li a:hover {
        background: var(--bg-light) !important;
        color: var(--primary-color) !important;
    }

    /* Reset nested dropdown for desktop */
    .nested-dropdown {
        position: absolute !important;
        left: 100% !important;
        top: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateX(-10px) !important;
        transition: all 0.3s ease !important;
        display: none !important;
        max-height: none !important;
        background: var(--white) !important;
        box-shadow: var(--shadow-lg) !important;
        pointer-events: auto !important;
    }

    .has-nested:hover > .nested-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        display: block !important;
    }

    .sidebar-header {
        display: none !important;
    }

    .sidebar-close {
        display: none !important;
    }
}

/* XL Screens - Ensure dropdowns work */
@media (min-width: 1200px) {
    .navbar .container {
        max-width: 250px; /* Match XXL planned width */
        max-width: 1400px !important;
    /* Hide filter counts on XXL */
    .category-sidebar .filter-option .count { display: none !important; }
        width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
    }
    .dropdown-menu {
        position: absolute !important;
        z-index: 2000 !important;
    }

    /* Ensure col-2 uses two-column grid on xl despite generic block reset */
    .dropdown-menu.col-2 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        min-width: 420px !important;
        column-gap: 0.75rem !important;
    }

    .has-dropdown:hover > .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        display: block !important;
    }

    .nested-dropdown {
        position: absolute !important;
        left: 100% !important;
        z-index: 2100 !important;
    }

    .has-nested:hover > .nested-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        display: block !important;
    }
}

/* XXL Screens - Ensure dropdowns work */
@media (min-width: 1400px) {
    .navbar .container {
        max-width: 1350px !important;
        width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
    }
    .dropdown-menu {
        position: absolute !important;
        z-index: 2000 !important;
    }

    /* XXL adjustments for wider two-column dropdown */
    .dropdown-menu.col-2 {
        min-width: 460px !important;
        column-gap: 1rem !important;
    }

    .has-dropdown:hover > .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        display: block !important;
    }

    .nested-dropdown {
        position: absolute !important;
        left: 100% !important;
        z-index: 2100 !important;
    }

    .has-nested:hover > .nested-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        display: block !important;
    }
}

/* Fix: Left-aligned nested dropdown for XL & XXL (override later !important rules) */
@media (min-width: 1200px) {
    .has-nested.left > .nested-dropdown,
    .nested-dropdown.left {
        left: auto !important;
        right: 100% !important;
        transform: translateX(10px) !important; /* initial offset before hover */
    }
    .has-nested.left:hover > .nested-dropdown,
    .has-nested:hover > .nested-dropdown.left {
        transform: translateX(0) !important;
    }
}
@media (min-width: 1400px) {
    .has-nested.left > .nested-dropdown,
    .nested-dropdown.left {
        left: auto !important;
        right: 100% !important;
        transform: translateX(10px) !important;
    }
    .has-nested.left:hover > .nested-dropdown,
    .has-nested:hover > .nested-dropdown.left {
        transform: translateX(0) !important;
    }
}

/* Desktop Navbar Overrides Placeholders */
@media (min-width: 1200px) {
    .navbar {
        /* override styles for ≥1200px screens */
        /* Non-invasive defaults to satisfy linter */
        z-index: 1050;
        background: #ffffff !important;
    }
    /* Reduce navbar item spacing on XL screens */
    .nav-menu {
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        row-gap: 0 !important;
        align-content: center !important;
        column-gap: 0 !important;
        width: 100% !important;
    }
    .nav-menu .nav-item:first-child .nav-link {
        padding-left: 0 !important;
    }
    .nav-link {
        font-size: 0.95rem !important;
        padding: 0.6rem 0.18rem !important;
    }
}

@media (min-width: 1400px) {
    .navbar {
        /* more overrides for ≥1400px screens */
        z-index: 1050;
    }
    /* Further tighten spacing on XXL screens */
    .nav-menu {
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        row-gap: 0 !important;
        align-content: center !important;
        column-gap: 0 !important;
        width: 100% !important;
    }
    .nav-menu .nav-item:first-child .nav-link {
        padding-left: 0 !important;
    }
    .nav-link {
        font-size: 0.9rem !important;
        padding: 0.6rem 0.16rem !important;
    }
}

/* Product Details Page - Desktop Adjustments */
@media (min-width: 768px) {
    .product-details-container .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .product-gallery {
        grid-column: 1 / 2;
    }

    .product-info-main {
        grid-column: 2 / 3;
    }

    .product-tabs {
        grid-column: 1 / -1;
    }

    .tabs-related-layout {
        grid-column: 1 / -1;
    }

    .product-title-main {
        font-size: 2rem;
    }

    .current-price {
        font-size: 2.5rem;
    }

    .product-actions-main {
        flex-direction: row;
    }


    .specs-grid {
        grid-template-columns: 1fr 1fr;
    }

    .spec-row {
        grid-column: span 1;
    }
}

/* Product Details Page - XL Screens */
@media (min-width: 1200px) {
    .product-details-container .container {
        gap: 3rem;
        grid-template-columns: 550px 750px;
    }

    .tabs-related-layout {
        grid-column: 1 / -1;
    }

    /* Product Details: Tabs + Related layout grid on XL screens */
    .product-details-page .tabs-related-layout {
        display: grid !important;
        grid-template-columns: 1fr 340px !important;
        align-items: start;
        gap: 2rem;
        margin-top: 0.5rem;
    }

    /* Tabs card + header layout like screenshot */
    .product-details-page .product-tabs {
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 0; /* sits above related column */
    }
    .product-details-page .product-tabs .tabs-header {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        margin: 0;
        border-bottom: 1px solid var(--border-color);
        overflow: hidden;
    }
    .product-details-page .product-tabs .tab-btn {
        background: #f7f8fb;
        color: #111827;
        padding: 0.9rem 1rem;
        font-weight: 600;
        border: none;
        border-right: 1px solid var(--border-color);
        border-radius: 0;
    }
    .product-details-page .product-tabs .tab-btn:last-child { border-right: none; }
    .product-details-page .product-tabs .tab-btn.active {
        background: #ffffff;
        color: var(--primary-color);
    }
    .product-details-page .product-tabs .tabs-content {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    /* On XL/XXL screens: Show all tab panels (scroll behavior, not tabs) */
    .product-details-page .tab-panel {
        display: block !important;
        margin-bottom: 3rem;
        padding-bottom: 2rem;
        border-bottom: 2px solid var(--border-color);
        scroll-margin-top: 20px; /* Offset for smooth scrolling */
    }

    .product-details-page .tab-panel:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* Add section titles for better navigation on large screens */
    .product-details-page .tab-panel > h3:first-child {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        color: var(--text-dark);
        padding-bottom: 0.5rem;
    }

    /* Spec rows spacing for desktop */
    .product-details-page .spec-row { padding: 0.45rem 0.65rem; grid-template-columns: 220px 1fr; }
    .product-details-page .spec-label { font-size: 0.9rem; }
    .product-details-page .spec-value { font-size: 0.9rem; }

    /* Ensure tabs sit in left column and related in right on XL+ */
    .product-details-page .tabs-related-layout > .product-tabs {
        grid-column: 1 !important;
    }
    .product-details-page .tabs-related-layout > .related-products {
        grid-column: 2 !important;
    }

    .product-details-page .related-products {
        margin-top: 0;
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.25rem 1.25rem 1.5rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        position: static; /* no sticky */
        top: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .product-details-page .related-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0 0 0.5rem;
        color: var(--text-dark);
    }

    .product-details-page .related-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }

    .product-details-page .related-item {
        display: flex;
        flex-direction: row; /* horizontal layout: image left, info right */
        gap: 0.85rem;
        background: #f9fafc;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 0.9rem;
        transition: all .25s ease;
        align-items: flex-start;
    }

    .product-details-page .related-item:hover {
        background: #f0f4ff;
        border-color: var(--primary-color);
        transform: translateY(-2px);
    }

    .product-details-page .related-thumb {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
        position: relative;
        overflow: hidden;
        border-radius: 10px;
        background: #ffffff;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-details-page .related-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* keep padding around image */
        object-position: center;
        display: block;
    }

    .product-details-page .related-info { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; flex: 1; }
    .product-details-page .related-name { font-size: 0.95rem; font-weight: 600; margin: 0; color: var(--text-dark); line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .product-details-page .related-name:hover { color: var(--primary-color); }
    .product-details-page .related-meta { font-size: 0.72rem; color: var(--text-light); line-height: 1.4; }
    .product-details-page .related-price-row { display: flex; align-items: baseline; gap: 0.5rem; margin-top: auto; }
    .product-details-page .price-current { color: #dc2626; font-weight: 700; font-size: 0.95rem; }
    .product-details-page .price-old { color: #6b7280; text-decoration: line-through; font-size: 0.78rem; }
    .product-details-page .related-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
    .product-details-page .btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none; font-weight: 600; transition: .2s ease; }
    .product-details-page .btn-sm { height: 28px; padding: 0 10px; font-size: 0.75rem; }
    .product-details-page .btn-light { background: #ffffff; color: var(--text-dark); border: 1px solid var(--border-color); }
    .product-details-page .btn-light:hover { background: #f3f4f6; }
    .product-details-page .btn-primary { background: var(--primary-color); color: #fff; border: 1px solid var(--primary-color); }
    .product-details-page .btn-primary:hover { background: var(--secondary-color); border-color: var(--secondary-color); }

    /* Show wishlist/compare icons only on XL and larger */
    .action-icon-group {
        display: flex;
        align-items: center;
    }

    .product-title-main {
        font-size: 2.25rem;
    }

    .current-price {
        font-size: 2.75rem;
    }

    .main-image {
        border-radius: 16px;
    }

    .thumbnail {
        width: 80px;
        height: 80px;
    }

    /* Product details: quantity + actions on one line */
    .product-details-page .quantity-section {
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        margin: 0;
    }

    .product-details-page .product-actions-main {
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        margin: 0 0 0 0.75rem; /* slight gap after quantity */
        flex-direction: row;
        flex-wrap: wrap;
        vertical-align: middle;
    }

    .product-details-page .add-to-cart-btn-main,
    .product-details-page .buy-now-btn-main {
        width: auto !important;
        min-width: 160px;
        padding: 0.75rem 1rem;
        flex: 0 0 auto;
    }
}

/* Product Details Page - XXL Screens */
@media (min-width: 1400px) {
    .product-details-container .container {
       gap: 2.25rem;
 /* 20px: fits within 1350px container (1320 content width) */
        max-width: 1350px; /* match navbar/container width for alignment */
        grid-template-columns: 550px 750px; /* 1300 + 20 gap = 1320 */
    }

    .product-title-main {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 3rem;
    }

    .main-image {
        border-radius: 20px;
    }

    .thumbnail {
        width: 90px;
        height: 90px;
    }

    .features-list li {
        font-size: 1rem;
    }

    .review-item {
        padding: 2rem;
    }

    /* Keep inline layout and spacing tight on XXL */
    .product-details-page .quantity-section { gap: 0.75rem; }
    .product-details-page .product-actions-main { gap: 0.75rem; margin-left: 0.75rem; }
    .product-details-page .add-to-cart-btn-main, .product-details-page .buy-now-btn-main { padding: 0.75rem 1rem; width: auto !important; min-width: 160px; }

    /* Product Details: Tabs + Related layout adjustments on XXL screens */
    .product-details-page .tabs-related-layout {
        grid-template-columns: 1fr 360px !important;
        gap: 2.5rem;
    }

    .product-details-page .product-tabs .tab-btn {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .product-details-page .spec-row { padding: 0.55rem 0.8rem; grid-template-columns: 240px 1fr; }
}
/* ================================================
   STICKY CART AND COMPARE BUTTONS (XL/XXL ONLY)
   ================================================ */

/* Hide by default on all screens */
.sticky-action-buttons {
    display: none;
}

/* Show only on XL screens (1200px+) */
@media (min-width: 1200px) {
    .sticky-action-buttons {
        display: flex;
        flex-direction: column;
        position: fixed;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        gap: 15px;
        z-index: 999;
        transition: all 0.3s ease;
    }

    .sticky-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 65px;
        height: 65px;
        background: var(--white);
        border: 2px solid var(--primary-color);
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        position: relative;
        padding: 8px;
        gap: 4px;
    }

    .sticky-btn svg {
        width: 24px;
        height: 24px;
        color: var(--primary-color);
        transition: all 0.3s ease;
    }

    .sticky-btn-text {
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--primary-color);
        transition: all 0.3s ease;
        text-align: center;
    }

    .sticky-btn-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: var(--white);
        font-size: 0.7rem;
        font-weight: 700;
        padding: 3px 7px;
        border-radius: 10px;
        min-width: 20px;
        text-align: center;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }

    .sticky-btn:hover {
        background: var(--primary-color);
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    }

    .sticky-btn:hover svg {
        color: var(--white);
    }

    .sticky-btn:hover .sticky-btn-text {
        color: var(--white);
    }

    .sticky-btn:active {
        transform: scale(0.95);
    }

    /* Special styling for cart button */
    .sticky-cart-btn {
        border-color: #2563eb;
    }

    .sticky-cart-btn:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    }

    /* Special styling for compare button */
    .sticky-compare-btn {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        border-color: #059669;
    }

    .sticky-compare-btn svg {
        color: var(--white);
    }

    .sticky-compare-btn .sticky-btn-text {
        color: var(--white);
    }

    .sticky-compare-btn:hover {
        background: linear-gradient(135deg, #047857 0%, #065f46 100%);
        border-color: #047857;
        box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
    }

    .sticky-compare-btn:hover svg,
    .sticky-compare-btn:hover .sticky-btn-text {
        color: var(--white);
    }

    /* Hide badge if count is 0 */
    .sticky-btn-badge:empty,
    .sticky-btn-badge[data-count="0"] {
        display: none;
    }
}

/* XXL Screens - Slightly larger buttons */
@media (min-width: 1400px) {
    .sticky-action-buttons {
        right: 30px;
        gap: 18px;
    }

    .sticky-btn {
        width: 75px;
        height: 75px;
        padding: 10px;
    }

    .sticky-btn svg {
        width: 28px;
        height: 28px;
    }

    .sticky-btn-text {
        font-size: 0.75rem;
    }

    .sticky-btn-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
        min-width: 22px;
    }
}

/* XL Screens */
@media (min-width: 1200px) {
    .product-features li {
        font-size: 0.8rem;
        color: #6b7280;
        padding: 0.1rem 0;
        padding-left: 1.5rem;
        position: relative;
        line-height: 1.4;
    }

    .product-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-dark);
        margin: 0 0 0.5rem 0;
        line-height: 1.4;
        display: -webkit-box;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .current-price {
        font-size: 1.5rem;
    }

    .old-price {
        font-size: 1rem;
        color: var(--text-light);
        text-decoration: line-through;
    }

    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1rem;
    }

    .brands-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 0.8rem;
    }
}

/* Final specificity override to force 2-column layout for col-2 dropdowns on large screens */
@media (min-width: 1200px) {
    .nav-menu .nav-item.has-dropdown > ul.dropdown-menu.col-2 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        min-width: 420px !important; /* narrower */
        column-gap: 0.45rem !important; /* tighter gap */
        background: linear-gradient(to right, #ffffff 0%, #ffffff 49.5%, #e9eef3 50%, #e9eef3 50.5%, #ffffff 51%, #ffffff 100%) !important; /* subtle center divider */
    }
    .nav-menu .nav-item.has-dropdown > ul.dropdown-menu.col-2 > li {
        width: 100% !important;
        padding: 0 !important;
    }
}
@media (min-width: 1400px) {
    .nav-menu .nav-item.has-dropdown > ul.dropdown-menu.col-2 {
        min-width: 450px !important;
        column-gap: 0.55rem !important;
    }
}
/* Left-anchored multi-column dropdown: place menu so it expands leftwards */
@media (min-width: 1200px) {
    .nav-menu .nav-item.has-dropdown > ul.dropdown-menu.left {
        left: auto !important;
        right: 0 !important; /* anchor right edge under nav item */
        transform-origin: top right !important;
    }
    /* If also col-2, keep width rules but still anchor right */
    .nav-menu .nav-item.has-dropdown > ul.dropdown-menu.col-2.left {
        left: auto !important;
        right: 0 !important;
    }
}
@media (min-width: 1400px) {
    .nav-menu .nav-item.has-dropdown > ul.dropdown-menu.left {
        left: auto !important;
        right: 0 !important;
    }
}

/* Final override: ensure XL/XXL dropdowns show separators */
@media (min-width: 1200px) {
    .dropdown-menu li,
    .dropdown-menu li:last-child,
    .nested-dropdown li,
    .nested-dropdown li:last-child {
        border-bottom: 1px solid #f1f1f3 !important;
    }
}

/* XXL Screens */
@media (min-width: 1400px) {
    .product-features li {
        font-size: 0.8rem;
        color: #6b7280;
        padding: 0.1rem 0;
        padding-left: 1.5rem;
        position: relative;
        line-height: 1.4;
    }

    .product-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-dark);
        margin: 0 0 0.5rem 0;
        line-height: 1.4;
        display: -webkit-box;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .current-price {
        font-size: 1.8rem;
    }

    .old-price {
        font-size: 1.2rem;
        color: var(--text-light);
        text-decoration: line-through;
    }

    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1rem;
    }

    .brands-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 0.8rem;
    }
}

/* Center About Section Text */
.about .about-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: block !important;
    grid-template-columns: unset !important;
}

.about .about-text p,
.about .about-text h2,
.about .about-text h3,
.about .about-text ul {
    text-align: center;
}
