/**
 * ALJA Multi-Step Checkout — Premium CSS
 * Inspired by Wecandoo. ALJA brand palette. BEM naming.
 *
 * Table of contents:
 *  1. Layout
 *  2. Stepper bar
 *  3. Step panels + animations
 *  4. Forms (floating labels)
 *  5. Auth (login / guest tabs)
 *  6. Cart review (step 1)
 *  7. Coupon
 *  8. Sidebar order summary
 *  9. Payment gateways
 * 10. Buttons
 * 11. Trust badges
 * 12. Empty cart
 * 13. Info recap
 * 14. Utilities + responsive
 */

/* ─────────────────────────────────────────
   1. Layout
───────────────────────────────────────── */
.alja-checkout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    font-family: 'Inter', system-ui, sans-serif;
}

.alja-checkout__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

@media (min-width: 1024px) {
    .alja-checkout__layout {
        grid-template-columns: 1fr 380px;
        align-items: start;
    }
}

/* ─────────────────────────────────────────
   2. Stepper bar
───────────────────────────────────────── */
.alja-checkout__stepper {
    background: #fff;
    border-radius: var(--alja-radius-xl);
    padding: 1.25rem 1.75rem;
    box-shadow: var(--alja-shadow-sm);
    border: 1px solid var(--alja-gray-200);
}

.alja-checkout__stepper-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.alja-stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    cursor: default;
    flex-shrink: 0;
    min-width: 60px;
}

.alja-stepper__circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    border: 2px solid var(--alja-gray-200);
    background: #fff;
    color: var(--alja-gray-400);
    transition: all 250ms ease;
    position: relative;
}

.alja-stepper__check { display: none; }
.alja-stepper__number { display: block; }

.alja-stepper__step--active .alja-stepper__circle {
    border-color: var(--alja-primary);
    background: var(--alja-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(58, 138, 106, 0.18);
}

.alja-stepper__step--completed .alja-stepper__circle {
    border-color: var(--alja-primary);
    background: var(--alja-primary);
    color: #fff;
}

.alja-stepper__step--completed .alja-stepper__number { display: none; }
.alja-stepper__step--completed .alja-stepper__check  { display: block; }

.alja-stepper__step--skipped .alja-stepper__circle {
    opacity: 0.4;
}

.alja-stepper__label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--alja-gray-400);
    transition: color 250ms ease;
    text-align: center;
    white-space: nowrap;
}

.alja-stepper__step--active .alja-stepper__label,
.alja-stepper__step--completed .alja-stepper__label {
    color: var(--alja-charcoal);
}

.alja-stepper__step--active .alja-stepper__label {
    color: var(--alja-primary);
    font-weight: 700;
}

.alja-stepper__connector {
    flex: 1;
    padding: 0 0.5rem;
    min-width: 24px;
    margin-bottom: 1.2rem; /* align with circles visually */
}

.alja-stepper__connector-line {
    height: 2px;
    background: var(--alja-gray-200);
    border-radius: 2px;
    transition: background 250ms ease;
    position: relative;
    overflow: hidden;
}

.alja-stepper__connector-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--alja-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms ease;
}

.alja-stepper__connector--active .alja-stepper__connector-line::after { transform: scaleX(1); }

/* ─────────────────────────────────────────
   3. Step panels + animations
───────────────────────────────────────── */
.alja-checkout__step {
    background: #fff;
    border-radius: var(--alja-radius-xl);
    padding: 2rem;
    box-shadow: var(--alja-shadow-md);
    border: 1px solid var(--alja-gray-200);
    animation: alja-step-in 320ms ease forwards;
}

@keyframes alja-step-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes alja-step-out {
    from { opacity: 1; transform: translateY(0);    }
    to   { opacity: 0; transform: translateY(-16px); }
}

.alja-checkout__step.is-exiting {
    animation: alja-step-out 200ms ease forwards;
}

.alja-checkout__step-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--alja-gray-200);
}

