@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Jost:wght@400;500;600&display=swap');

:root {
    --gold: #b99d75;
    --ink: #191919;
    --sand: #f5efe3;
    --muted: #6c6c6c;
    --border: #e7e1d7;
}

.pool-calculator {
    max-width: 100%;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Jost', sans-serif;
    color: var(--ink);
    width: 100%;
    overflow-x: hidden;
}

.pool-calculator,
.pool-calculator * {
    box-sizing: border-box;
}

.pool-calculator img {
    max-width: 100%;
    height: auto;
    display: block;
}

.calculator-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
}

.calculator-main {
    flex: 1 1 auto;
    min-width: 0;
}

.calculator-header {
    margin-bottom: 32px;
    display: none;
}

.calculator-intro {
    max-width: 720px;
}

.calculator-intro .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}

.calculator-intro h1 {
    font-family: 'Marcellus', serif;
    font-size: 34px;
    margin: 0 0 10px;
}

.price-display {
    flex: 0 0 320px;
    max-width: 320px;
    width: 100%;
    background: var(--ink);
    color: #fff;
    padding: 30px;
    border: 1px solid var(--gold);
}

.price-display-sticky {
    position: sticky;
    top: 20px;
}

.price-display-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20;
    background: var(--ink);
    color: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(185,157,117,0.5);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
    overflow: visible;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.price-display-floating.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.price-display-floating::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(185,157,117,0.6);
    border-radius: 12px;
    z-index: -1;
}

.price-display-floating .price-label {
    font-size: 11px;
    letter-spacing: 0.2em;
}

.price-display-floating .price-main-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-display-floating .price-amount {
    font-size: 26px;
    color: #b99d75;
}

.price-display-inline {
    position: static;
    max-width: 100%;
    width: 100%;
    margin-bottom: 20px;
}

.price-amount,
.summary-row strong,
.summary-row span,
.summary-total,
.option-price,
.dimension-info-price,
.price-label {
    font-family: 'Marcellus', serif;
}

.price-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.25em;
    opacity: 0.7;
}

.price-amount {
    font-size: 42px;
    color:#b99d75;
    font-family: 'Marcellus', serif;
    margin: 10px 0;
    display: inline-block;
}

.price-note {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.price-tax-note {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 0 8px;
    display: inline-block;
}

.calculator-step {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.step-heading {
    margin-bottom: 35px;
}

.step-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
}

.step-heading h2,
.step-heading .step-title {
    font-family: 'Marcellus', serif;
    font-size: 35px;
    margin: 10px 0 0 0;
}

.step-index {
    flex-shrink: 0;
}

.step-title {
    flex: 1 1 auto;
}

.step-heading p,
.step-description {
    color: var(--muted);
    margin: 8px 0 0 0;
}

.step-index {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border: none;
    font-size: 35px;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    letter-spacing: 0.15em;
    font-family: 'Marcellus', serif;
}
.step-index::after {
    content: ')';
    margin-left: 4px;
}

.calculator-section {
    margin-bottom: 35px;
}
.calculator-section.hidden {
    display: none;
}
.hidden {
    display: none !important;
}
.dimension-select-wrapper {
    display: none;
    flex-direction: column;
    gap: 15px;
}
.dimension-select-wrapper.show {
    display: flex;
}
.dimension-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    font-size: 16px;
    background: #fff;
}
.dimension-info {
    border: 1px solid var(--border);
    padding: 16px;
    background: rgba(185,157,117,0.05);
}
.dimension-info-price {
    display: none;
}
.dimension-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.dimension-filter {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: #fff;
}
.dimension-info-title {
    font-weight: 600;
    margin-bottom: 6px;
}
.dimension-info-description {
    color: var(--muted);
    margin-bottom: 4px;
    white-space: pre-line;
}
.dimension-info-price {
    font-weight: 600;
}

.section-heading-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}

.section-heading-inline h3 {
    font-size: 20px;
    margin: 0;
}

.section-heading-inline p {
    margin: 0;
    color: var(--muted);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.option-card {
    border: 1px solid var(--border);
    background: #fff;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: box-shadow 0.3s ease, border 0.3s ease;
    min-width: 0;
}

.option-card.selected {
    border-color: var(--gold);
    box-shadow: 0 12px 30px rgba(185,157,117,0.18);
}

.option-card.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.option-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.option-media img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    max-width: 100%;
}
.option-media .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.option-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-title {
    font-size: 18px;
    margin: 0;
}

.option-description {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.option-price {
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
}
.option-card-checkbox {
    position: relative;
}
.option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.option-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
    flex-direction: row-reverse;
    justify-content: flex-end;
    flex-shrink: 0;
}
.option-checkbox-input {
    width: 18px;
    height: 18px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
    display: grid;
    place-content: center;
    cursor: pointer;
}
.option-checkbox-input::after {
    content: '';
    width: 8px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transform-origin: center;
    transition: transform 0.12s ease-out;
}
.option-checkbox-input:checked {
    background: var(--gold);
    border-color: var(--gold);
}
.option-checkbox-input:checked::after {
    transform: rotate(-45deg) scale(1);
}
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(185,157,117,0.12);
    color: var(--ink);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dimension-grid .option-card {
    min-height: 180px;
}

.dimension-info-description {
    position: relative;
    padding-left: 32px;
}

