/* FirmwareBR Design Boost Theme - Custom Styles */

/* Design System - All colors in HSL */
:root {
    /* Light Mode Colors */
    --background: 0 0% 100%;
    --foreground: 220 25% 10%;

    --card: 0 0% 100%;
    --card-foreground: 220 25% 10%;

    --primary: 217 100% 50%;
    --primary-foreground: 0 0% 100%;
    --primary-glow: 190 100% 45%;

    --secondary: 210 40% 96%;
    --secondary-foreground: 220 25% 10%;

    --muted: 210 40% 96%;
    --muted-foreground: 215 15% 45%;

    --accent: 275 70% 60%;
    --accent-foreground: 0 0% 100%;

    --success: 160 84% 45%;
    --success-foreground: 0 0% 100%;

    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 217 100% 50%;

    --radius: 0.75rem;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(217 100% 50%), hsl(190 100% 50%));
    --gradient-secondary: linear-gradient(135deg, hsl(275 70% 60%), hsl(217 100% 50%));
    --gradient-accent: linear-gradient(135deg, hsl(160 84% 50%), hsl(190 100% 50%));

    /* Shadows */
    --shadow-glow: 0 0 40px hsl(217 100% 50% / 0.25);
    --shadow-card: 0 10px 40px hsl(220 25% 10% / 0.1);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Explicit - Force dark text on light background */
[data-theme="light"],
:root:not([data-theme="dark"]) {
    --background: 0 0% 100%;
    --foreground: 220 25% 15%;

    --card: 0 0% 100%;
    --card-foreground: 220 25% 15%;

    --primary: 217 100% 50%;
    --primary-foreground: 0 0% 100%;
    --primary-glow: 190 100% 45%;

    --secondary: 210 40% 96%;
    --secondary-foreground: 220 25% 15%;

    --muted: 210 40% 96%;
    --muted-foreground: 220 20% 40%;

    --accent: 275 70% 60%;
    --accent-foreground: 0 0% 100%;

    --success: 160 84% 45%;
    --success-foreground: 0 0% 100%;

    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 217 100% 50%;

    --shadow-glow: 0 0 40px hsl(217 100% 50% / 0.25);
    --shadow-card: 0 10px 40px hsl(220 25% 10% / 0.1);
}

/* Dark Mode Support */
[data-theme="dark"] {
    --background: 220 25% 6%;
    --foreground: 210 40% 98%;

    --card: 220 20% 10%;
    --card-foreground: 210 40% 98%;

    --primary: 217 100% 50%;
    --primary-foreground: 0 0% 100%;
    --primary-glow: 190 100% 50%;

    --secondary: 220 15% 20%;
    --secondary-foreground: 210 40% 98%;

    --muted: 220 15% 15%;
    --muted-foreground: 215 15% 65%;

    --accent: 275 70% 60%;
    --accent-foreground: 0 0% 100%;

    --success: 160 84% 50%;
    --success-foreground: 0 0% 100%;

    --border: 220 15% 20%;
    --input: 220 15% 20%;
    --ring: 217 100% 50%;

    --shadow-glow: 0 0 40px hsl(217 100% 50% / 0.3);
    --shadow-card: 0 10px 40px hsl(220 25% 3% / 0.5);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --background: 220 25% 6%;
        --foreground: 210 40% 98%;

        --card: 220 20% 10%;
        --card-foreground: 210 40% 98%;

        --primary: 217 100% 50%;
        --primary-foreground: 0 0% 100%;
        --primary-glow: 190 100% 50%;

        --secondary: 220 15% 20%;
        --secondary-foreground: 210 40% 98%;

        --muted: 220 15% 15%;
        --muted-foreground: 215 15% 65%;

        --accent: 275 70% 60%;
        --accent-foreground: 0 0% 100%;

        --success: 160 84% 50%;
        --success-foreground: 0 0% 100%;

        --border: 220 15% 20%;
        --input: 220 15% 20%;
        --ring: 217 100% 50%;

        --shadow-glow: 0 0 40px hsl(217 100% 50% / 0.3);
        --shadow-card: 0 10px 40px hsl(220 25% 3% / 0.5);
    }
}

/* Base Styles */
body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Ensure text is always readable */
h1, h2, h3, h4, h5, h6,
p, span, div, a, li, td, th {
    color: inherit;
}

/* Light mode specific overrides */
[data-theme="light"] body,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] p,
[data-theme="light"] span:not(.gradient-text):not(.gradient-accent),
[data-theme="light"] div,
[data-theme="light"] li {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] .text-muted-foreground,
[data-theme="light"] .muted-foreground {
    color: hsl(220 20% 40%) !important;
}