.alja-checkout__step-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--alja-charcoal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.375rem;
}

.alja-checkout__step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, var(--alja-primary), #2A6B7C);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50%;
}

.alja-checkout__step-subtitle {
    font-size: 0.9rem;
    color: var(--alja-gray-600);
    margin: 0;
}

.alja-checkout__step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--alja-gray-200);
    gap: 1rem;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   4. Forms (floating labels)
───────────────────────────────────────── */
.alja-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.alja-form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.alja-form-group:last-child { margin-bottom: 0; }

.alja-input,
.alja-select,
.alja-textarea {
    width: 100%;
    padding: 1.125rem 1rem 0.5rem;
    border: 1.5px solid var(--alja-gray-200);
    border-radius: var(--alja-radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--alja-charcoal);
    background: #fff;
    outline: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    appearance: none;
    -webkit-appearance: none;
}

.alja-input:focus,
.alja-select:focus,
.alja-textarea:focus {
    border-color: var(--alja-primary);
    box-shadow: 0 0 0 3px rgba(58, 138, 106, 0.15);
}

.alja-input.is-invalid,
.alja-select.is-invalid {
    border-color: var(--alja-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Floating Labels */
.alja-label {
    position: absolute;
    left: 1rem;
    top: 0.875rem;
    font-size: 0.9375rem;
    color: var(--alja-gray-600);
    pointer-events: none;
    transition: all 180ms ease;
    background: transparent;
}

/* Float when input has value (placeholder=" " trick) or is focused */
.alja-input:not(:placeholder-shown) ~ .alja-label,
.alja-input:focus ~ .alja-label,
.alja-select:focus ~ .alja-label,
.alja-label--select {
    top: 0.3rem;
    font-size: 0.7rem;
    color: var(--alja-primary);
    font-weight: 600;
}

.alja-label--select {
    color: var(--alja-gray-600);
}

.alja-select:focus ~ .alja-label--select { color: var(--alja-primary); }

/* Password toggle */
.alja-input__password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--alja-gray-400);
    padding: 0;
    display: flex;
    align-items: center;
}

.alja-input__password-toggle:hover { color: var(--alja-charcoal); }

/* Select */
.alja-form-group--select { position: relative; }

.alja-select { padding-right: 2.5rem; cursor: pointer; }

.alja-select__arrow {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--alja-gray-600);
    display: flex;
}

/* Textarea */
.alja-textarea {
    padding-top: 1rem;
    resize: vertical;
    min-height: 90px;
}

/* Collapsible note */
.alja-collapsible-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--alja-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alja-collapsible-content { margin-top: 0.875rem; }

/* Field errors */
.alja-field-error {
    font-size: 0.78rem;
    color: var(--alja-error);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ─────────────────────────────────────────
   5. Auth Tabs
───────────────────────────────────────── */
.alja-auth-tabs {
    display: flex;
    border-radius: var(--alja-radius-lg);
    background: var(--alja-gray-100);
    padding: 0.25rem;
    margin-bottom: 1.75rem;
}

.alja-auth-tab {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: var(--alja-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--alja-gray-600);
    transition: all 200ms ease;
}

.alja-auth-tab--active {
    background: #fff;
    color: var(--alja-charcoal);
    box-shadow: var(--alja-shadow-sm);
}

.alja-form-feedback {
    padding: 0.75rem 1rem;
    border-radius: var(--alja-radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alja-form-feedback--error {
    background: #FEF2F2;
    color: var(--alja-error);
    border: 1px solid #FECACA;
}

.alja-form-feedback--success {
    background: #ECFDF5;
    color: var(--alja-success);
    border: 1px solid #A7F3D0;
}

.alja-auth-guest__desc {
    font-size: 0.9rem;
    color: var(--alja-gray-600);
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    background: var(--alja-sand-lt);
    border-radius: var(--alja-radius-md);
    border-left: 3px solid var(--alja-primary);
}

.alja-auth__forgot {
    font-size: 0.8125rem;
    color: var(--alja-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    display: block;
    margin-bottom: 1.25rem;
    margin-top: -0.5rem;
}

/* ─────────────────────────────────────────
   6. Cart Review (Step 1)
───────────────────────────────────────── */
.alja-cart-review { margin-bottom: 1.5rem; }

.alja-cart-review__item {
    display: flex;
    align-items: flex-start;
    gap: 1.125rem;
    padding: 1.125rem 0;
    border-bottom: 1px solid var(--alja-gray-200);
}

.alja-cart-review__item:last-child { border-bottom: none; }

.alja-cart-review__image {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--alja-radius-md);
    /* overflow:hidden supprimé pour ne pas couper le badge quantité */
    background: var(--alja-gray-100);
}

.alja-cart-review__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--alja-radius-md); /* radius sur l'img, pas le container */
}

.alja-cart-review__qty-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--alja-charcoal);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    z-index: 1;
}

