
/* =========================================
   ANNA ACCESORII NUNTĂ
   Checkout Page
   ========================================= */

.checkout-page {
    --checkout-accent: #b76f69;
    --checkout-accent-hover: #9f5b55;
    --checkout-text: #171717;
    --checkout-muted: #747474;
    --checkout-border: #e8e5e3;
    --checkout-soft: #faf5f4;

    background: #fff;
    color: var(--checkout-text);
    padding: 28px 24px 100px;
    font-family: Arial, Helvetica, sans-serif;
}

.checkout-page *,
.checkout-page *::before,
.checkout-page *::after {
    box-sizing: border-box;
}

.checkout-container {
    max-width: 1320px;
    margin: 0 auto;
}

/* Breadcrumb */

.checkout-breadcrumb {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    font-size: 14px;
}

.checkout-breadcrumb a {
    color: #777;
    text-decoration: none;
}

.checkout-breadcrumb a:hover {
    color: var(--checkout-accent);
}

.checkout-breadcrumb > span:last-child {
    color: var(--checkout-accent);
}

.checkout-breadcrumb > span:nth-child(2) {
    font-size: 22px;
    color: #999;
}

/* Main layout */

.checkout-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(350px, 0.92fr);
    align-items: start;
    gap: 22px;
}

.checkout-panel,
.checkout-summary {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--checkout-border);
    border-radius: 12px;
}

.checkout-panel {
    grid-column: 1;
    grid-row: 1;
    padding: 30px;
}

.checkout-summary {
    grid-column: 2;
    grid-row: 1;
    padding: 28px;
}

/* Form sections */

.checkout-section {
    border: 0;
    margin: 0 0 30px;
    padding: 0 0 30px;
    border-bottom: 1px solid var(--checkout-border);
    min-width: 0;
}

.checkout-section-last {
    padding-bottom: 0;
    margin-bottom: 26px;
    border-bottom: 0;
}

.checkout-section-title {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0 0 8px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #151515;
}

.checkout-section-description {
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--checkout-muted);
}

.checkout-optional {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--checkout-muted);
}

/* Fields */

.checkout-field {
    margin-bottom: 22px;
    min-width: 0;
}

.checkout-section .checkout-field:last-child {
    margin-bottom: 0;
}

.checkout-field label {
    display: block;
    margin-bottom: 11px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.required {
    color: var(--checkout-accent);
}

.checkout-input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 7px;
    background: #fff;
    color: #171717;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.checkout-input::placeholder {
    color: #aaa;
    opacity: 1;
}

.checkout-input:hover {
    border-color: #bcbcbc;
}

.checkout-input:focus {
    border-color: var(--checkout-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(183, 111, 105, 0.11);
}

.checkout-textarea {
    min-height: 92px;
    resize: vertical;
}

.checkout-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.checkout-field-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--checkout-muted);
}

.checkout-field-error {
    display: block;
    margin-top: 7px;
    color: #b42318;
    font-size: 12px;
    line-height: 1.5;
}

/* Delivery */

.checkout-delivery-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.checkout-delivery-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 12px 14px;
    border: 1px solid #dedede;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.checkout-delivery-option:hover {
    border-color: var(--checkout-accent);
}

.checkout-delivery-option:has(input:checked) {
    border-color: var(--checkout-accent);
    background: #fdf8f7;
}

.checkout-delivery-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--checkout-accent);
}

.checkout-address {
    margin-bottom: 24px;
}

.checkout-address[hidden] {
    display: none !important;
}

/* Privacy */

.checkout-privacy {
    margin: 0 0 24px;
}

.checkout-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.65;
    color: #555;
}

.checkout-checkbox-label input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 1px 0 0;
    accent-color: var(--checkout-accent);
    cursor: pointer;
}

.checkout-checkbox-label a {
    color: var(--checkout-accent);
    text-decoration: none;
}

.checkout-checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit */

.checkout-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    min-height: 58px;
    padding: 15px 22px;
    border: none;
    border-radius: 7px;
    background: var(--checkout-accent);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        opacity 0.2s ease;
}

.checkout-submit:hover {
    background: var(--checkout-accent-hover);
}

.checkout-submit:focus-visible {
    outline: 3px solid rgba(183, 111, 105, 0.4);
    outline-offset: 3px;
}

.checkout-submit.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.checkout-submit-arrow {
    font-size: 27px;
    line-height: 0.8;
    font-weight: 400;
}

.checkout-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 20px 0 0;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.checkout-security-note svg {
    flex-shrink: 0;
}

