/* assets/css/checkout.css */

* {
    box-sizing: border-box;
}

:root {
    --lux-bg: #fbf7ef;
    --lux-card: #fffdf8;
    --lux-card-soft: #fff7ec;
    --lux-border: #e8d9c4;
    --lux-border-strong: #d6b98d;
    --lux-text: #18120d;
    --lux-heading: #080604;
    --lux-muted: #7b6c5b;
    --lux-brown-soft: #8b6a43;
    --lux-gold-dark: #9b6415;
    --lux-green: #087a43;
    --lux-danger: #b3261e;
    --lux-black: #070707;
    --lux-black-soft: #161616;
    --lux-shadow: 0 24px 70px rgba(70, 47, 22, 0.12);
    --lux-soft-shadow: 0 14px 36px rgba(70, 47, 22, 0.09);
    --lux-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
    --lux-transition: 220ms ease;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(219, 174, 101, .18), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(255, 244, 225, .85), transparent 38%),
        linear-gradient(135deg, #fffdf9 0%, var(--lux-bg) 48%, #f7efe5 100%);
    color: var(--lux-text);
    font-family: "Inter", "Montserrat", Arial, sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
label,
select {
    cursor: pointer;
}

input,
select,
textarea {
    min-width: 0;
}

img {
    max-width: 100%;
    display: block;
}

.lux-checkout-page {
    min-height: 100vh;
    padding: 26px 32px 42px;
}

.checkout-shell {
    max-width: 1760px;
    margin: 0 auto;
}

.checkout-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 0 0 22px;
    border-bottom: 1px solid rgba(214, 185, 141, .56);
}

.checkout-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 24px;
}

.checkout-title-wrap h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 3vw, 54px);
    line-height: 1;
    font-weight: 500;
    letter-spacing: -1.3px;
    color: var(--lux-heading);
}

.checkout-title-wrap span {
    font-size: 15px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--lux-brown-soft);
    font-weight: 800;
}

.secure-badge {
    min-height: 54px;
    padding: 0 24px;
    border: 1px solid var(--lux-border);
    border-radius: 999px;
    background: rgba(255, 253, 248, .9);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--lux-soft-shadow);
    backdrop-filter: blur(14px);
    color: var(--lux-heading);
    font-size: 15px;
    font-weight: 900;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 28px;
    align-items: start;
    padding-top: 22px;
}

.checkout-main,
.summary-card {
    border: 1px solid rgba(232, 217, 196, .9);
    border-radius: 22px;
    background: rgba(255, 253, 248, .78);
    box-shadow: var(--lux-soft-shadow);
    backdrop-filter: blur(14px);
}

.checkout-main {
    padding: 20px;
}

.checkout-steps {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 0 56px 22px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.step-item strong {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--lux-border);
    background: #f8ead5;
    color: var(--lux-heading);
    font-size: 16px;
    box-shadow: var(--lux-inner-shadow);
}

.step-item.active strong {
    background: linear-gradient(145deg, #3a3a3a, var(--lux-black));
    color: #fff;
    border-color: var(--lux-black);
}

.step-item b {
    display: block;
    color: var(--lux-heading);
    font-size: 13px;
    margin-bottom: 4px;
}

.step-item span {
    display: block;
    color: var(--lux-muted);
    font-size: 12px;
}

.step-line {
    height: 1px;
    background: var(--lux-border);
}

.checkout-form {
    display: grid;
    gap: 14px;
}

.checkout-card {
    border: 1px solid rgba(232, 217, 196, .95);
    border-radius: 18px;
    background: rgba(255, 253, 248, .7);
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.card-heading > span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f8ead5;
    border: 1px solid var(--lux-border);
    color: var(--lux-brown-soft);
    font-size: 21px;
}

.card-heading h2 {
    margin: 0;
    color: var(--lux-heading);
    font-size: 20px;
    letter-spacing: -.2px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 28px;
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field.full,
.full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: var(--lux-heading);
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--lux-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, .94);
    color: var(--lux-text);
    outline: none;
    padding: 0 14px;
    box-shadow: var(--lux-inner-shadow);
    transition: var(--lux-transition);
}

