@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --color-primary: #dc2626;      /* Premium Red */
    --color-primary-hover: #b91c1c;
    --color-secondary: #000000;    /* Accent Black */
    --color-secondary-hover: #1a1a1a;
    --color-text-dark: #111111;
    --color-text-light: #6b7280;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-dark);
    background-color: #f3f4f6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Custom Utilities & Animations */
.bg-primary { background-color: var(--color-primary); }
.text-primary { color: var(--color-primary); }
.border-primary { border-color: var(--color-primary); }

.bg-secondary { background-color: var(--color-secondary); }
.text-secondary { color: var(--color-secondary); }
.border-secondary { border-color: var(--color-secondary); }

/* Premium Card Hover Effect */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Glassmorphism Classes */
.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for sidebars & dropdowns */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Micro-animations */
.hover-scale {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-scale:hover {
    transform: scale(1.03);
}

/* Quantity input spin removal */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Active sidebar link */
.sidebar-link.active {
    background-color: rgba(35, 58, 149, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

/* Keyframes for Dropdown and Entrance Animations */
@keyframes slideDownIn {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wiggle {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-3deg); }
}

/* Animation Classes */
.animate-slide-down {
    animation: slideDownIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-wiggle {
    animation: wiggle 0.4s ease-in-out;
}

/* Underline Animation for Navigation Links */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu Show on Hover/Click with Transition */
.dropdown-animate {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.group:hover .dropdown-animate {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Location Selector Specific Styling */
.location-selector-btn {
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    background-color: #f3f4f6;
}
.location-selector-btn:hover {
    border-color: rgba(35, 58, 149, 0.2);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Hero Section Custom Enhancements */
.hero-slider-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.2) 100%);
    z-index: 1;
}

.hero-overlay-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.65) 50%, rgba(17, 24, 39, 0.2) 100%);
    z-index: 1;
}

/* Smooth Category Sidebar List */
.category-sidebar-list a {
    position: relative;
    overflow: hidden;
}
.category-sidebar-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--color-primary);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}
.category-sidebar-list a:hover::before {
    transform: scaleY(1);
}

