:root {
    --bs-primary: #F15A29;
    --bs-primary-hover: #d4491c;
    --bs-primary-rgb: 241, 90, 41;
    --bs-dark: #111827;
    --bs-body-font-family: 'Inter', sans-serif;
    --bs-body-bg: #F5F5F5;
}

body {
    font-family: var(--bs-body-font-family);
    background-color: var(--bs-body-bg);
    /* Add padding bottom on mobile to accommodate bottom nav bar */
    padding-bottom: 70px;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

/* Override Bootstrap Utilities */
.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-dark {
    background-color: var(--bs-dark) !important;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--bs-primary-hover);
    border-color: var(--bs-primary-hover);
    color: #fff;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: white;
}

/* Helper Classes */
.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-text-primary:hover {
    color: var(--bs-primary) !important;
}

.hover-bg-primary:hover {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

.bg-orange-50 {
    background-color: #fff7f5 !important;
}

/* New Category Design Styles */
.category-card {
    transition: all 0.3s ease;
    border-color: rgba(241, 90, 41, 0.15) !important;
    /* Light tint of primary color */
}

.category-card:hover {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 8px 16px rgba(241, 90, 41, 0.15) !important;
    transform: translateY(-3px);
}

.category-card:hover .category-img-zoom {
    transform: scale(1.08);
}

.category-img-zoom {
    transition: transform 0.4s ease;
}

/* Custom Pagination (Matching the Image) */
.category-pagination .swiper-pagination-bullet {
    background: #ffbba6;
    /* Light primary color */
    opacity: 0.8;
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
    transition: all 0.3s ease;
}

.category-pagination .swiper-pagination-bullet-active {
    background: var(--bs-primary);
    opacity: 1;
    width: 24px;
    /* Pill shape for active dot */
    border-radius: 4px;
}

/* Typography Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Keep one sticky header without competing transform layers. */
html, body { width: 100%; min-width: 0; }
@supports (overflow: clip) {
    html, body { overflow-x: clip; }
}
.site-header { top: 0; width: 100%; max-width: 100%; }
.site-header-main, .site-header-actions { min-width: 0; }
.site-header-actions { flex-shrink: 0; }
@media (min-width: 768px) {
    html { scroll-behavior: smooth; }
}
@media (max-width: 767.98px) {
    html { scroll-behavior: auto; }
    .site-header { position: sticky; transform: none; perspective: none; will-change: auto; }
    .site-header-main { gap: 8px !important; padding-inline: 12px; }
    .site-header-logo > span { font-size: clamp(17px, 4.7vw, 24px) !important; }
    .site-header-actions { gap: 8px !important; }
    .site-header-actions .rounded-circle { width: 34px !important; height: 34px !important; }
    .site-topbar { flex-wrap: wrap; gap: 6px 12px; font-size: .65rem !important; }
    .site-topbar > div { gap: 8px !important; }
    .site-topbar a { white-space: nowrap; }
    .site-header input { font-size: 16px; }
    .new-arrivals-swiper, .new-category-swiper, .brands-swiper { touch-action: pan-y pinch-zoom; }
}
@media (hover: none), (pointer: coarse) {
    .product-card:hover, .category-card:hover { transform: none; }
    .product-card:hover .product-img, .category-card:hover .category-img-zoom { transform: none; }
}
/* Premium custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary-hover);
}

/* Hide scrollbar for horizontal scroll containers */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Specific Component Styles */
.z-index-highest {
    z-index: 1050;
}

/* Search Box Dropdown - Centered & Wide */
.search-suggestion-box {
    width: 800px;
    max-width: 95vw;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    /* Hidden by default */
}

/* Hero Slider Resizing */
.hero-slider-container {
    height: 250px;
}

@media (min-width: 576px) {
    .hero-slider-container {
        height: 400px;
    }
}

@media (min-width: 768px) {
    .hero-slider-container {
        height: 500px;
    }
}

/* Swiper Customizations */
.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--bs-primary);
    opacity: 1;
    width: 25px;
    border-radius: 5px;
}

/* Hide default Swiper navigation icons */
.swiper-button-next::after,
.swiper-button-prev::after {
    display: none;
}

.swiper-button-next,
.swiper-button-prev {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    transition: background 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Promo Card Overlay */
.promo-overlay {
    background: linear-gradient(to right, rgba(234, 88, 12, 0.7), rgba(0, 0, 0, 0.5));
}

/* Product Card Interactions */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

/* Horizontal Snap Scrolling */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-start {
    scroll-snap-align: start;
}

/* Drawers (Cart & Category) */
.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: #fff;
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.side-drawer.show {
    transform: translateX(0);
}

.bottom-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85vh;
    background: #fff;
    z-index: 1060;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

.bottom-drawer.show {
    transform: translateY(0);
}

/* Animation */
@keyframes pulse-custom {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse-custom {
    animation: pulse-custom 2s infinite;
}



/* Drawer Overlay Glass Effect */
.glass-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Glass effect for desktop modal */
@media (min-width: 768px) {
    #user-modal {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        background-color: rgba(0, 0, 0, 0.5) !important;
    }
}

/* Custom Checkbox */
.custom-checkbox .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.custom-checkbox .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(241, 90, 41, 0.25);
    border-color: var(--bs-primary);
}

/* Range Slider Customization */
.form-range::-webkit-slider-thumb {
    background: var(--bs-primary);
}