/* Links in light mode */
[data-theme="light"] a:not(.btn) {
    color: hsl(217 100% 45%);
}

[data-theme="light"] a:not(.btn):hover {
    color: hsl(217 100% 35%);
}

/* Header Styling */
#header {
    background: hsl(var(--background) / 0.95) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border) / 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#header .container {
    padding: 1rem 0;
}

/* Logo Styling */
#logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -30px;
}

#logo img {
    max-width: 150px;
    height: auto;
}

#logo h1,
#logo a {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

/* Navigation Menu */
#menu {
    background: transparent !important;
    border: none !important;
    padding: 0.75rem 0;
}

#menu .navbar-nav .nav-link {
    color: hsl(var(--foreground));
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition-smooth);
}

#menu .navbar-nav .nav-link:hover {
    background: hsl(var(--muted));
    color: hsl(var(--primary));
}

/* Override Bootstrap bg-primary on menu */
#menu.bg-primary {
    background: transparent !important;
}

/* Default light mode for menu (before JS loads) */
:root:not([data-theme="dark"]) #menu .navbar-nav .nav-link,
:root:not([data-theme="dark"]) #menu .navbar-nav a.nav-link,
:root:not([data-theme="dark"]) #menu .nav-link,
:root:not([data-theme="dark"]) #menu a.nav-link,
:root:not([data-theme="dark"]) #menu .dropdown-toggle,
:root:not([data-theme="dark"]) #menu a.dropdown-toggle {
    color: hsl(220 25% 15%) !important;
}

/* Force dark text on light background for all menu links by default */
#menu .navbar-nav .nav-link,
#menu .navbar-nav a.nav-link,
#menu .nav-link,
#menu a.nav-link {
    color: hsl(220 25% 15%) !important;
}

/* Dark mode override */
[data-theme="dark"] #menu .navbar-nav .nav-link,
[data-theme="dark"] #menu .navbar-nav a.nav-link,
[data-theme="dark"] #menu .nav-link,
[data-theme="dark"] #menu a.nav-link {
    color: hsl(210 40% 98%) !important;
}

/* Light mode menu fix - All menu items */
[data-theme="light"] #menu,
[data-theme="light"] #menu.navbar {
    background: hsl(0 0% 100% / 0.95) !important;
    border-bottom: 1px solid hsl(214 32% 91%);
}

[data-theme="light"] #menu .navbar-nav .nav-link,
[data-theme="light"] #menu .navbar-nav a.nav-link,
[data-theme="light"] #menu .nav-link,
[data-theme="light"] #menu a.nav-link,
[data-theme="light"] #menu .dropdown-toggle,
[data-theme="light"] #menu a.dropdown-toggle {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] #menu .navbar-nav .nav-link:hover,
[data-theme="light"] #menu .navbar-nav a.nav-link:hover,
[data-theme="light"] #menu .dropdown-toggle:hover {
    color: hsl(217 100% 45%) !important;
    background: hsl(210 40% 96%) !important;
}

[data-theme="light"] #menu .dropdown-menu {
    background: hsl(0 0% 100%) !important;
    border: 1px solid hsl(214 32% 91%);
}

[data-theme="light"] #menu .dropdown-item,
[data-theme="light"] #menu a.dropdown-item {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] #menu .dropdown-item:hover,
[data-theme="light"] #menu a.dropdown-item:hover {
    color: hsl(217 100% 45%) !important;
    background: hsl(210 40% 96%) !important;
}

/* Light mode category button */
[data-theme="light"] #menu #category {
    color: hsl(220 25% 15%) !important;
}

/* Light mode navbar toggler */
[data-theme="light"] #menu .navbar-toggler {
    color: hsl(220 25% 15%) !important;
    border-color: hsl(214 32% 91%);
}

[data-theme="light"] #menu .navbar-toggler i {
    color: hsl(220 25% 15%) !important;
}

/* Light mode top bar */
[data-theme="light"] #top a,
[data-theme="light"] #top .dropdown-toggle {
    color: hsl(220 25% 25%) !important;
}

[data-theme="light"] #top .dropdown-menu {
    background: hsl(0 0% 100%) !important;
}

[data-theme="light"] #top .dropdown-item {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] #top .dropdown-item:hover {
    background: hsl(210 40% 96%) !important;
}

/* Light mode icons in top bar */
[data-theme="light"] #top i,
[data-theme="light"] #top .fa-solid {
    color: hsl(220 25% 25%) !important;
}