.dimension-info-description::before {
    content: '\2139';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0b766;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dimension-error {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #a62323;
    background: #ffecec;
    border: 1px solid #d93636;
    border-radius: 4px;
}

.section-helper {
    background: #ffecec;
    border: 1px solid #d93636;
    padding: 14px 16px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #a62323;
}

.section-helper--construction {
    position: relative;
    padding-left: 40px;
    background: #fff7e8;
    border-color: #e0b766;
    color: #8a5b15;
}

.section-helper--construction::before {
    content: '\2139';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0b766;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-chip {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.05);
    display: inline-block;
}
.color-option-media {
    height: 300px;
    aspect-ratio: auto;
}
.color-option-media img {
    height: 100%;
    object-fit: cover;
}

.compact-grid .option-card {
    min-height: 140px;
}

.technology-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
@media (min-width: 768px) {
    .technology-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.option-grid.stairs-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    margin-bottom: 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: auto;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}

.option-grid.stairs-grid::-webkit-scrollbar {
    height: 14px;
}

.option-grid.stairs-grid::-webkit-scrollbar-track {
    background: transparent;
}

.option-grid.stairs-grid::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

.stairs-grid .option-card {
    flex: 0 0 260px;
    min-height: 240px;
    scroll-snap-align: start;
}

/* Stairs slider arrows */
.stairs-slider {
    position: relative;
}

.stairs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    z-index: 2;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.stairs-arrow svg {
    width: 16px;
    height: 16px;
}

.stairs-arrow-left {
    left: -20px;
}

.stairs-arrow-right {
    right: -20px;
}

.stairs-arrow:hover {
    background: #fff;
    border-color: var(--gold);
    box-shadow: 0 12px 26px rgba(0,0,0,0.18);
    transform: translateY(-50%) translateY(-1px);
}

.stairs-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .option-grid.stairs-grid {
        gap: 14px;
    }

    .stairs-grid .option-card {
        flex-basis: 220px;
    }
}

.summary-and-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    align-items: stretch;
    width: 100%;
}

.summary-and-contact.has-success {
    grid-template-columns: 1fr;
}

.summary-success {
    border: 1px solid var(--border);
    background: #f9f7f2;
    padding: 40px 30px;
    text-align: center;
}

.summary-success-inner {
    max-width: 480px;
    margin: 0 auto;
}

.summary-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.summary-success-checkmark {
    display: inline-block;
    width: 20px;
    height: 10px;
    border-left: 3px solid var(--gold);
    border-bottom: 3px solid var(--gold);
    transform: rotate(-45deg);
}

.summary-success h3 {
    font-family: 'Marcellus', serif;
    font-size: 26px;
    margin: 0 0 10px;
}

.summary-success p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.contact-form {
    border: 1px solid var(--border);
    padding: 24px;
    min-width: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 16px;
}
.contact-field-full {
    grid-column: 1 / -1;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.contact-field input,
.contact-field textarea {
    border: 1px solid var(--border);
    padding: 12px;
    font-family: inherit;
    font-size: 15px;
}

.gdpr-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    margin: 18px 0;
}

.summary-panel {
    border: 1px solid var(--border);
    padding: 24px;
    background: var(--sand);
    min-width: 0;
}

.summary-panel h3 {
    margin-top: 0;
}

.summary-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.vat-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink);
}

.vat-selector label {
    font-weight: 500;
}

.vat-selector select {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    background-color: #fff;
    min-width: 170px;
}

@media (max-width: 640px) {
    .summary-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow: auto;
    padding-right: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.summary-row strong {
    font-weight: 600;
}

.summary-total {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.btn {
    border: none;
    background: var(--gold);
    color: #fff;
    padding: 14px 24px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.btn-primary {
    background: #b99d75;
    color: #fff;
    border: 1px solid #b99d75;
}

.btn-primary:hover {
    background: #9b825d;
    border-color: #9b825d;
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(185,157,117,0.08);
    border-color: #9b825d;
}

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

@media (max-width: 1024px) {
    .pool-calculator {
        margin: 25px auto;
        padding: 16px;
        width: 100%;
    }
    
    .calculator-step{
        border: none !important;
    }
    
    .step-index{
        font-size: 32px !important;
    }
    
    .step-heading h2 {
        font-size: 32px !important;
    }

    .calculator-layout {
        flex-direction: column;
        gap: 18px;
        width: 100%;
    }

    .calculator-step,
    .calculator-section,
    .calculator-layout > * {
        width: 100%;
    }

    .price-display {
        max-width: 100%;
        width: 100%;
    }

    .price-display-sticky {
        position: static;
    }

    .price-display-floating {
        right: 16px;
        bottom: 16px;
    }

    .summary-and-contact {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        width: 100%;
    }

    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .calculator-step {
        padding-bottom: 32px;
    }
}

@media (max-width: 680px) {
    .pool-calculator {
        margin: 15px auto;
        padding: 12px;
        width: 100%;
    }
    
    .calculator-step{
        border: none !important;
    }
    
    .step-index{
        font-size: 30px !important;
    }

    .calculator-layout,
    .calculator-layout > * {
        width: 100%;
    }

    .step-heading h2 {
        font-size: 30px !important;
    }

    .price-amount {
        font-size: 32px;
    }

    .option-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .option-card {
        padding: 14px;
        width: 100%;
    }

    .dimension-select {
        padding: 12px 14px;
        font-size: 15px;
    }

    .summary-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .price-display {
        padding: 22px;
    }

    .price-display-floating {
        left: 12px;
        right: 12px;
        bottom: 12px;
        min-width: unset;
        border-radius: 10px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .price-display-floating .price-amount {
        font-size: 19px;
    }

    .option-grid.stairs-grid {
        gap: 12px;
    }

    .stairs-grid .option-card {
        flex-basis: 200px;
    }
}
