/* ══════════════════════════════════════
   CHECKOUT PAGE — checkout.css
   Matches Figma node 100:803
   ══════════════════════════════════════ */

.checkout-page {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ── Breadcrumb ── */
.co-breadcrumb {
    background: #fafafa;
    border-top: 1px solid #efefef;
    border-bottom: 1px solid #efefef;
    padding: 14px 0;
    margin-top: 172px;
}

@media (max-width: 1024px) {
    .co-breadcrumb {
        margin-top: 77px;
    }
}

.co-breadcrumb__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.co-breadcrumb__left,
.co-breadcrumb__right {
    font-family: var(--font-primary);
    font-size: 14px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .co-breadcrumb__left,
    .co-breadcrumb__right {
        font-size: 12px;
        letter-spacing: 1px;
    }
}

/* ── Layout ── */
.co-section {
    padding: 48px 0 80px;
    overflow-x: hidden;
}

.co-layout {
    display: grid;
    grid-template-columns: 1fr 570px;
    gap: 0;
    align-items: start;
}

/* ── Left Column ── */
.co-left {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-right: 1px solid #efefef;
    padding-right: 36px;
}

/* ── Block (Delivery / Shipping / Payment) ── */
.co-block {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid #efefef;
}

.co-block--last {
    border-bottom: none;
    margin-bottom: 0;
}

.co-block__title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #2a190e;
    margin: 0 0 24px;
}

/* ── Form ── */
.co-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.co-form__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.co-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.co-field__label {
    font-family: var(--font-primary);
    font-size: 11px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #2a190e;
}

.co-field__input {
    height: 50px;
    border: 1px solid #efefef;
    background: #fff;
    padding: 0 16px;
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #2a190e;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    width: 100%;
}

.co-field__input:focus {
    border-color: #2a190e;
}

.co-field__input::placeholder {
    color: rgba(42, 25, 14, 0.5);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.1px;
}

/* ── Shipping Note ── */
.co-shipping__note {
    font-family: var(--font-primary);
    font-size: 13px;
    color: rgba(42, 25, 14, 0.5);
    line-height: 1.8;
    letter-spacing: 0.3px;
    margin: 0;
}

/* ── Payment ── */
.co-payment__note {
    font-family: var(--font-primary);
    font-size: 12px;
    color: rgba(42, 25, 14, 0.5);
    letter-spacing: 0.5px;
    margin: 0 0 16px;
}

/* ── Payment blocks ── */
.co-payment__block {
    border: 1px solid #efefef;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.co-payment__block--active {
    border-color: #af6f44;
}

.co-payment__tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
}

.co-payment__tab-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.co-payment__tab-label {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #2a190e;
}

.co-payment__tab-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.co-card-icon {
    height: 24px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.co-card-icon--paypal {
    height: 24px;
    width: 70px;
}

.co-card-more {
    font-family: var(--font-primary);
    font-size: 11px;
    color: #2a190e;
    letter-spacing: 0.5px;
    border: 1px solid #efefef;
    padding: 2px 6px;
}

/* ── Radio Button ── */
.co-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #efefef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.co-radio--selected {
    border-color: #af6f44;
    position: relative;
}

.co-radio--selected::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #af6f44;
    border-radius: 50%;
}

/* ── Credit Card Fields ── */
.co-payment__card-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fafafa;
    border-top: 1px solid #efefef;
}

/* ── Checkbox ── */
.co-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.co-checkbox input[type="checkbox"] {
    display: none;
}

