/* XO Boat Configurator — Reference design */

:root {
    --xo-bg:              #ffffff;
    --xo-bg-muted:        #f0f0f0;
    --xo-gradient-section: linear-gradient(180deg, #b0b0b0 0%, #e4e4e4 38%, #ffffff 100%);
    --xo-text:            #111111;
    --xo-text-secondary:  #555555;
    --xo-text-muted:      #888888;
    --xo-border:          #e0e0e0;
    --xo-row-alt:         #f2f2f2;
    --xo-accent:          #2B7BE5;
    --xo-accent-hover:    #1a5fc4;
    --xo-dealer-bg:       #2b2b2b;
    --xo-card-selected:   #2b2b2b;
    --xo-btn-dark:        #222222;
    --xo-radius:          0;
    --xo-transition:      0.2s ease;
    --xo-font:            'Montserrat', 'Barlow', 'Arial Narrow', sans-serif;
}

.xo-configurator {
    font-family: var(--xo-font);
    color: var(--xo-text);
    background: var(--xo-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.xo-configurator *,
.xo-configurator *::before,
.xo-configurator *::after {
    box-sizing: border-box;
}

.xo-full-bleed {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.xo-gradient-bg {
    background: var(--xo-gradient-section);
}

.xo-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.xo-section {
    padding: 48px 0;
}

.xo-section-title,
.xo-configurate-title,
.xo-choices-heading {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--xo-text);
    margin: 0 0 32px;
    text-align: center;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ── Choose your model (full width, 4-col grid like xoboats.com) ── */
.xo-model-selector {
    padding: 72px 0 80px;
    background:#ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.xo-model-selector-inner {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Reference h2: 60px / 600 / #303133 / uppercase */
.xo-model-selector .xo-section-title {
    font-size: clamp(36px, 3.125vw, 60px);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0 0 clamp(32px, 3vw, 56px);
    padding: 0;
    color: #303133;
    text-transform: uppercase;
    text-align: center;
}

.xo-model-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 8px;
    width: 100%;
    margin: 0;
    align-items: end;
}

/* Each card = exactly one grid column (25% of row), even when only one model */
.xo-model-card {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    padding: 9px;
    width: 100%;
    max-width: none;
    justify-self: stretch;
    box-sizing: border-box;
    transition: opacity var(--xo-transition), filter var(--xo-transition), border-color var(--xo-transition);
}

/* Reference: .chooseBoat:hover .tmb, .chooseBoat.boatChosen .tmb { opacity: 0.5 } */
.xo-model-card.xo-dimmed {
    opacity: 0.5;
}

.xo-model-card.xo-selected,
.xo-model-card:hover {
    opacity: 1;
}

.xo-model-card:hover .xo-model-card-image img {
    transform: translateX(-50%) scale(1.02);
}

/* Aspect ratio spacer (reference: padding-top ~48.1%) */
.xo-model-card-image {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
}

.xo-model-card-aspect {
    display: block;
    width: 100%;
    padding-top: 48.1%;
    pointer-events: none;
}

.xo-model-card-image img {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform var(--xo-transition), filter var(--xo-transition), opacity var(--xo-transition);
}

.xo-model-card-placeholder {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 64px;
    height: 48px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--xo-text-muted);
}

/* Reference grid labels: small caps, #303133, regular weight */
.xo-model-card-title {
    font-size: clamp(12px, 0.72vw, 15px);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 4px 0 0;
    line-height: 1.35;
    color: #303133;
}

.xo-model-card.xo-selected .xo-model-card-title {
    font-weight: 400;
    color: #303133;
}

/* ── Hero ── */
.xo-hero-section {
    padding: 40px 0 24px;
    text-align: center;
}

.xo-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 24px;
}

.xo-hero-media {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.xo-hero-image,
.xo-choices-boat-image {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.xo-hero-disclaimer,
.xo-choices-disclaimer {
    font-size: 11px;
    color: var(--xo-text-muted);
    max-width: 720px;
    margin: 0 auto 16px;
    line-height: 1.5;
}

.xo-model-title,
.xo-choices-model-name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.xo-model-description {
    font-size: 14px;
    color: var(--xo-text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

/* ── Standard equipment accordion ── */
.xo-standard-equipment {
    padding: 0 0 8px;
    background: var(--xo-bg);
}

.xo-standard-equipment-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.xo-equipment-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border: none;
    border-top: 1px solid #d8d8d8;
    border-bottom: 1px solid #d8d8d8;
    background: transparent;
    cursor: pointer;
    font-family: var(--xo-font);
    text-align: left;
    gap: 16px;
}

.xo-equipment-accordion-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--xo-accent);
    line-height: 1.4;
}

.xo-equipment-accordion-label strong {
    font-weight: 700;
    color: var(--xo-accent);
}

.xo-equipment-accordion-chevron {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 400;
    color: #999;
    transition: transform var(--xo-transition);
}

.xo-equipment-accordion-toggle[aria-expanded="true"] .xo-equipment-accordion-chevron {
    transform: rotate(90deg);
}

.xo-equipment-panel {
    padding: 28px 0 16px;
}

.xo-equipment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 20px;
}

.xo-equipment-card {
    text-align: left;
}

.xo-equipment-card-image {
    width: 100%;
    height: 130px;
    overflow: hidden;
    background: #e8e8e8;
    margin-bottom: 10px;
    position: relative;
}

.xo-equipment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xo-equipment-card-image .xo-coming-soon-overlay {
    font-size: 10px;
    background: rgba(20, 20, 20, 0.8);
}

.xo-equipment-card-title {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.3;
    color: var(--xo-text);
}

.xo-equipment-card-desc {
    font-size: 10px;
    color: var(--xo-text-secondary);
    margin: 0;
    line-height: 1.45;
}

.xo-equipment-empty {
    color: var(--xo-text-muted);
    font-size: 13px;
}

/* ── Configurate tabs ── */
.xo-options-section {
    padding: 40px 0 24px;
    background: var(--xo-bg);
}

.xo-configurate-wrap {
    padding-bottom: 24px;
}

.xo-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--xo-border);
    padding-bottom: 12px;
}

