/* base_ecommerce.css */
[x-cloak] {
    display: none !important;
}


/* Apply theme colors to links */
a:not(.no-theme) {
    color: var(--theme-primary);
}

a:not(.no-theme):hover {
    opacity: 0.8;
}

/* Primary buttons (Add to Cart, etc) */
.btn-primary,
.bg-theme-primary,
.add-to-cart-inline,
button[class*="bg-blue-"],
a[class*="bg-blue-"] {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: white !important;
}

.add-to-cart-inline:hover {
    filter: brightness(0.9);
}

/* Secondary buttons (Buy Now, etc) */
.btn-secondary,
.bg-theme-secondary,
button[class*="bg-orange-"],
a[class*="bg-orange-"],
button[class*="from-orange-"],
a[class*="from-orange-"] {
    background: var(--theme-secondary) !important;
    border-color: var(--theme-secondary) !important;
    color: white !important;
}

/* Text colors */
.text-theme-primary,
.text-blue-600,
.dark .text-blue-400 {
    color: var(--theme-primary) !important;
}

.text-theme-secondary {
    color: var(--theme-secondary) !important;
}

/* Border colors */
.border-theme-primary {
    border-color: var(--theme-primary) !important;
}

/* Hover states */
.hover\:bg-theme-primary:hover,
.hover\:text-theme-primary:hover {
    background-color: var(--theme-primary) !important;
}

/* Navigation active/hover states */
.nav-link:hover,
.dashboard-menu-item:hover {
    color: var(--theme-primary) !important;
}

.nav-link-item {
    color: #374151;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.dark .nav-link-item {
    color: #d1d5db;
}

.nav-link-item:hover {
    color: #2563eb;
}

/* Smooth Header Scroll Transitions */
header,
#main-header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: auto;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Prevent flickering during scroll transitions */
#main-header>div {
    will-change: auto;
    transform: translate3d(0, 0, 0);
}

/* Top bar smooth animation */
[data-top-bar] {
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: opacity, transform;
}

/* Header states smooth transitions */
[data-header-full],
[data-header-compact] {
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: opacity, transform;
}

/* Ensure no layout shift during transitions */
#main-header {
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Default text colors (for non-home pages or when solid) */
header .nav-link-item,
header a:not(.btn-login),
header span:not(.cart-count-badge),
header button,
header i {
    color: #374151 !important;
    text-shadow: none;
}

.dark header .nav-link-item,
.dark header a:not(.btn-login),
.dark header span:not(.cart-count-badge),
.dark header button,
.dark header i {
    color: #d1d5db !important;
}

/* Scrolled Solid Header State */
header.solid-header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(10px);
}

.dark header.solid-header {
    background-color: rgba(31, 41, 55, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* White text on transparent header removed */

/* Logo always shows original colors */
header img {
    filter: none;
}

/* Force dark icons/text removed */

.btn-login {
    background-color: #2563eb;
    color: white;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background-color: #1d4ed8;
}

.btn-login:active {
    transform: scale(0.95);
}

/* Navigation & Scrollbar Styles */
.nav-link {
    color: #374151;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.dark .nav-link {
    color: #d1d5db;
}

.nav-link:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.dark .nav-link:hover {
    color: #60a5fa;
    background-color: rgba(30, 58, 138, 0.2);
}

.nav-link:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3b82f6;
}

.dark .nav-link:focus {
    box-shadow: 0 0 0 2px #1f2937, 0 0 0 4px #3b82f6;
}

.nav-link-active {
    color: #2563eb;
    background-color: #eff6ff;
    font-weight: 600;
}

.dark .nav-link-active {
    color: #60a5fa;
    background-color: rgba(30, 58, 138, 0.3);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.dark .mobile-nav-link {
    color: #d1d5db;
}

.mobile-nav-link:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    transform: translateX(4px);
}

.dark .mobile-nav-link:hover {
    background-color: #374151;
    color: #60a5fa;
}

.mobile-sub-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.dark .mobile-sub-nav-link {
    color: #9ca3af;
}

.mobile-sub-nav-link:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    transform: translateX(4px);
}

