/* ============================================
   Model details page
   ============================================ */

.model-hero {
    min-height: clamp(340px, 44vh, 520px);
}

.model-hero-content {
    max-width: 900px;
}

.model-details-main {
    max-width: 1280px;
}

[hidden] {
    display: none !important;
}

/* Breadcrumb ----------------------------------------------------------- */

.model-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.model-back-link,
.model-variants-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.model-back-link:hover,
.model-variants-link:hover {
    color: #ffffff;
}

.model-back-link i,
.model-variants-link i {
    color: var(--yamaha-red);
    font-size: 0.72rem;
}

/* Showcase ------------------------------------------------------------- */

.model-visual-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.model-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: stretch;
}

.model-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    background: linear-gradient(160deg, rgba(20, 20, 20, 0.92), rgba(5, 5, 5, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.model-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 68%, var(--selected-color, #e60012) 0%, transparent 62%);
    opacity: 0.34;
    pointer-events: none;
    transition: background 0.35s ease;
}

.model-visual img {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    height: auto;
    padding: clamp(0.5rem, 1.5vw, 0.85rem);
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.model-visual.is-clickable img {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.model-visual.is-clickable img:hover {
    transform: scale(1.02);
    box-shadow: 0 28px 55px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.model-visual img:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.model-year {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    padding: 0.4rem 0.85rem;
    background: var(--yamaha-red);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.model-summary {
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3.5vw, 2.25rem);
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.model-kicker {
    color: var(--yamaha-red);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.model-summary h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.model-summary > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.35rem;
}

.model-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.model-highlight {
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--yamaha-red);
}

.model-highlight span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.model-highlight strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.model-colors {
    padding: 1.1rem 1.2rem;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.model-colors h3 {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.color-swatch {
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: var(--swatch);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.14), 0 5px 14px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.color-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: inherit;
}

.color-swatch:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.75);
}

.color-swatch[aria-pressed="true"] {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px rgba(230, 0, 18, 0.45);
    transform: scale(1.04);
}

.color-swatch:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.color-name {
    min-height: 1.25rem;
    margin-top: 0.65rem;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.color-hint {
    margin-top: 0.15rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.2px;
}

/* Specifications summary ---------------------------------------------- */

.model-summary-specs {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 1.5rem;
}

.model-summary-specs > h3 {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.model-summary-specs .spec-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 430px;
    padding-right: 0.35rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 0, 18, 0.65) rgba(255, 255, 255, 0.06);
}

.model-summary-specs .spec-groups::-webkit-scrollbar {
    width: 6px;
}

.model-summary-specs .spec-groups::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

.model-summary-specs .spec-groups::-webkit-scrollbar-thumb {
    background: rgba(230, 0, 18, 0.65);
    border-radius: 999px;
}

.model-summary-specs .spec-group {
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.model-summary-specs .spec-group h3 {
    font-size: 0.68rem;
    letter-spacing: 1.6px;
}

.model-summary-specs .spec-row {
    padding: 0.42rem 0;
}

.model-summary-specs .spec-label {
    font-size: 0.73rem;
}

.model-summary-specs .spec-value {
    font-size: 0.78rem;
}

.model-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.model-actions .btn-primary,
.model-actions .btn-secondary {
    flex: 1 1 160px;
    justify-content: center;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
    gap: 0.5rem;
}

.model-section {
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.model-description {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid var(--yamaha-red);
}

.model-description p {
    max-width: 980px;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.model-description p:last-child {
    margin-bottom: 0;
}

.model-description p:first-child {
    color: #e8e8e8;
}

.model-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.model-section-head h2 {
    margin-bottom: 0;
}

.model-section-head p {
    max-width: 430px;
    margin: 0 0 0.2rem;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: right;
}

.spec-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.spec-group {
    padding: 1.35rem 1.4rem;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.spec-group h3 {
    padding-bottom: 0.7rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--yamaha-red);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-label {
    flex: 0 0 48%;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.spec-value {
    flex: 1 1 auto;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: right;
}

@media (max-width: 980px) {
    .model-showcase {
        grid-template-columns: 1fr;
    }

    .model-summary-specs .spec-groups {
        max-height: none;
        padding-right: 0;
        overflow: visible;
    }

    .spec-groups {
        grid-template-columns: 1fr;
    }

    .model-visual {
        min-height: 340px;
    }

    .model-visual img {
        width: min(100%, 360px);
    }

    .model-actions {
        margin-top: 1.5rem;
    }

    .model-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .model-section-head p {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .model-hero {
        min-height: 320px;
    }

    .model-visual {
        min-height: 250px;
        padding: 1rem;
    }

    .model-visual img {
        width: min(100%, 260px);
    }

    .model-year {
        top: 0.85rem;
        left: 0.85rem;
        padding: 0.35rem 0.65rem;
        font-size: 0.65rem;
    }

    .model-summary {
        padding: 1.25rem;
    }

    .model-colors {
        padding: 0.9rem;
    }

    .model-summary h2 {
        font-size: 1.65rem;
    }

    .model-highlights {
        grid-template-columns: 1fr;
    }

    .model-actions {
        flex-direction: column;
    }

    .model-section-head {
        margin-bottom: 1rem;
    }

    .spec-groups {
        grid-template-columns: 1fr;
    }

    .spec-row {
        flex-direction: column;
        gap: 0.15rem;
    }

    .spec-label,
    .spec-value {
        flex-basis: auto;
        text-align: left;
    }
}
