/*=======================================================
    HOORATOOR — CHECKOUT PAGE
    Extends the existing site theme (style.css).
    Palette:
      Black      #000001
      Gold       #9A7B4F
      Gold Light #C6B184
      Cream      #F5F3EF
      Border     #d6d0c7 / #e8e8e8
=======================================================*/

.checkout-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 90px;
}

/*=================================
        BREADCRUMB / TOPBAR
=================================*/

.checkout-topbar {
    padding: 22px 0 26px;
    border-bottom: 1px solid #ececec;
    margin-bottom: 40px;
}

.checkout-topbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-crumb {
    color: #777;
    font-size: 13px;
    text-decoration: none;
    transition: color .3s ease;
}

.checkout-crumb:hover {
    color: #9A7B4F;
}

.checkout-crumb-sep {
    color: #ccc;
    font-size: 12px;
}

.checkout-crumb-current {
    color: #000001;
    font-size: 13px;
    font-weight: 600;
}

.checkout-secure {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #9A7B4F;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .8px;
}

.checkout-secure svg {
    width: 16px;
    height: 16px;
}

/*=================================
        CHECKOUT GRID
=================================*/

.checkout-grid[hidden] {
    display: none;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 60px;
}

/*=================================
        LEFT: FORM COLUMN
=================================*/

.checkout-form-col {
    min-width: 0;
}

.checkout-section {
    padding-bottom: 34px;
    margin-bottom: 34px;
    border-bottom: 1px solid #ececec;
}

.checkout-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-section-title {
    font-family: Georgia, serif;
    font-size: 20px;
    color: #000001;
    margin-bottom: 22px;
    letter-spacing: .3px;
}

.checkout-field {
    margin-bottom: 18px;
}

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

.checkout-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.checkout-optional {
    color: #999;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
}

.checkout-field input[type="text"],
.checkout-field input[type="tel"],
.checkout-field textarea {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid #d6d0c7;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #000001;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.checkout-field textarea {
    height: auto;
    min-height: 96px;
    padding: 14px 16px;
    line-height: 1.6;
    resize: vertical;
}

.checkout-field input::placeholder,
.checkout-field textarea::placeholder {
    color: #a8a29a;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
    border-color: #9A7B4F;
    box-shadow: 0 0 0 3px rgba(154, 123, 79, .12);
}

/* ---------- Payment Method ---------- */

.checkout-payment-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #9A7B4F;
    border-radius: 10px;
    background: #FBF9F5;
}

.checkout-payment-option input[type="radio"] {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    accent-color: #9A7B4F;
    cursor: default;
}

.checkout-payment-option label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: default;
}

.checkout-payment-name {
    font-family: Georgia, serif;
    font-size: 15px;
    color: #000001;
}

.checkout-payment-note {
    font-size: 12px;
    color: #8a8a8a;
}

/*=================================
        RIGHT: ORDER SUMMARY
=================================*/

.checkout-summary-col {
    min-width: 0;
    position: sticky;
    top: 100px;
}

.checkout-summary {
    background: #F5F3EF;
    border: 1px solid #e8e2d6;
    border-radius: 14px;
    padding: 32px;
}

.checkout-summary-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid #e8e2d6;
}

.checkout-summary-logo img {
    width: 110px;
    height: auto;
    object-fit: contain;
}

/* ---------- Order Items ---------- */

.checkout-order-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.checkout-order-item {
    display: flex;
    gap: 14px;
}

.checkout-order-item-img {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e2d6;
}

.checkout-order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-order-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.checkout-order-item-name {
    font-family: Georgia, serif;
    font-size: 14px;
    color: #000001;
    line-height: 1.4;
}

.checkout-order-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkout-order-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-order-item-qty span {
    font-size: 12px;
    color: #777;
    min-width: 14px;
    text-align: center;
}

.checkout-qty-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6d0c7;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: .25s ease;
}

.checkout-qty-btn:hover {
    background: #9A7B4F;
    color: #fff;
    border-color: #9A7B4F;
}

.checkout-order-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #9A7B4F;
    white-space: nowrap;
}

/* ---------- Totals ---------- */

.checkout-totals {
    padding-top: 20px;
    border-top: 1px solid #e8e2d6;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
}

.checkout-totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.checkout-totals-row span:last-child {
    color: #333;
    font-weight: 500;
}

.checkout-totals-total {
    padding-top: 12px;
    border-top: 1px dashed #d6d0c7;
}

.checkout-totals-total span:first-child {
    font-family: Georgia, serif;
    font-size: 15px;
    color: #000001;
    font-weight: 400;
}

.checkout-totals-total span:last-child {
    font-family: Georgia, serif;
    font-size: 24px;
    color: #000001;
    font-weight: 700;
}

/* ---------- Place Order Button ---------- */

.checkout-place-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 8px;
    background: #9A7B4F;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s ease, transform .15s ease;
}

.checkout-place-order:hover {
    background: #000001;
}

.checkout-place-order:active {
    transform: scale(.98);
}

.checkout-place-order:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.checkout-error {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fdf1ee;
    border: 1px solid #f2c8bd;
    color: #9c3b25;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.checkout-summary-note {
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
    color: #999;
    letter-spacing: .3px;
}

/*=================================
        SUCCESS STATE
        (hidden by default via the [hidden] attribute —
        checkout.js removes it only after a successful
        Place Order submission)
=================================*/

.checkout-success[hidden] {
    display: none;
}

.checkout-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    animation: checkoutFadeIn .5s ease;
}

.checkout-success-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #9A7B4F;
    color: #fff;
    font-size: 28px;
    margin-bottom: 24px;
}

.checkout-success h2 {
    font-family: Georgia, serif;
    font-size: 28px;
    color: #000001;
    margin-bottom: 14px;
}

.checkout-success p {
    color: #666;
    font-size: 14px;
    max-width: 440px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.checkout-success-btn {
    display: inline-block;
    width: auto;
    padding: 15px 34px;
}

@keyframes checkoutFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*=======================================================
        RESPONSIVE — TABLET
=======================================================*/

@media (max-width: 1030px) {

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

    .checkout-summary-col {
        position: static;
        order: -1;
    }

    .checkout-page {
        padding-top: 4px;
    }
}

/*=======================================================
        RESPONSIVE — MOBILE
=======================================================*/

@media (max-width: 576px) {

    .checkout-page {
        padding: 0 16px 70px;
    }

    .checkout-topbar {
        padding: 16px 0 18px;
        margin-bottom: 28px;
    }

    .checkout-secure span {
        display: none;
    }

    .checkout-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .checkout-summary {
        padding: 22px;
    }

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

    .checkout-place-order {
        height: 52px;
    }
}
