:root {
    --card-primary: #8B0000;
    --card-secondary: #31302c;
    --card-accent: #f3b712;
    --card-gray-100: #f3f3f3;
    --card-gray-200: #e9e9e9;
    --card-gray-300: #d1d1d1;
    --card-gray-400: #a0a0a0;
    --card-gray-500: #6c6c6c;
    --card-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --card-font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Apply font to all card elements */
.plate-card,
.plate-card * {
    font-family: var(--card-font-family);
}

/* Card styles based on the provided design */
.plate-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: auto; /* Only use will-change when needed */
    position: relative;
    height: 325px;
    display: flex;
    flex-direction: column;
    border: 1px solid #fff;
}

/* Plates Grid Styles - Fixed width cards aligned to the left */
.plates-grid {
    display: grid;
    grid-template-columns: repeat(4, 265px); /* Reduced from 280px to 265px */
    gap: 25px;
    width: 100%;
    justify-content: center; /* Center the grid */
}

/* Sponsored Plates Carousel - Keep as is */
.sponsored-plates {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 10px 0 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
    /* Remove any scroll snap for super smooth scrolling */
    scroll-snap-type: none !important;
}

/* Ensure no snap on sponsored cards */
.sponsored-plates .plate-card {
    scroll-snap-align: none !important;
    scroll-snap-stop: none !important;
}

/* Base plate card with fixed width for all contexts */
.plate-card {
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    /* Fixed width for all cards */
    width: 265px; /* Reduced from 280px */
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    position: relative;
}

.plate-card:hover {
    transform: translateY(-3px); /* Reduced from -5px */
    /* Simplified shadow */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Remove complex animations on mobile */
@media (max-width: 768px) {
    .plate-card {
        transition: none;
    }
    
    .plate-card:hover {
        transform: none;
    }
    
    /* Remove gradient backgrounds on mobile */
    .plate-card {
        background: #fff;
    }
    
    .sponsored-plate {
        background: #fffaf0;
    }
    
    .champagne-plate {
        background: #fdf6e3;
    }
}

/* Mobile specific fixes to prevent horizontal scroll */
@media (max-width: 768px) {
    /* Plates grid - prevent overflow */
    .plates-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 flexible columns on mobile */
        gap: 15px;
        justify-content: stretch;
        width: 100%; /* Full width */
        max-width: 100%; /* Don't exceed container */
        overflow: hidden; /* Prevent overflow */
    }
    
    .plate-card {
        width: 100%; /* Full width in grid cells on mobile */
        max-width: 100%; /* Don't exceed grid cell */
        box-sizing: border-box; /* Include border in width */
    }
    
    /* Sponsored plates carousel specific */
    .sponsored-plates {
        display: flex;
        overflow-x: auto !important; /* Allow horizontal scroll only here */
        overflow-y: hidden; /* No vertical scroll in carousel */
        gap: 15px;
        padding: 10px 0 20px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* Remove scroll snap for smooth scrolling */
        scroll-snap-type: none !important;
        scrollbar-width: thin;
        position: relative;
        width: auto; /* Allow natural width */
        max-width: none; /* Allow scrolling */
    }
    
    /* Cards in sponsored carousel should have fixed width */
    .sponsored-plates .plate-card {
        flex: 0 0 auto; /* Don't grow or shrink */
        width: 240px; /* Fixed width for carousel cards */
        min-width: 240px; /* Maintain minimum width */
        /* No scroll snap */
        scroll-snap-align: none !important;
    }
}

/* Responsive adjustments for consistent sizing */
@media (max-width: 1200px) {
    .plates-grid {
        grid-template-columns: repeat(3, 250px); /* Reduced from 260px */
        justify-content: center;
    }
    
    .plate-card {
        width: 250px; /* Reduced from 260px */
    }
}