[data-theme="light"] #top button i,
[data-theme="light"] #top .theme-toggle i {
    color: hsl(220 25% 25%) !important;
}

/* Search Bar */
#search {
    position: relative;
}

#search input {
    background: hsl(var(--card) / 0.5) !important;
    border: 1px solid hsl(var(--border) / 0.5) !important;
    border-radius: var(--radius);
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    transition: var(--transition-smooth);
}

#search input:focus {
    border-color: hsl(var(--primary) / 0.5) !important;
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1);
}

/* Cart Button */
#cart {
    position: relative;
}

#cart .btn {
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    transition: var(--transition-smooth);
}

#cart .btn:hover {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

/* Light mode cart and header icons */
[data-theme="light"] #cart .btn,
[data-theme="light"] #cart .btn i,
[data-theme="light"] #cart i,
[data-theme="light"] #header i,
[data-theme="light"] header i {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] #cart .btn-dark,
[data-theme="light"] #cart .btn-dark i {
    color: hsl(220 25% 15%) !important;
    background: hsl(0 0% 98%) !important;
    border-color: hsl(220 10% 85%) !important;
}

[data-theme="light"] #cart .btn:hover,
[data-theme="light"] #cart .btn:hover i,
[data-theme="light"] #header a:hover i {
    color: hsl(217 100% 50%) !important;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    color: hsl(var(--primary-foreground)) !important;
    border-radius: var(--radius);
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px hsl(217 100% 50% / 0.35);
}

.btn-outline-primary {
    background: transparent !important;
    border: 2px solid hsl(var(--primary)) !important;
    color: hsl(var(--primary)) !important;
    border-radius: var(--radius);
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-outline-primary:hover {
    background: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}

/* Cards */
.card,
.product-card,
.product-thumb {
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.card:hover,
.product-card:hover,
.product-thumb:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px hsl(220 25% 10% / 0.15);
    border-color: hsl(var(--primary) / 0.3);
}

/* Product Grid */
.product-layout {
    margin-bottom: 2rem;
}

.product-thumb .image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-thumb .image img {
    transition: var(--transition-smooth);
}

.product-thumb:hover .image img {
    transform: scale(1.05);
}

/* Price Styling */
.price {
    color: hsl(var(--primary-glow));
    font-weight: 700;
    font-size: 1.25rem;
}

.price-old {
    color: hsl(var(--muted-foreground));
    text-decoration: line-through;
    font-size: 1rem;
}

/* Cookie Banner */
#cookie {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    padding: 1rem 0;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

#cookie p {
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
}

#cookie .alert-link {
    color: hsl(var(--primary));
    text-decoration: underline;
}

[data-theme="light"] #cookie {
    background: hsl(0 0% 98%);
    border-top: 1px solid hsl(220 10% 85%);
}

[data-theme="light"] #cookie p {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] #cookie .alert-link {
    color: hsl(217 100% 50%) !important;
}

[data-theme="light"] #cookie .btn-light {
    color: hsl(220 25% 15%) !important;
    background: hsl(0 0% 95%) !important;
    border-color: hsl(220 10% 85%) !important;
}

/* Footer */
footer {
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    padding: 3rem 0 1.5rem;
    margin-top: 40rem;
}

footer h5 {
    color: hsl(var(--foreground));
    font-weight: 700;
    margin-bottom: 1rem;
}

footer a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: var(--transition-smooth);
}

footer a:hover {
    color: hsl(var(--primary));
}

/* Badge/Labels */
.badge {
    border-radius: calc(var(--radius) * 0.5);
    padding: 0.25rem 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--gradient-primary) !important;
    color: hsl(var(--primary-foreground)) !important;
}

.badge-success {
    background: hsl(var(--success)) !important;
    color: hsl(var(--success-foreground)) !important;
}

/* Alert Boxes */
.alert {
    border-radius: var(--radius);
    border: none;
}

.alert-success {
    background: hsl(var(--success) / 0.1) !important;
    color: hsl(var(--success)) !important;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
}

.breadcrumb-item a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: hsl(var(--primary));
}

.breadcrumb-item.active {
    color: hsl(var(--foreground));
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    color: hsl(var(--foreground));
    transition: var(--transition-smooth);
}

input:focus,
select:focus,
textarea:focus {
    border-color: hsl(var(--primary)) !important;
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1) !important;
    outline: none;
}

/* Pagination */
.pagination .page-link {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    border-radius: var(--radius);
    margin: 0 0.25rem;
}

.pagination .page-link:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px hsl(217 100% 50% / 0.3);
    }
    50% {
        box-shadow: 0 0 40px hsl(217 100% 50% / 0.6);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Product Page Specific */
#product .image-additional {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

#product .image-additional a {
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition-smooth);
}

