/* Custom Styles for Affiliate Price Comparison Portal */

/* ============================================
   CSS Variables & Theme Configuration
   ============================================ */
:root {
    /* Brand Colors */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    
    /* Light Theme */
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: rgba(0, 0, 0, 0.125);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.2s ease-in-out;
    --transition-slow: 0.3s ease-in-out;
    
    /* Touch Target Size (minimum 44x44px for accessibility) */
    --touch-target: 44px;
}

/* Dark Mode Variables - IMPROVED CONTRAST (WCAG AA Compliant) */
[data-theme="dark"] {
    --bg-color: #1a1d20;
    --bg-secondary: #2d3238;
    --text-color: #f0f2f5;
    --text-muted: #c5cdd5;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.6);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.8);
    
    /* Enhanced primary color for better contrast */
    --primary-color: #6ba3ff;
    
    /* Additional variables for components */
    --bg-card: #252830;
}

/* ============================================
   Base Styles - Mobile First
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
}

main {
    flex: 1;
    padding-bottom: var(--spacing-xl);
}

/* Smooth Scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================
   MODERN HEADER STYLES (Global)
   ============================================ */

.modern-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

[data-theme="dark"] .modern-header {
    background: linear-gradient(135deg, #1e2329 0%, #2d3238 100%);
}

.modern-header .navbar {
    padding: 0.75rem 0;
}

/* Desktop/Tablet: Logo zentriert über Navigation */
@media (min-width: 768px) {
    .modern-header .navbar > .container {
        flex-direction: column;
        align-items: center;
    }
    
    .modern-header .navbar-brand {
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
    
    .modern-header .navbar-collapse {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .modern-header .navbar-nav.me-auto {
        margin: 0 auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

.modern-header .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff;
    transition: all var(--transition-base);
    letter-spacing: 0.5px;
}

.modern-header .navbar-brand:hover {
    opacity: 0.9;
    color: #ffffff;
    transform: scale(1.02);
}

.modern-header .navbar-brand i {
    margin-right: 0.75rem;
    font-size: 1.6rem;
}

/* Modern Navigation Links - Automatisch zentriert */
.modern-header .navbar-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.modern-header .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: all var(--transition-base);
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: relative;
}

.modern-header .nav-link i {
    font-size: 1.1rem;
    transition: transform var(--transition-base);
}

.modern-header .nav-link:hover,
.modern-header .nav-link:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.modern-header .nav-link:hover i {
    transform: scale(1.15);
}

/* Active state for current page */
.modern-header .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Dropdown Toggle */
.modern-header .dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform var(--transition-base);
}

.modern-header .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

.modern-header .dropdown-menu {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
    margin-top: 0.5rem;
    padding: 0.5rem;
    min-width: 200px;
}

[data-theme="dark"] .modern-header .dropdown-menu {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.modern-header .dropdown-item {
    transition: all var(--transition-base);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.modern-header .dropdown-item i {
    font-size: 1rem;
    transition: transform var(--transition-base);
}

.modern-header .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.15);
    transform: translateX(4px);
}

.modern-header .dropdown-item:hover i {
    transform: scale(1.1);
}

[data-theme="dark"] .modern-header .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .modern-header .dropdown-item:hover {
    background-color: rgba(107, 163, 255, 0.25);
    color: var(--text-color);
}

/* Header Search Bar - Inline with Navigation */
.header-search {
    min-width: 250px;
    max-width: 400px;
    flex: 1 1 auto; /* Allow flexible growth */
    margin: 0;
    padding: 0;
}

.header-search .input-group {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.header-search .form-control {
    height: 38px;
    font-size: 0.875rem;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #212529;
    padding: 0 0.75rem;
    min-width: 150px; /* Ensure minimum width */
}

.header-search .form-control:focus {
    background: #ffffff;
    box-shadow: none;
    color: #212529;
}

.header-search .form-control::placeholder {
    color: rgba(33, 37, 41, 0.5);
}

[data-theme="dark"] .header-search .form-control {
    background: #2d3238;
    color: #f0f2f5;
}

[data-theme="dark"] .header-search .form-control:focus {
    background: #252830;
    color: #f0f2f5;
}

[data-theme="dark"] .header-search .form-control::placeholder {
    color: #c5cdd5;
}

.header-search .btn {
    height: 38px;
    padding: 0 1rem;
    border: none;
    background: #ffffff;
    color: #0d6efd;
    font-weight: 600;
    transition: all var(--transition-fast);
    flex-shrink: 0; /* Prevent button from shrinking */
}

.header-search .btn:hover {
    background: #f8f9fa;
    color: #0b5ed7;
}

[data-theme="dark"] .header-search .btn {
    background: #252830;
    color: #6ba3ff;
}

[data-theme="dark"] .header-search .btn:hover {
    background: #2d3238;
    color: #ffffff;
}

/* Mobile Header Styles - Logo bleibt links neben Toggle */
@media (max-width: 767px) {
    .modern-header .navbar > .container {
        flex-direction: row !important;
        align-items: center;
        gap: 0.5rem;
    }
    
    .modern-header .navbar-brand {
        margin-bottom: 0 !important;
        margin-right: auto !important;
        font-size: 1.25rem;
    }
    
    /* Language Switcher außerhalb Burger-Menü auf Mobile */
    .modern-header .language-switcher.d-lg-none {
        margin-right: 0.5rem;
    }
    
    .modern-header .language-switcher.d-lg-none .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    .modern-header .language-switcher.d-lg-none .language-name {
        display: none !important;
    }
    
    .modern-header .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.15);
        padding: var(--spacing-md);
        margin-top: var(--spacing-md);
        border-radius: var(--radius-lg);
        backdrop-filter: blur(10px);
    }
    
    [data-theme="dark"] .modern-header .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.08);
    }
    
    .modern-header .navbar-nav {
        gap: 0.5rem;
    }
    
    .modern-header .navbar-nav .nav-item {
        margin: 0;
    }
    
    /* Suchleiste auf Mobile an den Anfang verschieben */
    .modern-header .navbar-nav .header-search-item {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .modern-header .navbar-nav .nav-link {
        padding: 0.85rem 1.25rem;
        border-radius: var(--radius-md);
        width: 100%;
        justify-content: flex-start;
    }
    
    .modern-header .navbar-nav .nav-link:hover,
    .modern-header .navbar-nav .nav-link:active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .modern-header .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.1);
        border: none;
        margin-top: 0.25rem;
    }
    
    [data-theme="dark"] .modern-header .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .header-search {
        max-width: 100%;
        padding: 0;
    }
    
    .theme-toggle {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Desktop/Tablet: Suchleiste ausblenden */
@media (min-width: 768px) {
    .header-search-item {
        display: none !important;
    }
    
    .navbar-nav.me-auto {
        align-items: center;
        flex-wrap: nowrap;
    }
}

@media (max-width: 575px) {
    .modern-header .navbar-brand {
        font-size: 1.1rem;
    }
    
    .header-search .form-control {
        font-size: 0.85rem;
    }
    
    .header-search .btn {
        padding: 0 1rem;
    }
}

/* Navbar Toggler Position - Mobile only */
@media (max-width: 767px) {
    .modern-header .navbar-toggler {
        margin-left: auto;
    }
}

/* ============================================
   Product Cards - Responsive Grid
   ============================================ */
.product-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    overflow: hidden;
}

