/* Plate grid and visual treatment shared by the home page and sold gallery. */

.grid { 
    display: grid; 
    grid-template-columns: repeat(5, minmax(0, 1fr)); 
    align-items: stretch;
    gap: clamp(8px, 0.8vw, 12px); 
    max-width: 1920px; 
    width: 98%;
    margin: 0 auto; 
}
.card {
    background: var(--card-bg); 
    border-radius: 12px; 
    padding: clamp(6px, 1vw, 10px); 
    text-align: center; 
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: 0.4s; 
    position: relative; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    height: 100%;
    min-width: 0;
}
.card:hover { transform: translateY(-10px); border-color: var(--primary-gold); }

/* Realistic License Plate CSS */
.plate-container { display: flex; justify-content: center; margin-bottom: clamp(4px, 1vw, 6px); width: 100%; perspective: 1000px; }
.license-plate {
    width: 100%; max-width: 400px; aspect-ratio: 280 / 130;
    border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 8px 15px rgba(0,0,0,0.6), inset 0 0 10px rgba(255,255,255,0.4);
    border: 3px solid #111; position: relative; overflow: hidden;
    container-type: inline-size;
}

.plate-number {
    position: absolute; top: 16%; left: 50%; transform: translateX(-50%);
    width: 100%; text-align: center; max-width: 90%; white-space: nowrap;
    font-family: 'Kanit', sans-serif; 
    font-size: clamp(1.0rem, 15vw, 3.6rem);
    font-size: clamp(1.0rem, 17cqi, 3.8rem);
    font-weight: 700; line-height: 1; z-index: 2; color: #111;
    text-shadow: -0.5px -1px 0px rgba(255,255,255,0.6), 1px 1.5px 0px rgba(0,0,0,0.6);
    letter-spacing: 0.06em;
}
.plate-province {
    position: absolute; bottom: 14%; left: 50%; transform: translateX(-50%) scaleX(0.95);
    width: 100%; max-width: 95%; text-align: center; white-space: nowrap;
    font-family: 'Mitr', sans-serif; 
    font-size: clamp(0.5rem, 6.5vw, 1.8rem);
    font-size: clamp(0.5rem, 7.5cqi, 1.8rem);
    font-weight: 700; line-height: 1; z-index: 2; color: #111;
    text-shadow: -0.5px -1px 0px rgba(255,255,255,0.6), 1px 1px 0px rgba(0,0,0,0.6);
    letter-spacing: 0.08em;
}

/* Specific Plate Colors */
.plate-normal { background: url('/seo-assets/plate-backgrounds/normal.webp') center/100% 100% no-repeat; }
.plate-normal .plate-number, .plate-normal .plate-province { color: #0a0a0a; }

.plate-truck { background: url('/seo-assets/plate-backgrounds/truck.webp') center/100% 100% no-repeat; border: none; }
.plate-truck .plate-number, .plate-truck .plate-province { color: #007A33; }

.plate-truck_graphic { background: url('/seo-assets/plate-backgrounds/truck_graphic.webp') center/100% 100% no-repeat; border: none; }
.plate-truck_graphic .plate-number, .plate-truck_graphic .plate-province { color: #007A33; }

.plate-van { background: url('/seo-assets/plate-backgrounds/van.webp') center/100% 100% no-repeat; }
.plate-van .plate-number, .plate-van .plate-province { color: #0033A0; }

.plate-van_graphic { background: url('/seo-assets/plate-backgrounds/van_graphic.webp') center/100% 100% no-repeat; }
.plate-van_graphic .plate-number, .plate-van_graphic .plate-province { color: #0033A0; }

.plate-graphic { background: url('/seo-assets/plate-backgrounds/graphic.webp') center/100% 100% no-repeat; }
.plate-graphic .plate-number, .plate-graphic .plate-province { color: #0a0a0a; }

.plate-golden_graphic { background: url('/seo-assets/plate-backgrounds/golden_graphic.webp') center/100% 100% no-repeat; }
.plate-golden_graphic .plate-number, .plate-golden_graphic .plate-province { color: #0a0a0a; }

.plate-motorcycle { 
    background-image: url('/seo-assets/plate-backgrounds/motorcycle.webp');
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    aspect-ratio: 55 / 43; 
    width: 65%; 
    max-width: 240px; 
    border: none !important; 
}
.plate-motorcycle .plate-number-top {
    position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
    width: 100%; text-align: center; white-space: nowrap;
    font-family: 'Kanit', sans-serif; font-size: clamp(0.9rem, 16vw, 3.0rem); font-size: clamp(0.9rem, 17cqi, 3.0rem);
    font-weight: 700; line-height: 1; z-index: 2; color: #0a0a0a;
    text-shadow: -0.5px -1px 0px rgba(255,255,255,0.6), 1px 1px 0px rgba(0,0,0,0.6);
    letter-spacing: 0.06em;
}
.plate-motorcycle .plate-province-middle {
    position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%) scaleX(0.95);
    width: 100%; text-align: center; white-space: nowrap;
    font-family: 'Mitr', sans-serif; font-size: clamp(0.4rem, 7vw, 1.6rem); font-size: clamp(0.4rem, 8cqi, 1.6rem);
    font-weight: 700; line-height: 1; z-index: 2; color: #0a0a0a;
    text-shadow: -0.5px -1px 0px rgba(255,255,255,0.6), 1px 1px 0px rgba(0,0,0,0.6);
    letter-spacing: 0.08em;
}
.plate-motorcycle .plate-number-bottom {
    position: absolute; bottom: 13%; left: 50%; transform: translateX(-50%);
    width: 100%; text-align: center; white-space: nowrap;
    font-family: 'Kanit', sans-serif; font-size: clamp(0.9rem, 16vw, 3.0rem); font-size: clamp(0.9rem, 17cqi, 3.0rem);
    font-weight: 700; line-height: 1; z-index: 2; color: #0a0a0a;
    text-shadow: -0.5px -1px 0px rgba(255,255,255,0.6), 1px 1.5px 0px rgba(0,0,0,0.6);
    letter-spacing: 0.08em;
}

.card-info { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; margin-bottom: 6px; }
.plate-details { color: #ccc; font-size: clamp(0.65rem, 1.2vw, 0.85rem); line-height: 1.25; word-break: break-word; overflow-wrap: anywhere; }
.plate-sum { font-size: clamp(0.65rem, 1.2vw, 0.85rem); color: #fff; background: #333; padding: 2px 8px; border-radius: 12px; white-space: nowrap; }

@media (max-width: 1199px) {
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 2vw, 12px); }
}

@media (max-width: 768px) {
    .card { padding: 6px 4px; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 375px) {
    .grid { gap: 6px; }
    .card { padding: 6px 4px; }
}