#product .image-additional a:hover {
    border-color: hsl(var(--primary));
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #logo h1,
    #logo a {
        font-size: 1.25rem;
    }

    #menu .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid hsl(var(--muted));
    border-top: 3px solid hsl(var(--primary));
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 8rem;
    min-height: 600px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/image/catalog/hero-circuit.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, hsl(var(--background)) 0%, hsl(var(--background) / 0.95) 50%, hsl(var(--background) / 0.7) 100%);
    z-index: -1;
}

[data-theme="dark"] .hero-section::after,
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero-section::after {
        background: linear-gradient(90deg, hsl(var(--background)) 0%, hsl(var(--background) / 0.98) 50%, hsl(var(--background) / 0.85) 100%);
    }
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: hsl(var(--primary) / 0.1);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--primary-glow));
}

.hero-stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.category-card {
    background: hsl(var(--card) / 0.5);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.category-card:hover {
    transform: scale(1.05);
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: var(--shadow-card);
}

.category-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-center;
    border-radius: 1rem;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.2), hsl(var(--primary-glow) / 0.2));
    transition: var(--transition-smooth);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-icon i, .category-icon svg {
    font-size: 2rem;
    color: hsl(var(--primary-glow));
}

.category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.category-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Light mode category text */
[data-theme="light"] .category-name {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] .category-count {
    color: hsl(220 20% 45%) !important;
}

/* Featured Products Section */
.featured-products {
    background: hsl(var(--muted) / 0.3);
    padding: 4rem 0 24rem;
}

.featured-products .container {
    padding: 0 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
}

.featured-product-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-product-card:hover {
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-product-image {
    position: relative;
    overflow: hidden;
    height: 10rem;
}

.featured-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.featured-product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius) * 0.5);
    font-size: 0.75rem;
    font-weight: 600;
}

.featured-product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsl(var(--background) / 0.8), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.featured-product-card:hover .featured-product-overlay {
    opacity: 1;
}

.featured-product-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.featured-product-rating i {
    color: #f59e0b;
}

.featured-product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition-smooth);
    min-height: 4rem;
}

.featured-product-card:hover .featured-product-title {
    color: hsl(var(--primary));
}

/* Light mode product text */
[data-theme="light"] .featured-product-title {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] .featured-product-card:hover .featured-product-title {
    color: hsl(217 100% 45%) !important;
}

[data-theme="light"] .featured-product-rating {
    color: hsl(220 20% 50%) !important;
}

.featured-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary-glow));
    margin-top: auto;
    padding-top: 0.5rem;
}

.featured-product-footer {
    padding: 0 1.25rem 1.25rem;
}

.featured-product-footer .btn {
    width: 100%;
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.benefit-card {
    background: hsl(var(--card) / 0.5);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.benefit-card:hover {
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: var(--shadow-card);
}

.benefit-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-center;
    border-radius: 1rem;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.2), hsl(var(--primary-glow) / 0.2));
}

.benefit-icon i, .benefit-icon svg {
    font-size: 2rem;
    color: hsl(var(--primary-glow));
}

.benefit-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.benefit-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Light mode benefits text */
[data-theme="light"] .benefit-title {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] .benefit-description {
    color: hsl(220 20% 45%) !important;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title .gradient-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 42rem;
    margin: 0 auto;
}

/* Light mode section headers */
[data-theme="light"] .section-title {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] .section-description {
    color: hsl(220 20% 45%) !important;
}

/* Light mode hero section */
[data-theme="light"] .hero-badge span {
    color: hsl(190 100% 35%) !important;
}

[data-theme="light"] .hero-stat-label {
    color: hsl(220 20% 45%) !important;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.25rem;
}

.theme-toggle .sun-icon {
    color: #f59e0b;
}

.theme-toggle .moon-icon {
    color: hsl(var(--primary));
}

/* ========================================
   PRODUCT PAGES & CATEGORY PAGES
   ======================================== */

/* Product Grid/List - All pages */
.product-thumb,
.product-layout .product-thumb {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
}

.product-thumb:hover,
.product-layout .product-thumb:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: hsl(var(--primary) / 0.3);
}