@media (max-width: 992px) {
    .plates-grid {
        grid-template-columns: repeat(2, 240px); /* Keep as is - already fits well */
        justify-content: center;
    }
    
    .plate-card {
        width: 240px; /* Keep as is */
    }
}

@media (max-width: 768px) {
    .plates-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 flexible columns on mobile */
        gap: 15px;
        justify-content: stretch;
    }
    
    .plate-card {
        width: 100%; /* Full width in grid cells on mobile */
    }
}

@media (max-width: 480px) {
    .plates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
        overflow: hidden;
    }
    
    /* On very small screens, both grid and sponsored cards should be same width */
    .plate-card {
        width: 100%;
        max-width: 100%;
    }
    
    /* Make sponsored cards slightly smaller on very small screens */
    .sponsored-plates .plate-card {
        width: calc(50vw - 20px); /* Half viewport width minus gap and padding */
        min-width: calc(50vw - 20px);
    }
}

/* Plate number container */
.plate-number-container {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--card-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* View count badge - bottom right of plate number container, SAME for all cards */
.view-count-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(52, 73, 94, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px 3px 6px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.13);
    pointer-events: none;
    min-width: unset;
    max-width: 72px;
    max-height: 18px;
    height: auto;
    overflow: hidden;
    line-height: 1.1;
}

.view-count-badge svg {
    width: 11px;
    height: 11px;
    fill: #fff;
    margin-right: 2px;
    flex-shrink: 0;
}

.view-count-badge span {
    min-width: 0;
    text-align: center;
    color: inherit;
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.1px;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

/* Remove all sponsored-plate overrides for .view-count-badge */
.sponsored-plate .view-count-badge {
    background-color: rgba(52, 73, 94, 0.92);
    color: #fff;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.13);
}
.sponsored-plate .view-count-badge svg {
    fill: #fff;
}
.sponsored-plate .view-count-badge span {
    color: #fff;
}

/* Remove any .plate-number-container.has-sponsored .view-count-badge top override */
.plate-number-container.has-sponsored .view-count-badge {
    top: auto;
}

.plate-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--card-secondary);
    letter-spacing: 1px;
    padding: 15px 20px;
    background: linear-gradient(to bottom, #ffffff, #f8f8f8);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center !important;
    direction: ltr;
    unicode-bidi: plaintext;
    display: block;
    position: relative;
    z-index: 1;
    margin: 0 auto; /* Keep centered horizontally */
}