.field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--lux-brown-soft) 50%), linear-gradient(135deg, var(--lux-brown-soft) 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--lux-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.field input::placeholder {
    color: #a79889;
}

.save-address {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--lux-text);
    font-size: 13px;
    font-weight: 650;
}

.save-address input {
    display: none;
}

.save-address span {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.8px solid #b98a42;
    background: #fff;
    position: relative;
}

.save-address input:checked + span {
    background: var(--lux-black);
    border-color: var(--lux-black);
}

.save-address input:checked + span::after {
    content: "✓";
    position: absolute;
    inset: 0;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.payment-option {
    min-height: 70px;
    border: 1px solid var(--lux-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .78);
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 13px;
    transition: var(--lux-transition);
    box-shadow: var(--lux-inner-shadow);
}

.payment-option input {
    display: none;
}

.payment-option i,
.pay-radio {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    color: var(--lux-heading);
    font-size: 20px;
}

.pay-radio {
    border-radius: 50%;
    border: 2px solid #6d6259;
    position: relative;
}

.payment-option.active .pay-radio::after,
.payment-option:has(input:checked) .pay-radio::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lux-black);
}

.payment-option div {
    min-width: 0;
}

.payment-option b {
    display: block;
    color: var(--lux-heading);
    font-size: 13px;
    margin-bottom: 4px;
}

.payment-option small {
    display: block;
    color: var(--lux-muted);
    font-size: 11px;
    line-height: 1.25;
}

.payment-option:hover,
.payment-option.active,
.payment-option:has(input:checked) {
    border-color: #bd8a42;
    background: #fffaf3;
    box-shadow: 0 10px 24px rgba(70, 47, 22, .08), inset 0 0 0 1px rgba(189, 138, 66, .4);
}

.payment-panel {
    padding-top: 4px;
}

.card-number-field,
.cvv-field {
    position: relative;
}

.card-number-field input {
    padding-right: 46px;
}

.card-number-field > i {
    position: absolute;
    right: 14px;
    bottom: 13px;
    color: #9c9186;
}

.cvv-field input {
    padding-right: 42px;
}

.cvv-field button {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 25px;
    height: 25px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #91877d;
}

.cod-note {
    min-height: 56px;
    border: 1px dashed var(--lux-border-strong);
    border-radius: 14px;
    background: #fff8ed;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    color: var(--lux-heading);
    font-weight: 800;
}

.checkout-alert {
    display: none;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid rgba(179, 38, 30, .22);
    background: #fff0ee;
    color: #9a1d17;
    font-weight: 800;
}

.checkout-alert.show {
    display: block;
}

.input-error {
    border-color: var(--lux-danger) !important;
    box-shadow: 0 0 0 3px rgba(179, 38, 30, .12) !important;
}

.checkout-summary-panel {
    position: sticky;
    top: 22px;
}

.summary-card {
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(227, 188, 104, .18), transparent 32%),
        rgba(255, 253, 248, .9);
    box-shadow: var(--lux-shadow);
}

.summary-card h3 {
    margin: 0 0 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--lux-border);
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--lux-heading);
    font-size: 22px;
}

.summary-card h3 i {
    color: #b48343;
}

.summary-products {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--lux-border);
}

