﻿/* ===================================
   PIRELLI ARGENTINA — Custom Styles
   =================================== */

/* 1. Google Fonts (Inter — visual similar ao Gotham) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

/* 2. Variáveis — Modo Claro (padrão) */
:root {
    --pirelli-yellow: #FFDD00;
    --pirelli-red: #DE211B;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFFFFF;
    --bg-federate: #F0F0F0;
    --bg-nav: #FFFFFF;
    --bg-hero: #1F1F1F;
    --text-primary: #1F1F1F;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #E0E0E0;
    --border-light: #F0F0F0;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 6px 24px rgba(0, 0, 0, 0.14);
    --badge-summer-bg: #FFF3CD;
    --badge-summer-text: #856404;
    --badge-allseason-bg: #D1ECF1;
    --badge-allseason-text: #0C5460;
    --badge-suv-bg: #D4EDDA;
    --badge-suv-text: #155724;
    --badge-touring-bg: #E2D9F3;
    --badge-touring-text: #4A2F8F;
    --badge-eco-bg: #D4EDDA;
    --badge-eco-text: #155724;
    --badge-perf-bg: #F8D7DA;
    --badge-perf-text: #721C24;
    --badge-awd-bg: #D1ECF1;
    --badge-awd-text: #0C5460;
    --badge-oe-bg: #FFDD00;
    --badge-oe-text: #1F1F1F;
    --btn-search-bg: #DE211B;
    --btn-search-text: #FFFFFF;
    --btn-search-hover: #FFE433;
}

/* 3. Variáveis — Modo Escuro */
[data-bs-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1A1A1A;
    --bg-card: #252525;
    --bg-federate: #1A1A1A;
    --bg-nav: #1A1A1A;
    --bg-hero: #0A0A0A;
    --text-primary: #F0F0F0;
    --text-secondary: #BBBBBB;
    --text-muted: #888888;
    --border-color: #3A3A3A;
    --border-light: #2A2A2A;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 6px 24px rgba(0, 0, 0, 0.6);
    --badge-summer-bg: #3D3200;
    --badge-summer-text: #FFD54F;
    --badge-allseason-bg: #0D2E35;
    --badge-allseason-text: #80DEEA;
    --badge-suv-bg: #0D2E18;
    --badge-suv-text: #69F0AE;
    --badge-touring-bg: #1E1240;
    --badge-touring-text: #CE93D8;
    --badge-eco-bg: #0D2E18;
    --badge-eco-text: #69F0AE;
    --badge-perf-bg: #3E0A0D;
    --badge-perf-text: #EF9A9A;
    --badge-awd-bg: #0D2E35;
    --badge-awd-text: #80DEEA;
    --badge-oe-bg: #3D3200;
    --badge-oe-text: #FFDD00;
    --btn-search-bg: #DE211B;
    --btn-search-text: #FFFFFF;
    --btn-search-hover: #FFE433;
}

/* 4. Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* 5. Federate Bar (top strip) */
.pirelli-federate {
    background-color: var(--bg-federate);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.72rem;
    padding: 6px 0;
    transition: background-color 0.3s ease;
}

    .pirelli-federate a {
        color: var(--text-secondary);
        text-decoration: none;
        font-weight: 400;
        margin: 0 8px;
        white-space: nowrap;
    }

        .pirelli-federate a:hover {
            text-decoration: underline;
        }

    .pirelli-federate .active-section {
        color: var(--text-primary);
        font-weight: 700;
    }

/* 6. Main Navigation */
.pirelli-nav {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pirelli-logo svg {
    height: 28px;
    width: auto;
}

.pirelli-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

    .pirelli-nav .nav-link:hover {
        background-color: var(--border-light);
    }

    .pirelli-nav .nav-link.active {
        color: var(--pirelli-red) !important;
    }

/* 7. Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

    .dark-mode-toggle:hover {
        background-color: var(--border-light);
        border-color: var(--text-secondary);
    }

    .dark-mode-toggle .icon-sun,
    .dark-mode-toggle .icon-moon {
        font-size: 1rem;
        line-height: 1;
    }

/* 8. Hero Search Section */
.pirelli-hero {
    background: linear-gradient(135deg, var(--bg-hero) 0%, #2a1010 100%);
    padding: 52px 0 48px;
    position: relative;
    overflow: hidden;
}

    .pirelli-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFDD00' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        pointer-events: none;
    }

    .pirelli-hero .hero-title {
        color: #FFFFFF;
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        font-weight: 900;
        line-height: 1.15;
        margin-bottom: 8px;
    }

        .pirelli-hero .hero-title span {
            color: var(--pirelli-yellow);
        }

    .pirelli-hero .hero-subtitle {
        color: rgba(255, 255, 255, 0.7);
        font-size: 1rem;
        margin-bottom: 32px;
    }

/* 9. Search Form */
.search-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 28px 24px;
}