/* Feature badge for special plates */
.feature-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: var(--card-secondary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-badge.multiple-features {
    cursor: help;
    padding-right: 18px;
}

.feature-badge.multiple-features::after {
    content: "+";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
}

/* Different colors for different features */
.feature-badge[title*="Birthday"] {
    background-color: #2ecc71;
}

.feature-badge[title*="Palindrome"] {
    background-color: #9b59b6;
}

.feature-badge[title*="Sequential"] {
    background-color: #3498db;
}

.feature-badge[title*="Repeated"] {
    background-color: #e74c3c;
}

.feature-badge[title*="Mirror"] {
    background-color: #f39c12;
}

/* Add a tooltip for multiple features */
.feature-badge::before {
    display: none;
    content: attr(data-features);
    position: absolute;
    bottom: 100%;
    right: 0;
    background-color: var(--card-secondary);
    color: white;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s, transform 0.2s;
}

.feature-badge.multiple-features:hover::before {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Special styling for sponsored plates */
.sponsored-plate .plate-number-container {
    background-color: #fffaf0;
}

.sponsored-plate .plate-number {
    border-color: rgba(243, 183, 18, 0.3);
    background: linear-gradient(to bottom, #ffffff, #fcf9f2);
}

.sponsored-plate::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--card-accent), #e09900);
    z-index: 2;
}

/* Sponsored label */
.sponsored-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background-color: var(--card-accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- VIP Sponsored Overrides --- */
/* Base container upgrade */
.sponsored-plate {
    background: linear-gradient(145deg,#3b030d 0%, #5e0918 45%, #7c0f23 70%, #3b030d 100%);
    border: 2px solid #d4af37; /* Simple solid gold border */
    box-shadow: 0 8px 22px -6px rgba(0,0,0,0.55);
    position: relative;
    overflow: hidden;
}

/* Remove the complex inner glow frame */
.sponsored-plate::before {
    display: none; /* Remove this effect */
}

/* Remove the animated edge shimmer */
.sponsored-plate::after {
    display: none; /* Remove this effect */
}

/* Plate number zone upgrade */
.sponsored-plate .plate-number-container {
    background: linear-gradient(160deg,#1c0107,#31040f 55%,#4b0918);
    border-bottom: 1px solid #d4af37; /* Simple gold border */
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 4px 14px -4px rgba(0,0,0,0.65);
}

.sponsored-plate .plate-number {
    background: linear-gradient(to bottom,#fffdf7,#f4e7c4);
    border: 2px solid #d4af37;
    color:#3b030d;
    font-weight:700;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.35), 0 0 0 1px rgba(212,175,55,0.25);
}

.sponsored-plate:hover .plate-number {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(0,0,0,0.55), 0 0 0 1px rgba(212,175,55,0.45);
}

/* Feature badge contrast adjustment inside dark background */
.sponsored-plate .feature-badge {
    background: linear-gradient(135deg,#d4af37,#b88d10);
    color:#2a1500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}
.sponsored-plate .feature-badge.multiple-features::after {
    color:#2a1500;
}

/* Sponsored ribbon refinement */
.sponsored-plate .sponsored-label {
    background: linear-gradient(135deg,#d4af37,#b88d10);
    color:#2a1500;
    letter-spacing:.5px;
    font-weight:700;
    border: 1px solid rgba(110,70,0,0.25);
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

/* Details area - RESTORED ORIGINAL COLORS */
.sponsored-plate .plate-details {
    /* Force the same gradient background as the card */
    background: linear-gradient(145deg, #3b030d 0%, #5e0918 45%, #7c0f23 70%, #3b030d 100%) !important;
    color: #f1d79b !important;
    padding: 20px;
    position: relative;
    z-index: 1;
    min-height: 120px; /* Add minimum height for consistency */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sponsored-plate .plate-category {
    color:#f1d79b;
    font-weight:600;
}

.sponsored-plate .plate-price {
    color: #f1d79b !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Ensure all text in sponsored details section is properly styled */
.sponsored-plate .plate-details * {
    color: #f1d79b !important;
}

/* Sponsored plate number section */
.sponsored-plate .plate-number {
    background: linear-gradient(to bottom, #fffdf7, #f4e7c4) !important;
    border: 2px solid #d4af37 !important;
    color: #3b030d !important;
}

/* Premium plate glow */
.sponsored-plate .plate-glow {
    background: radial-gradient(circle, rgba(212,175,55,0.3), transparent 70%);
}

/* Mobile specific fixes for sponsored plates */
@media (max-width: 768px) {
    .sponsored-plate {
        /* Ensure the gradient background is maintained on mobile */
        background: linear-gradient(145deg, #3b030d 0%, #5e0918 45%, #7c0f23 70%, #3b030d 100%) !important;
        border: 2px solid #d4af37; /* Keep simple gold border on mobile */
    }
    
    .sponsored-plate .plate-details {
        /* Force consistent styling on mobile */
        background: linear-gradient(145deg, #3b030d 0%, #5e0918 45%, #7c0f23 70%, #3b030d 100%) !important;
        color: #f1d79b !important;
        padding: 15px;
    }
    
    .sponsored-plate .plate-price {
        color: #f1d79b !important;
        font-size: 16px;
    }
    
    .sponsored-plate .plate-number {
        background: linear-gradient(to bottom, #fffdf7, #f4e7c4) !important;
        color: #3b030d !important;
        border: 2px solid #d4af37 !important;
    }
}

@media (max-width: 480px) {
    .sponsored-plate {
        background: linear-gradient(145deg, #3b030d 0%, #5e0918 45%, #7c0f23 70%, #3b030d 100%) !important;
        border: 2px solid #d4af37; /* Keep simple gold border on small screens */
    }
    
    .sponsored-plate .plate-details {
        background: linear-gradient(145deg, #3b030d 0%, #5e0918 45%, #7c0f23 70%, #3b030d 100%) !important;
        color: #f1d79b !important;
        padding: 15px;
    }
    
    .sponsored-plate .plate-details * {
        color: #f1d79b !important;
    }
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.loading .plate-card {
    pointer-events: none;
}

.loading .plate-number-container {
    background-color: var(--card-gray-200);
    background-image: linear-gradient(
        to right,
        var(--card-gray-200) 0%,
        var(--card-gray-100) 20%,
        var(--card-gray-200) 40%,
        var(--card-gray-200) 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}

.loading .plate-category,
.loading .plate-price-row {
    background-color: var(--card-gray-200);
    border-radius: 4px;
    height: 14px;
    margin-bottom: 8px;
    background-image: linear-gradient(
        to right,
        var(--card-gray-200) 0%,
        var(--card-gray-100) 20%,
        var(--card-gray-200) 40%,
        var(--card-gray-200) 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .plate-card {
        height: 305px; /* was 300px - adding 5px */
    }
    
    .plate-number-container {
        height: 180px;
    }
    
    .plate-number {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .plate-card {
        height: 285px; /* was 280px - adding 5px */
    }
    
    .plate-number-container {
        height: 160px;
    }
    
    .plate-number {
        font-size: 32px;
    }
}

/* Phone-specific adjustments */
@media (max-width: 480px) {
    .plate-number {
        font-size: 25px;
        letter-spacing: 1px;
        font-weight: 700;
    }
    
    .plate-card {
        height: 265px; /* was 260px - adding 5px */
    }
    
    .plate-number-container {
        height: 150px; /* Slightly smaller container */
    }
}

/* Mobile spacing fix for sponsored plates - fixed vertical alignment */
@media (max-width: 768px) {
	.plate-number-container.has-sponsored {
		/* Don't use padding-top as it pushes the content down */
		padding-top: 0;
		position: relative;
	}
	
	.plate-number-container.has-sponsored .sponsored-label {
		top: 10px;
		left: 12px;
		/* Ensure the label floats above without affecting layout */
		position: absolute;
		z-index: 5;
	}
	
	/* Use a pseudo-element to create space at top without moving the plate */
	.plate-number-container.has-sponsored::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		height: 36px; /* Reserve space for label without moving content */
		z-index: 1;
		pointer-events: none;
	}
	
	/* Keep plate vertically centered */
	.plate-number-container.has-sponsored {
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	/* Adjust just the label position */
	.plate-number-container.has-sponsored .sponsored-label {
		top: 8px;
	}
	
	/* No need to push plate down */
	.plate-number-container.has-sponsored {
		padding-top: 0;
	}
}

/* Disabled add-to-cart button */
.add-to-cart-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-to-cart-disabled:hover {
    background-color: var(--card-gray-200);
    color: var(--card-secondary);
    transform: none;
}

/* Favorite count badge on cards */
.favorite-count-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(139, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.favorite-count-badge svg {
    width: 12px;
    height: 12px;
    fill: white;
}

.favorite-count-badge span {
    min-width: 16px;
    text-align: center;
}

/* Adjust position when feature badge is present */
.plate-number-container:has(.feature-badge) .favorite-count-badge {
    bottom: 35px;
}

/* Sponsored card favorite counter styling */
.sponsored-plate .favorite-count-badge {
    background: linear-gradient(135deg, #d4af37, #b88d10);
    color: #2a1500;
    border: 1px solid rgba(110, 70, 0, 0.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.sponsored-plate .favorite-count-badge svg {
    fill: #2a1500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .favorite-count-badge {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .favorite-count-badge svg {
        width: 10px;
        height: 10px;
    }
}

/* Favorite count badge in plate details */
.plate-details .favorite-count-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    background-color: rgba(139, 0, 0, 0.1);
    color: var(--card-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: none;
    width: fit-content;
    margin-left: auto; /* Push to the right */
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.plate-details .favorite-count-badge:hover {
    background-color: rgba(139, 0, 0, 0.15);
    transform: translateY(-1px);
}

.plate-details .favorite-count-badge:active {
    transform: scale(0.95);
}

.plate-details .favorite-count-badge.active {
    background-color: var(--card-primary);
    color: white;
}

.plate-details .favorite-count-badge.active svg {
    fill: white;
}

.plate-details .favorite-count-badge svg {
    width: 14px;
    height: 14px;
    fill: var(--card-primary);
    transition: fill 0.2s ease;
}

.plate-details .favorite-count-badge span {
    min-width: 16px;
    text-align: center;
    color: inherit;
}

/* Sponsored card favorite counter styling in details */
.sponsored-plate .plate-details .favorite-count-badge {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
}

.sponsored-plate .plate-details .favorite-count-badge:hover {
    background: rgba(212, 175, 55, 0.3);
}

.sponsored-plate .plate-details .favorite-count-badge.active {
    background: linear-gradient(135deg, #d4af37, #b88d10);
    color: #2a1500;
}

.sponsored-plate .plate-details .favorite-count-badge svg {
    fill: #d4af37;
}

.sponsored-plate .plate-details .favorite-count-badge.active svg {
    fill: #2a1500;
}

.sponsored-plate .plate-details .favorite-count-badge span {
    color: inherit;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .plate-details .favorite-count-badge {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .plate-details .favorite-count-badge svg {
        width: 12px;
        height: 12px;
    }
}

.plate-details {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.plate-category {
    font-size: 12px;
    color: var(--card-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.plate-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.plate-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--card-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

/* Update favorite count badge to be clickable */
.plate-details .favorite-count-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(139, 0, 0, 0.1);
    color: var(--card-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: none;
    width: fit-content;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    fill: #d4af37;
}

.sponsored-plate .plate-details .favorite-count-badge span {
    color: #d4af37;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .plate-details .favorite-count-badge {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .plate-details .favorite-count-badge svg {
        width: 12px;
        height: 12px;
    }
}

/* Pearl with gold accents (champagne) tier card - Subtle Golden Style */
.champagne-plate {
    background: linear-gradient(135deg, #f9f4e6 0%, #f0e68c 30%, #daa520 70%, #b8860b 100%);
    border: 2px solid #d4af37;
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.2),
        0 2px 6px rgba(139, 105, 20, 0.3);
    position: relative;
    overflow: hidden;
    color: #222 !important;
}

.champagne-plate .plate-number-container {
    background: linear-gradient(135deg, 
        #f5f0e8 0%, 
        #e6d16a 40%, 
        #d4af37 100%
    );
    border: 1px solid #d4af37;
    box-shadow: 
        inset 0 1px 2px rgba(255, 215, 0, 0.2),
        0 2px 4px rgba(139, 105, 20, 0.15);
}

/* Simplified plate number styling for golden cards */
.champagne-plate .plate-number {
    background: linear-gradient(to bottom, #fffef7 0%, #f4e7c4 100%);
    border: 2px solid #d4af37;
    color: #5a4a0d !important;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 4px rgba(139, 105, 20, 0.25);
}

.champagne-plate:hover .plate-number {
    transform: scale(1.02);
    box-shadow: 0 3px 6px rgba(139, 105, 20, 0.3);
}

.champagne-plate .plate-category {
    color: #5a4a0d !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.champagne-plate .plate-price {
    color: #5a4a0d !important;
    font-weight: 700;
}

.champagne-plate .plate-details {
    background: linear-gradient(135deg, 
        #f9f4e6 0%, 
        #f0e68c 50%, 
        #daa520 100%
    ) !important;
}

.champagne-plate .favorite-count-badge {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border: 1px solid #8b6914;
    color: #5a4a0d !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(139, 105, 20, 0.25);
}

.champagne-plate .favorite-count-badge svg {
    fill: #5a4a0d !important;
}

.champagne-plate .favorite-count-badge:hover {
    background: linear-gradient(135deg, #e6c547 0%, #d4af37 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(139, 105, 20, 0.3);
}

.champagne-plate .favorite-count-badge.active {
    background: linear-gradient(135deg, #8b6914 0%, #5a4a0d 100%);
    color: #d4af37 !important;
}

.champagne-plate .favorite-count-badge.active svg {
    fill: #d4af37 !important;
}

/* Dashboard-specific plate actions */
.plate-actions-dashboard {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.plate-actions-dashboard button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.edit-btn {
    background-color: #3182ce;
    color: white;
}

.edit-btn:hover {
    background-color: #2c5282;
    transform: translateY(-1px);
}

.delete-btn {
    background-color: #e53e3e;
    color: white;
}

.delete-btn:hover {
    background-color: #c53030;
    transform: translateY(-1px);
}

/* Hide edit/delete buttons on non-dashboard pages */
body:not(.dashboard-page) .plate-actions-dashboard {
    display: none;
}

/* Favorite Count Badge - Better visibility */
.favorite-count-badge {
    background: rgba(139, 0, 0, 0.08); /* Light red background */
    border: 1.5px solid rgba(139, 0, 0, 0.2); /* Subtle red border */
    color: #8B0000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.favorite-count-badge:hover {
    background: rgba(139, 0, 0, 0.12);
    border-color: rgba(139, 0, 0, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.favorite-count-badge:active {
    transform: translateY(0);
    background: rgba(139, 0, 0, 0.15);
}

.favorite-count-badge svg {
    width: 16px;
    height: 16px;
    fill: #ff4458; /* Bright red heart */
    stroke: none;
    transition: transform 0.2s ease;
}

.favorite-count-badge:hover svg {
    transform: scale(1.1);
}

.favorite-count-badge span {
    color: #8B0000;
    font-weight: 600;
}

/* Sponsored plate favorite button adjustments */
.sponsored-plate .favorite-count-badge {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: #8B0000;
}

.sponsored-plate .favorite-count-badge:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.4);
}

.sponsored-plate .favorite-count-badge svg {
    fill: #d4af37; /* Gold heart for sponsored */
}

/* Champagne plate favorite button */
.champagne-plate .favorite-count-badge {
    background: rgba(255, 224, 102, 0.2);
    border-color: rgba(255, 224, 102, 0.4);
}

.champagne-plate .favorite-count-badge:hover {
    background: rgba(255, 224, 102, 0.3);
    border-color: rgba(255, 224, 102, 0.5);
}

.champagne-plate .favorite-count-badge svg {
    fill: #ffe066; /* Yellow heart for champagne */
}

.champagne-plate .favorite-count-badge.active span {
    color: #8B0000; /* Dark red for visibility on yellow background */
    font-weight: 700;
}

/* Simplify card hover effects for better performance */
.plate-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: auto; /* Only use will-change when needed */
}

.plate-card:hover {
    transform: translateY(-3px); /* Reduced from -5px */
    /* Simplified shadow */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Remove complex animations on mobile */
@media (max-width: 768px) {
    .plate-card {
        transition: none;
    }
    
    .plate-card:hover {
        transform: none;
    }
    
    /* Remove gradient backgrounds on mobile */
    .plate-card {
        background: #fff;
    }
    
    .sponsored-plate {
        background: #fffaf0;
    }
    
    .champagne-plate {
        background: #fdf6e3;
    }
}

/* Optimize fade-in animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(5px); /* Reduced from 10px */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards; /* Faster animation */
}

/* Batch animations for better performance */
.plates-grid .plate-card:nth-child(n+10) {
    animation-delay: 0s; /* No delay after first 10 cards */
}

/* Star badge for sponsored plates */
.sponsored-star-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #d4af37, #b88d10);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    animation: subtle-pulse 2s infinite ease-in-out;
}

.sponsored-star-badge svg {
    color: white;
    fill: white;
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sponsored-star-badge {
        width: 25px;
        height: 25px;
        top: 8px;
        left: 8px;
    }
    
    .sponsored-star-badge svg {
        width: 14px;
        height: 14px;
    }
}

/* Special feature emojis in top right */
.plate-feature-emojis {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.feature-emoji {
    font-size: 20px;
    line-height: 1;
    cursor: default;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease;
}

.feature-emoji:hover {
    transform: scale(1.15);
}

/* Ensure plate details has relative positioning for absolute emoji placement */
.plate-details {
    position: relative;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,1));
    min-height: 120px; /* Add minimum height for consistency */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Dark theme styling for cards */
body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border: 1px solid #404040 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .plate-number-container {
    background-color: #2d2d2d !important;
}

body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .plate-number {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d) !important;
    border: 2px solid #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .plate-details {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: #e0e0e0 !important;
}

body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .plate-category {
    color: #a0a0a0 !important;
}

body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .plate-price {
    color: #e0e0e0 !important;
}

/* Ensure feature badges work in dark mode */
body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .feature-badge {
    background-color: #404040 !important;
    color: #e0e0e0 !important;
}

/* View count badge in dark mode */
body.dark-theme .plate-card:not(.sponsored-plate):not(.champagne-plate) .view-count-badge {
    background-color: rgba(64, 64, 64, 0.9) !important;
    color: #e0e0e0 !important;
}

/* RTL alignment for plate cards */
body.rtl .plate-details,
body.rtl .plate-category,
body.rtl .plate-price-row,
body.rtl .plate-number-container,
body.rtl .plate-number {
    direction: rtl;
    text-align: right;
}

body.rtl .plate-price-row {
    flex-direction: row-reverse;
}

body.rtl .favorite-count-badge {
    margin-left: 0;
    margin-right: 8px;
}

/* Ensure sponsored label sits correctly in RTL */
body.rtl .sponsored-label {
    right: auto;
    left: 8px;
}

/* RTL: Force feature emojis to the left inside the card */
body.rtl .plate-details {
    position: relative; /* Ensure this is a positioning context */
}

body.rtl .plate-feature-emojis {
    position: absolute;
    top: 8px;
    left: 8px; /* Position from the left edge */
    right: auto; /* Unset right positioning */
    direction: ltr;
    justify-content: flex-start;
}

/* RTL: right-align feature stickers and avoid overlap with text */
body.rtl .plate-feature-emojis {
    display: flex;
    direction: ltr;             /* force left start even in RTL context */
    flex-direction: row;        /* normal order */
    justify-content: flex-start;/* stick to left */
    align-items: center;
    gap: 6px;
    width: 100%;                /* own row */
    margin: 0 0 6px 0;          /* spacing from category */
}

body.rtl .plate-feature-emojis .feature-emoji {
    margin: 0; /* rely on gap */
}

/* Ensure plate number stays centered and LTR in all languages */
.plate-number {
    text-align: center !important;
    direction: ltr;
    unicode-bidi: plaintext;
    display: block;
}

/* Override RTL grouping that right-aligns everything */
body.rtl .plate-number {
    text-align: center !important;
    direction: ltr;
}

/* If container affects alignment, ensure text remains centered */
body.rtl .plate-number-container {
    text-align: center;
}