/* Order summary */

.checkout-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
}

.checkout-summary-header h2 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.3;
}

.checkout-edit-cart {
    color: var(--checkout-accent);
    font-size: 13px;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.checkout-edit-cart:hover {
    color: var(--checkout-accent-hover);
}

/* Products */

.checkout-summary-products {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 8px 0 30px;
    border-bottom: 1px solid var(--checkout-border);
}

.checkout-product {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    min-width: 0;
}

.checkout-product-image {
    width: 96px;
    height: 104px;
    overflow: hidden;
    border-radius: 9px;
    background: #f5f1ee;
}

.checkout-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #a38b83;
    font-family: Georgia, serif;
    font-size: 17px;
    letter-spacing: 0.15em;
}

.checkout-product-details {
    min-width: 0;
}

.checkout-product-details h3 {
    margin: 2px 0 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.checkout-product-subtitle {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--checkout-muted);
}

.checkout-product-quantity {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--checkout-muted);
}

.checkout-product-price {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

/* Totals */

.checkout-summary-totals {
    padding-top: 24px;
}

.checkout-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.checkout-summary-row span:last-child {
    text-align: right;
}

.checkout-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--checkout-border);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 23px;
    line-height: 1.3;
}

.checkout-summary-total strong {
    font-weight: 600;
}

.checkout-total-note {
    margin: 12px 0 0;
    color: var(--checkout-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* Benefits */

.checkout-benefits {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
    padding: 26px 22px;
    border-radius: 10px;
    background: #faf4f3;
}

.checkout-benefit {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.checkout-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #75453e;
}

.checkout-benefit-icon svg {
    display: block;
    width: 30px;
    height: 30px;
}

.checkout-benefit strong {
    display: block;
    margin-bottom: 5px;
    color: #4b302d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.checkout-benefit p {
    margin: 0;
    color: #777;
    font-size: 12px;
    line-height: 1.55;
}

/* Validation */

.checkout-alert {
    padding: 14px 16px;
    margin-bottom: 26px;
    border: 1px solid #efc7c3;
    border-radius: 6px;
    background: #fff7f6;
    color: #a3332a;
    font-size: 13px;
    line-height: 1.5;
}

/* Existing confirmation page */

.checkout-confirm {
    max-width: 700px;
    margin: 70px auto;
    padding: 40px;
    border: 1px solid var(--checkout-border);
    border-radius: 12px;
    background: #fff;
}

.checkout-confirm h1 {
    font-family: Georgia, serif;
    font-size: 36px;
}

.checkout-confirm dl div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--checkout-border);
}

.checkout-confirm dd {
    margin: 0;
    font-weight: 600;
}

.checkout-confirm .checkout-submit {
    margin-top: 26px;
    text-decoration: none;
}

/* Tablet */

@media (max-width: 1000px) {
    .checkout-grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(310px, 0.85fr);
        gap: 16px;
    }

    .checkout-panel,
    .checkout-summary {
        padding: 22px;
    }

    .checkout-product {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
    }

    .checkout-product-image {
        width: 78px;
        height: 90px;
    }
}

/* Mobile */

@media (max-width: 800px) {
    .checkout-page {
        padding: 22px 16px 70px;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .checkout-panel,
    .checkout-summary {
        padding: 24px;
    }

    .checkout-panel,
    .checkout-summary {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 520px) {
    .checkout-page {
        padding: 18px 12px 60px;
    }

    .checkout-breadcrumb {
        margin-bottom: 20px;
    }

    .checkout-panel,
    .checkout-summary {
        padding: 20px 16px;
        border-radius: 9px;
    }

    .checkout-section-title {
        font-size: 23px;
    }

    .checkout-section-description {
        font-size: 13px;
    }

    .checkout-two-columns,
    .checkout-delivery-options {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .checkout-delivery-options {
        gap: 10px;
    }

    .checkout-input {
        min-height: 50px;
        font-size: 16px;
    }

    .checkout-summary-header h2 {
        font-size: 22px;
    }

    .checkout-summary-total {
        font-size: 20px;
    }

    .checkout-product {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .checkout-product-image {
        width: 76px;
        height: 86px;
    }

    .checkout-product-details h3 {
        font-size: 14px;
    }

    .checkout-benefits {
        padding: 22px 16px;
    }

    .checkout-security-note {
        align-items: flex-start;
    }

    .checkout-confirm {
        margin: 30px 12px;
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .checkout-page *,
    .checkout-page *::before,
    .checkout-page *::after {
        transition: none !important;
    }
}