.alja-cart-review__info { flex: 1; min-width: 0; }

.alja-cart-review__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--alja-charcoal);
    margin: 0 0 0.25rem;
    line-height: 1.4;
}

.alja-cart-review__desc {
    font-size: 0.8125rem;
    color: var(--alja-gray-600);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.alja-cart-review__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alja-cart-review__qty {
    font-size: 0.8125rem;
    color: var(--alja-gray-600);
}

/* Stepper −/+ de quantité (page panier) */
.alja-cart-review__qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    border: 1px solid var(--alja-gray-200, #E5E7EB);
    border-radius: 999px;
    padding: 0.125rem;
    background: #fff;
    transition: opacity 150ms ease;
}

.alja-cart-review__qty-stepper.is-busy {
    opacity: 0.5;
    pointer-events: none;
}

.alja-cart-review__qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    color: var(--alja-charcoal);
    cursor: pointer;
    transition: background 150ms ease;
}

.alja-cart-review__qty-btn:hover {
    background: var(--alja-gray-100, #F3F4F6);
}

.alja-cart-review__qty-value {
    min-width: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--alja-charcoal);
}

.alja-cart-review__price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--alja-charcoal);
}

.alja-cart-review__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--alja-gray-400);
    padding: 0.25rem;
    border-radius: var(--alja-radius-sm);
    transition: color 150ms ease, background 150ms ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.alja-cart-review__remove:hover {
    color: var(--alja-error);
    background: #FEF2F2;
}

/* ─────────────────────────────────────────
   7. Coupon
───────────────────────────────────────── */
.alja-coupon { margin-bottom: 1.5rem; }

.alja-coupon__toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--alja-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alja-coupon__form { margin-top: 0.875rem; display: none; }
.alja-coupon__form.is-open { display: block; }

.alja-coupon__input-wrap {
    display: flex;
    gap: 0.75rem;
}

.alja-coupon__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--alja-gray-200);
    border-radius: var(--alja-radius-md);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 200ms ease;
}

.alja-coupon__input:focus { border-color: var(--alja-primary); }

.alja-coupon__feedback {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    min-height: 1.2em;
}

.alja-coupon__feedback--success { color: var(--alja-success); }
.alja-coupon__feedback--error   { color: var(--alja-error); }

/* ─────────────────────────────────────────
   8. Sidebar Order Summary
───────────────────────────────────────── */
.alja-checkout__sidebar {
    position: relative;
}

@media (min-width: 1024px) {
    .alja-checkout__sidebar { position: sticky; top: 100px; }
}

.alja-order-summary {
    background: #fff;
    border-radius: var(--alja-radius-xl);
    box-shadow: var(--alja-shadow-md);
    border: 1px solid var(--alja-gray-200);
    overflow: hidden;
}

.alja-order-summary__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.5rem;
    background: var(--alja-sand-lt);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--alja-charcoal);
    gap: 0.75rem;
    transition: background 150ms ease;
}

.alja-order-summary__toggle:hover { background: var(--alja-sand); }