/* Bacola Search Box Dropdown Styles */
.search-category-select {
    max-width: 160px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide scrollbar utility class */
.no-scrollbar::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Mobile App Layout Adjustments */
@media (max-width: 639px) {
    /* Product card adjustments on mobile */
    .product-card {
        border-radius: 20px !important;
    }
    .product-card a.relative {
        padding-top: 80% !important; /* Slightly taller aspect ratio for mobile grid */
    }
    .product-card div.p-5 {
        padding: 10px !important; /* Smaller padding for mobile columns */
    }
    .product-card a.font-bold {
        font-size: 12px !important;
        margin-bottom: 2px !important;
        line-height: 1.25 !important;
    }
    .product-card span.text-\[9px\] {
        font-size: 8px !important;
    }
    .product-card div.text-xs {
        font-size: 9px !important;
        margin-bottom: 6px !important;
    }
    .product-card div.mb-4.font-sans,
    .product-card div.font-sans {
        display: none !important; /* Hide reviews on mobile grid to save space */
    }
    .product-card div.product-card-footer,
    .product-card div.mt-auto {
        padding-top: 6px !important;
        gap: 6px !important;
    }
    .product-card span.text-xl {
        font-size: 13px !important;
    }
    .product-card span.line-through {
        font-size: 9px !important;
    }
    .product-card button.add-to-cart-ajax, 
    .product-card button[disabled] {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        border-radius: 10px !important;
        font-size: 8px !important;
        letter-spacing: 0.05em !important;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: 74px !important; /* Prevent content overlapping sticky mobile nav */
    }
}

/* ==========================================
   PREMIUM DARK / BLACK THEME STYLING
   ========================================== */

/* Product card backgrounds using dynamic variables */
.product-card,
.category-sidebar-list,
.bg-white {
    background-color: var(--color-card-bg, #ffffff) !important;
}

/* Dark/Black Theme CSS overrides */
body.dark-theme {
    background-color: #08080a !important;
    color: #f3f4f6 !important;
}

/* Base text color overrides for visibility and contrast */
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6 {
    color: #ffffff !important;
}

.dark-theme .text-gray-900,
.dark-theme .text-gray-800,
.dark-theme .text-gray-700 {
    color: #f3f4f6 !important;
}

.dark-theme .text-gray-650,
.dark-theme .text-gray-600 {
    color: #e4e4e7 !important;
}

.dark-theme .text-gray-550,
.dark-theme .text-gray-500,
.dark-theme .text-gray-400,
.dark-theme .text-gray-450 {
    color: #a1a1aa !important;
}

/* Card overrides in dark theme (supports dynamic dark card background picker) */
.dark-theme .bg-white,
.dark-theme .product-card,
.dark-theme .category-sidebar-list {
    background-color: var(--color-card-bg-dark, #121214) !important;
    border-color: #1f2937 !important;
}

.dark-theme .bg-gray-50 {
    background-color: #18181b !important;
}

.dark-theme .bg-gray-50\/50 {
    background-color: rgba(24, 24, 27, 0.5) !important;
}

.dark-theme .bg-gray-100 {
    background-color: #27272a !important;
}

/* Border overrides */
.dark-theme .border-gray-50,
.dark-theme .border-gray-100,
.dark-theme .border-gray-200,
.dark-theme .border-gray-300 {
    border-color: #1f2937 !important;
}

.dark-theme .divide-gray-50 > :not([hidden]) ~ :not([hidden]),
.dark-theme .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #1f2937 !important;
}

/* Category sidebar active links */
.dark-theme .category-sidebar-list a.sidebar-link {
    border-color: #1f2937 !important;
    color: #d1d5db !important;
}

.dark-theme .category-sidebar-list a.sidebar-link:hover {
    background-color: rgba(220, 38, 38, 0.1) !important;
    color: var(--color-primary) !important;
}

.dark-theme .category-sidebar-list a.sidebar-link.active {
    background-color: rgba(220, 38, 38, 0.1) !important;
    color: var(--color-primary) !important;
}

/* Mobile bottom navigation */
.dark-theme .fixed.bottom-0 {
    background-color: rgba(18, 18, 20, 0.95) !important;
    border-top-color: #1f2937 !important;
}

.dark-theme .fixed.bottom-0 a {
    color: #a1a1aa !important;
}

.dark-theme .fixed.bottom-0 a.text-primary {
    color: var(--color-primary) !important;
}

/* Inputs, Selects, Textareas inside dark theme cards */
.dark-theme input,
.dark-theme select,
.dark-theme textarea {
    background-color: #18181b !important;
    color: #f3f4f6 !important;
    border-color: #27272a !important;
}

.dark-theme input:focus,
.dark-theme select:focus,
.dark-theme textarea:focus {
    background-color: #09090b !important;
    border-color: var(--color-primary) !important;
}

/* Qty selector wrapper override */
.dark-theme .qty-selector {
    background-color: #18181b !important;
    border-color: #27272a !important;
}

.dark-theme .qty-selector button:hover {
    background-color: #27272a !important;
    color: #ffffff !important;
}

/* Badges overrides */
.dark-theme .bg-primary-light {
    background-color: rgba(220, 38, 38, 0.15) !important;
    color: #ffffff !important;
}

/* Star rating selector overrides */
.dark-theme #star-rating-selector i.text-gray-350,
.dark-theme #star-rating-selector i.text-gray-300 {
    color: #3f3f46 !important;
}

/* Checkout and Cart layout overrides */
.dark-theme table {
    border-color: #1f2937 !important;
}
.dark-theme th {
    background-color: #18181b !important;
    color: #ffffff !important;
    border-bottom-color: #27272a !important;
}
.dark-theme td {
    border-bottom-color: #1f2937 !important;
}

/* Toast/Alerts overrides */
.dark-theme .bg-rose-50 {
    background-color: #2d1313 !important;
    border-color: #4c1d1d !important;
    color: #fecaca !important;
}
.dark-theme .text-rose-600 {
    color: #fca5a5 !important;
}

/* Hero Section slider overlays in dark theme */
.dark-theme .hero-overlay-tint {
    background: linear-gradient(90deg, rgba(8, 8, 10, 0.98) 0%, rgba(8, 8, 10, 0.85) 45%, rgba(8, 8, 10, 0.3) 100%) !important;
}
@media (max-width: 768px) {
    .dark-theme .hero-overlay-tint {
        background: linear-gradient(180deg, rgba(8, 8, 10, 0.7) 0%, rgba(8, 8, 10, 0.95) 100%) !important;
    }
}
.dark-theme .hero-slide {
    background-color: transparent !important;
}
.dark-theme .hero-slide .slide-content span.bg-primary\/10 {
    background-color: rgba(220, 38, 38, 0.2) !important;
    color: #ffffff !important;
}
.dark-theme .hero-slide .slide-content p.text-gray-500 {
    color: #a1a1aa !important;
}
.dark-theme .hero-slide .slide-content .bg-white\/75 {
    background-color: rgba(18, 18, 20, 0.75) !important;
    border-color: #27272a !important;
}
.dark-theme .hero-slide .slide-content .bg-white\/75 span.text-gray-400 {
    color: #a1a1aa !important;
}
.dark-theme .hero-prev,
.dark-theme .hero-next {
    background-color: rgba(24, 24, 27, 0.85) !important;
    border-color: #27272a !important;
    color: #d1d5db !important;
}
.dark-theme .hero-prev:hover,
.dark-theme .hero-next:hover {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}

/* Custom Scrollbar for dark theme */
.dark-theme ::-webkit-scrollbar-track {
    background: #0c0c0e !important;
}
.dark-theme ::-webkit-scrollbar-thumb {
    background: #27272a !important;
}
.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #3f3f46 !important;
}