/* Hover effect only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }
}

/* Touch devices - add active state */
@media (hover: none) and (pointer: coarse) {
    .product-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-sm);
    }
}

.product-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: var(--spacing-md);
    background-color: var(--bg-secondary);
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
}

.product-card .card-title {
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.product-card .card-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card .card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-md);
}

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Responsive Grid Breakpoints */
@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card .card-img-top {
        height: 220px;
    }
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-card .card-img-top {
        height: 240px;
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-xl);
    }
}

/* ============================================
   Wishlist Toggle - Touch Optimized
   ============================================ */
.wishlist-toggle {
    background: var(--bg-color);
    border-radius: var(--radius-full);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    width: var(--touch-target);
    height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-decoration: none;
    border: 2px solid var(--border-color);
    cursor: pointer;
    position: relative;
}

/* Hover effect for desktop */
@media (hover: hover) and (pointer: fine) {
    .wishlist-toggle:hover {
        transform: scale(1.1);
        box-shadow: var(--shadow-md);
        border-color: var(--danger-color);
    }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .wishlist-toggle:active {
        transform: scale(0.95);
        box-shadow: var(--shadow-sm);
    }
}

.wishlist-toggle i {
    transition: all var(--transition-base);
    font-size: 1.25rem;
    color: var(--danger-color);
}