.alja-order-summary__toggle-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--alja-primary);
}

.alja-order-summary__toggle-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.alja-order-summary__total-pill {
    background: var(--alja-primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.alja-order-summary__chevron {
    transition: transform 250ms ease;
    color: var(--alja-gray-600);
}

.alja-order-summary__toggle[aria-expanded="false"] .alja-order-summary__chevron {
    transform: rotate(0deg);
}

.alja-order-summary__toggle[aria-expanded="true"] .alja-order-summary__chevron {
    transform: rotate(180deg);
}

.alja-order-summary__body {
    padding: 1.25rem 1.5rem;
}

/* On desktop always show body */
@media (min-width: 1024px) {
    .alja-order-summary__body { display: block !important; }
    .alja-order-summary__chevron { display: none; }
    .alja-order-summary__toggle { cursor: default; pointer-events: none; }
}

/* Mobile: hidden by default, toggle shows */
@media (max-width: 1023px) {
    .alja-order-summary__body { display: none; }
    .alja-order-summary__body.is-open { display: block; }
}

.alja-order-summary__items {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--alja-gray-200);
    padding-bottom: 1rem;
}

.alja-order-summary__item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 0;
}

.alja-order-summary__item-image {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--alja-radius-md);
    /* overflow:hidden supprimé pour ne pas couper le badge quantité */
    background: var(--alja-gray-100);
    border: 1px solid var(--alja-gray-200);
}

.alja-order-summary__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--alja-radius-md);
}

.alja-order-summary__item-qty {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--alja-charcoal);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 3px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    z-index: 1;
}

.alja-order-summary__item-info {
    flex: 1;
    min-width: 0;
}

.alja-order-summary__item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--alja-charcoal);
    line-height: 1.4;
    display: block;
}

.alja-order-summary__item-original {
    font-size: 0.75rem;
    color: var(--alja-gray-400);
    text-decoration: line-through;
    display: block;
    margin-top: 0.125rem;
}

.alja-order-summary__item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--alja-charcoal);
    flex-shrink: 0;
}

/* Coupons */
.alja-order-summary__coupons {
    padding-bottom: 0.875rem;
    margin-bottom: 0.875rem;
    border-bottom: 1px solid var(--alja-gray-200);
}

.alja-order-summary__coupon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

.alja-order-summary__coupon-code {
    color: var(--alja-primary);
    font-weight: 600;
}

.alja-order-summary__coupon-discount {
    color: var(--alja-primary);
    font-weight: 700;
}

/* Totals */
.alja-order-summary__totals { margin-bottom: 1.25rem; }

.alja-order-summary__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--alja-charcoal-lt);
}

.alja-order-summary__line--total {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--alja-charcoal);
    padding-top: 0.875rem;
    margin-top: 0.625rem;
    border-top: 2px solid var(--alja-charcoal);
}

.alja-order-summary__line--discount { color: var(--alja-primary); }
.alja-order-summary__line--tax {
    font-size: 0.8rem;
    color: var(--alja-gray-600);
}

/* ─────────────────────────────────────────
   9. Payment gateways
───────────────────────────────────────── */
.alja-payment-gateways { 
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.alja-gateway {
    border: 1.5px solid var(--alja-gray-200);
    border-radius: var(--alja-radius-lg);
    cursor: pointer;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    overflow: hidden;
    display: block;
}

.alja-gateway:has(.alja-gateway__radio:checked),
.alja-gateway--selected {
    border-color: var(--alja-primary);
    box-shadow: 0 0 0 3px rgba(58, 138, 106, 0.15);
}

.alja-gateway__radio { position: absolute; opacity: 0; width: 0; height: 0; }

.alja-gateway__content { padding: 1.125rem 1.25rem; }

.alja-gateway__header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.alja-gateway__radio-ui {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--alja-gray-400);
    flex-shrink: 0;
    transition: all 200ms ease;
    position: relative;
}

.alja-gateway__radio-ui::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--alja-primary);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 200ms ease;
}