.form-range::-webkit-slider-thumb:active {
    background-color: var(--bs-primary-hover);
}

.login-banner-overlay {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.85) 0%, rgba(241, 90, 41, 0.6) 100%);
}

/* Profile Specific Styles */
.profile-nav-link {
    color: #4b5563;
    font-weight: 600;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.profile-nav-link:hover {
    background-color: var(--bs-body-bg);
    color: var(--bs-primary);
}

.profile-nav-link.active {
    background-color: rgba(241, 90, 41, 0.1);
    color: var(--bs-primary);
    border-left: 4px solid var(--bs-primary);
}

@media (max-width: 991px) {
    .profile-nav-link.active {
        border-left: none;
        border-bottom: 3px solid var(--bs-primary);
    }
}

.order-status-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 50rem;
    font-weight: 700;
    text-transform: uppercase;
}
/* New Arrivals: match the recommended product cards. */
#new-arrivals .new-arrivals-swiper { min-width: 0; width: 100%; overflow: hidden; padding: 5px 0 12px; }
#new-arrivals .swiper-wrapper { flex-wrap: nowrap; align-items: stretch; }
#new-arrivals .swiper-slide { min-width: 0; height: auto; }
#new-arrivals .prod-prev, #new-arrivals .prod-next { width: 32px; height: 32px; }
#new-arrivals .swiper-button-disabled { opacity: .35; cursor: default; }
#new-arrivals .swiper-button-lock { display: none; }
#new-arrivals .product-card { min-width: 0; overflow: hidden; }
#new-arrivals .arrival-image-frame { position: relative; display: block; flex: 0 0 180px; width: 100%; height: 180px; }
#new-arrivals .arrival-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
#new-arrivals .arrival-category { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .55rem; letter-spacing: .05em; }
#new-arrivals .arrival-name { height: 2.8em; overflow-wrap: anywhere; font-size: .75rem; line-height: 1.4; }
#new-arrivals .arrival-price { font-size: .9rem; }
#new-arrivals .arrival-order { padding: 8px 6px; font-size: .8rem; }
#new-arrivals a:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { #new-arrivals .product-card, #new-arrivals .arrival-image { transition: none; } }

/* Category navigation on desktop and mobile. */
.category-navbar, .category-navbar .container-lg, .category-navbar-items { min-width: 0; max-width: 100%; }
.category-navbar-items { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.category-navbar-items a[aria-current="page"] { border-color: var(--bs-primary) !important; color: var(--bs-primary) !important; }
.category-navbar-items a:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
#category-drawer { height: 85vh; height: 85dvh; max-height: 100dvh; }
#category-drawer > :first-child { flex-shrink: 0; }
#category-drawer .category-drawer-content { min-height: 0; overscroll-behavior-y: contain; padding-bottom: calc(3rem + env(safe-area-inset-bottom)) !important; }
#main-cat-grid > .col { min-width: 0; }
#main-cat-grid .mobile-category-card { min-width: 0; color: inherit; }
#main-cat-grid .mobile-category-card span { max-width: 100%; overflow-wrap: anywhere; }
#main-cat-grid .mobile-category-card:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
#cat-modal-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 8px; }
@media (max-width: 359.98px) {
    #main-cat-grid > .col { flex: 0 0 auto; width: 50%; }
}
/* Subcategory dropdowns float above the scrollable category bar. */
.navbar-submenu-toggle { display: grid; place-items: center; width: 28px; height: 28px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: #f5f5f5; color: #555; font-size: 10px; flex-shrink: 0; }
.navbar-submenu-toggle:hover, .navbar-submenu-toggle[aria-expanded="true"] { background: var(--bs-primary); color: #fff; }
.navbar-submenu-toggle:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.navbar-category-submenu { position: fixed; z-index: 1055; width: 250px; max-width: calc(100vw - 16px); padding: 8px; overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #eee; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.navbar-category-submenu[hidden] { display: none; }
.navbar-submenu-link { display: block; padding: 11px 12px; border-radius: 6px; color: #333; text-decoration: none; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.navbar-submenu-link:hover, .navbar-submenu-link:focus-visible { background: #fff1eb; color: var(--bs-primary); }

/* Shared desktop and mobile product search. */
.product-search { min-width: 0; width: 100%; }
.product-search-input { min-width: 0; box-shadow: none !important; }
.product-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1060; max-height: min(60dvh, 520px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #e9ecef; border-radius: 14px; background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.13); }
.product-search-results[hidden], .product-search-all[hidden] { display: none !important; }
.product-search-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #26313c; text-decoration: none; border-top: 1px solid #f2f2f2; }
.product-search-item:hover, .product-search-item:focus-visible { background: #fff2ed; outline: none; box-shadow: inset 3px 0 var(--bs-primary); }
.product-search-item img { width: 54px; height: 54px; flex-shrink: 0; object-fit: contain; border-radius: 8px; background: #f8f9fa; }
.product-search-item > span { min-width: 0; }
.product-search-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.product-search-price { display: block; margin-top: 4px; color: var(--bs-primary); font-size: 13px; font-weight: 700; }
.product-search-all { color: var(--bs-primary); background: #fff; font-size: 13px; }
@media (max-width: 767.98px) {
    #mobile-search-container .product-search-results { max-height: 48dvh; }
    .product-search-item { padding: 10px 12px; gap: 10px; }
}