.co-checkbox__box {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #c8b8ae;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Checked state: filled circle with checkmark */
.co-checkbox input[type="checkbox"]:checked + .co-checkbox__box {
    background: var(--color-brand, #af6f44);
    border-color: var(--color-brand, #af6f44);
}

.co-checkbox input[type="checkbox"]:checked + .co-checkbox__box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* Hide SVG — we use CSS ::after checkmark instead */
.co-checkbox__box svg {
    display: none;
}

.co-checkbox__label {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 1.2px;
    color: rgba(42, 25, 14, 0.5);
    text-transform: uppercase;
}

/* ── Shop Pay ── */
.co-shop-pay {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.co-shop-pay__text {
    font-family: var(--font-primary);
    font-size: 16px;
    color: rgba(42, 25, 14, 0.5);
    line-height: 1.4;
    letter-spacing: 1.6px;
    margin: 0;
    max-width: 420px;
    width: 100%;
}

.co-shop-pay__text a {
    color: rgba(42, 25, 14, 0.5);
    text-decoration: underline;
}

.co-shop-pay__btn {
    background: none;
    border: none;
    border-bottom: 1px solid #af6f44;
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 1.24px;
    text-transform: uppercase;
    color: #af6f44;
    cursor: pointer;
    padding: 4px 0;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── Pay Now Button ── */
.co-pay-btn {
    display: block;
    width: 100%;
    background: #af6f44;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 16px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    text-align: center;
    border: none;
    height: 52px;
    cursor: pointer;
    transition: background 0.2s;
}

.co-pay-btn:hover {
    background: #9a6038;
}

/* ── Footer Links ── */
.co-footer-links {
    display: flex;
    gap: 23px;
    margin-top: 62px;
    flex-wrap: wrap;
}

.co-footer-links a {
    font-family: var(--font-primary);
    font-size: 14px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #2a190e;
    text-decoration: underline;
}

.co-footer-links a:hover {
    color: #2a190e;
}

/* ── Right Column: Order Summary ── */
.co-right {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: 24px;
    padding-left: 36px;
}

/* ── Order Items ── */
.co-order-item {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    align-items: flex-start;
    position: relative;
}

.co-order-item__image {
    width: 131px;
    height: 131px;
    border: 1px solid #efefef;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.co-order-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.co-order-item__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
    padding-right: 28px;
}

.co-order-item__name {
    font-family: var(--font-primary);
    font-size: 13px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #2a190e;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
    max-width : 228px;
    width: 100%;
}

.co-order-item__price {
    font-family: var(--font-primary);
    font-size: 13px;
    letter-spacing: 1.3px;
    color: #af6f44;
    margin: 0;
}

.co-order-item__remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
    position: absolute;
    top: 20px;
    right: 0;
    line-height: 0;
}

.co-order-item__remove:hover {
    opacity: 1;
}

/* ── Qty Stepper ── */
.co-order-item__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.co-order-item__qty {
    display: flex;
    align-items: center;
    border: 1px solid #efefef;
    height: 44px;
    width: 80px;
    overflow: hidden;
    flex-shrink: 0;
}

.co-qty-value {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #2a190e;
    padding: 0 0 0 15px;
    line-height: 44px;
    flex: 1;
    text-align: left;
    display: block;
}

.co-qty-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-right: 8px;
    gap: 2px;
}

.co-qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    transition: opacity 0.15s;
    line-height: 1;
}

.co-qty-btn:hover {
    opacity: 0.6;
}

/* ── Wishlist ── */
.co-order-item__wishlist {
    background: none;
    border: 1px solid #efefef;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.co-order-item__wishlist svg {
    width: 30px;
    height: 30px;
}

.co-order-item__wishlist:hover {
    border-color: #2a190e;
}

.co-order-divider {
    height: 1px;
    background: #efefef;
    width: 100%;
}

/* ── Discount ── */
.co-discount {
    display: flex;
    gap: 10px;
    padding: 20px 0;
    align-items: center;
}

.co-discount__input {
    flex: 1;
    height: 50px;
    border: 1px solid #efefef;
    background: #fff;
    padding: 0 16px;
    font-family: var(--font-primary);
    font-size: 11px;
    letter-spacing: 1px;
    color: #2a190e;
    text-transform: uppercase;
    outline: none;
    box-sizing: border-box;
}

.co-discount__input::placeholder {
    color: rgba(42, 25, 14, 0.5);
    text-transform: uppercase;
}

.co-discount__btn {
    height: 50px;
    width: 206px;
    background: #af6f44;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 16px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.co-discount__btn:hover {
    background: #9a6038;
}

/* ── Totals ── */
.co-totals {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.co-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.co-totals__label {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #2a190e;
}

.co-totals__label--total {
    font-size: 16px;
    letter-spacing: 1.6px;
}

.co-totals__value {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #2a190e;
    text-align: right;
}

.co-totals__value--muted {
    color: rgba(42, 25, 14, 0.5);
    font-size: 12px;
}

.co-totals__value--total {
    font-size: 16px;
    letter-spacing: 1.6px;
}

.co-totals__row--total {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}

.co-totals__tax {
    font-family: var(--font-primary);
    font-size: 12px;
    color: rgba(42, 25, 14, 0.5);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-align: left;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .co-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .co-left {
        border-right: none;
        padding-right: 0;
    }

    .co-right {
        position: static;
        order: -1;
        border-bottom: 1px solid #efefef;
        padding-bottom: 40px;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .co-section {
        padding: 32px 0 60px;
    }

    .co-form__row--half {
        grid-template-columns: 1fr;
    }

    .co-footer-links {
        gap: 16px;
    }

    .co-order-item__image {
        width: 90px;
        height: 90px;
    }

    .co-discount {
        flex-wrap: wrap;
    }

    .co-discount__input {
        flex: 1 1 100%;
    }

    .co-discount__btn {
        width: 100%;
    }

    .co-order-item__name {
        max-width: 100%;
    }
}
