:root {
    --primary-dark: #004F8B;
    --primary-light: #76B6D7;
    --accent-teal: #00B5AD;
    --accent-turquoise: #8CE5C2;
    --grey-light: #E0E0E0;
    --grey-medium: #D9D9D9;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);

    /* Background colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E9ECEF;

    /* Border colors */
    --border-color: #E0E0E0;
    --border-light: #F0F0F0;

    /* Input colors */
    --input-bg: #FFFFFF;
    --input-border: #E0E0E0;
    --input-text: #333333;
    --input-placeholder: #999999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-primary);
    line-height: 1.6;
}

/* Sticky Header Wrapper */
.sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.sticky-header-wrapper.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* Announcement Bar */
.announcement-bar {
    background-color: var(--accent-teal);
    color: var(--white);
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.announcement-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .announcement-content {
        padding: 0 20px;
    }

    /* AGGRESSIVE MOBILE BANNER TEXT FIXES - FORCE WHITE TEXT ON ALL HERO SECTIONS */
    .singles-page-hero,
    .backorder-page-hero,
    .collection-page-hero,
    .format-page-hero,
    .page-hero,
    .hero-section,
    .sealed-page-hero,
    .releases-page-hero,
    .deckbuilder-header,
    [class*="hero"],
    [class*="banner"] {
        color: #ffffff !important;
    }

    /* FORCE WHITE TEXT ON ALL MOBILE HERO ELEMENTS */
    .singles-page-hero *,
    .backorder-page-hero *,
    .collection-page-hero *,
    .format-page-hero *,
    .page-hero *,
    .hero-section *,
    .sealed-page-hero *,
    .releases-page-hero *,
    .deckbuilder-header *,
    [class*="hero"] *,
    [class*="banner"] * {
        color: #ffffff !important;
    }

    .singles-page-hero h1,
    .singles-page-hero p,
    .singles-page-hero .hero-badge,
    .singles-page-hero .hero-notice,
    .singles-page-hero .hero-notice span,
    .singles-page-hero .hero-notice i,
    .backorder-page-hero h1,
    .backorder-page-hero p,
    .backorder-page-hero .hero-badge,
    .collection-page-hero h1,
    .collection-page-hero p,
    .collection-page-hero .hero-badge,
    .format-page-hero h1,
    .format-page-hero p,
    .format-page-hero .hero-badge,
    .page-hero h1,
    .page-hero p,
    .page-hero .hero-badge,
    .hero-section h1,
    .hero-section p,
    .hero-section .hero-badge,
    .sealed-page-hero h1,
    .sealed-page-hero p,
    .sealed-page-hero .hero-badge,
    .sealed-page-hero .hero-notice,
    .sealed-page-hero .hero-notice span,
    .sealed-page-hero .hero-notice i,
    .releases-page-hero h1,
    .releases-page-hero p,
    .releases-page-hero .hero-badge,
    .releases-page-hero .hero-stats,
    .releases-page-hero .hero-stats span,
    .releases-page-hero .hero-stats i,
    .deckbuilder-header h1,
    .deckbuilder-header p {
        color: #ffffff !important;
    }

    .hero-badge,
    .mobile-hero-badge,
    .backorder-badge {
        color: #ffffff !important;
    }

    .hero-notice,
    .hero-notice span,
    .hero-notice i {
        color: #ffffff !important;
    }
}

.announcement-text {
    display: inline-block;
    animation: slideIn 1s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* Header Styles */
.header-top {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.header-top-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
}

.contact-info span {
    margin-right: 20px;
    color: var(--text-light);
}

.contact-info .contact-link {
    margin-right: 20px;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info .contact-link:hover {
    color: var(--accent-turquoise);
}

.contact-info .hours-info {
    color: var(--white);
}

.contact-info span:last-child,
.contact-info .contact-link:last-child {
    margin-right: 0;
}

.contact-info i {
    margin-right: 5px;
    color: var(--primary-light);
}

.header-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.search-bar-top {
    display: flex;
    max-width: 800px;
    width: 100%;
}

.search-bar-top .search-input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid rgba(255,255,255,0.3);
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 20px 0 0 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-bar-top .search-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-bar-top .search-input:focus {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.search-bar-top .search-btn {
    padding: 8px 20px;
    background-color: var(--primary-light);
    color: var(--white);
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.search-bar-top .search-btn:hover {
    background-color: #5FA1C6;
}

.header-link {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.header-link i {
    font-size: 16px;
}

.cart-count {
    font-weight: 600;
}

/* User Greeting in Header */
.user-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
}

.user-greeting i {
    font-size: 16px;
    color: var(--primary-light);
}

/* Dedicated User Navigation Bar */
.user-nav-bar {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-teal) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-nav-content {
    display: flex;
    justify-content: center;
}

.user-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.user-nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.user-nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.user-nav-link:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.user-nav-link i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

/* Removed special styling for My Collection link for consistency */

/* Special styling for Sell Cards link - subtle highlight */
.user-nav-link.sell-link {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
    border-color: rgba(255, 193, 7, 0.3);
    position: relative;
}

.user-nav-link.sell-link:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.35) 0%, rgba(255, 152, 0, 0.35) 100%);
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.25);
    transform: translateY(-3px);
}

.user-nav-link.sell-link i {
    color: #FFD700;
}

/* Subtle pulse animation for sell link */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
    }
}

.user-nav-link.logout-link {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
    color: #ffcccb;
    margin-left: 8px;
}

.user-nav-link.logout-link:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
    color: #fff;
}

.user-nav-link.logout-link i {
    color: #ffcccb;
}

/* Legacy dropdown styles for other dropdowns */
.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.user-dropdown .dropdown-toggle:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.user-dropdown .dropdown-toggle i.fa-chevron-down {
    font-size: 10px;
    transition: transform 0.3s;
}

.user-dropdown:hover .dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    margin-top: 10px;
}

.user-dropdown:hover .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.user-menu .dropdown-item:hover {
    background-color: #F5F5F5;
    color: var(--primary-dark);
    padding-left: 25px;
}

.user-menu .dropdown-item i {
    font-size: 14px;
    width: 16px;
    color: var(--primary-light);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--grey-light);
    margin: 8px 0;
}

/* Removed duplicate sell-link styles that were causing size issues
.sell-link {
    background-color: rgba(255,255,255,0.1);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
}

.sell-link:hover {
    background-color: rgba(255,255,255,0.2);
} */


.main-header {
    background-color: var(--bg-primary);
}

.main-nav {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    padding: 20px 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}


.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
    font-size: 15px;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.nav-link.sale {
    color: #FF4444;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 10px;
    transition: transform 0.3s;
}

.dropdown-toggle:hover i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    margin-top: 10px;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #F5F5F5;
    color: var(--primary-dark);
    padding-left: 25px;
}

/* Banner Carousel */
.banner-carousel {
    width: 100%;
    margin-top: -1px;
}

.carousel-container {
    position: relative;
    max-width: 1920px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 600%; /* Increased to accommodate cloned slides */
}

.carousel-slide {
    min-width: 16.666667%; /* 100% / 6 slides (4 original + 2 clones) */
    flex-shrink: 0;
    position: relative;
}

.banner-link {
    display: block;
    width: 100%;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
    transition: all 0.3s;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 40px;
}

.carousel-next {
    right: 40px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background-color: white;
}

@media (max-width: 768px) {
    .carousel-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
}

/* Button Styles (kept for other sections) */
.btn {
    padding: 14px 32px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background-color: #003A6B;
}