.alja-gateway:has(.alja-gateway__radio:checked) .alja-gateway__radio-ui {
    border-color: var(--alja-primary);
}

.alja-gateway:has(.alja-gateway__radio:checked) .alja-gateway__radio-ui::after {
    opacity: 1;
    transform: scale(1);
}

.alja-gateway__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--alja-charcoal);
    flex: 1;
}

.alja-gateway__icons { display: flex; gap: 0.25rem; align-items: center; }
.alja-gateway__icons img { height: 24px; width: auto; }

.alja-gateway__description {
    font-size: 0.8125rem;
    color: var(--alja-gray-600);
    margin-top: 0.625rem;
    padding-left: 2.5rem;
    line-height: 1.5;
}

.alja-gateway__form {
    padding: 0.875rem 0 0 2.5rem;
}

.alja-gateway__form:empty { display: none; }

/* Payment notice (no gateways) */
.alja-payment-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--alja-radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alja-payment-notice--warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* Terms */
.alja-terms { margin-bottom: 1.5rem; }

.alja-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--alja-charcoal-lt);
    line-height: 1.5;
}

.alja-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }

.alja-checkbox-ui {
    width: 20px;
    height: 20px;
    border: 2px solid var(--alja-gray-200);
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms ease;
    margin-top: 1px;
    position: relative;
}

.alja-checkbox:checked + .alja-checkbox-ui {
    background: var(--alja-primary);
    border-color: var(--alja-primary);
}

.alja-checkbox:checked + .alja-checkbox-ui::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    margin-top: -2px;
}

.alja-terms__text a {
    color: var(--alja-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─────────────────────────────────────────
   10. Buttons
───────────────────────────────────────── */
.alja-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--alja-radius-lg);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 200ms ease;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.alja-btn--primary {
    background: linear-gradient(135deg, var(--alja-primary) 0%, #2A6B7C 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(58, 138, 106, 0.35);
}

.alja-btn--primary:hover {
    background: linear-gradient(135deg, var(--alja-primary-dk) 0%, #22576A 100%);
    box-shadow: 0 6px 20px rgba(58, 138, 106, 0.45);
    transform: translateY(-1px);
}

.alja-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(58, 138, 106, 0.35);
}

.alja-btn--outline {
    background: transparent;
    color: var(--alja-primary);
    border-color: var(--alja-primary);
}

.alja-btn--outline:hover {
    background: var(--alja-primary);
    color: #fff;
}

.alja-btn--ghost {
    background: transparent;
    color: var(--alja-gray-600);
    border-color: var(--alja-gray-200);
}

.alja-btn--ghost:hover {
    background: var(--alja-gray-100);
    color: var(--alja-charcoal);
    border-color: var(--alja-gray-400);
}

.alja-btn--full { width: 100%; }

.alja-btn--sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }

.alja-btn--place-order {
    min-width: 220px;
    padding: 0.9375rem 2rem;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--alja-primary) 0%, #2A6B7C 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(58, 138, 106, 0.4);
}

.alja-btn--place-order:hover {
    box-shadow: 0 8px 26px rgba(58, 138, 106, 0.5);
    transform: translateY(-2px);
}

.alja-btn--place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.alja-btn--loading .alja-btn__text { display: none; }
.alja-btn--loading .alja-btn__spinner { display: flex !important; gap: 0.5rem; align-items: center; }

/* Spinner */
.alja-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: alja-spin 0.7s linear infinite;
}

@keyframes alja-spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────
   11. Trust Badges
───────────────────────────────────────── */
.alja-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 1rem;
    border-top: 1px solid var(--alja-gray-200);
}

.alja-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8rem;
    color: var(--alja-gray-600);
}

.alja-trust-badge svg { color: var(--alja-primary); flex-shrink: 0; }

/* ─────────────────────────────────────────
   12. Empty cart
───────────────────────────────────────── */
.alja-checkout-empty {
    text-align: center;
    padding: 5rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.alja-checkout-empty__icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: block;
}