.wishlist-toggle.active {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.wishlist-toggle.active i {
    color: white;
    font-weight: bold;
}

.wishlist-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Wishlist Remove Button */
.wishlist-remove {
    background: transparent;
    border: none;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.wishlist-remove:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

.wishlist-remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Wishlist Page Styles */
.wishlist-empty-icon {
    font-size: 4rem;
    color: #6c757d;
}

/* Toast Notification */
.toast {
    min-width: 250px;
}

/* Search Form */
.search-form .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Feature Icons */
.feature-icon {
    font-size: 2rem;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Cards */
.card {
    border-radius: 0.5rem;
}

.card-img-top {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* ============================================
   MODERN FOOTER STYLES (Global)
   ============================================ */

.modern-footer {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 3rem 0 0.5rem;
    margin-top: 4rem;
    border-top: 3px solid #0d6efd;
}

[data-theme="dark"] .modern-footer {
    background: linear-gradient(135deg, #1e2329 0%, #252830 100%);
    border-top-color: #6ba3ff;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 1rem;
}

[data-theme="dark"] .footer-title {
    color: #8bb8ff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #0d6efd;
    transform: translateX(4px);
}

[data-theme="dark"] .footer-links a {
    color: #c5cdd5;
}

[data-theme="dark"] .footer-links a:hover {
    color: #8bb8ff;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.footer-social a:hover {
    background: #0d6efd;
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .footer-social a {
    background: #252830;
    color: #8bb8ff;
}

[data-theme="dark"] .footer-social a:hover {
    background: #6ba3ff;
    color: #ffffff;
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #6c757d;
    font-size: 0.9rem;
}

[data-theme="dark"] .footer-copyright {
    border-top-color: rgba(255, 255, 255, 0.2);
    color: #c5cdd5;
}

/* Old Footer Fallback */
footer {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ============================================
   Product Page Layout
   ============================================ */
.product-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px;
    border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
    .product-image {
        max-height: 500px;
    }
}

.product-description {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-color);
}

/* Price Boxes */
.price-box {
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.price-box .price-amount {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .price-box .price-amount {
        font-size: 1.5rem;
    }
}

/* Price Comparison List */
.list-group-item {
    border-left: none;
    border-right: none;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: var(--spacing-md);
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Rating Display */
.rating-box {
    text-align: center;
    padding: var(--spacing-lg);
}

.rating-percentage {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 576px) {
    .rating-percentage {
        font-size: 2rem;
    }
}

/* ============================================
   Admin Dashboard Styles
   ============================================ */
.admin-dashboard {
    padding: var(--spacing-lg);
}

.admin-stat-card {
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5ed7 100%);
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

@media (hover: hover) and (pointer: fine) {
    .admin-stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
}

.admin-stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.admin-stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin: var(--spacing-md) 0;
}

.admin-stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Tables */
.admin-table {
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table thead {
    background-color: var(--bg-secondary);
}

.admin-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: var(--spacing-md);
    vertical-align: middle;
}

/* Responsive Table */
@media (max-width: 768px) {
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: var(--spacing-sm);
    }
}

/* Admin Charts */
.admin-chart-container {
    position: relative;
    height: 300px;
    padding: var(--spacing-md);
}

@media (min-width: 768px) {
    .admin-chart-container {
        height: 400px;
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */
[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .card {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .card-title.h5,
[data-theme="dark"] h3.card-title,
[data-theme="dark"] h5.card-title {
    color: var(--text-color) !important;
}

[data-theme="dark"] .card-text {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .navbar {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .list-group-item {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 0 0.25rem rgba(107, 163, 255, 0.25);
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .table {
    color: var(--text-color);
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table thead {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

/* Dark Mode Toggle Button - Modern Style */
.theme-toggle {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    border-radius: var(--radius-md);
    border: none;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    gap: 0.65rem;
}

[data-theme="dark"] .theme-toggle {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
    .theme-toggle:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        background-color: rgba(255, 255, 255, 0.25);
    }
}

.theme-toggle i {
    font-size: 1.1rem;
    color: inherit;
    transition: transform var(--transition-base);
}

.theme-toggle:hover i {
    transform: scale(1.15);
}

/* ============================================
   Dark Mode - Additional Component Fixes
   ============================================ */

/* Buttons in Dark Mode */
[data-theme="dark"] .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-color);
}

[data-theme="dark"] .btn-primary:hover {
    background-color: #5a9fff;
    border-color: #5a9fff;
    color: var(--bg-color);
}

[data-theme="dark"] .btn-secondary {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: #3d4349;
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

/* Alerts in Dark Mode */
[data-theme="dark"] .alert {
    border-color: var(--border-color);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(107, 163, 255, 0.15);
    border-color: rgba(107, 163, 255, 0.3);
    color: #8bb8ff;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(102, 187, 106, 0.15);
    border-color: rgba(102, 187, 106, 0.3);
    color: #81c784;
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(255, 213, 79, 0.15);
    border-color: rgba(255, 213, 79, 0.3);
    color: #ffd54f;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 83, 80, 0.15);
    border-color: rgba(239, 83, 80, 0.3);
    color: #ef5350;
}

/* Badges in Dark Mode */
[data-theme="dark"] .badge {
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

[data-theme="dark"] .badge.bg-primary {
    background-color: var(--primary-color) !important;
    color: var(--bg-color);
}

/* Pagination in Dark Mode */
[data-theme="dark"] .pagination .page-link {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-color);
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-color);
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Dropdown in Dark Mode */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: rgba(107, 163, 255, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-divider {
    border-top-color: var(--border-color);
}

/* Toast in Dark Mode */
[data-theme="dark"] .toast {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .toast-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom-color: var(--border-color);
    color: var(--text-color);
}

/* Breadcrumb in Dark Mode */
[data-theme="dark"] .breadcrumb {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--primary-color);
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--text-muted);
}

/* Progress Bar in Dark Mode */
[data-theme="dark"] .progress {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .progress-bar {
    background-color: var(--primary-color);
}

/* Links in Dark Mode */
[data-theme="dark"] a {
    color: var(--primary-color);
}

[data-theme="dark"] a:hover {
    color: #8bb8ff;
}

/* Text Colors in Dark Mode */
[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .text-primary {
    color: var(--primary-color) !important;
}

/* Price Display in Dark Mode */
[data-theme="dark"] .h4.text-primary,
[data-theme="dark"] h4.text-primary {
    color: var(--primary-color) !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .product-card .card-title {
        font-size: 0.9rem;
        min-height: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    /* Stack columns on mobile */
    .row > [class*="col-"] {
        margin-bottom: var(--spacing-md);
    }
    
    /* Full width buttons on mobile */
    .btn-group-vertical {
        width: 100%;
    }
    
    .btn-group-vertical .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    /* Reduce padding on small screens */
    .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    /* Smaller hero text */
    h1.display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Compact cards */
    .card-body {
        padding: var(--spacing-md);
    }
    
    /* Smaller buttons */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.3s ease-in-out;
}

/* Price Display */
.h4.text-primary {
    font-weight: 600;
}

/* Rating Stars */
.text-warning {
    color: #ffc107 !important;
}

/* Alert Styles */
.alert {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert i {
    margin-right: var(--spacing-sm);
}

/* ============================================
   Touch-Optimized Elements
   ============================================ */
/* Ensure all interactive elements meet minimum touch target size */
.btn,
.nav-link,
.page-link,
.form-control,
.form-select {
    min-height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-link {
    padding: var(--spacing-sm) var(--spacing-md);
}

/* Larger tap targets for mobile */
@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .nav-link {
        padding: var(--spacing-md);
    }
}

/* Remove tap highlight on mobile */
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth touch scrolling */
.overflow-auto,
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   Form Styles
   ============================================ */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

/* ============================================
   Utility Classes
   ============================================ */
/* Spacing utilities */
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* Text utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Shadow utilities */
.shadow-xs { box-shadow: var(--shadow-sm); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Border radius utilities */
.rounded-xs { border-radius: var(--radius-sm); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* ============================================
   Accessibility Improvements
   ============================================ */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-md);
    text-decoration: none;
    z-index: 10000;
}

.skip-to-main:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .footer,
    .btn,
    .wishlist-toggle,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}


/* ============================================
   Enhanced Mobile Navigation
   ============================================ */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--bg-secondary);
        padding: var(--spacing-md);
        margin-top: var(--spacing-md);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    
    .navbar-nav .nav-item {
        margin: var(--spacing-xs) 0;
    }
    
    .navbar-nav .nav-link {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        transition: background-color var(--transition-base);
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active {
        background-color: rgba(13, 110, 253, 0.1);
    }
}

/* ============================================
   Image Optimization
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

.card-img-top {
    object-fit: contain;
    background-color: var(--bg-secondary);
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Enhanced Card Interactions
   ============================================ */
.card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Improved Form Elements
   ============================================ */
.input-group {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.input-group .form-control {
    border: none;
}

.input-group .btn {
    border: none;
}

/* ============================================
   Enhanced Pagination
   ============================================ */
.pagination {
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.pagination .page-link {
    color: var(--primary-color);
    border-radius: var(--radius-md);
    margin: 0 var(--spacing-xs);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

@media (hover: hover) and (pointer: fine) {
    .pagination .page-link:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }
}

/* ============================================
   Loading States
   ============================================ */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.empty-state-description {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 9999;
}

.toast {
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
}

@media (max-width: 576px) {
    .toast-container {
        top: var(--spacing-md);
        right: var(--spacing-md);
        left: var(--spacing-md);
    }
    
    .toast {
        width: 100%;
    }
}

/* ============================================
   Smooth Transitions
   ============================================ */
.fade-in {
    animation: fadeIn var(--transition-slow) ease-in-out;
}

.slide-up {
    animation: slideUp var(--transition-slow) ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */
/* GPU acceleration for animations */
.product-card,
.btn,
.wishlist-toggle,
.theme-toggle {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   High Contrast Mode Support
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
    }
    
    [data-theme="dark"] {
        --border-color: #fff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ============================================
   Focus Indicators for Accessibility
   ============================================ */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   Landscape Mobile Optimization
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    main {
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }
}


/* ============================================
   Product Carousel Styles - Modern Horizontal Design
   ============================================ */
.carousel-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem 0;
    width: 100%;
}

[data-theme="dark"] .carousel-section {
    background: linear-gradient(135deg, #1a1d20 0%, #2d3238 100%);
}

.carousel-header {
    margin-bottom: 1.5rem;
}

.carousel-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-title i {
    font-size: 1.5rem;
}

.product-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 70px;
}

.product-carousel {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1.5rem 0;
}

.product-carousel::-webkit-scrollbar {
    display: none;
}

/* Carousel Card - Fixed Width for Horizontal Layout */
.carousel-card {
    flex: 0 0 auto !important;
    width: 240px !important;
    min-width: 240px !important;
    scroll-snap-align: start;
}

/* Modern Product Card */
.product-card-compact {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.product-card-compact:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

[data-theme="dark"] .product-card-compact {
    background: #2d3238;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .product-card-compact:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Image Wrapper - Smaller Size */
.product-card-compact .card-img-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

[data-theme="dark"] .product-card-compact .card-img-wrapper {
    background: #1a1d20;
}

.product-card-compact .card-img-top {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-compact:hover .card-img-top {
    transform: scale(1.05);
}

/* Card Body */
.product-card-compact .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card-compact .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    margin: 0;
    min-height: 2.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-compact .price-tag {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-top: auto;
}

.product-card-compact .price-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

/* Navigation Buttons - Hidden by Default, Show on Hover */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    color: #333;
}

[data-theme="dark"] .carousel-nav-btn {
    background: #2d3238;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.carousel-nav-prev {
    left: 10px;
}

.carousel-nav-next {
    right: 10px;
}

/* Show buttons on wrapper hover */
.product-carousel-wrapper:hover .carousel-nav-btn:not(:disabled) {
    opacity: 1;
    visibility: visible;
}

.carousel-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

[data-theme="dark"] .carousel-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
}

.carousel-nav-btn:disabled {
    opacity: 0 !important;
    visibility: hidden !important;
    cursor: not-allowed;
}

.carousel-nav-btn i {
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .carousel-section {
        padding: 2rem 0;
    }
    
    .product-carousel-wrapper {
        padding: 0 55px;
    }
    
    .carousel-nav-btn {
        opacity: 1;
        visibility: visible;
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav-btn i {
        font-size: 1rem;
    }
    
    .carousel-card {
        width: 200px !important;
        min-width: 200px !important;
    }
    
    .product-card-compact .card-img-wrapper {
        height: 160px;
    }
    
    .carousel-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .carousel-section {
        padding: 1.5rem 0;
    }
    
    .product-carousel-wrapper {
        padding: 0 50px;
    }
    
    .carousel-card {
        width: 180px !important;
        min-width: 180px !important;
    }
    
    .product-card-compact .card-img-wrapper {
        height: 140px;
    }
    
    .carousel-title {
        font-size: 1.25rem;
    }
    
    .carousel-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav-prev {
        left: 5px;
    }
    
    .carousel-nav-next {
        right: 5px;
    }
}

@media (max-width: 575px) {
    .product-carousel-wrapper {
        padding: 0 45px;
    }
    
    .carousel-card {
        width: 160px !important;
        min-width: 160px !important;
    }
    
    .product-card-compact .card-body {
        padding: 0.75rem;
    }
    
    .product-card-compact .price-amount {
        font-size: 1.15rem;
    }
    
    .product-card-compact .card-img-wrapper {
        height: 120px;
    }
}

/* Loading State */
.product-carousel.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Animations */
.carousel-card {
    animation: fadeInSlide 0.4s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Auto-update Indicator */
.carousel-update-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-update-indicator.show {
    opacity: 1;
}

/* Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    .carousel-card:active .product-card-compact {
        transform: scale(0.97);
    }
}

/* ============================================
   Dark Mode - Carousel Improvements
   ============================================ */

[data-theme="dark"] .carousel-section {
    background: linear-gradient(135deg, #1a1d20 0%, #2d3238 100%);
}

[data-theme="dark"] .carousel-title {
    color: var(--text-color);
}

[data-theme="dark"] .product-card-compact {
    background: #2d3238;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .product-card-compact:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .product-card-compact .card-img-wrapper {
    background: #1a1d20;
}

[data-theme="dark"] .product-card-compact .card-title {
    color: var(--text-color);
}

[data-theme="dark"] .product-card-compact .price-amount {
    color: var(--primary-color);
}

[data-theme="dark"] .carousel-nav-btn {
    background: #2d3238;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .carousel-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
}

[data-theme="dark"] .carousel-update-indicator {
    background: #66bb6a;
}

/* ============================================
   Wishlist Toggle Button Styles
   ============================================ */
.wishlist-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    cursor: pointer;
    z-index: 10;
}

.wishlist-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.wishlist-toggle:active {
    transform: scale(0.95);
}

.wishlist-toggle i {
    transition: all var(--transition-base);
}

.wishlist-toggle.active i {
    color: #dc3545 !important;
}

.wishlist-toggle:not(.active):hover i {
    color: #dc3545;
}

/* Dark mode adjustments */
[data-theme="dark"] .wishlist-toggle {
    background: rgba(45, 50, 56, 0.9);
}

[data-theme="dark"] .wishlist-toggle:hover {
    background: rgba(45, 50, 56, 1);
}

/* Product Card Styles */
.product-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card .card-img-top {
    transition: transform var(--transition-slow);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* ==
==========================================
   Admin Sidebar Navigation - Fixed & Full Height
   ============================================ */
.admin-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Admin content area with sidebar offset */
.admin-content-wrapper {
    margin-left: 250px;
    min-height: 100vh;
    padding: 2rem;
    width: calc(100% - 250px);
}

.admin-content-wrapper .container-fluid {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
}

.admin-content-wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

/* Admin pages should not have sticky header and offset for sidebar */
body.admin-page .modern-header {
    position: relative !important;
    margin-left: 250px;
    width: calc(100% - 250px);
}

body.admin-page main {
    margin-left: 0;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    color: #3b82f6;
    font-size: 1.3rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    padding-bottom: 3rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.sidebar-link i {
    font-size: 1.2rem;
    min-width: 20px;
    transition: transform 0.2s ease;
}

.sidebar-link span {
    flex: 1;
}

.sidebar-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #fff;
    text-decoration: none;
    transform: translateX(4px);
}

.sidebar-link:hover i {
    transform: scale(1.1);
}

.sidebar-link.active {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #60a5fa;
}

.sidebar-link.active:hover {
    transform: translateX(0);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.sidebar-section-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.sidebar-footer .sidebar-link {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-footer .sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Scrollbar styling for sidebar */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Dark mode adjustments */
[data-theme="dark"] .admin-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -250px;
        width: 250px;
        transition: left 0.3s ease;
        z-index: 2000;
    }
    
    .admin-sidebar.show {
        left: 0;
    }
    
    body.admin-page .modern-header {
        margin-left: 0;
        width: 100%;
    }
    
    .admin-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    /* Mobile menu toggle button */
    .admin-mobile-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 2001;
        background: #1e293b;
        color: white;
        border: none;
        padding: 0.5rem;
        border-radius: 0.5rem;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .admin-mobile-toggle i {
        font-size: 1.5rem;
    }
    
    /* Overlay when sidebar is open */
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }
    
    .admin-sidebar-overlay.show {
        display: block;
    }
}

@media (min-width: 769px) {
    .admin-mobile-toggle {
        display: none;
    }
    
    .admin-sidebar-overlay {
        display: none !important;
    }
}

/* Admin footer adjustment - same as header */
body.admin-page .modern-footer {
    position: relative !important;
    margin-left: 250px;
    width: calc(100% - 250px);
}

@media (max-width: 768px) {
    body.admin-page .modern-footer {
        margin-left: 0;
        width: 100%;
    }
}

/* ============================================
   Navbar Logo Styles (Design Management)
   ============================================ */

/* Fixed width for navbar-brand to prevent layout shifts */
.modern-header .navbar-brand {
    min-width: 180px;
    max-width: 200px;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Logo images in navbar */
.navbar-logo {
    max-height: 40px;
    height: auto;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition-fast);
    background: transparent !important; /* Ensure no background */
}

/* Desktop logo - larger on desktop screens */
.navbar-logo-desktop {
    max-height: 50px;
    max-width: 200px;
}

/* Mobile logo - smaller for mobile screens */
.navbar-logo-mobile {
    max-height: 40px;
    max-width: 180px;
}

/* Add some spacing around logo */
.navbar-brand .navbar-logo {
    margin-right: 0;
}

/* Hover effect for logo */
@media (hover: hover) and (pointer: fine) {
    .navbar-brand:hover .navbar-logo {
        opacity: 0.9;
    }
}

/* Responsive adjustments for logo */
@media (max-width: 991px) {
    .modern-header .navbar-brand {
        min-width: 150px;
        max-width: 180px;
    }
    
    .navbar-logo-desktop {
        max-height: 40px;
        max-width: 180px;
    }
    
    .navbar-logo-mobile {
        max-height: 35px;
        max-width: 150px;
    }
}

@media (max-width: 575px) {
    .modern-header .navbar-brand {
        min-width: 120px;
        max-width: 150px;
    }
    
    .navbar-logo-desktop {
        max-height: 35px;
        max-width: 150px;
    }
    
    .navbar-logo-mobile {
        max-height: 30px;
        max-width: 120px;
    }
}

/* Dark mode adjustments for logo (if needed for contrast) */
/* [data-theme="dark"] .navbar-logo {
    filter: brightness(1.1);
} */
