:root {
    --bg-color: #0a0a0a;
    --card-bg: #141414;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-gold: #d4af37;
    --accent-gold-hover: #f3c84b;
    --border-color: #333;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --transition-speed: 0.3s;
}

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

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Strict overflow prevention */
    position: relative;
    /* layout context */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    /* Reduced padding for mobile */
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--accent-gold);
}

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

.nav-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--accent-gold);
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-gold), #b8860b);
    color: #000;
    padding: 10px 25px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    color: #000;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 70vh;
    /* Reduced from fixed 90vh */
    padding: 100px 0 60px;
    /* Add padding for content spacing */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Add a subtle dark gradient or abstract automotive background here */
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(transparent 0%,
            rgba(212, 175, 55, 0.03) 1px,
            transparent 1px,
            transparent 40px);
    opacity: 0.5;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.search-bar-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: border-color var(--transition-speed);
}

.search-input-wrapper:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-secondary);
}

#searchInput {
    width: 100%;
    background: transparent;
    border: none;
    padding: 15px 15px 15px 50px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

/* Collection Section */
.collection-section {
    padding: 80px 0;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition-speed);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
}

.filter-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #333;
    color: #666;
    pointer-events: none;
    /* Ensure no interaction */
}

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

.plate-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.plate-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

.plate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.plate-card:hover::before {
    opacity: 1;
}

.plate-visuals {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.plate-sample {
    border-radius: 4px;
    padding: 10px 20px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 280px;
    transition: transform var(--transition-speed);
}

.plate-sample:hover {
    transform: scale(1.02);
}

.plate-black {
    background: #000;
    border: 2px solid #fff;
    color: #fff;
}

.plate-white {
    background: #fff;
    border: 2px solid #000;
    color: #000;
}

.plate-text {
    font-family: 'Arial Black', 'Arial', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    /* Tighter letter spacing to simulate compact */
    transform: scaleX(0.85);
    /* Compact effect */
    display: inline-block;
    /* Required for transform */
    white-space: nowrap;
}

.plate-description {
    font-size: 0.95rem;
    color: #ccc;
    margin: 15px 0 20px;
    font-style: italic;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 4px 4px 0;
    text-align: left;
    flex: 1;
    /* Grow to fill available space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plate-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.plate-details h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.plate-price {
    color: var(--accent-gold);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
}

.plate-status {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4cd137;
    /* Green for available */
    padding: 4px 10px;
    background: rgba(76, 209, 55, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.plate-btn {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.plate-card:hover .plate-btn {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

/* Process Section */
.process-section {
    padding: 80px 0;
    background: #0f0f0f;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 50px;
}

.step-card {
    flex: 1;
    text-align: center;
    padding: 30px;
    background: var(--glass-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

/* Footer */
.footer {
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
    background: #050505;
}

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

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding-top: 20px;
    border-top: 1px solid #1a1a1a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 40px;
    border: 1px solid var(--accent-gold);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
}

.close-modal {
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #fff;
}

.highlight-text {
    color: var(--accent-gold);
}

.plate-preview-card {
    background: #000;
    color: #fff;
    padding: 15px 30px;
    border: 2px solid #fff;
    border-radius: 4px;
    display: inline-block;
    font-size: 2.5rem;
    font-family: 'Arial Black', 'Arial', sans-serif;
    font-weight: 900;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: -1px;
    transform: scaleX(0.85);
}

.price-tag {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 30px;
    font-family: var(--font-heading);
}

.btn-whatsapp {
    display: inline-block;
    background-color: #25D366;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.captcha-container {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.captcha-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

#captchaQuestion {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 1.1rem;
    min-width: 80px;
}

#captchaInput {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    color: var(--text-primary);
    width: 60px;
    font-size: 1rem;
    outline: none;
    text-align: center;
}

#captchaInput:focus {
    border-color: var(--accent-gold);
}

.btn-verify {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-verify:hover {
    background: var(--accent-gold-hover);
}

.captcha-feedback {
    font-size: 0.8rem;
    margin-top: 8px;
    min-height: 1.2em;
}

.captcha-feedback.error {
    color: #ff4757;
}

.captcha-feedback.success {
    color: #4cd137;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .process-steps {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    /* Mobile UX Optimizations */
    .hero {
        min-height: 40vh;
        /* Further reduced from 50vh */
        padding-top: 80px;
        padding-bottom: 20px;
        /* Explicitly reduce bottom padding */
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .collection-section {
        padding: 10px 0 40px;
        /* Further reduced top padding from 40px */
    }

    .section-header {
        margin-bottom: 20px;
        /* Tighter header spacing */
    }

    /* Modal Responsive */
    /* Modal Responsive */
    .modal-content {
        /* V8 Fix: Absolute Centering + Wider Width */
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;

        padding: 20px 15px;
        width: 90vw;
        /* 90% Width for less whitespace */
        max-width: 340px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-header h2 {
        font-size: 1.1rem;
        margin-right: 30px;
        word-wrap: break-word;
        line-height: 1.3;
    }

    .plate-preview-card {
        /* V4 Fix: Absolute safety resets */
        transform: none !important;
        width: 100%;
        max-width: 100%;
        display: block;
        box-sizing: border-box;

        font-size: 1.3rem;
        font-weight: 800;
        padding: 12px 10px;
        margin: 15px 0;
        letter-spacing: normal;
        text-align: center;
    }

    .plate-preview-card span {
        white-space: normal;
        display: inline-block;
        word-break: break-all;
        line-height: 1.2;
    }

    .price-tag {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
}