.btn-secondary {
    background-color: #e9ecef;
    color: #495057;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Category Highlights */
.category-highlights {
    padding: 60px 0;
    background-color: var(--bg-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Responsive breakpoints for categories grid */
@media (max-width: 1176px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.category-card {
    background-color: var(--bg-primary);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-light);
}

a.category-card {
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-card-group {
    display: contents;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-light);
}

.category-icon i {
    transition: all 0.3s;
}

.category-card:hover .category-icon i {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}


/* Featured Products */
.featured-products {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.section-header-actions {
    margin-top: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

@media (max-width: 1600px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-image {
        padding-top: 140%; /* Maintain consistent aspect ratio */
        position: relative;
        overflow: hidden;
    }

    .product-image img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .product-image {
        padding-top: 140%; /* Maintain consistent aspect ratio */
        position: relative;
        overflow: hidden;
    }

    .product-image img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}
    
    /* Extra mobile centering for footer newsletter */
    .footer-section .newsletter {
        max-width: 250px;
        padding: 0 10px;
    }
    
    .footer-section h4 {
        font-size: 18px;
    }
    
    .footer-section p {
        font-size: 14px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--grey-light);
}

.product-image-wrapper {
    position: relative;
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.product-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.product-title-link:hover {
    color: var(--primary-light);
}

.product-image {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
    background-color: transparent; /* Transparent background */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    object-fit: cover; /* Fill the container while maintaining aspect ratio */
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.product-card .product-image-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.btn-quick-view,
.btn-full-view {
    padding: 10px 20px;
    background: white;
    color: #333;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-quick-view:hover {
    background: var(--primary-dark);
    color: white;
    transform: scale(1.05);
}

.btn-full-view {
    background: var(--primary-dark);
    color: white;
}

.btn-full-view:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* TARGETED FIX: Full size images with no transforms */
.product-card .product-image img {
    /* Full size images - no transforms needed */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
}

.product-card:hover .product-image img {
    /* On hover, maintain full size - no scaling or transforms */
    transform: none !important;
}

/* Disable other hover effects */
.product-card:hover {
    box-shadow: inherit !important;
    border-color: inherit !important;
    background-color: inherit !important;
}

.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-badge.in-stock {
    background-color: #00C851;
    color: white;
}

.stock-badge.back-order {
    background-color: #FF8800;
    color: white;
}

.product-info {
    padding: 16px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.set-code {
    color: var(--text-light);
    font-weight: 500;
}

.rarity-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.rarity-indicator i {
    font-size: 8px;
}

.rarity-indicator.rare {
    color: #FFB300;
}

.rarity-indicator.uncommon {
    color: #78909C;
}

.rarity-indicator.common {
    color: #424242;
}

.rarity-indicator.mythic {
    color: #FF6F00;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.4;
    height: 2.8em; /* Exactly 2 lines (1.4em * 2) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.foil-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    color: #6b5b00;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    animation: shimmer 2s infinite;
}

.foil-indicator i {
    font-size: 10px;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.product-variants {
    margin-bottom: 12px;
}

.variant-badges {
    display: flex;
    gap: 6px;
}

/* Variant Selector Styles */
.variant-selector {
    margin-bottom: 12px;
}

.variant-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.variant-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.variant-badge.selectable {
    cursor: pointer;
}

.variant-badge.selectable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.variant-badge.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5 !important;
    color: #999 !important;
}

.variant-badge.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Normal variant styling */
.variant-badge:not(.foil) {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    opacity: 0.6;
}

.variant-badge:not(.foil).selected {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border-color: #0d47a1;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
    transform: translateY(-2px);
    opacity: 1;
}

.variant-badge:not(.foil).selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Foil variant styling */
.variant-badge.foil {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    opacity: 0.6;
    position: relative;
}

.variant-badge.foil::after {
    content: '✨';
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.5;
}

.variant-badge.foil.selected {
    background: linear-gradient(135deg, #ff8f00 0%, #f57c00 50%, #e65100 100%);
    color: white;
    border-color: #bf360c;
    box-shadow: 0 4px 15px rgba(255, 143, 0, 0.5);
    transform: translateY(-2px);
    opacity: 1;
}

.variant-badge.foil.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

.variant-badge.foil.selected::after {
    content: '✨';
    margin-left: 4px;
    font-size: 10px;
    opacity: 1;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--primary-dark);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-quick-view {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-footer {
    text-align: center;
}

/* Back Order Info Section */
.backorder-info {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    background: var(--primary-dark);
}

.backorder-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(118, 182, 215, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 181, 173, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(140, 229, 194, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.backorder-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.backorder-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-turquoise) 100%);
    color: #ffffff !important; /* Force white text for better contrast */
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.backorder-header h2 {
    font-size: 42px;
    color: var(--white);
    margin-bottom: 10px;
    font-weight: 800;
}

.backorder-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.backorder-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.backorder-feature {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
}

.backorder-feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(118, 182, 215, 0.3);
}

.backorder-feature.featured {
    background: linear-gradient(135deg, rgba(118, 182, 215, 0.1) 0%, rgba(0, 181, 173, 0.1) 100%);
    border-color: rgba(118, 182, 215, 0.3);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.feature-icon-wrapper i {
    font-size: 32px;
    color: var(--primary-light);
}

.feature-highlight {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-teal);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.backorder-feature h4 {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 10px;
    font-weight: 600;
}

.backorder-feature p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

.backorder-action {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.action-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-content i {
    font-size: 24px;
    color: var(--accent-teal);
}

.action-content p,
.backorder-action .action-content p {
    margin: 0;
    color: #FFFFFF !important;
    font-size: 16px;
}

.action-content strong {
    color: var(--accent-teal);
    font-weight: 600;
}

.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-teal);
    color: var(--primary-dark);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-learn-more:hover {
    background: var(--accent-turquoise);
    transform: translateX(5px);
}

@media (max-width: 1200px) {
    .backorder-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .backorder-header h2 {
        font-size: 32px;
    }
    
    .backorder-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .backorder-action {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .action-content {
        flex-direction: column;
    }
}

/* Formats Section */
.formats-section {
    padding: 80px 0;
    background-color: #F8F9FA;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.format-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.format-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.format-icon {
    font-size: 48px;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.format-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.format-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 14px;
}

.format-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.format-link:hover {
    color: var(--primary-light);
}

/* AGGRESSIVE BANNER TEXT FIXES - FORCE WHITE TEXT ON ALL HERO SECTIONS */
.singles-page-hero,
.backorder-page-hero,
.collection-page-hero,
.format-page-hero,
.page-hero,
.sealed-page-hero,
.releases-page-hero,
.deckbuilder-header,
[class*="hero"],
[class*="banner"] {
    color: #ffffff !important;
}

/* FORCE WHITE TEXT ON ALL HERO ELEMENTS */
.singles-page-hero *,
.backorder-page-hero *,
.collection-page-hero *,
.format-page-hero *,
.page-hero *,
.sealed-page-hero *,
.releases-page-hero *,
.deckbuilder-header *,
[class*="hero"] *,
[class*="banner"] * {
    color: #ffffff !important;
}

.singles-page-hero h1,
.singles-page-hero p,
.singles-page-hero .hero-badge,
.singles-page-hero .hero-notice,
.singles-page-hero .hero-notice span,
.backorder-page-hero h1,
.backorder-page-hero p,
.collection-page-hero h1,
.collection-page-hero p,
.format-page-hero h1,
.format-page-hero p,
.page-hero h1,
.page-hero p,
.sealed-page-hero h1,
.sealed-page-hero p,
.sealed-page-hero .hero-badge,
.sealed-page-hero .hero-notice,
.sealed-page-hero .hero-notice span,
.sealed-page-hero .hero-notice i,
.releases-page-hero h1,
.releases-page-hero p,
.releases-page-hero .hero-badge,
.releases-page-hero .hero-stats,
.releases-page-hero .hero-stats span,
.releases-page-hero .hero-stats i {
    color: #ffffff !important;
}

.hero-badge {
    color: #ffffff !important;
}

.hero-notice,
.hero-notice span,
.hero-notice i {
    color: #ffffff !important;
}

/* Trust Section */
.trust-section {
    background-color: var(--white);
    padding: 60px 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.trust-item {
    text-align: center;
}

.trust-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--accent-teal);
}

.trust-icon i {
    transition: all 0.3s;
}

.trust-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

/* WhatsApp CTA */
.whatsapp-cta {
    background-color: #F8F9FA;
    padding: 40px 0;
    text-align: center;
}

.whatsapp-content h3 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.whatsapp-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.btn-whatsapp {
    display: inline-block;
    background-color: #25D366;
    color: var(--white);
    padding: 14px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-teal) 100%);
    padding: 60px 0;
    color: var(--white);
}

.newsletter-content {
    text-align: center;
}

.newsletter-content h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.newsletter-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
}

.newsletter-form button {
    padding: 14px 30px;
    background-color: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 0 25px 25px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: #003A6B;
}

/* Footer */
.main-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    text-align: center;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--primary-light);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-section li i {
    margin-right: 8px;
    color: var(--primary-light);
}

.newsletter {
    max-width: 300px;
    margin: 0 auto;
}

.newsletter input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 4px;
    text-align: center;
}

.newsletter input::placeholder {
    color: rgba(255,255,255,0.7);
    text-align: center;
}

.newsletter button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter button:hover {
    background-color: #5FA1C6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
}

.social-links i {
    font-size: 18px;
    color: var(--white);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.footer-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-credits {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    font-size: 14px;
}

.tcgsync-link {
    color: var(--accent-turquoise);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(140, 229, 194, 0.1);
}

.tcgsync-link:hover {
    color: #fff;
    background: var(--accent-turquoise);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(140, 229, 194, 0.4);
}

.tcgsync-link i {
    font-size: 12px;
}

@media (max-width: 768px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Center footer newsletter section on mobile */
    .footer-section {
        text-align: center;
    }
    
    .footer-section h4,
    .footer-section p {
        text-align: center;
    }
    
    .footer-section .newsletter {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    .footer-section .newsletter input,
    .footer-section .newsletter button {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
    
    .footer-section .social-links {
        justify-content: center;
        margin: 20px auto 0;
        display: flex;
    }
    
    .footer-section ul {
        text-align: center;
        padding: 0;
    }
    
    .footer-section li {
        text-align: center;
    }

    /* Hide newsletter CTA section on mobile */
    .newsletter-cta {
        display: none !important;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.quick-view-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F9FA;
    border-radius: 8px;
    padding: 20px;
}

.quick-view-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.quick-view-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quick-view-details h2 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.modal-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
}

.modal-variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.variant-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.variant-option:hover {
    border-color: var(--primary-light);
    background-color: #F8F9FA;
}

.variant-option.selected {
    border-color: var(--primary-dark);
    background-color: #E8F4FD;
}

.variant-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #F5F5F5;
    border-color: #E0E0E0;
}

.variant-option.disabled:hover {
    border-color: #E0E0E0;
    background-color: #F5F5F5;
}

.variant-condition {
    font-weight: 500;
}

.variant-stock {
    font-size: 12px;
    color: var(--text-light);
}

.variant-price {
    font-weight: 600;
    color: var(--primary-dark);
}

.modal-add-cart {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: auto;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .quick-view-image img {
        max-height: 300px;
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .header-top-content {
        grid-template-columns: auto 1fr;
        gap: 20px;
    }
    
    .contact-info {
        display: none;
    }
    
    .search-bar-top {
        order: 2;
        max-width: 300px;
    }
    
    .header-actions {
        order: 1;
    }
}

@media (max-width: 1200px) {
    .nav-links {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .header-top-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .search-bar-top {
        width: 100%;
        max-width: 100%;
        order: 3;
    }
    
    /* Mobile user navigation bar adjustments */
    .user-nav-bar {
        padding: 15px 0;
    }
    
    .user-nav-links {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .user-nav-link {
        font-size: 13px;
        padding: 12px 16px;
        justify-content: center;
        text-align: center;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo {
        margin-bottom: 10px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    
    .dropdown-menu {
        position: fixed;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .nav-dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
    
}

/* Back Order Page Styles */
.backorder-page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003A6B 100%);
    padding: 60px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.backorder-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(118, 182, 215, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 181, 173, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-teal);
    color: var(--primary-dark);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
}

.backorder-filters {
    background-color: #F8F9FA;
    padding: 30px 0;
    border-bottom: 1px solid var(--grey-light);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.filter-info h2 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.filter-info p {
    color: var(--text-light);
    margin: 0;
}

.expansion-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.expansion-filter label {
    font-weight: 500;
    color: var(--text-dark);
}

.expansion-dropdown {
    padding: 10px 15px;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
    background-color: var(--white);
    font-size: 14px;
    cursor: pointer;
    min-width: 250px;
    transition: all 0.3s;
}

.expansion-dropdown:hover {
    border-color: var(--primary-light);
}

.expansion-dropdown:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(0, 79, 139, 0.1);
}

.backorder-products {
    padding: 60px 0;
}

.backorder-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #003A6B;
    transform: translateY(-2px);
}

.page-info {
    font-weight: 500;
    color: var(--text-dark);
}

.backorder-info-detailed {
    background-color: #F8F9FA;
    padding: 80px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-teal) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon i {
    font-size: 32px;
    color: var(--white);
}

.info-card h3 {
    font-size: 22px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .backorder-page-hero {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .expansion-dropdown {
        width: 100%;
    }
    
    .backorder-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Deck Builder Styles */
.deckbuilder-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003A6B 100%);
    padding: 40px 0;
    color: #ffffff !important; /* Force white text */
}

.deckbuilder-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 5px;
    color: #ffffff !important; /* Force white text */
}

.deckbuilder-header p {
    font-size: 18px;
    opacity: 0.9;
    color: #ffffff !important; /* Force white text */
}

.deckbuilder-main {
    padding: 40px 0;
    background-color: #F5F6F7;
    min-height: 80vh;
}

/* Search Bar Section */
.search-bar-section {
    margin-bottom: 30px;
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.search-wrapper h2 {
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.search-box-large {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.card-search-input-large {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid var(--grey-light);
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
}

.card-search-input-large:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(118, 182, 215, 0.1);
}



.deckbuilder-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 25px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* Search Results Panel (Center) */
.search-results-panel {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-header {
    padding: 20px;
    border-bottom: 1px solid var(--grey-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    font-size: 20px;
    color: var(--primary-dark);
}

.results-count {
    font-size: 14px;
    color: var(--text-light);
}

.search-results-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.search-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 80px 20px;
}

.search-placeholder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.2;
    color: var(--primary-light);
}

.search-placeholder h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Card Grid Display */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.search-card {
    background: var(--white);
    border: 1px solid var(--grey-light);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.search-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.search-card-image-wrapper {
    position: relative;
    padding-top: 140%;
    background: #F8F9FA;
}

.search-card-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.search-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-stock {
    background: #00C851;
    color: white;
}

.badge-backorder {
    background: #FF8800;
    color: white;
}

.search-card-info {
    padding: 15px;
}

.search-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 2.8em;
}

.search-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.search-card-set {
    font-size: 12px;
    color: var(--text-light);
}

.search-card-rarity {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.rarity-common { color: #424242; }
.rarity-uncommon { color: #78909C; }
.rarity-rare { color: #FFB300; }
.rarity-mythic { color: #FF6F00; }

.search-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 8px;
}

.search-card-add {
    width: 100%;
    padding: 10px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.search-card-add:hover {
    background: #003A6B;
}

/* Deck Panel */
.deck-panel {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.deck-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--grey-light);
    gap: 20px;
}

.deck-name-input {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    border: none;
    outline: none;
    padding: 5px;
}

.format-select {
    padding: 8px 15px;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
    font-size: 14px;
}

.deck-stats {
    display: flex;
    gap: 30px;
    padding: 15px 20px;
    background: #F8F9FA;
    border-bottom: 1px solid var(--grey-light);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
}

.deck-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.deck-section {
    margin-bottom: 30px;
}

.deck-section h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-weight: 600;
}

.deck-cards {
    min-height: 30px;
    border: 1px dashed var(--grey-light);
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
}

.deck-cards.has-cards {
    border-style: solid;
    border-color: transparent;
}

.deck-card-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    background: #F8F9FA;
    border-radius: 6px;
    transition: all 0.3s;
}

.deck-card-item:hover {
    background: #E8F4FD;
}

.deck-card-qty {
    font-weight: 600;
    margin-right: 10px;
    min-width: 25px;
}

.deck-card-name {
    flex: 1;
    font-size: 14px;
}

.deck-card-cost {
    margin-left: 10px;
}

.deck-card-price {
    margin-left: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.deck-card-remove {
    margin-left: 10px;
    color: #DC3545;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.deck-card-item:hover .deck-card-remove {
    opacity: 1;
}

.deck-actions {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--grey-light);
}

.btn-deck-action {
    padding: 10px 20px;
    border: 1px solid var(--grey-light);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-deck-action:hover {
    background: #F8F9FA;
}

.btn-deck-action.primary {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
    margin-left: auto;
}

.btn-deck-action.primary:hover {
    background: #003A6B;
}

/* Stats Panel */
.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mana-curve, .color-distribution, .saved-decks {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.mana-curve h3, .color-distribution h3, .saved-decks h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.curve-bars {
    display: flex;
    align-items: flex-end;
    height: 120px;
    gap: 10px;
}

.curve-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.bar-fill {
    width: 100%;
    background: var(--primary-light);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
    min-height: 2px;
}

.bar-label {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

.color-stats {
    display: flex;
    justify-content: space-around;
}

.color-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.color-stat i {
    font-size: 24px;
}

.color-count {
    font-weight: 600;
    font-size: 16px;
}

.deck-list-saved {
    max-height: 200px;
    overflow-y: auto;
}

.saved-deck-item {
    padding: 10px;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.saved-deck-item:hover {
    border-color: var(--primary-light);
}

.saved-deck-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.saved-deck-meta {
    font-size: 12px;
    color: var(--text-light);
}

.no-decks {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
}

/* Card Preview Modal */
.card-preview-modal .modal-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.preview-image img {
    width: 100%;
    border-radius: 8px;
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.preview-info {
    flex: 1;
}

.info-row {
    margin-bottom: 15px;
}

.info-row strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.preview-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
}

.source-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 10px;
}

.preview-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--grey-light);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #F8F9FA;
}

#qtyInput {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
}

.btn-add-to-deck {
    flex: 1;
    padding: 12px 24px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-to-deck:hover {
    background: #003A6B;
}

/* Mana symbols */
.ms {
    font-size: 14px;
}

/* Loading animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hero Carousel Styles */
.hero-carousel {
    padding: 20px 0;
}

.carousel {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    position: relative;
    width: 100%;
    padding-bottom: 33.33%; /* 3:1 aspect ratio for desktop */
    overflow: hidden;
    background: #f0f0f0;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Carousel controls hidden - can be re-enabled if needed */
.carousel-control,
.carousel-indicators {
    display: none;
}

@media (max-width: 768px) {
    .carousel-inner {
        padding-bottom: 56.25%; /* 16:9 aspect ratio for mobile */
    }
    
    .carousel-control {
        padding: 15px;
        font-size: 18px;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
}

/* Legacy banner styles for compatibility */
.banner-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 600%; /* Increased to accommodate cloned slides */
    height: 100%;
}

.carousel-slide {
    min-width: 16.666667%; /* 100% / 6 slides (4 original + 2 clones) */
    flex-shrink: 0;
    width: 16.666667%;
    height: 100%;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 768px) {
    .carousel-container {
        padding-bottom: 56.25%; /* 16:9 aspect ratio for mobile */
    }
}

/* Featured Collections Section */
.featured-collections {
    padding: 80px 0;
    background: #f8f9fa;
}

.featured-collections .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.featured-collections .section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: #ff6b6b;
    color: white;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 30px;
    margin-bottom: 20px;
}

.featured-collections h2 {
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.featured-collections .section-header p {
    font-size: 18px;
    color: #666;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.collection-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.collection-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.collection-header {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.collection-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 64px;
    color: #ddd;
}

.collection-content {
    padding: 25px;
}

.collection-content h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.collection-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.collection-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.collection-stats i {
    margin-right: 5px;
    color: #ff6b6b;
}

.import-badge {
    padding: 4px 10px;
    background: #96BF48;
    color: white;
    border-radius: 12px;
    font-size: 12px;
}

.collection-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.preview-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-footer {
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #1a1a1a;
    color: white;
}

@media (max-width: 1400px) {
    .deckbuilder-grid {
        grid-template-columns: 1fr 250px;
    }
}

@media (max-width: 1200px) {
    .deckbuilder-grid {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    .deck-panel {
        order: 1;
        max-height: 500px;
    }

    .stats-panel {
        order: 2;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    
    .deck-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .deck-actions {
        flex-wrap: wrap;
    }
    
    .btn-deck-action {
        flex: 1;
        min-width: 100px;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Deck Builder Cart Integration */
.result-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.result-add, .result-cart {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.result-add {
    background: var(--primary-dark);
    color: white;
}

.result-add:hover {
    background: #003A6B;
    transform: translateY(-1px);
}

.result-cart {
    background: var(--accent-teal);
    color: white;
}

.result-cart:hover {
    background: #009A93;
    transform: translateY(-1px);
}

.result-add i, .result-cart i {
    font-size: 0.8rem;
}

/* Cart Page Styles */
.cart-page {
    padding: 40px 0;
    background-color: #F5F6F7;
    min-height: 80vh;
}

.cart-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003A6B 100%);
    padding: 40px 0;
    color: var(--white);
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 5px;
}

.cart-header p {
    font-size: 18px;
    opacity: 0.9;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 40px;
}

.cart-items-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.cart-items-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--grey-light);
    background: #F8F9FA;
}

.cart-items-header h2 {
    font-size: 24px;
    color: var(--primary-dark);
    margin: 0;
}

.cart-items-list {
    padding: 20px 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--grey-light);
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #F8F9FA;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.item-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-light);
}

.source-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-stock {
    background: #E8F5E8;
    color: #2E7D32;
}

.badge-backorder {
    background: #FFF3E0;
    color: #F57C00;
}

.item-price {
    font-size: 14px;
    color: var(--text-light);
}

.item-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--grey-light);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #F8F9FA;
    border-color: var(--primary-light);
}

.qty-input {
    width: 50px;
    text-align: center;
    padding: 6px;
    border: 1px solid var(--grey-light);
    border-radius: 4px;
    font-weight: 600;
}

.item-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: right;
}

.item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #DC3545;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.item-remove:hover {
    opacity: 1;
}

.cart-summary {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.summary-header {
    margin-bottom: 25px;
}

.summary-header h2 {
    font-size: 24px;
    color: var(--primary-dark);
    margin: 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-line.total {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    padding-top: 15px;
    border-top: 2px solid var(--grey-light);
    margin-top: 20px;
}

.summary-line.final-total {
    font-size: 24px;
    color: var(--accent-teal);
    border-top: 2px solid var(--primary-dark);
    margin-top: 20px;
    padding-top: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    background: #003A6B;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.checkout-btn:disabled {
    background: var(--grey-medium);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.empty-cart {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-light);
}

.empty-cart i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-cart h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.empty-cart p {
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-continue-shopping:hover {
    background: #003A6B;
    transform: translateY(-2px);
}

/* Store Credit Section */
.store-credit-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--grey-light);
}

/* Store Credit Page */
.store-credit-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 40px 0;
}

.store-credit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.store-credit-title {
    margin: 0;
    font-size: 2.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.store-credit-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 8px 0 0 0;
}

.balance-card {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.2);
    padding: 40px;
    color: white;
    margin-bottom: 40px;
}

.balance-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.balance-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.balance-amount {
    text-align: right;
}

.balance-amount .amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.balance-amount .label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    transition: all 0.3s;
}

.action-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.action-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.action-card p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.transaction-history {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

.transaction-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--grey-light);
    background: #f8f9fa;
}

.transaction-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.transaction-item {
    padding: 20px 30px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.transaction-details p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.transaction-amount {
    text-align: right;
}

.transaction-amount .amount {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.transaction-amount .amount.credit {
    color: #28a745;
}

.transaction-amount .amount.debit {
    color: #dc3545;
}

.transaction-amount .type {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

.empty-state {
    padding: 60px 30px;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-light);
    margin: 0;
}

.info-panel {
    background: #e3f2fd;
    border-radius: 16px;
    padding: 30px;
}

.info-panel h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 12px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    color: #1e88e5;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #42a5f5;
    font-weight: bold;
}

@media (max-width: 768px) {
    .store-credit-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .balance-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .balance-amount {
        text-align: center;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .transaction-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .transaction-amount {
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.credit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.credit-header h3 {
    font-size: 16px;
    color: var(--primary-dark);
    margin: 0;
}

.credit-balance {
    font-size: 14px;
    color: var(--text-light);
}

.credit-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.credit-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--grey-light);
    border-radius: 4px;
    font-size: 14px;
}

.apply-credit-btn {
    padding: 10px 16px;
    background: var(--accent-teal);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.apply-credit-btn:hover {
    background: #009A93;
}

.credit-applied {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #E8F5E8;
    border-radius: 4px;
    margin-bottom: 10px;
}

.credit-applied-text {
    color: #2E7D32;
    font-weight: 600;
}

.remove-credit-btn {
    background: none;
    border: none;
    color: #DC3545;
    cursor: pointer;
    font-size: 14px;
}

/* Promo Code Section */
.promo-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--grey-light);
}

.promo-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.promo-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--grey-light);
    border-radius: 4px;
    font-size: 14px;
    text-transform: uppercase;
}

.apply-promo-btn {
    padding: 10px 16px;
    background: var(--primary-light);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.apply-promo-btn:hover {
    background: #5FA1C6;
}

.promo-applied {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #E3F2FD;
    border-radius: 4px;
    margin-bottom: 10px;
}

.promo-applied-text {
    color: var(--primary-dark);
    font-weight: 600;
}

.remove-promo-btn {
    background: none;
    border: none;
    color: #DC3545;
    cursor: pointer;
    font-size: 14px;
}

@media (max-width: 1200px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 15px;
    }
    
    .item-image {
        width: 60px;
        height: 60px;
    }
    
    .item-quantity, .item-total {
        grid-column: 1 / -1;
        margin-top: 10px;
    }
    
    .item-quantity {
        justify-self: start;
    }
    
    .item-total {
        justify-self: end;
        margin-top: 5px;
    }
    
    .cart-summary {
        padding: 20px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-dark, #004F8B);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-light, #76B6D7);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Infinite Scroll Loading */
.infinite-scroll-loader {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.infinite-scroll-loader.active {
    display: block;
}

.infinite-scroll-loader .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-dark, #004F8B);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.infinite-scroll-end {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-size: 16px;
    display: none;
}

.infinite-scroll-end.show {
    display: block;
}

.infinite-scroll-error {
    text-align: center;
    padding: 30px 20px;
    color: #dc3545;
    display: none;
}

.infinite-scroll-error.show {
    display: block;
}

/* Modern Toast Notifications */
.toast-notification {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid;
    opacity: 0;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast-notification.success {
    border-left-color: #28a745;
}

.toast-notification.error {
    border-left-color: #dc3545;
}

.toast-notification.warning {
    border-left-color: #ffc107;
}

.toast-notification.info {
    border-left-color: #17a2b8;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
}

.toast-notification.success .toast-icon {
    background: #e7f5e9;
    color: #28a745;
}

.toast-notification.error .toast-icon {
    background: #fde8ea;
    color: #dc3545;
}

.toast-notification.warning .toast-icon {
    background: #fff8e1;
    color: #ffc107;
}

.toast-notification.info .toast-icon {
    background: #e3f2fd;
    color: #17a2b8;
}

.toast-content {
    flex: 1;
}

.toast-message {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 12px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Confirmation Modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.confirm-modal-overlay.show {
    opacity: 1;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.confirm-modal.show {
    transform: scale(1);
}

.confirm-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.confirm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.confirm-modal-body {
    padding: 24px;
}

.confirm-modal-body p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.confirm-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-modal-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-modal-footer .btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.confirm-modal-footer .btn-secondary:hover {
    background: #dee2e6;
}

.confirm-modal-footer .btn-danger {
    background: #dc3545;
    color: white;
}

.confirm-modal-footer .btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Newsletter Message Styles */
.newsletter-message {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
    text-align: center;
}

.newsletter-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.newsletter-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newsletter button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Dashboard Styles */
.dashboard-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003A6B 100%);
    color: var(--white);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(118, 182, 215, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 181, 173, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.welcome-section h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent-turquoise) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section p {
    font-size: 18px;
    opacity: 0.9;
    color: var(--white);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn-header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-header-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-header-action.primary {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: var(--primary-dark);
}

.btn-header-action.primary:hover {
    background: var(--accent-turquoise);
    border-color: var(--accent-turquoise);
}

.dashboard-content {
    padding: 40px 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-teal) 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
    position: relative;
}

.stat-icon.orders {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.stat-icon.pending {
    background: linear-gradient(135deg, #FF9800 0%, #f57c00 100%);
}


.stat-icon.credit {
    background: linear-gradient(135deg, #2196F3 0%, #1976d2 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.stat-trend.positive {
    color: #4CAF50;
}

.stat-trend.negative {
    color: #f44336;
}

.stat-trend.neutral {
    color: var(--text-light);
}

.stat-trend i {
    font-size: 10px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-panel {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s;
}

.dashboard-panel:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.panel-header {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.panel-header p {
    font-size: 14px;
    color: var(--text-light);
    margin: 5px 0 0 0;
}

.view-all-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.view-all-link:hover {
    color: var(--primary-dark);
}

.settings-link {
    color: var(--text-light);
    font-size: 18px;
    transition: all 0.3s;
    padding: 8px;
    border-radius: 50%;
}

.settings-link:hover {
    color: var(--primary-dark);
    background: #f8f9fa;
}

/* Quick Actions */
.actions-grid {
    padding: 20px 30px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-light);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.action-card:hover {
    border-color: var(--primary-light);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-card:hover::before {
    transform: scaleY(1);
}

.action-card.featured {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ffc107;
}

.action-card.featured::before {
    background: #ffc107;
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.action-icon.orders {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.action-icon.backorders {
    background: linear-gradient(135deg, #FF9800 0%, #f57c00 100%);
}


.action-icon.credit {
    background: linear-gradient(135deg, #2196F3 0%, #1976d2 100%);
}

.action-icon.collection {
    background: linear-gradient(135deg, #9C27B0 0%, #7b1fa2 100%);
}

.action-icon.sell {
    background: linear-gradient(135deg, #FF5722 0%, #d84315 100%);
}

.action-content {
    flex: 1;
}

.action-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.action-content p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.action-arrow {
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.3s;
}

.action-card:hover .action-arrow {
    color: var(--primary-dark);
    transform: translateX(3px);
}

/* Recent Activity */
.activity-list {
    padding: 20px 30px 30px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--white);
}

.activity-icon.success {
    background: #4CAF50;
}

.activity-icon.pending {
    background: #FF9800;
}


.activity-icon.credit {
    background: #2196F3;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 3px;
}

.activity-meta {
    font-size: 13px;
    color: var(--text-light);
}

.activity-amount {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 14px;
}

/* Account Overview */
.account-details {
    padding: 20px 30px 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-dark);
}

.detail-label i {
    color: var(--primary-light);
    width: 16px;
}

.detail-value {
    font-weight: 600;
    color: var(--primary-dark);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.verified {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-badge.unsubscribed {
    background: #fff3e0;
    color: #f57c00;
}

.tier-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.silver {
    background: #f5f5f5;
    color: #666;
}

/* Recommendations */
.recommendations-grid {
    padding: 20px 30px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.recommendation-card {
    text-align: center;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s;
}

.recommendation-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rec-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.rec-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rec-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-dark);
    margin-bottom: 3px;
}

.rec-set {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.rec-price {
    font-weight: 700;
    color: var(--accent-teal);
    font-size: 12px;
    margin-bottom: 8px;
}

.rec-actions {
    margin-top: 8px;
}

.rec-add-cart {
    width: 100%;
    padding: 8px 12px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.rec-add-cart:hover {
    background: #003A6B;
    transform: translateY(-1px);
}

.rec-add-cart i {
    font-size: 10px;
}

/* Recommendation Variant Styles */
.rec-variants {
    margin: 8px 0;
}

.rec-variant-selector {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.rec-variant-badge.selectable {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 2px;
}

.rec-variant-badge.selectable:hover {
    border-color: var(--primary-dark);
    background: #f0f8ff;
    transform: translateY(-1px);
}

.rec-variant-badge.selectable.selected {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.rec-variant-badge.selectable.foil {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffc107;
    color: #333;
}

.rec-variant-badge.selectable.foil:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    border-color: #ff9800;
}

.rec-variant-badge.selectable.foil.selected {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-color: #f57c00;
    color: white;
}

.rec-variant-badge.selectable.foil i {
    color: #ffc107;
    font-size: 8px;
}

.rec-variant-badge.selectable.foil.selected i {
    color: white;
}

.rec-variant-badge.selectable.disabled {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.rec-variant-badge.selectable.disabled:hover {
    transform: none;
    border-color: #dee2e6;
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-card {
        padding: 15px;
    }
    
    .panel-header {
        padding: 20px;
    }
    
    .activity-list,
    .account-details,
    .recommendations-grid {
        padding: 15px 20px 20px;
    }
    
    .recommendations-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .dashboard-content {
        padding: 20px 0;
    }
}

/* ===========================
   DARK MODE SUPPORT
   =========================== */

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode color variables - Improved harmony */
        --primary-dark: #4A90E2;
        --primary-light: #7BB3F0;
        --accent-teal: #4ECDC4;
        --accent-turquoise: #6DDBD4;
        --grey-light: #3A3A3A;
        --grey-medium: #4A4A4A;
        --text-dark: #E8E8E8;
        --text-light: #B8B8B8;
        --white: #1A1A1A;
        --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
        --shadow-lg: 0 8px 20px rgba(0,0,0,0.6);

        /* Dark mode backgrounds - Warmer, more cohesive */
        --bg-primary: #1A1A1A;
        --bg-secondary: #252525;
        --bg-tertiary: #303030;

        /* Dark mode borders - Softer contrast */
        --border-color: #3A3A3A;
        --border-light: #2A2A2A;

        /* Dark mode inputs */
        --input-bg: #252525;
        --input-border: #3A3A3A;
        --input-text: #E8E8E8;
        --input-placeholder: #888888;
    }

    /* Body and main containers */
    body {
        background-color: var(--bg-primary) !important;
        color: var(--text-dark) !important;
    }

    /* Header sections */
    .header-top {
        background: linear-gradient(135deg, #1E1E1E 0%, #2D2D2D 100%) !important;
        color: var(--text-dark) !important;
    }

    /* Announcement Bar - Harmonious dark mode styling */
    .announcement-bar {
        background-color: var(--bg-tertiary) !important; /* Consistent dark background */
        color: var(--text-dark) !important; /* Light text for dark background */
        border-bottom: 1px solid var(--border-color) !important;
    }

    .announcement-text,
    .announcement-content .announcement-text,
    .announcement-content a.announcement-text {
        color: var(--text-dark) !important; /* Light text on dark background */
    }

    /* All Hero/Banner Sections - Harmonious dark mode styling */
    .singles-page-hero,
    .backorder-page-hero,
    .deckbuilder-header,
    .collection-page-hero,
    .format-page-hero,
    .sealed-page-hero,
    .releases-page-hero,
    .hero-section,
    .page-hero,
    [class*="hero"],
    [class*="banner"] {
        background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
        color: var(--text-dark) !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    /* Hero text elements */
    .singles-page-hero *,
    .backorder-page-hero *,
    .deckbuilder-header *,
    .collection-page-hero *,
    .format-page-hero *,
    .sealed-page-hero *,
    .releases-page-hero *,
    .hero-section *,
    .page-hero *,
    [class*="hero"] *,
    [class*="banner"] * {
        color: var(--text-dark) !important;
    }

    .singles-page-hero h1,
    .singles-page-hero p,
    .singles-page-hero .hero-badge,
    .singles-page-hero .hero-notice,
    .backorder-page-hero h1,
    .backorder-page-hero p,
    .backorder-page-hero .hero-badge,
    .deckbuilder-header h1,
    .deckbuilder-header p,
    .collection-page-hero h1,
    .collection-page-hero p,
    .format-page-hero h1,
    .format-page-hero p,
    .sealed-page-hero h1,
    .sealed-page-hero p,
    .sealed-page-hero .hero-badge,
    .sealed-page-hero .hero-notice,
    .sealed-page-hero .hero-notice span,
    .sealed-page-hero .hero-notice i,
    .releases-page-hero h1,
    .releases-page-hero p,
    .releases-page-hero .hero-badge,
    .releases-page-hero .hero-stats,
    .releases-page-hero .hero-stats span,
    .releases-page-hero .hero-stats i {
        color: #212121 !important; /* Dark text on light grey background */
    }

    /* Hero badges and notices */
    .hero-badge,
    .backorder-badge {
        background-color: rgba(33, 33, 33, 0.1) !important; /* Slightly darker area on light grey */
        color: #212121 !important; /* Dark text */
    }

    .hero-notice,
    .hero-notice span {
        color: #424242 !important; /* Slightly lighter dark text for secondary info */
    }

    .main-header,
    .main-nav {
        background-color: var(--bg-secondary) !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    /* Navigation links */
    .nav-link {
        color: var(--text-dark) !important;
    }

    .nav-link:hover {
        color: var(--primary-light) !important;
    }

    /* Contact info and header links */
    .contact-info .contact-link,
    .header-link {
        color: var(--text-light) !important;
    }

    .contact-info .contact-link:hover,
    .header-link:hover {
        color: var(--text-dark) !important;
    }

    /* Search bar */
    .search-bar-top .search-input {
        background-color: var(--input-bg) !important;
        border-color: var(--input-border) !important;
        color: var(--input-text) !important;
    }

    .search-bar-top .search-input::placeholder {
        color: var(--input-placeholder) !important;
    }

    .search-bar-top .search-btn {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
    }

    /* User navigation */
    .user-nav-link {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        color: var(--text-dark) !important;
    }

    .user-nav-link:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    /* Dropdown menus */
    .dropdown-menu,
    .user-menu {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    }

    .dropdown-item {
        color: var(--text-dark) !important;
    }

    .dropdown-item:hover {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-dark) !important;
    }

    /* Cards and containers - Sleek rounded styling */
    .category-card,
    .product-card,
    .collection-card,
    .info-card,
    .stat-card,
    .action-card,
    .dashboard-panel,
    .recommendation-card,
    .search-card,
    .trust-item,
    .format-card,
    .backorder-feature {
        background-color: var(--bg-secondary) !important; /* Consistent dark background */
        border-color: var(--border-color) !important; /* Harmonious border */
        color: var(--text-dark) !important; /* Light text for dark backgrounds */
        border-radius: 12px !important; /* Sleek rounded corners */
        box-shadow: var(--shadow-sm) !important; /* Subtle shadow for depth */
    }

    /* Text elements - Light text for dark backgrounds */
    h1, h2, h3, h4, h5, h6 {
        color: var(--text-dark) !important; /* Light text for dark backgrounds */
    }

    p, span, div, .product-name, .product-price, .category-card h3 {
        color: var(--text-light) !important; /* Secondary light text */
    }

    .text-muted,
    .product-details,
    .search-card-details {
        color: var(--input-placeholder) !important;
    }

    /* Buttons */
    .btn-primary {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: var(--text-dark) !important;
    }

    .btn-primary:hover {
        background-color: var(--primary-light) !important;
        border-color: var(--primary-light) !important;
    }

    .btn-secondary {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }

    .btn-secondary:hover {
        background-color: var(--grey-light) !important;
        border-color: var(--grey-medium) !important;
    }

    .btn-outline {
        background-color: transparent !important;
        border-color: var(--border-color) !important;
        color: var(--text-light) !important;
    }

    .btn-outline:hover {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-dark) !important;
    }

    /* Forms and inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    textarea,
    select,
    .form-control,
    .search-input,
    .card-search-input-large,
    .newsletter-form input {
        background-color: var(--input-bg) !important;
        border-color: var(--input-border) !important;
        color: var(--input-text) !important;
    }

    input::placeholder,
    textarea::placeholder {
        color: var(--input-placeholder) !important;
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: var(--primary-light) !important;
        box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2) !important;
    }

    /* Sections and backgrounds */
    .category-highlights,
    .featured-collections,
    .trust-section,
    .whatsapp-cta,
    .newsletter-cta,
    .backorder-section,
    .dashboard-page {
        background-color: var(--bg-secondary) !important;
    }

    .hero-carousel,
    .banner-carousel {
        background-color: var(--bg-primary) !important;
    }

    /* Footer */
    .footer,
    .main-footer {
        background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%) !important;
        border-top-color: var(--border-color) !important;
        color: #E0E0E0 !important;
    }

    /* Footer newsletter styling */
    .footer .newsletter input,
    .main-footer .newsletter input {
        background-color: #2d2d2d !important;
        border-color: #404040 !important;
        color: #ffffff !important;
    }

    .footer .newsletter input::placeholder,
    .main-footer .newsletter input::placeholder {
        color: #888888 !important;
    }

    .footer .newsletter button,
    .main-footer .newsletter button {
        background-color: var(--primary-dark) !important;
        color: #ffffff !important;
    }

    .footer .newsletter button:hover,
    .main-footer .newsletter button:hover {
        background-color: var(--primary-light) !important;
    }

    .footer-section h4 {
        color: #FFFFFF !important;
    }

    .footer-section a,
    .footer-links a {
        color: #E0E0E0 !important;
    }

    .footer-section a:hover,
    .footer-links a:hover {
        color: #FFFFFF !important;
    }

    .footer-section p,
    .footer-bottom p,
    .footer-credits {
        color: #C0C0C0 !important;
    }

    .footer-section li i {
        color: var(--primary-light) !important;
    }

    .social-links a {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: #FFFFFF !important;
    }

    .social-links a:hover {
        background-color: var(--primary-light) !important;
        color: var(--bg-primary) !important;
    }

    .social-links i {
        color: inherit !important;
    }

    /* Special elements */
    .variant-badge {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-light) !important;
    }

    .variant-badge.selected {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: var(--text-dark) !important;
    }

    .stock-badge.in-stock {
        background-color: #2E7D32 !important;
        color: var(--text-dark) !important;
    }

    .stock-badge.low-stock {
        background-color: #F57C00 !important;
        color: var(--text-dark) !important;
    }

    .stock-badge.out-of-stock {
        background-color: #D32F2F !important;
        color: var(--text-dark) !important;
    }

    /* Modal and overlay elements - Sleek rounded styling */
    .modal-overlay,
    .modal-backdrop {
        background-color: rgba(0, 0, 0, 0.8) !important;
    }

    .modal,
    .modal-content,
    .modal-dialog,
    .quick-view-modal {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
        border-radius: 16px !important; /* Larger radius for modals */
        box-shadow: var(--shadow-lg) !important; /* Enhanced shadow */
    }

    .modal-header {
        background-color: var(--bg-tertiary) !important;
        border-bottom-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }

    .modal-body {
        background-color: var(--bg-secondary) !important;
        color: var(--text-dark) !important;
    }

    .modal-footer {
        background-color: var(--bg-tertiary) !important;
        border-top-color: var(--border-color) !important;
    }

    .modal-title,
    .modal h1,
    .modal h2,
    .modal h3,
    .modal h4,
    .modal h5,
    .modal h6 {
        color: var(--text-dark) !important;
    }

    .modal p,
    .modal span,
    .modal div {
        color: var(--text-light) !important;
    }

    .modal-close,
    .close {
        color: var(--text-light) !important;
        opacity: 0.8;
    }

    .modal-close:hover,
    .close:hover {
        color: var(--text-dark) !important;
        opacity: 1;
    }

    .modal-close {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-light) !important;
    }

    .modal-close:hover {
        background-color: var(--grey-light) !important;
        color: var(--text-dark) !important;
    }

    /* Toast notifications */
    .toast-notification {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }

    .toast-notification.success {
        border-left-color: #2E7D32 !important;
    }

    .toast-notification.error {
        border-left-color: #D32F2F !important;
    }

    .toast-notification.warning {
        border-left-color: #F57C00 !important;
    }

    /* Ensure proper contrast for links */
    a {
        color: var(--primary-light) !important;
    }

    a:hover {
        color: var(--accent-teal) !important;
    }

    /* Fix any remaining white backgrounds - Use light grey for better readability */
    .bg-white {
        background-color: #2d2d2d !important; /* Light grey instead of dark secondary */
    }

    /* Additional background fixes - Harmonious dark mode styling */
    .card,
    .product-card,
    .search-card,
    .collection-card {
        background-color: var(--bg-secondary) !important; /* Consistent dark background */
        border-color: var(--border-color) !important; /* Harmonious border */
        color: var(--text-dark) !important; /* Light text for dark background */
    }

    /* Product card specific text styling for dark backgrounds */
    .product-card .product-title,
    .product-card .product-name,
    .product-card h4,
    .product-card h3 {
        color: var(--text-dark) !important; /* Light text for titles */
    }

    .product-card .product-meta,
    .product-card .set-code,
    .product-card .rarity-indicator,
    .product-card p,
    .product-card span {
        color: var(--text-light) !important; /* Secondary light text */
    }

    .product-card .product-price,
    .product-card .price {
        color: var(--primary-light) !important; /* Accent color for prices */
        font-weight: 600 !important;
    }

    /* Product overlay styling for dark mode */
    .product-overlay {
        background: rgba(0, 0, 0, 0.8) !important; /* Dark overlay */
    }

    .btn-quick-view {
        background-color: var(--primary-dark) !important; /* Primary color button */
        color: var(--text-dark) !important; /* Light text */
        border: 1px solid var(--primary-dark) !important;
    }

    .btn-quick-view:hover {
        background-color: var(--primary-light) !important; /* Lighter on hover */
        color: var(--text-dark) !important;
    }

    /* Button styling for dark mode - Sleek rounded */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-add-cart {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: var(--text-dark) !important;
        border-radius: 8px !important; /* Rounded corners */
        box-shadow: var(--shadow-sm) !important; /* Subtle shadow */
        transition: all 0.3s ease !important; /* Smooth transitions */
    }

    .btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-outline:hover,
    .btn-add-cart:hover {
        background-color: var(--primary-light) !important;
        border-color: var(--primary-light) !important;
        color: var(--text-dark) !important;
        transform: translateY(-1px) !important; /* Subtle lift effect */
        box-shadow: var(--shadow-md) !important; /* Enhanced shadow on hover */
    }

    .btn-outline {
        background-color: transparent !important;
        border-color: var(--primary-dark) !important;
        color: var(--primary-dark) !important;
    }

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

    /* Ensure all white sections become light grey */
    .white-section,
    .content-section,
    .main-content {
        background-color: #2d2d2d !important;
    }

    /* Newsletter and CTA sections */
    .newsletter-section,
    .cta-section,
    .info-section {
        background-color: #2d2d2d !important;
        border-color: #404040 !important;
    }

    /* Carousel indicators */
    .indicator {
        border-color: var(--text-dark) !important;
    }

    .indicator.active {
        background-color: var(--text-dark) !important;
    }

    /* Carousel controls */
    .carousel-btn {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: var(--text-dark) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    .carousel-btn:hover {
        background-color: rgba(255, 255, 255, 0.3) !important;
        color: var(--text-dark) !important;
    }

    /* Additional dark mode fixes for specific elements */
    .product-details .price,
    .search-card-price,
    .rec-price {
        color: var(--primary-light) !important;
    }

    .rarity-common { color: #9E9E9E !important; }
    .rarity-uncommon { color: #B0BEC5 !important; }
    .rarity-rare { color: #FFD54F !important; }
    .rarity-mythic { color: #FF8A65 !important; }

    /* Deck builder and search specific elements */
    .deck-card-item {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-dark) !important;
    }

    .deck-card-item:hover {
        background-color: var(--grey-light) !important;
    }

    /* Form elements and dropdowns - Sleek styling */
    .expansion-dropdown,
    .sort-select,
    select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea {
        background-color: var(--input-bg) !important;
        border-color: var(--input-border) !important;
        color: var(--input-text) !important;
        border-radius: 8px !important; /* Rounded corners */
        box-shadow: var(--shadow-sm) !important; /* Subtle shadow */
    }

    .expansion-dropdown:focus,
    .sort-select:focus,
    select:focus,
    input:focus,
    textarea:focus {
        border-color: var(--primary-dark) !important;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2) !important;
    }

    /* Sort dropdown specific styling */
    select[name="sort"],
    .sort-dropdown {
        background-color: var(--input-bg) !important;
        border-color: var(--input-border) !important;
        color: var(--input-text) !important;
        border-radius: 8px !important;
        padding: 8px 12px !important;
    }

    select[name="sort"] option {
        background-color: var(--input-bg) !important;
        color: var(--input-text) !important;
    }

    /* Cart and checkout elements */
    .cart-item {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
    }

    .cart-summary {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
    }

    /* Dashboard specific elements */
    .welcome-section {
        background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
    }

    .activity-item {
        border-color: var(--border-light) !important;
    }

    .activity-item:hover {
        background-color: var(--bg-tertiary) !important;
    }

    /* Ensure proper text contrast for all text elements */
    .product-name,
    .collection-title,
    .section-title,
    .card-title {
        color: var(--text-dark) !important;
    }

    .product-subtitle,
    .collection-subtitle,
    .section-subtitle {
        color: var(--text-light) !important;
    }

    /* Fix any remaining contrast issues */
    .text-primary {
        color: var(--primary-light) !important;
    }

    .text-secondary {
        color: var(--text-light) !important;
    }

    .text-success {
        color: #4CAF50 !important;
    }

    .text-warning {
        color: #FF9800 !important;
    }

    .text-danger {
        color: #F44336 !important;
    }

    /* Newsletter and CTA sections - Better contrast for dark mode */
    .newsletter-cta {
        background: linear-gradient(135deg, #1E88E5 0%, #26C6DA 100%) !important; /* Keep gradient but with better colors */
        color: #ffffff !important; /* Force white text */
    }

    .newsletter-content h3,
    .newsletter-content p {
        color: #ffffff !important; /* Ensure white text for better contrast */
    }

    .whatsapp-cta {
        background-color: #2d2d2d !important; /* Light grey background */
    }

    .whatsapp-content h3 {
        color: #ffffff !important;
    }

    .whatsapp-content p {
        color: #b3b3b3 !important;
    }

    .newsletter-form input {
        background-color: #ffffff !important; /* Keep input white for contrast */
        color: #333333 !important; /* Dark text in white input */
        border: 1px solid #e0e0e0 !important;
    }

    .newsletter-form input::placeholder {
        color: #666666 !important;
    }

    .newsletter-form button,
    .btn-whatsapp {
        background-color: var(--primary-dark) !important;
        color: #ffffff !important; /* Force white text */
    }

    .newsletter-form button:hover,
    .btn-whatsapp:hover {
        background-color: var(--primary-light) !important;
        color: #ffffff !important;
    }

    /* Ensure all text in cards is properly colored */
    .category-card h3,
    .product-card .product-name,
    .collection-card .collection-title,
    .info-card h3,
    .format-card h3,
    .trust-item h4 {
        color: var(--text-dark) !important;
    }

    .category-card p,
    .product-card .product-details,
    .collection-card .collection-description,
    .info-card p,
    .format-card p,
    .trust-item p {
        color: var(--text-light) !important;
    }

    /* Price elements should be prominent */
    .product-price,
    .price-display,
    .cart-total,
    .checkout-total {
        color: var(--primary-light) !important;
        font-weight: 600 !important;
    }

    /* Ensure proper visibility for icons */
    .category-icon i,
    .trust-icon i,
    .format-icon i {
        color: var(--primary-light) !important;
    }

    /* Comprehensive table styling for dark mode - Sleek rounded */
    table,
    .table,
    .collection-table,
    .data-table {
        background-color: var(--bg-secondary) !important;
        color: var(--text-dark) !important;
        border-color: var(--border-color) !important;
        border-radius: 12px !important; /* Rounded corners */
        overflow: hidden !important; /* Ensure rounded corners work */
        box-shadow: var(--shadow-sm) !important; /* Subtle shadow */
    }

    th,
    .table th,
    .collection-table th,
    .data-table th {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-dark) !important;
        border-color: var(--border-color) !important;
    }

    td,
    .table td,
    .collection-table td,
    .data-table td {
        color: var(--text-light) !important;
        border-color: var(--border-light) !important;
    }

    .table-striped tbody tr:nth-of-type(odd),
    .collection-table tbody tr:nth-of-type(odd) {
        background-color: rgba(255, 255, 255, 0.03) !important;
    }

    .table-hover tbody tr:hover,
    .collection-table tbody tr:hover {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-dark) !important;
    }

    /* Pagination styling - Comprehensive dark mode */
    .pagination,
    .pagination-nav,
    .pagination-container {
        background-color: transparent !important;
    }

    .pagination .page-link,
    .page-link {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-light) !important;
        border-radius: 8px !important; /* Rounded corners */
        margin: 0 4px !important; /* Gap between items */
        padding: 8px 12px !important; /* Better padding */
        transition: all 0.3s ease !important; /* Smooth transitions */
        text-decoration: none !important;
    }

    .pagination .page-link:hover,
    .page-link:hover {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
        transform: translateY(-1px) !important; /* Subtle lift */
        box-shadow: var(--shadow-sm) !important;
    }

    .pagination .page-item.active .page-link,
    .page-item.active .page-link {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: var(--text-dark) !important;
        box-shadow: var(--shadow-md) !important;
    }

    /* Page info styling */
    .page-info,
    .pagination-info {
        background-color: var(--bg-secondary) !important;
        color: var(--text-light) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px !important;
        padding: 12px 16px !important;
        margin-top: 16px !important;
        text-align: center !important;
        font-size: 14px !important;
    }

    /* Breadcrumb styling */
    .breadcrumb {
        background-color: var(--bg-secondary) !important;
    }

    .breadcrumb-item a {
        color: var(--primary-light) !important;
    }

    .breadcrumb-item.active {
        color: var(--text-light) !important;
    }

    /* Alert and notification styling - Sleek rounded */
    .alert {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
        border-radius: 10px !important; /* Rounded corners */
        box-shadow: var(--shadow-sm) !important; /* Subtle shadow */
    }

    .alert-success {
        background-color: rgba(78, 205, 196, 0.2) !important;
        border-color: var(--accent-teal) !important;
        color: var(--text-dark) !important;
        border-radius: 10px !important;
    }

    .alert-warning {
        background-color: rgba(243, 156, 18, 0.2) !important;
        border-color: #F39C12 !important;
        color: var(--text-dark) !important;
        border-radius: 10px !important;
    }

    .alert-danger {
        background-color: rgba(231, 76, 60, 0.2) !important;
        border-color: #E74C3C !important;
        color: var(--text-dark) !important;
        border-radius: 10px !important;
    }

    /* Sort controls and view toggle styling */
    .sort-controls {
        background-color: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 12px !important;
        padding: 16px 20px !important;
        margin-bottom: 20px !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .sort-label {
        color: var(--text-dark) !important;
    }

    .sort-label i {
        color: var(--primary-light) !important;
        margin-right: 8px !important;
    }

    .sort-label span {
        color: var(--text-dark) !important;
    }

    /* View toggle buttons */
    .view-toggle {
        background-color: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 12px !important;
        padding: 12px !important;
        margin-bottom: 20px !important;
        box-shadow: var(--shadow-sm) !important;
        display: flex !important;
        gap: 8px !important;
        justify-content: flex-end !important;
    }

    .view-btn {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-light) !important;
        border-radius: 8px !important;
        padding: 8px 16px !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 14px !important;
        cursor: pointer !important;
    }

    .view-btn:hover {
        background-color: var(--grey-light) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
        transform: translateY(-1px) !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .view-btn.active {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: var(--text-dark) !important;
        box-shadow: var(--shadow-md) !important;
    }

    .view-btn i {
        color: inherit !important;
    }

    td {
        border-color: var(--border-color) !important;
        color: var(--text-light) !important;
    }

    /* Pagination elements */
    .page-link {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }

    .page-link:hover {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: var(--text-dark) !important;
    }

    /* Search results and filters */
    .filter-section {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
    }

    .filter-option {
        color: var(--text-light) !important;
    }

    .filter-option:hover,
    .filter-option.active {
        color: var(--text-dark) !important;
        background-color: var(--bg-tertiary) !important;
    }

    /* Breadcrumb navigation */
    .breadcrumb {
        background-color: var(--bg-secondary) !important;
    }

    .breadcrumb-item a {
        color: var(--primary-light) !important;
    }

    .breadcrumb-item.active {
        color: var(--text-light) !important;
    }

    /* Alert and message boxes */
    .alert {
        border-color: var(--border-color) !important;
    }

    .alert-success {
        background-color: rgba(76, 175, 80, 0.1) !important;
        border-color: #4CAF50 !important;
        color: #4CAF50 !important;
    }

    .alert-warning {
        background-color: rgba(255, 152, 0, 0.1) !important;
        border-color: #FF9800 !important;
        color: #FF9800 !important;
    }

    .alert-danger {
        background-color: rgba(244, 67, 54, 0.1) !important;
        border-color: #F44336 !important;
        color: #F44336 !important;
    }

    .alert-info {
        background-color: rgba(30, 136, 229, 0.1) !important;
        border-color: var(--primary-light) !important;
        color: var(--primary-light) !important;
    }

    /* Override any remaining hardcoded colors */
    * {
        border-color: var(--border-color) !important;
    }

    /* Specific overrides for common problematic elements */
    .text-black {
        color: var(--text-dark) !important;
    }

    .text-white {
        color: var(--text-dark) !important;
    }

    .bg-light {
        background-color: var(--bg-secondary) !important;
    }

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

    /* Ensure form labels are visible */
    label {
        color: var(--text-dark) !important;
    }

    /* Ensure all headings are properly colored */
    .section-header h2,
    .section-header h3,
    .page-header h1,
    .page-header h2 {
        color: var(--text-dark) !important;
    }

    /* Ensure proper contrast for any remaining elements */
    .card-header {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }

    .card-body {
        background-color: var(--bg-secondary) !important;
        color: var(--text-light) !important;
    }

    .card-footer {
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-light) !important;
    }

    /* Loading states */
    .loading,
    .spinner {
        color: var(--primary-light) !important;
    }

    /* Ensure proper visibility for all interactive elements */
    .clickable,
    .interactive {
        color: var(--text-dark) !important;
    }

    .clickable:hover,
    .interactive:hover {
        color: var(--primary-light) !important;
    }
}


/* Cart Stock Indicators */
.stock-info {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stock-info.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-info.low-stock {
    background: #fff3cd;
    color: #856404;
}

.stock-info.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.max-qty-warning {
    color: #ff6b6b;
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
    text-align: center;
}

.qty-controls {
    position: relative;
}

.qty-controls .qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-controls .qty-input {
    text-align: center;
    font-weight: 600;
}

/* Cart item adjustments for stock display */
.cart-item .item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}