[data-bs-theme="dark"] .search-card {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.search-card .form-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.search-card .form-select {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 8px;
    color: #1F1F1F;
    font-weight: 600;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    appearance: none;
}

    .search-card .form-select:focus {
        border-color: var(--pirelli-yellow);
        box-shadow: 0 0 0 3px rgba(255, 221, 0, 0.3);
        outline: none;
    }

.btn-pirelli-search {
    background-color: var(--pirelli-yellow);
    color: #1F1F1F;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-weight: 700;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-pirelli-search:hover {
        background-color: var(--btn-search-hover);
        color: #333333;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(222, 33, 27, 0.4);
    }

    .btn-pirelli-search:active {
        transform: translateY(0);
    }

/* 10. Breadcrumb */
.pirelli-breadcrumb {
    padding: 14px 0 6px;
    font-size: 0.8rem;
}

    .pirelli-breadcrumb .breadcrumb-item a {
        color: var(--text-secondary);
        text-decoration: none;
    }

        .pirelli-breadcrumb .breadcrumb-item a:hover {
            text-decoration: underline;
        }

    .pirelli-breadcrumb .breadcrumb-item.active {
        color: var(--text-primary);
        font-weight: 700;
    }

/* 11. Results Section */
.results-header {
    padding: 28px 0 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.results-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

    .results-title strong {
        font-weight: 900;
    }

.results-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.btn-change-selection {
    background: none;
    border: 2px solid var(--text-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 18px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .btn-change-selection:hover {
        background-color: var(--text-primary);
        color: var(--bg-primary);
    }


/* ── TIRE CARD (new layout matching screenshot) ──────────────── */

.tire-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-card);
}

    .tire-card:hover {
        box-shadow: var(--shadow-card-hover);
        border-color: var(--border-color);
    }

/* Header */
.tc-header {
    padding: 16px 16px 0;
}

.tc-name {
    font-size: 1.15rem;
    font-weight: 900;
    font-style: italic;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* Badges */
.tc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
}

.tc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.tc-badge--icon {
    padding: 4px 9px;
    color: var(--text-secondary);
}

.tc-badge--text svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Image area */
.tc-image-wrap {
    position: relative;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    overflow: hidden;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

    .tc-image-wrap img {
        max-height: 165px;
        width: auto;
        max-width: 90%;
        object-fit: contain;
        filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
        transition: transform 0.3s ease;
    }

.tire-card:hover .tc-image-wrap img {
    transform: scale(1.04);
}

.tc-zoom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 0;
    transition: background-color 0.2s;
}

    .tc-zoom:hover {
        background-color: var(--border-light);
        color: var(--text-primary);
    }

/* Info table */
.tc-info-table {
    flex: 1;
}

.tc-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 8px;
}

    .tc-info-row:last-child {
        border-bottom: none;
    }

.tc-info-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    flex-shrink: 0;
}

.tc-info-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.tc-empty {
    color: var(--text-muted);
    font-weight: 400;
}

.tc-info-highlight {
    font-weight: 900;
    color: var(--pirelli-red);
    font-size: 0.9rem;
}

.tc-info-tech {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: var(--text-primary);
}

/* Footer button */
.tc-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

.btn-distribuidor {
    display: block;
    width: 100%;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .btn-distribuidor:hover {
        background-color: var(--bg-secondary);
        border-color: var(--text-primary);
        color: var(--text-primary);
    }

/* 14. Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

    .empty-state svg {
        opacity: 0.25;
        margin-bottom: 16px;
    }

    .empty-state h4 {
        color: var(--text-primary);
        font-weight: 700;
    }

/* 15. Footer */
.pirelli-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    margin-top: 60px;
    transition: background-color 0.3s ease;
}

    .pirelli-footer p {
        color: var(--text-secondary);
        font-size: 0.8rem;
        margin: 0;
    }

/* 16. Responsive adjustments */
@media (max-width: 768px) {
    .pirelli-federate {
        display: none;
    }

    .pirelli-hero {
        padding: 36px 0 32px;
    }

    .search-card {
        padding: 20px 16px;
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
    }

    .tire-card__image-wrap {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .btn-change-selection {
        width: 100%;
        justify-content: center;
    }
}

/* 17. Smooth section reveal */
.results-section {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 18. Form select in dark mode custom arrow */
[data-bs-theme="dark"] .search-card .form-select {
    background-color: rgba(40, 40, 40, 0.95);
    color: #F0F0F0;
}


/* 19. NEW SEARCH FORM */
.size-preview {
    background: var(--pirelli-yellow);
    color: #111;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.selector-progress {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

    .selector-progress .step {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #666;
    }

        .selector-progress .step.active {
            background: var(--pirelli-yellow);
        }

.selector-display {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 14px;
    margin-bottom: 14px;
    font-weight: 700;
    background: white;
    color: #111;
    transition: .3s;
}

    .selector-display.completed {
        border: 2px solid #198754;
    }

    .selector-display:disabled {
        opacity: .55;
    }

.option-item {
    width: 100%;
    padding: 18px;
    border: none;
    margin-bottom: 8px;
    border-radius: 12px;
    background: #f5f5f5;
    text-align: left;
    font-weight: 700;
    color: black;
}

    .option-item:hover {
        background: #FFDD00;
    }


.btn-reset-selection {
    flex: 1;
    border: 1px solid rgba(255,255,255,.25);
    background: transparent;
    color: #fff;
    border-radius: 12px;
    height: 60px;
    font-weight: 700;
    transition: .2s;
}

.btn-reset-selection:hover {
    background: rgba(255,255,255,.08);
}

.btn-pirelli-search {
    flex: 2;
}