.xo-tab-btn {
    background: none;
    border: none;
    padding: 8px 4px;
    font-family: var(--xo-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--xo-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -13px;
    transition: var(--xo-transition);
}

.xo-tab-btn:hover {
    color: var(--xo-text);
}

.xo-tab-btn.active {
    color: var(--xo-accent);
    border-bottom-color: var(--xo-accent);
    font-weight: 600;
}

.xo-tab-count {
    font-weight: 400;
}

.xo-tab-panel {
    display: none;
}

.xo-tab-panel.active {
    display: block;
}

.xo-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.xo-option-card {
    background: var(--xo-bg);
    border: 1px solid var(--xo-border);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--xo-transition);
}

.xo-option-card:hover {
    border-color: #ccc;
}

.xo-option-card.xo-selected {
    background: var(--xo-card-selected);
    border-color: var(--xo-card-selected);
}

.xo-option-card.xo-selected .xo-option-card-title,
.xo-option-card.xo-selected .xo-option-card-desc {
    color: #ffffff;
}

.xo-option-card.xo-selected .xo-option-card-footer {
    border-top-color: rgba(255, 255, 255, 0.15);
}

.xo-option-card.xo-selected .xo-add-btn {
    color: rgba(255, 255, 255, 0.75);
}

.xo-option-card.xo-coming-soon {
    opacity: 0.65;
    cursor: not-allowed;
}

.xo-option-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: var(--xo-bg-muted);
}

.xo-option-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xo-coming-soon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 30, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    padding: 8px;
}

.xo-option-card-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--xo-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    font-weight: 700;
    color: var(--xo-text-muted);
}

.xo-option-card-body {
    padding: 14px 14px 8px;
    flex: 1;
}

.xo-option-card-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
}

.xo-option-card-desc {
    font-size: 12px;
    color: var(--xo-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.xo-option-card-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--xo-border);
    text-align: right;
}

.xo-add-btn {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--xo-text-muted);
}

.xo-no-options {
    grid-column: 1 / -1;
    color: var(--xo-text-muted);
    font-size: 13px;
}

/* Tab footer prev/next */
.xo-tab-footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 32px;
    gap: 16px;
}

.xo-tab-nav-btn {
    flex: 0 1 auto;
    min-width: 200px;
    padding: 16px 24px;
    background: var(--xo-btn-dark);
    color: #fff;
    border: none;
    font-family: var(--xo-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--xo-transition);
    text-align: center;
}

.xo-tab-nav-btn:hover:not(:disabled) {
    background: #000;
}

.xo-tab-nav-btn[hidden] {
    display: none !important;
}