/* Product titles */
.product-thumb h4,
.product-thumb .caption h4,
.product-thumb h4 a {
    color: hsl(var(--foreground)) !important;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.product-thumb h4 a:hover {
    color: hsl(var(--primary)) !important;
    text-decoration: none;
}

/* Product description text */
.product-thumb .description,
.product-thumb p {
    color: hsl(var(--muted-foreground)) !important;
}

/* Product prices */
.product-thumb .price,
.price-new,
.price-old {
    font-weight: 700;
}

.product-thumb .price-new {
    color: hsl(var(--primary-glow)) !important;
    font-size: 1.5rem;
}

.product-thumb .price-old {
    color: hsl(var(--muted-foreground)) !important;
    text-decoration: line-through;
}

/* Light mode product text */
[data-theme="light"] .product-thumb h4,
[data-theme="light"] .product-thumb .caption h4,
[data-theme="light"] .product-thumb h4 a {
    color: hsl(220 25% 15%) !important;
}

[data-theme="light"] .product-thumb .description,
[data-theme="light"] .product-thumb p {
    color: hsl(220 20% 45%) !important;
}

/* Product page single */
#product .form-control {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}

#product h1,
#product h2,
#product h3 {
    color: hsl(var(--foreground));
}

[data-theme="light"] #product h1,
[data-theme="light"] #product h2,
[data-theme="light"] #product h3,
[data-theme="light"] #product .list-unstyled li,
[data-theme="light"] #product p {
    color: hsl(220 25% 15%) !important;
}

/* Breadcrumb - all pages */
.breadcrumb {
    background: transparent;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: hsl(var(--muted-foreground));
}

[data-theme="light"] .breadcrumb-item,
[data-theme="light"] .breadcrumb-item a {
    color: hsl(220 20% 45%) !important;
}

.breadcrumb-item.active {
    color: hsl(var(--foreground));
}

[data-theme="light"] .breadcrumb-item.active {
    color: hsl(220 25% 15%) !important;
}

/* Filter/Sort dropdowns */
.input-group .form-control,
.input-group .form-select {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}

[data-theme="light"] .input-group .form-control,
[data-theme="light"] .input-group .form-select {
    color: hsl(220 25% 15%) !important;
}

/* Category page titles */
#product-category h1,
#product-category h2 {
    color: hsl(var(--foreground));
}

[data-theme="light"] #product-category h1,
[data-theme="light"] #product-category h2 {
    color: hsl(220 25% 15%) !important;
}

/* Pagination on all pages */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    border-radius: var(--radius);
    margin: 0 0.25rem;
    transition: var(--transition-smooth);
}

.pagination .page-link:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
    color: hsl(var(--primary-foreground));
}

[data-theme="light"] .pagination .page-link {
    color: hsl(220 25% 15%) !important;
}

/* Review/Rating stars */
.rating {
    color: #f59e0b;
}

/* Tab navigation */
.nav-tabs .nav-link {
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.nav-tabs .nav-link.active {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    color: hsl(var(--primary));
}

[data-theme="light"] .nav-tabs .nav-link {
    color: hsl(220 25% 15%) !important;
}

/* Form pages (login, register, contact) */
#content form .form-label,
#content form label {
    color: hsl(var(--foreground));
    font-weight: 500;
}

[data-theme="light"] #content form .form-label,
[data-theme="light"] #content form label {
    color: hsl(220 25% 15%) !important;
}

/* Account pages */
#account-account h2,
#account-login h2,
#account-register h2 {
    color: hsl(var(--foreground));
}

[data-theme="light"] #account-account h2,
[data-theme="light"] #account-login h2,
[data-theme="light"] #account-register h2 {
    color: hsl(220 25% 15%) !important;
}

/* List groups */
.list-group-item {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}

[data-theme="light"] .list-group-item {
    color: hsl(220 25% 15%) !important;
}

/* Tables */
.table {
    color: hsl(var(--foreground));
}

.table thead th {
    border-bottom-color: hsl(var(--border));
}

[data-theme="light"] .table,
[data-theme="light"] .table td,
[data-theme="light"] .table th {
    color: hsl(220 25% 15%) !important;
}

/* Modals */
.modal-content {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
}

.modal-header,
.modal-footer {
    border-color: hsl(var(--border));
}

.modal-title {
    color: hsl(var(--foreground));
}

[data-theme="light"] .modal-title {
    color: hsl(220 25% 15%) !important;
}

/* Alerts */
.alert-success {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border-color: hsl(var(--success) / 0.3);
}

.alert-info {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    border-color: hsl(var(--primary) / 0.3);
}

/* Ensure all content text is readable */
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content p {
    color: hsl(var(--foreground));
}

[data-theme="light"] #content h1,
[data-theme="light"] #content h2,
[data-theme="light"] #content h3,
[data-theme="light"] #content h4,
[data-theme="light"] #content h5,
[data-theme="light"] #content p {
    color: hsl(220 25% 15%) !important;
}