/* Footer elements overrides in dark theme values bar */
.dark-theme section.bg-white.border-t.border-gray-100 {
    background-color: transparent !important;
    border-top-color: #1f2937 !important;
}
.dark-theme section.bg-white.border-t.border-gray-100 .bg-white {
    background-color: var(--color-card-bg-dark, #121214) !important;
}

/* Sticky Header animations & overrides */
#main-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark-theme #main-header.is-sticky {
    background-color: #0b0b0c !important;
    border-bottom: 1px solid #1f2937 !important;
}

/* Hero Slider container dark mode customizations */
.dark-theme .hero-slider-container {
    background-image: linear-gradient(135deg, #09090b 0%, #121214 50%, #09090b 100%) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-theme .hero-slide h1 {
    color: #ffffff !important;
}

.dark-theme .hero-slide p {
    color: #d1d5db !important;
}

/* Category Sidebar Directory Premium Dark Theme overrides */
.dark-theme .category-sidebar-list {
    background-color: var(--color-card-bg-dark, #121214) !important;
    border-color: #1f2937 !important;
}

/* Sidebar header & footer backgrounds overrides */
.dark-theme .category-sidebar-list .bg-gray-50\/50,
.dark-theme .category-sidebar-list div.bg-gray-50\/50 {
    background-color: #0b0b0c !important;
    border-color: #1f2937 !important;
}

.dark-theme .category-sidebar-list .sidebar-link {
    color: #e4e4e7 !important;
    border-color: #1f2937 !important;
}

.dark-theme .category-sidebar-list .sidebar-link i {
    color: #a1a1aa !important;
}

.dark-theme .category-sidebar-list .sidebar-link:hover {
    background-color: rgba(220, 38, 38, 0.1) !important;
    color: var(--color-primary) !important;
}

.dark-theme .category-sidebar-list .sidebar-link:hover i {
    color: var(--color-primary) !important;
}

.dark-theme .category-sidebar-list .sidebar-link.active {
    background-color: rgba(220, 38, 38, 0.15) !important;
    color: var(--color-primary) !important;
}

.dark-theme .category-sidebar-list .sidebar-link.active i {
    color: var(--color-primary) !important;
}

/* Category Item Count badges */
.dark-theme .category-sidebar-list .sidebar-link span.bg-gray-100 {
    background-color: #18181b !important;
    color: #a1a1aa !important;
}

/* Bottom promotion value links section styling and hover states */
.dark-theme .category-sidebar-list a.text-red-500:hover {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
}

.dark-theme .category-sidebar-list a.text-blue-500:hover {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
}

.dark-theme .category-sidebar-list a.text-emerald-600:hover {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #6ee7b7 !important;
}

/* Category Show More button */
.dark-theme #btn-show-more-categories {
    border-color: #1f2937 !important;
    color: var(--color-primary) !important;
}

.dark-theme #btn-show-more-categories:hover {
    background-color: rgba(220, 38, 38, 0.1) !important;
}