.summary-product {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.summary-product-img {
    width: 74px;
    height: 74px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--lux-border);
    background: linear-gradient(145deg, #fff8ef, #ead8c2);
    display: grid;
    place-items: center;
}

.summary-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.summary-product-info {
    min-width: 0;
}

.summary-product-info strong {
    display: block;
    color: var(--lux-heading);
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.summary-product-info span,
.summary-product-info small {
    display: block;
    color: var(--lux-muted);
    font-size: 12px;
    line-height: 1.5;
}

.summary-product > b {
    color: var(--lux-heading);
    font-size: 14px;
    white-space: nowrap;
}

.summary-lines {
    display: grid;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid var(--lux-border);
}

.summary-lines div,
.grand-total-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.summary-lines span {
    color: #51483f;
    font-size: 14px;
}

.summary-lines strong {
    color: var(--lux-heading);
    font-size: 14px;
    font-weight: 900;
}

.grand-total-box {
    margin: 20px 0 18px;
    padding: 18px 20px;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff7eb, #f4e3cc);
}

.grand-total-box span {
    color: var(--lux-heading);
    font-size: 16px;
    font-weight: 900;
}

.grand-total-box strong {
    color: var(--lux-heading);
    font-size: 30px;
    line-height: 1;
}

.place-order-btn {
    width: 100%;
    min-height: 58px;
    padding: 0 26px;
    border: 0;
    border-radius: 13px;
    background: var(--lux-black);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: var(--lux-transition);
}

.place-order-btn:hover {
    background: var(--lux-black-soft);
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .24);
}

.place-order-btn.loading {
    pointer-events: none;
    opacity: .86;
}

.place-order-btn.loading i {
    animation: checkoutSpin .8s linear infinite;
}

.secure-note {
    margin: 14px 0 0;
    color: var(--lux-muted);
    font-size: 12px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.secure-note i {
    color: #b48343;
}

@keyframes checkoutSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1380px) {
    .checkout-layout {
        grid-template-columns: minmax(0, 1fr) 390px;
    }

    .checkout-steps {
        padding-inline: 20px;
        gap: 12px;
    }

    .payment-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .checkout-steps {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding-inline: 0;
    }

    .step-line {
        display: none;
    }

    .step-item {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }

    .step-item span {
        display: none;
    }

    .form-grid,
    .form-grid.three {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .lux-checkout-page {
        padding: 0 10px 28px;
    }

    .checkout-topbar {
        position: sticky;
        top: 0;
        z-index: 80;
        padding: 15px 6px;
        background: rgba(255, 253, 248, .94);
        backdrop-filter: blur(14px);
    }

    .checkout-title-wrap h1 {
        font-size: 30px;
    }

    .checkout-title-wrap span {
        display: none;
    }

    .secure-badge {
        min-height: 40px;
        padding: 0 13px;
        font-size: 0;
        box-shadow: none;
    }

    .secure-badge i {
        font-size: 16px;
    }

    .checkout-layout {
        padding-top: 14px;
        gap: 18px;
    }

    .checkout-main,
    .summary-card {
        border-radius: 18px;
    }

    .checkout-main,
    .summary-card,
    .checkout-card {
        padding: 15px;
    }

    .checkout-steps {
        padding-bottom: 15px;
    }

    .step-item strong {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .step-item b {
        font-size: 11px;
    }

    .card-heading {
        gap: 12px;
    }

    .card-heading > span {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .card-heading h2 {
        font-size: 18px;
    }

    .payment-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .payment-option {
        min-height: 62px;
    }

    .summary-product {
        grid-template-columns: 64px minmax(0, 1fr) auto;
    }

    .summary-product-img {
        width: 64px;
        height: 64px;
    }

    .grand-total-box strong {
        font-size: 27px;
    }
}

@media (max-width: 460px) {
    .checkout-topbar {
        gap: 10px;
    }

    .checkout-title-wrap h1 {
        font-size: 27px;
    }

    .checkout-steps {
        overflow-x: auto;
        justify-content: start;
        grid-template-columns: repeat(4, minmax(76px, 1fr));
        scrollbar-width: none;
    }

    .checkout-steps::-webkit-scrollbar {
        display: none;
    }

    .field input,
    .field select {
        min-height: 42px;
        font-size: 14px;
    }

    .summary-card h3 {
        font-size: 20px;
    }

    .summary-product {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .summary-product > b {
        grid-column: 2;
    }

    .summary-product-img {
        width: 58px;
        height: 58px;
        grid-row: span 2;
    }

    .place-order-btn {
        min-height: 54px;
        font-size: 15px;
    }
}