/* ========================================
   BOOKING DETAIL — RIDE SHEET
   Hero prodotto + ticket di configurazione
======================================== */

:root {
    --primary: var(--tenant-primary, #f59e0b);
    --primary-dark: color-mix(in srgb, var(--tenant-primary, #f59e0b) 78%, black);
    --primary-light: color-mix(in srgb, var(--tenant-primary, #f59e0b) 16%, white);
    --secondary: var(--tenant-secondary, #1e3a5f);
    --success: #059669;
    --success-dark: #047857;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.1);
    --page-bg: #ececee;
    --surface: #ffffff;
    --surface-border: rgba(15, 23, 42, 0.1);
    --surface-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.07);
    --surface-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.06), 0 10px 22px rgba(15, 23, 42, 0.1);
    --paper: #f7f4ef;
    --ticket: #fffdf9;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

.focus-page.ride-sheet {
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--ink);
    padding: 28px 0 24px;
    position: relative;
}

.ride-back {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ride-back:hover {
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transform: translateX(-2px);
}

.ride-alerts {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 20px 0;
}

.focus-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.focus-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.focus-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Shell largo: su desktop bici | prenota affiancate */
.ride-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 20px 40px;
}

.ride-main {
    display: block;
}

.ride-stage {
    position: relative;
    margin: 0;
    background: transparent;
    color: var(--ink);
}

.ride-stage-media {
    position: relative;
    z-index: 1;
    min-height: 200px;
    overflow: visible;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 24px 12px;
}

.ride-stage-media img {
    width: auto;
    max-width: min(400px, 78%);
    height: auto;
    max-height: 190px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.12));
}

.ride-stage-copy {
    position: relative;
    z-index: 1;
    padding: 4px 0 16px;
    color: var(--ink);
}

.ride-kicker {
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.ride-title {
    margin: 0 0 14px;
    font-size: clamp(1.7rem, 3.4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--ink);
}

/* Superfici informativi (non cliccabili): piatte, soft, senza lift */
.ride-meta-block,
.ride-context-sheet {
    background: color-mix(in srgb, var(--page-bg) 72%, white);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: none;
    cursor: default;
    user-select: text;
}

.ride-meta-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 16px;
    border-radius: 16px;
}

.ride-context-sheets {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.ride-context-sheet {
    border-radius: 14px;
    padding: 12px 14px;
}

.ride-context-sheet-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ride-context-sheet-head i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary-dark);
    font-size: 0.78rem;
}

.ride-context-sheet-head h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ink-soft);
}

