﻿:root {
    --checkout-bg: #fffaf7;
    --checkout-surface: #ffffff;
    --checkout-ink: #221b1b;
    --checkout-muted: #756a68;
    --checkout-line: #eaded8;
    --checkout-brand: #b94f72;
    --checkout-brand-dark: #81384f;
    --checkout-success: #4d7a54;
    --checkout-radius: 16px;
    --checkout-shadow: 0 16px 46px rgba(55, 35, 35, .09);
}

.checkout-shell {
    color: var(--checkout-ink);
    background: var(--checkout-bg);
}

.checkout-container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.checkout-title {
    margin: 0 0 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
}

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

.checkout-card {
    border: 1px solid var(--checkout-line);
    border-radius: var(--checkout-radius);
    background: var(--checkout-surface);
    box-shadow: var(--checkout-shadow);
}

.checkout-card-header,
.checkout-card-body,
.checkout-summary-row,
.checkout-summary-total {
    padding: 20px;
}

.checkout-card-header {
    border-bottom: 1px solid var(--checkout-line);
}

.checkout-card-header h2 {
    margin: 0;
    font-size: 18px;
}

.checkout-items {
    display: grid;
    gap: 16px;
}

.checkout-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--checkout-line);
    border-radius: 14px;
    background: #fff;
}

.checkout-item img {
    width: 92px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
    background: #f4ece8;
}

.checkout-item h3 {
    margin: 0;
    font-size: 16px;
}

.checkout-item p {
    margin: 6px 0 0;
    color: var(--checkout-muted);
    font-size: 13px;
    line-height: 1.45;
}

.checkout-qty {
    display: inline-grid;
    grid-template-columns: 34px 44px 34px;
    overflow: hidden;
    border: 1px solid var(--checkout-line);
    border-radius: 999px;
}

.checkout-qty button,
.checkout-qty input {
    height: 34px;
    border: 0;
    background: #fff;
    text-align: center;
}

.checkout-qty button {
    color: var(--checkout-brand-dark);
    font-weight: 800;
}

.checkout-price {
    display: block;
    margin-top: 8px;
    color: var(--checkout-brand);
    font-weight: 800;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkout-field {
    display: grid;
    gap: 7px;
}

.checkout-field.is-wide {
    grid-column: 1 / -1;
}

.checkout-field label {
    color: var(--checkout-muted);
    font-size: 13px;
    font-weight: 700;
}

.checkout-field input,
.checkout-field select,
.checkout-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--checkout-line);
    border-radius: 12px;
    background: #fff;
    color: var(--checkout-ink);
}

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

.checkout-summary {
    position: sticky;
    top: 110px;
}

.checkout-summary-row,
.checkout-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--checkout-line);
    color: var(--checkout-muted);
}

.checkout-summary-total {
    border-bottom: 0;
    color: var(--checkout-ink);
    font-size: 20px;
    font-weight: 800;
}

.checkout-steps {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.checkout-step {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--checkout-line);
    border-radius: 999px;
    background: #fff;
    color: var(--checkout-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.checkout-step.is-active {
    color: #fff;
    background: var(--checkout-brand);
    border-color: var(--checkout-brand);
}

.checkout-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--checkout-brand);
    border-radius: 999px;
    background: var(--checkout-brand);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.checkout-btn:hover {
    color: #fff;
    background: var(--checkout-brand-dark);
    border-color: var(--checkout-brand-dark);
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .checkout-container {
        width: min(100% - 24px, 1160px);
    }

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

    .checkout-item > :last-child {
        grid-column: 1 / -1;
    }

    .checkout-form-grid {
        grid-template-columns: 1fr;
    }

    .checkout-steps {
        overflow-x: auto;
    }

    .checkout-step {
        min-width: 130px;
    }
}

.checkout-art-field {
    margin-top: 12px;
}

.checkout-art-preview {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--checkout-line);
    border-radius: 12px;
    background: #fff;
}

.checkout-art-preview img {
    width: 74px;
    height: 74px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.checkout-art-preview strong {
    display: block;
    margin-bottom: 8px;
    color: var(--checkout-ink);
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.checkout-upload-box {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0 16px;
    border: 1px dashed var(--checkout-brand);
    border-radius: 999px;
    color: var(--checkout-brand-dark);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.checkout-upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