.alja-checkout-empty__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--alja-charcoal);
    margin: 0 0 0.75rem;
}

.alja-checkout-empty__text {
    color: var(--alja-gray-600);
    margin-bottom: 2rem;
}

/* ─────────────────────────────────────────
   13. Info recap (step 4)
───────────────────────────────────────── */
.alja-info-recap {
    margin-bottom: 1.75rem;
    padding: 1rem 1.25rem;
    background: var(--alja-sand-lt);
    border-radius: var(--alja-radius-md);
    border: 1px solid var(--alja-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.alja-info-recap__inner {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--alja-charcoal);
}

.alja-info-recap__label {
    font-weight: 700;
    color: var(--alja-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    display: block;
}

/* ─────────────────────────────────────────
   14. Utilities + responsive
───────────────────────────────────────── */
.alja-link {
    color: var(--alja-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: 0.875rem;
}

/* Mobile adaptations */
@media (max-width: 640px) {
    .alja-checkout { padding: 1rem 0.875rem 3rem; }
    .alja-checkout__stepper { padding: 1rem; }
    .alja-stepper__label { display: none; }
    .alja-checkout__step { padding: 1.25rem; }
    .alja-checkout__step-title { font-size: 1.125rem; }
    .alja-checkout__step-actions { flex-direction: column-reverse; }
    .alja-checkout__step-actions .alja-btn { width: 100%; }
    .alja-btn--place-order { width: 100%; }

    /* ── Form field gaps: consistent 1rem between every field ── */
    .alja-form-group {
        margin-bottom: 1rem;
    }
    .alja-form-group:last-child {
        margin-bottom: 0;
    }
    /* Stack grid rows (first/last name) into single column */
    .alja-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    /* Add spacing between WC fieldset sections */
    .woocommerce-billing-fields,
    .woocommerce-shipping-fields,
    .woocommerce-additional-fields {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* WooCommerce checkout page overrides */
body.woocommerce-checkout .entry-content,
body.woocommerce-checkout .wp-block-post-content {
    padding: 0 !important;
    max-width: none !important;
}

/* Ensure billing form inside WC native stays invisible */
#alja-wc-native-form { display: none !important; }

/* Checkout main layout override */
.alja-checkout-main {
    padding-top: 0 !important;
}

/* WooCommerce notices */
.woocommerce-notices-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Style all WC notices with ALJA design */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    border-radius: var(--alja-radius-md) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 0.9rem !important;
}

/* ─────────────────────────────────────────
   15. Order Confirmation page — suppress WC default blocks
   WooCommerce injects Order Details + Billing Address blocks
   outside our shortcode. Hide them since we render them ourselves.
───────────────────────────────────────── */
.wc-block-order-confirmation-status,
.wc-block-order-confirmation-summary,
.wc-block-order-confirmation-totals-wrapper,
.wc-block-order-confirmation-totals,
.wc-block-order-confirmation-downloads-wrapper,
.wc-block-order-confirmation-downloads,
.wc-block-order-confirmation-billing-wrapper,
.wc-block-order-confirmation-billing-address,
.wc-block-order-confirmation-shipping-wrapper,
.wc-block-order-confirmation-shipping-address,
.wc-block-order-confirmation-additional-fields-wrapper,
.wc-block-order-confirmation-additional-information,
.wc-block-order-confirmation-address-wrapper,
.wp-block-woocommerce-order-confirmation-status,
.wp-block-woocommerce-order-confirmation-summary,
.wp-block-woocommerce-order-confirmation-totals-wrapper,
/* Legacy WC PHP template output outside our custom block */
.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-customer-details,
.woocommerce-order > h2,
/* Catch-all for remaining WC thank-you page injected content */
body.page-id-129 .woocommerce-order,
body.page-id-129 .woocommerce-order-details,
body.page-id-129 .woocommerce-customer-details {
    display: none !important;
}
