/* ==========================================================================
   Checkout — Hair By Jana
   Depends on tokens defined in global.css (--primary-green, --matte-black,
   --pure-white, --body-text, --font-heading, --font-body)
   ========================================================================== */

/* ---------- Shared Nav (duplicated per page, matching site convention) ---------- */
.navbar {
    background: var(--matte-black);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 40px;
    height: 120px;
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid rgba(156, 175, 136, 0.2);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links.left {
    justify-content: flex-end;
    margin-right: 40px;
}

.nav-links.right {
    justify-content: flex-start;
    margin-left: 40px;
}

.nav-links a {
    color: var(--primary-green);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.nav-links a:hover {
    color: var(--pure-white);
}

.logo-container {
    width: 180px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nav-shopping-bag-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-shopping-bag-icon-wrapper svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-green);
    transition: fill 0.3s ease;
}

.nav-shopping-bag-icon-wrapper:hover svg {
    fill: var(--pure-white);
}

.shopping-bag-numerical-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background-color: var(--primary-green);
    color: var(--matte-black);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-light {
    display: inline-block;
    padding: 14px 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: var(--body-text);
    font-family: var(--font-body);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-decoration: none;
    text-align: center;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.mono-value {
    font-family: 'Consolas', 'SFMono-Regular', Menlo, monospace;
}

/* ---------- Page Container ---------- */
.checkout-container {
    background-color: var(--matte-black);
    padding: 40px 8% 100px 8%;
    max-width: 1400px;
    margin: 0 auto;
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.checkout-title {
    font-family: var(--font-heading);
    color: var(--pure-white);
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.checkout-back-btn {
    padding: 12px 28px;
    font-size: 0.75rem;
}

/* ---------- Empty Cart State ---------- */
.checkout-empty-state {
    text-align: center;
    padding: 80px 30px;
    color: rgba(255, 255, 255, 0.6);
}

.checkout-empty-state p {
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ---------- Two-Column Layout ---------- */
.checkout-columns {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    align-items: start;
}

.checkout-main-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.checkout-section {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 30px;
}

.checkout-section-title {
    font-family: var(--font-heading);
    color: var(--pure-white);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

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

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.checkout-field-narrow {
    max-width: 140px;
}

.checkout-label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.checkout-input {
    padding: 12px 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--pure-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.checkout-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(156, 175, 136, 0.2);
}

.checkout-expiry-row {
    display: flex;
    gap: 10px;
}

.checkout-security-note {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    margin-top: 4px;
}

/* ---------- Order Summary Sidebar ---------- */
.checkout-summary-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 30px;
}

.checkout-summary-card {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 30px;
}

.checkout-order-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 24px;
}

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

.checkout-order-item-thumb {
    width: 50px;
    height: 60px;
    background-color: var(--pure-white);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.checkout-order-item-thumb .product-card-no-image {
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.5rem;
    text-align: center;
    letter-spacing: 0;
}

.checkout-order-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.checkout-order-item-name {
    font-family: var(--font-body);
    color: var(--pure-white);
    font-size: 0.85rem;
}

.checkout-order-item-qty {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.checkout-order-item-total {
    font-family: var(--font-body);
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.checkout-shipping-block {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
    margin-bottom: 20px;
}

.checkout-shipping-label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.checkout-radio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    color: var(--body-text);
    font-size: 0.85rem;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkout-radio-row input[type="radio"] {
    accent-color: var(--primary-green);
}

.checkout-shipping-fee {
    margin-left: auto;
    color: var(--primary-green);
    font-weight: 600;
}

.checkout-intl-note {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.5;
    margin-top: 8px;
}

.checkout-totals {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
    margin-bottom: 24px;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-body);
    color: var(--body-text);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.checkout-total-final {
    color: var(--pure-white);
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    margin-top: 4px;
}

.checkout-pay-btn {
    width: 100%;
    margin-top: 0;
}

.checkout-accepted-card {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 20px 24px;
}

.checkout-accepted-label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.checkout-accepted-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checkout-accepted-badge {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--body-text);
}

/* ---------- Confirmation State ---------- */
.checkout-confirmation {
    text-align: center;
    padding: 90px 30px;
}

.checkout-confirmation-title {
    font-family: var(--font-heading);
    color: var(--primary-green);
    font-size: 2.2rem;
    margin-bottom: 18px;
}

.checkout-confirmation-text {
    font-family: var(--font-body);
    color: var(--body-text);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto 20px auto;
    line-height: 1.7;
}

.checkout-order-ref {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 30px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
    .checkout-columns {
        grid-template-columns: 1fr;
    }

    .checkout-summary-column {
        position: static;
    }
}

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

    .checkout-field-narrow {
        max-width: none;
    }

    .checkout-container {
        padding: 24px 6% 60px 6%;
    }

    .checkout-title {
        font-size: 1.6rem;
    }
}