.ride-sheet-chevron {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.ride-details-sheet.is-open .ride-sheet-chevron {
    transform: rotate(180deg);
    color: var(--primary-dark);
}

.ride-context-sheet-body {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.4;
}

.ride-context-sheet-body .focus-pickup-box {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.ride-from {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.ride-from strong {
    font-size: 1.45rem;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ride-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.ride-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ride-chip i {
    color: var(--primary-dark);
}

.ride-chip.is-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.ride-chip.is-ok i {
    color: #059669;
}

.ride-chip.is-out {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.ride-chip.is-out i {
    color: #dc2626;
}

/* Pannello prenotazione: fondo neutro, soft grey solo sui controlli */
.ride-cockpit {
    padding: 20px 0 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.ride-more {
    padding: 8px 0 24px;
}

@media (min-width: 992px) {
    .ride-main {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
        gap: 24px;
        align-items: start;
        padding-top: 12px;
    }

    .ride-stage {
        background: transparent;
    }

    .ride-stage-media {
        min-height: 280px;
        padding: 36px 12px 16px;
        background: transparent;
    }

    .ride-stage-media img {
        max-width: min(480px, 88%);
        max-height: 250px;
    }

    .ride-stage-copy {
        padding: 8px 4px 8px;
    }

    .ride-title {
        font-size: clamp(1.85rem, 2.6vw, 2.4rem);
    }

    .ride-meta-block {
        padding: 16px 18px;
    }

    .ride-cockpit {
        padding: 8px 0 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        position: sticky;
        top: 16px;
    }

    .ride-details {
        margin-top: 24px;
    }

    .ride-actions-desktop {
        display: grid;
    }

    .ride-ticket-total {
        display: inline;
        color: var(--primary-dark);
    }
}

.ride-ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.ride-ticket-label {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ride-ticket-sub {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.ride-ticket-total {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
}

.ride-pass {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    border-radius: 16px;
    padding: 14px 14px;
    cursor: pointer;
    box-shadow: var(--surface-shadow);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ride-pass:hover {
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: var(--surface-shadow-hover);
    transform: translateY(-1px);
}

.ride-pass.is-empty {
    border-style: dashed;
    background: var(--surface);
}

.ride-pass-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--page-bg);
    color: var(--primary-dark);
    border: 1px solid var(--surface-border);
}

.ride-pass-eyebrow {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.ride-pass-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
}

.ride-pass-main i {
    font-size: 0.75rem;
    color: var(--muted);
}

.ride-pass-sub {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.ride-pass-edit {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--page-bg);
    color: var(--ink-soft);
    font-size: 0.8rem;
    border: 1px solid var(--surface-border);
}

.ride-sizes {
    margin-top: 18px;
}

.ride-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.ride-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 8px;
}

.ride-size {
    position: relative;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    border-radius: 14px;
    padding: 14px 10px;
    cursor: pointer;
    box-shadow: var(--surface-shadow);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ride-size:hover:not(:disabled):not(.disabled) {
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: var(--surface-shadow-hover);
    transform: translateY(-1px);
}

.ride-size.selected {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    box-shadow: var(--surface-shadow), inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, white);
}

.ride-size.disabled,
.ride-size:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.ride-size-name {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.ride-size-meta {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
}

.ride-size-qty {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.ride-qty {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.ride-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ride-qty-controls button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--gray-200);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.ride-qty-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ride-qty-controls strong {
    min-width: 1.25rem;
    text-align: center;
    font-size: 1.1rem;
}

.ride-extras {
    width: 100%;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    box-shadow: var(--surface-shadow);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ride-extras:hover {
    background: var(--surface);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: var(--surface-shadow-hover);
    transform: translateY(-1px);
}

.ride-extras-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--ink-soft);
}

.ride-extras-left i {
    color: var(--primary-dark);
}

.ride-extras-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.ride-extras-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--success);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.ride-extras-price {
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.ride-actions-desktop {
    margin-top: 22px;
    display: grid;
    gap: 8px;
}

.ride-cta {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--success);
    color: #fff;
    font-weight: 800;
    font-size: 0.98rem;
    padding: 15px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ride-cta:hover:not(:disabled) {
    background: var(--success-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.34);
}

.ride-cta:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ride-cta-ghost {
    width: 100%;
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--surface-shadow);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ride-cta-ghost:hover {
    background: var(--surface);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: var(--surface-shadow-hover);
    transform: translateY(-1px);
}

/* ---------- MORE / ACCORDION ---------- */
.focus-accordion-inline .focus-accordion-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: none;
}

.focus-accordion-inline .focus-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}

.focus-accordion-inline .focus-accordion-header:hover {
    background: rgba(15, 23, 42, 0.02);
}

.focus-accordion-inline .focus-accordion-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.focus-accordion-inline .focus-accordion-header h3 i {
    color: var(--primary-dark);
}

.focus-accordion-inline .focus-accordion-header .chevron {
    color: var(--muted);
    transition: transform 0.2s ease;
}

.focus-accordion-inline .focus-accordion-item.open .chevron {
    transform: rotate(180deg);
}

.focus-accordion-inline .focus-accordion-body {
    display: none;
    padding: 0 16px 16px;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.focus-accordion-inline .focus-accordion-item.open .focus-accordion-body {
    display: block;
}

.focus-pricing-table {
    width: 100%;
    border-collapse: collapse;
}

.focus-pricing-table th,
.focus-pricing-table td {
    padding: 8px 4px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}

.focus-pricing-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 700;
}

.focus-pricing-table .discounted {
    font-weight: 800;
    color: var(--primary-dark);
    text-align: right;
}

.focus-pickup-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 12px;
    background: var(--gray-50);
}

.focus-pickup-box i {
    margin-top: 2px;
}

.focus-sizes-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.82rem;
    font-weight: 600;
}

.ride-sizes.is-flashing {
    animation: sizeFlash 0.9s ease 2;
}

@keyframes sizeFlash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent); border-radius: 12px; }
}