.dark .mobile-sub-nav-link:hover {
    background-color: #374151;
    color: #60a5fa;
}

.category-link {
    display: flex;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.dark .category-link {
    color: #e5e7eb;
}

.category-link:hover {
    background-color: #f9fafb;
    color: #2563eb;
    padding-left: 1.5rem;
}

.dark .category-link:hover {
    background-color: #374151;
    color: #60a5fa;
}

/* Smooth animations */
.nav-link:hover i,
.mobile-nav-link:hover i {
    transform: scale(1.1);
}

/* Custom scrollbar for mobile menu */
.mobile-menu-scroll::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-scroll::-webkit-scrollbar-track {
    background-color: #f3f4f6;
}

.dark .mobile-menu-scroll::-webkit-scrollbar-track {
    background-color: #1f2937;
}

.mobile-menu-scroll::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 9999px;
}

.dark .mobile-menu-scroll::-webkit-scrollbar-thumb {
    background-color: #4b5563;
}

.mobile-menu-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

.dark .mobile-menu-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}

/* Loader animations */
@keyframes bounceY {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-12px);
    }
}

@keyframes pulseSquare {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(.55);
        opacity: .5;
    }
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    50% {
        transform: rotateX(180deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(180deg) rotateY(180deg);
    }
}

@keyframes morph {
    0% {
        border-radius: 35% 55% 45% 65% / 55% 35% 65% 45%;
    }

    50% {
        border-radius: 55% 35% 65% 45% / 35% 65% 45% 55%;
    }

    100% {
        border-radius: 35% 55% 45% 65% / 55% 35% 65% 45%;
    }
}

@keyframes fadeDot {

    0%,
    80%,
    100% {
        opacity: .25;
    }

    40% {
        opacity: 1;
    }
}

.loader-dots span {
    animation: bounceY 1.2s infinite ease-in-out;
}

.loader-grid span {
    animation: pulseSquare 1.3s infinite ease-in-out;
}

.loader-grid span:nth-child(2) {
    animation-delay: .1s
}

.loader-grid span:nth-child(3) {
    animation-delay: .2s
}

.loader-grid span:nth-child(4) {
    animation-delay: .1s
}

.loader-grid span:nth-child(5) {
    animation-delay: .2s
}

.loader-grid span:nth-child(6) {
    animation-delay: .3s
}

.loader-grid span:nth-child(7) {
    animation-delay: .2s
}

.loader-grid span:nth-child(8) {
    animation-delay: .3s
}

.loader-grid span:nth-child(9) {
    animation-delay: .4s
}

.loader-dots span:nth-child(1) {
    animation-delay: 0s
}

.loader-dots span:nth-child(2) {
    animation-delay: .15s
}

.loader-dots span:nth-child(3) {
    animation-delay: .3s
}

.loader-cube {
    animation: rotateCube 2s infinite linear;
    transform-style: preserve-3d;
}

.loader-cube div {
    position: absolute;
    inset: 0;
    border: 3px solid #3b82f6;
    box-sizing: border-box;
    border-radius: 6px;
}

.loader-morph {
    animation: morph 2.2s infinite ease-in-out;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.loader-fade span {
    animation: fadeDot 1.1s infinite ease-in-out;
    display: block;
}

.loader-fade span:nth-child(2) {
    animation-delay: .15s
}

.loader-fade span:nth-child(3) {
    animation-delay: .3s
}

/* Hero title animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Swiper Pagination - Thin Bars Style */
.swiper-pagination-bullet {
    width: 20px !important;
    height: 3px !important;
    border-radius: 0 !important;
    background: #9ca3af !important; /* Gray-400 */
    opacity: 0.5 !important;
    margin: 0 4px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #000000 !important; /* Active Color - Default Black */
    opacity: 1 !important; /* Ensure visibility */
    width: 30px !important;
}

/* For Hero Slider specifically (often on dark images), make it white-ish */
.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5) !important;
}
.hero-swiper .swiper-pagination-bullet-active {
    background: #ffffff !important;
}