/* =============================================================================
   VOUCHER PRODUCT PAGE — MOA Studio
   Ładowany tylko na stronie produktu-vouchera
   ============================================================================= */

/* ---- Layout główny -------------------------------------------------------- */

.voucher-product {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 60px;
}

@media (min-width: 992px) {
    .voucher-product {
        flex-direction: row;
        align-items: flex-start;
        gap: 0;
        padding-bottom: 80px;
    }
}

/* ---- Lewa kolumna: sticky image ------------------------------------------ */

.voucher-image {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .voucher-image {
        width: 50%;
        position: sticky;
        top: 120px; /* wysokość headera */
        align-self: flex-start;
    }
}

.voucher-image__inner {
    border-radius: 20px;
    overflow: hidden;
    line-height: 0;
}

.voucher-image__photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

@media (min-width: 992px) {
    .voucher-image__photo {
        aspect-ratio: 3 / 4;
    }
}

/* ---- Prawa kolumna: formularz --------------------------------------------- */

.voucher-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 992px) {
    .voucher-details {
        width: 50%;
        padding-left: 64px;
        padding-top: 8px;
    }
}

/* ---- Tytuł produktu ------------------------------------------------------- */

.voucher-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--chocolate);
    line-height: 1.2;
    margin: 0;
}

/* ---- Opis ----------------------------------------------------------------- */

.voucher-description {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.7;
}

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

/* ---- Suwak wartości ------------------------------------------------------- */

.voucher-slider-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.voucher-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.voucher-slider-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gray);
}

.voucher-amount-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.voucher-amount-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--terracotta);
    line-height: 1;
    transition: var(--transition);
}

.voucher-amount-currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--terracotta);
}

/* Custom range slider */
.voucher-slider-track-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voucher-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        var(--terracotta) 0%,
        var(--terracotta) var(--slider-progress, 0%),
        #e0d0c8 var(--slider-progress, 0%),
        #e0d0c8 100%
    );
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 10px 0;
}

/* Thumb - WebKit (Chrome, Safari, Edge) */
.voucher-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--terracotta);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background 0.15s ease;
}

.voucher-slider-input::-webkit-slider-thumb:hover,
.voucher-slider-input::-webkit-slider-thumb:active {
    background: var(--coral);
    transform: scale(1.15);
}

/* Thumb - Firefox */
.voucher-slider-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--terracotta);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background 0.15s ease;
}

.voucher-slider-input::-moz-range-thumb:hover {
    background: var(--coral);
    transform: scale(1.15);
}

/* Track - Firefox */
.voucher-slider-input::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: #e0d0c8;
}

.voucher-slider-input::-moz-range-progress {
    height: 4px;
    border-radius: 2px 0 0 2px;
    background: var(--terracotta);
}

.voucher-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    opacity: 0.7;
}

/* ---- Pole "Dla:" ---------------------------------------------------------- */

.voucher-recipient-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voucher-recipient-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gray);
}

.voucher-recipient-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0d0c8;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--chocolate);
    background: var(--white);
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.voucher-recipient-input::placeholder {
    color: #c0b0a8;
}

.voucher-recipient-input:focus {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(173, 138, 116, 0.15);
}

/* ---- Odbiór osobisty ------------------------------------------------------ */

.voucher-pickup-section {
    margin-top: -8px;
}

.voucher-pickup-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    padding: 16px 18px;
    border: 2px solid #e0d0c8;
    border-radius: 12px;
    transition: var(--transition);
}

.voucher-pickup-label:hover {
    border-color: var(--terracotta);
    background: rgba(173, 138, 116, 0.04);
}

.voucher-pickup-label:has(.voucher-pickup-checkbox:checked) {
    border-color: var(--terracotta);
    background: rgba(173, 138, 116, 0.06);
}

/* Custom checkbox */
.voucher-pickup-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #c0b0a8;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    transition: var(--transition);
    position: relative;
    background: var(--white);
}

.voucher-pickup-checkbox:checked {
    background: var(--terracotta);
    border-color: var(--terracotta);
}

.voucher-pickup-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 0px;
    width: 7px;
    height: 12px;
    border: 2px solid var(--white);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.voucher-pickup-text {
    font-size: 14px;
    color: var(--chocolate);
    line-height: 1.5;
}

.voucher-pickup-address {
    display: block;
    font-size: 12px;
    color: var(--gray);
    opacity: 0.8;
    margin-top: 2px;
}

/* ---- Przycisk i info ------------------------------------------------------ */

.voucher-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.voucher-submit {
    width: 100%;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.voucher-submit:disabled,
.voucher-submit.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.voucher-delivery-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    margin: 0;
}

.voucher-delivery-info i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--terracotta);
}

/* ---- Komunikat błędu/sukcesu ---------------------------------------------- */

.voucher-message {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.voucher-message.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.voucher-message.is-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ---- Ukryj domyślne elementy WC ------------------------------------------ */

.voucher-product .woocommerce-breadcrumb,
.voucher-product .woocommerce-product-rating,
.voucher-product .woocommerce-tabs,
.voucher-product .related {
    display: none !important;
}