.ride-more {
    padding: 8px 0 24px;
}

/* Dettagli a sheet richiudibili — chiusi di default */
.ride-details {
    margin-top: 20px;
    padding-bottom: 8px;
    display: grid;
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.ride-details-sheet {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: var(--surface-shadow);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ride-details-sheet-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 800;
    font-family: inherit;
}

.ride-details-sheet-head:hover {
    background: rgba(15, 23, 42, 0.03);
}

.ride-details-sheet:not(.is-open) .ride-details-sheet-head:hover {
    background: color-mix(in srgb, var(--primary) 6%, white);
}

.ride-details-sheet-head > i:first-child {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 14%, white);
    color: var(--primary-dark);
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ride-details-sheet-head > span {
    flex: 1;
}

.ride-details-sheet.is-open .ride-details-sheet-head {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.ride-details-panel {
    padding: 16px 16px 18px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ride-price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ride-price-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    padding: 12px 8px;
    text-align: center;
    border-radius: 14px;
    background: var(--page-bg);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.ride-price-tile-dur {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.2;
}

.ride-price-tile strong {
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.ride-price-tile--extra {
    background: color-mix(in srgb, var(--primary) 10%, white);
    border-color: color-mix(in srgb, var(--primary) 22%, transparent);
}

@media (max-width: 640px) {
    .ride-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ride-details-panel--scroll {
    max-height: 420px;
    overflow-y: auto;
}

.ride-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ride-spec-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 14px 14px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 3px solid color-mix(in srgb, var(--primary) 70%, transparent);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ride-spec-card:nth-child(4n + 2) {
    border-left-color: color-mix(in srgb, var(--primary) 45%, #0ea5e9);
}

.ride-spec-card:nth-child(4n + 3) {
    border-left-color: color-mix(in srgb, var(--primary) 40%, #f59e0b);
}

.ride-spec-card:nth-child(4n + 4) {
    border-left-color: color-mix(in srgb, var(--primary) 35%, #8b5cf6);
}

.ride-spec-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.ride-spec-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 14%, white);
    color: var(--primary-dark);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ride-spec-card:nth-child(4n + 2) .ride-spec-icon {
    background: color-mix(in srgb, #0ea5e9 16%, white);
    color: #0369a1;
}

.ride-spec-card:nth-child(4n + 3) .ride-spec-icon {
    background: color-mix(in srgb, #f59e0b 18%, white);
    color: #b45309;
}

.ride-spec-card:nth-child(4n + 4) .ride-spec-icon {
    background: color-mix(in srgb, #8b5cf6 16%, white);
    color: #6d28d9;
}

.ride-spec-copy h4 {
    margin: 0 0 5px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-dark);
    line-height: 1.2;
}

.ride-spec-card:nth-child(4n + 2) .ride-spec-copy h4 { color: #0369a1; }
.ride-spec-card:nth-child(4n + 3) .ride-spec-copy h4 { color: #b45309; }
.ride-spec-card:nth-child(4n + 4) .ride-spec-copy h4 { color: #6d28d9; }

.ride-spec-copy p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--ink);
    font-weight: 500;
}

@media (max-width: 640px) {
    .ride-spec-grid {
        grid-template-columns: 1fr;
    }
}

/* Fallback se il parsing HTML non riesce */
.ride-details-panel .features-content {
    color: var(--ink);
    display: grid;
    gap: 10px;
}

.ride-details-panel .features-content :where(ul, ol) {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ride-details-panel .features-content :where(li, .feature-item, p) {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 3px solid color-mix(in srgb, var(--primary) 65%, transparent);
    font-size: 0.88rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ride-details-panel .features-content :where(li, .feature-item, p):nth-child(4n + 2) {
    border-left-color: color-mix(in srgb, var(--primary) 45%, #0ea5e9);
}

.ride-details-panel .features-content :where(li, .feature-item, p):nth-child(4n + 3) {
    border-left-color: color-mix(in srgb, var(--primary) 40%, #f59e0b);
}

.ride-details-panel .features-content :where(li, .feature-item, p):nth-child(4n + 4) {
    border-left-color: color-mix(in srgb, var(--primary) 35%, #8b5cf6);
}

.ride-details-panel .features-content :where(strong, b) {
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

@media (max-width: 640px) {
    .ride-details-panel .features-content :where(ul, ol) {
        grid-template-columns: 1fr;
    }
}

.ride-info-text {
    margin: 0;
}

[x-cloak] {
    display: none !important;
}

/* ---------- STICKY CTA ---------- */
.focus-sticky-cta {
    display: none;
}

/* ---------- MODALS ---------- */
#dateModal .modal-content {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

#dateModal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
}

#dateModal .modal-body {
    padding: 24px;
}

.accessories-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accessory-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.accessory-modal-item:hover {
    border-color: var(--primary);
}

.accessory-modal-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.accessory-modal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accessory-modal-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.accessory-modal-price {
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.accessory-modal-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn-modal {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.qty-btn-modal:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.qty-btn-modal:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-value-modal {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-800);
}

.accessories-modal-total {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: color-mix(in srgb, var(--primary) 10%, white);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.accessories-modal-total strong {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .focus-page.ride-sheet {
        padding-top: 18px;
    }

    .ride-stage-media {
        min-height: 170px;
        padding: 52px 16px 16px;
    }

    .ride-stage-media img {
        max-width: min(280px, 78%);
        max-height: 130px;
    }

    .ride-stage-copy {
        padding: 8px 16px 16px;
    }

    .ride-title {
        font-size: clamp(1.45rem, 6vw, 1.85rem);
    }

    .ride-shell {
        padding: 0 0 28px;
    }

    .ride-cockpit {
        margin: 0;
        border-radius: 0;
        padding: 16px 16px 8px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .ride-details {
        margin-left: 16px;
        margin-right: 16px;
        margin-top: 16px;
    }

    .ride-actions-desktop {
        display: none;
    }

    .ride-ticket-total {
        display: none;
    }

    .focus-page.ride-sheet {
        padding-bottom: 96px;
    }

    .focus-sticky-cta {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.1);
        backdrop-filter: blur(10px);
    }

    .focus-sticky-total {
        flex: 0 1 36%;
        min-width: 0;
    }

    .focus-sticky-label {
        display: block;
        font-size: 0.68rem;
        color: var(--muted);
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .focus-sticky-value {
        display: block;
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--ink);
        line-height: 1.1;
    }

    .focus-sticky-btn {
        flex: 1;
        border: 0;
        border-radius: 14px;
        background: var(--success);
        color: #fff;
        font-weight: 800;
        font-size: 0.88rem;
        padding: 14px 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .focus-sticky-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

    .focus-sticky-btn:hover:not(:disabled) {
        background: var(--success-dark);
    }
}

@media (max-width: 480px) {
    .ride-pass-main {
        font-size: 1.02rem;
    }

    .ride-size-name {
        font-size: 1.15rem;
    }

    .ride-stage-media img {
        max-height: 115px;
    }
}