.xo-tab-nav-next:not([hidden]) {
    margin-left: auto;
}

/* ── Your choices ── */
.xo-your-choices {
    padding: 56px 0;
    background: var(--xo-bg);
    text-align: center;
}

.xo-choices-hero-wrap {
    padding: 32px 24px;
    margin-bottom: 12px;
}

.xo-your-choices .xo-choices-model-name {
    text-align: center;
    margin: 8px auto 20px;
}

.xo-choices-table-wrap {
    text-align: left;
    max-width: 800px;
    margin: 24px auto;
}

.xo-choices-table-wrap[hidden] {
    display: none;
}

.xo-choices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.xo-choices-table tr:nth-child(odd) {
    background: var(--xo-row-alt);
}

.xo-choices-table tr:nth-child(even) {
    background: var(--xo-bg);
}

.xo-choices-table td {
    padding: 10px 14px;
    vertical-align: top;
}

.xo-choices-table td:first-child {
    width: 40%;
    font-weight: 700;
}

.xo-choices-table td:last-child {
    color: var(--xo-text-secondary);
}

.xo-choices-empty-row td {
    text-align: center;
    font-style: italic;
    color: var(--xo-text-muted);
}

.xo-choices-footer-note {
    font-size: 10px;
    color: var(--xo-text-muted);
    max-width: 720px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

.xo-choices-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}

.xo-btn {
    width: 100%;
    font-family: var(--xo-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 16px 24px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--xo-transition);
}

.xo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.xo-btn-download {
    background: var(--xo-btn-dark);
    color: #fff;
}

.xo-btn-download:hover:not(:disabled) {
    background: #000;
}

.xo-btn-send-dealer,
.xo-btn-submit-dealer {
    background: var(--xo-accent);
    color: #fff;
}

.xo-btn-send-dealer:hover:not(:disabled),
.xo-btn-submit-dealer:hover:not(:disabled) {
    background: var(--xo-accent-hover);
}

.xo-btn-icon {
    font-size: 16px;
    line-height: 1;
}

/* ── Dealer panel (dark) ── */
.xo-dealer-panel {
    background: var(--xo-dealer-bg);
    color: #ffffff;
    padding: 64px 0 80px;
}

.xo-dealer-panel-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.xo-dealer-panel .xo-dealer-title,
.xo-configurator .xo-dealer-panel .xo-dealer-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #ffffff !important;
}

.xo-dealer-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 32px;
}

.xo-dealer-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.xo-select-wrap {
    position: relative;
}

.xo-select-dark {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 14px 36px 14px 14px;
    font-size: 14px;
    font-family: var(--xo-font);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.xo-select-dark option {
    background: var(--xo-dealer-bg);
    color: #fff;
}

.xo-select-dark:disabled {
    opacity: 0.5;
}

.xo-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.xo-dealer-notice {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 12px 0;
    text-align: left;
}

.xo-dealer-notice a {
    color: var(--xo-accent);
}

.xo-contact-heading {
    font-size: 13px;
    color: #fff;
    margin: 32px 0 20px;
    text-align: center;
}

.xo-form-fields {
    text-align: left;
}

.xo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.xo-form-field {
    display: flex;
    flex-direction: column;
}

.xo-form-field--full {
    margin-bottom: 16px;
}

.xo-form-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.xo-form-field input,
.xo-form-field textarea {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 14px;
    font-size: 14px;
    font-family: var(--xo-font);
}

.xo-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.xo-btn-submit-dealer {
    width: 100%;
    margin-top: 8px;
}

#xo-form-response {
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
}

#xo-form-response.xo-success {
    color: #81c784;
}

#xo-form-response.xo-error {
    color: #ef9a9a;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .xo-model-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .xo-equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .xo-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .xo-model-selector-inner {
        padding: 0 24px;
    }

    .xo-model-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 8px;
    }

    .xo-equipment-grid {
        grid-template-columns: 1fr 1fr;
    }

    .xo-dealer-row,
    .xo-form-row {
        grid-template-columns: 1fr;
    }

    .xo-tab-footer {
        flex-direction: column;
    }

    .xo-tab-nav-btn {
        width: 100%;
        min-width: 0;
    }

    .xo-tab-nav-next {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .xo-model-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xo-options-grid {
        grid-template-columns: 1fr;
    }

    .xo-tabs-nav {
        gap: 4px 12px;
    }

    .xo-tab-btn {
        font-size: 11px;
    }
}
