/* 
 * ==========================================
 * MODAIS, VÍDEO E TABELAS DE CONSÓRCIOS
 * ==========================================
 */
.modal-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(6px); 
    display: flex;
    justify-content: center; 
    align-items: center; 
    z-index: 1000; 
    padding: 20px; 
    opacity: 0; 
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.modal-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }

.modal-container { 
    background: var(--modal-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 24px; 
    width: 100%; 
    max-width: 780px; 
    max-height: 90vh; 
    overflow-y: auto; 
    overflow-x: hidden; 
    overscroll-behavior-y: contain; 
    position: relative; 
    padding: 32px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
    margin: auto;
    transform: translateY(20px);
    transition: transform var(--transition-smooth); 
}

.modal-overlay.show .modal-container { transform: translateY(0); }

.modal-close { position: absolute; top: 20px; right: 20px; background: #f1f5f9; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: var(--transition-smooth); z-index: 10; }
@media (hover: hover) { .modal-close:hover { color: white; background: var(--honda-red); transform: rotate(90deg); } }
.modal-header-nav { margin-bottom: 20px; padding-right: 50px; }
.modal-title { font-size: 1.6rem; font-weight: 900; word-break: break-word; line-height: 1.2; }

/* Container para Vídeo do YouTube Responsivo */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000000;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Modal Detalhes */
.gallery-container { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; background: var(--bg-light); padding: 24px; border-radius: 20px; border: 1px solid var(--card-border); width: 100%; }
.main-img-view { flex: 1; min-width: 0; aspect-ratio: 16/9; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.15)); transition: opacity 0.3s ease-in-out; opacity: 1; }
.color-selector { display: flex; flex-direction: column; gap: 12px; align-items: center; min-width: 55px; flex-shrink: 0; }
#color-thumbs-list { display: flex; flex-direction: column; gap: 10px; }

.color-thumb { width: 48px; height: 48px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; object-fit: contain; padding: 4px; background: #ffffff; transition: var(--transition-fast); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.color-thumb.active { background: #ffffff; box-shadow: 0 0 12px rgba(230, 0, 0, 0.25); border-color: var(--honda-red); }
.color-thumb:focus-visible { outline: 2px solid var(--honda-red); outline-offset: 2px; }

.yt-btn { width: 48px; height: 48px; border-radius: 50%; background: #ff0000; color: white; border: none; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-top: 8px; box-shadow: 0 4px 15px rgba(255,0,0,0.3); transition: var(--transition-smooth); cursor: pointer; }
@media (hover: hover) { .yt-btn:hover { transform: scale(1.1); background: #cc0000; } }

.cta-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.highlights-list { margin-bottom: 30px; }
.highlight-item { margin-bottom: 16px; border-left: 4px solid var(--honda-red); padding-left: 16px; background: linear-gradient(90deg, rgba(230,0,0,0.03) 0%, transparent 100%); padding-top: 8px; padding-bottom: 8px; border-radius: 0 8px 8px 0; }
.highlight-item h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.highlight-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

.specs-table-wrapper { width: 100%; overflow-x: auto; border-radius: 12px; border: 1px solid var(--card-border); }
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; background: var(--bg-light); }
.specs-table td { padding: 12px 16px; border-bottom: 1px solid var(--card-border); word-break: break-word; }
.specs-table td:first-child { font-weight: 800; width: 45%; background: #f8fafc; }

/* Modal Consórcio */
.watermark-bg { background-color: var(--bg-light); background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 20px 20px; border-radius: 20px; padding: 24px; border: 1px solid var(--card-border); }
.consortium-header-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--card-border); padding-bottom: 16px; margin-bottom: 20px; }
.seller-mini { display: flex; align-items: center; gap: 12px; }
.seller-mini img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--honda-red); object-fit: cover; }
.seller-mini-text h5 { font-size: 0.9rem; font-weight: 800; }
.seller-mini-text p { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.consortium-top-info { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--card-border); padding-bottom: 16px; }
.bike-title-modal { font-size: 1.5rem; font-weight: 900; line-height: 1.2; }
.credit-box { display: flex; align-items: center; gap: 10px; background: #ffffff; padding: 8px 16px; border-radius: 50px; border: 1px solid var(--card-border); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.credit-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.credit-value { font-size: 1.4rem; font-weight: 900; color: var(--honda-red); }

.consortium-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 24px; }
.consortium-card { background: var(--card-bg); border: 2px solid transparent; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; position: relative; transition: var(--transition-smooth); box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.consortium-card.highlight-card { border-color: var(--honda-red); background: #fffafaa8; }
.consortium-card-badge { position: absolute; top: -12px; right: 20px; font-size: 0.7rem; font-weight: 900; text-transform: uppercase; background: #f1f5f9; color: var(--text-muted); padding: 4px 12px; border-radius: 50px; border: 1px solid var(--card-border); }
.consortium-card-badge.red { background: var(--honda-red); color: white; border: none; box-shadow: 0 4px 10px rgba(230,0,0,0.3); }
.consortium-card h4 { font-size: 1.15rem; font-weight: 900; margin-bottom: 6px; }
.consortium-card .card-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.4; font-weight: 500; }

.plans-list { display: flex; flex-direction: column; gap: 10px; }
.installment-option { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; cursor: pointer; color: var(--text-muted); padding: 12px; border-radius: 12px; border: 1px solid var(--card-border); transition: var(--transition-fast); background: #ffffff; }
.installment-option.selected { border-color: var(--honda-red); background: #fff0f0; color: var(--text-main); }
.installment-option.selected span strong { color: var(--honda-red); }
.installment-option input[type="radio"] { accent-color: var(--honda-red); width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.installment-option span strong { color: var(--text-main); font-size: 1rem; font-weight: 900; }

.disclaimer-text { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; text-align: center; font-weight: 500; }
.consortium-ctas { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 768px) {
    .header-banner { justify-content: center; height: 140px; }
    .dealership-badge { font-size: 0.8rem; padding: 0 16px; height: 38px; }
    .profile-card { padding: 24px 20px; margin-top: -50px; border-radius: 20px; }
    .profile-avatar { width: 90px; height: 90px; margin-top: -65px; border-width: 4px; }
    .profile-details h1 { font-size: 1.5rem; }
    .cta-trio { grid-template-columns: 1fr; gap: 10px; }
    .consortium-cards-grid { grid-template-columns: 1fr; gap: 16px; }
    .consortium-top-info { flex-direction: column; align-items: flex-start; }
    .credit-box { width: 100%; justify-content: space-between; }
    .gallery-container { flex-direction: column; padding: 16px; }
    .color-selector { flex-direction: row; width: 100%; justify-content: center; flex-wrap: wrap; }
    #color-thumbs-list { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .main-img-view { aspect-ratio: auto; height: 180px; }
    .yt-btn { margin-top: 0; }
    .modal-container { padding: 24px 20px; border-radius: 20px; margin: 10px; }
    .floating-widget { bottom: 20px; right: 20px; padding: 10px 20px; font-size: 0.85rem; }
}