/**
 * Nectarium Shop – Checkout Styles
 *
 * Uses the same brand tokens as nectarium-shop.css
 */

/* ── Layout ───────────────────────────────────────────────────────────────── */

.nec-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0;
    font-family: 'DM Sans', sans-serif;
    color: var(--nec-color-text, #2C2416);
}

@media (max-width: 900px) {
    .nec-checkout-layout {
        grid-template-columns: 1fr;
    }
    .nec-checkout-sidebar {
        order: -1;
    }
}

/* ── Step Indicator ───────────────────────────────────────────────────────── */

.nec-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nec-step {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0;
}

.nec-step__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--nec-color-border, #E8DFD1);
    color: var(--nec-color-text-soft, #6B5D4D);
    flex-shrink: 0;
}

.nec-step--active .nec-step__num {
    background: var(--nec-color-primary, #D4920B);
    color: #fff;
}

.nec-step--done .nec-step__num {
    background: var(--nec-color-success, #5A8A3C);
    color: #fff;
}

.nec-step__label {
    font-size: 0.85rem;
    color: var(--nec-color-text-soft);
    white-space: nowrap;
}

.nec-step--active .nec-step__label {
    color: var(--nec-color-text);
    font-weight: 600;
}

.nec-step__divider {
    width: 24px;
    height: 1px;
    background: var(--nec-color-border);
    margin: 0 0.3rem;
}

/* ── Auth Tabs (Step 1) ───────────────────────────────────────────────────── */

.nec-checkout-auth h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
}

.nec-auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--nec-color-border);
    margin-bottom: 1.5rem;
}

.nec-auth-tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--nec-color-text-soft);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.nec-auth-tab:hover {
    color: var(--nec-color-text);
}

.nec-auth-tab--active {
    color: var(--nec-color-primary);
    border-bottom-color: var(--nec-color-primary);
    font-weight: 600;
}

.nec-auth-panel {
    display: none;
    padding: 1rem 0;
}

.nec-auth-panel--active {
    display: block;
}

.nec-auth-info {
    color: var(--nec-color-text-soft);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ── Form Elements ────────────────────────────────────────────────────────── */

.nec-form-group {
    margin-bottom: 1rem;
}

.nec-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--nec-color-text);
}

.nec-optional {
    font-weight: 400;
    color: var(--nec-color-text-soft);
    font-size: 0.85rem;
}

.nec-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--nec-color-border);
    border-radius: var(--nec-radius, 8px);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--nec-color-text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.nec-input:focus {
    outline: none;
    border-color: var(--nec-color-primary);
    box-shadow: 0 0 0 3px rgba(212, 146, 11, 0.15);
}

select.nec-input {
    appearance: auto;
}

.nec-form-row {
    display: grid;
    gap: 1rem;
}

.nec-form-row--2 {
    grid-template-columns: 1fr 2fr;
}

.nec-form-row--3 {
    grid-template-columns: 1fr 1.5fr 1.5fr;
}

@media (max-width: 600px) {
    .nec-form-row--2,
    .nec-form-row--3 {
        grid-template-columns: 1fr;
    }
}

.nec-form-group--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.5;
}

.nec-form-group--checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--nec-color-primary);
}

.nec-form-group--checkbox a {
    color: var(--nec-color-primary);
}

.nec-form-hint {
    font-size: 0.85rem;
    color: var(--nec-color-text-soft);
    margin-bottom: 1rem;
}

/* ── Error Messages ───────────────────────────────────────────────────────── */

.nec-form-error {
    color: var(--nec-color-error, #C0392B);
    font-size: 0.9rem;
    min-height: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.nec-form-error:not(:empty) {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(192, 57, 43, 0.08);
    border-radius: var(--nec-radius);
    border-left: 3px solid var(--nec-color-error);
}

/* ── Method Cards (Shipping / Payment) ────────────────────────────────────── */

.nec-method-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.nec-method-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--nec-color-border);
    border-radius: var(--nec-radius);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.nec-method-card:hover {
    border-color: var(--nec-color-primary);
    background: rgba(212, 146, 11, 0.03);
}

.nec-method-card--selected {
    border-color: var(--nec-color-primary);
    background: rgba(212, 146, 11, 0.06);
}

.nec-method-card input[type="radio"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--nec-color-primary);
}

.nec-method-card__content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.nec-method-card__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.nec-method-card__name {
    display: block;
    font-weight: 600;
}

.nec-method-card__detail {
    display: block;
    font-size: 0.85rem;
    color: var(--nec-color-text-soft);
}

.nec-method-card__desc {
    font-size: 0.85rem;
    color: var(--nec-color-text-soft);
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */

.nec-checkout-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--nec-color-border);
}

/* ── Review (Step 5) ──────────────────────────────────────────────────────── */

.nec-checkout-review h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
}

.nec-review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .nec-review-grid {
        grid-template-columns: 1fr;
    }
}

.nec-review-card {
    padding: 1rem 1.25rem;
    background: var(--nec-color-bg, #FBF7F0);
    border-radius: var(--nec-radius);
    border: 1px solid var(--nec-color-border);
}

.nec-review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.nec-review-card__header h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--nec-color-text-soft);
    margin: 0;
}

.nec-link {
    background: none;
    border: none;
    color: var(--nec-color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.nec-link:hover {
    color: var(--nec-color-primary-d, #B37A09);
}

.nec-address-block {
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.6;
}

.nec-text-soft {
    color: var(--nec-color-text-soft);
    font-size: 0.9rem;
}

/* Review Items */

.nec-review-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nec-review-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--nec-color-border);
}

.nec-review-item:last-child {
    border-bottom: none;
}

.nec-review-item__img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.nec-review-item__info {
    flex: 1;
}

.nec-review-item__name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.nec-review-item__qty {
    font-size: 0.85rem;
    color: var(--nec-color-text-soft);
}

.nec-review-item__price {
    font-weight: 600;
    white-space: nowrap;
}

/* ── Order Summary Sidebar ────────────────────────────────────────────────── */

.nec-order-summary {
    background: var(--nec-color-bg);
    border: 1px solid var(--nec-color-border);
    border-radius: var(--nec-radius);
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.nec-order-summary h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    margin: 0 0 1rem;
}

.nec-order-summary__items {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nec-color-border);
}

.nec-order-summary__item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.nec-order-summary__item-name {
    flex: 1;
    color: var(--nec-color-text-soft);
}

.nec-order-summary__line {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    color: var(--nec-color-text-soft);
}

.nec-order-summary__total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid var(--nec-color-border);
    font-size: 1.1rem;
    color: var(--nec-color-text);
}

/* ── Order Confirmation ───────────────────────────────────────────────────── */

.nec-order-confirmation {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.nec-confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--nec-color-success);
    color: #fff;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.nec-order-confirmation h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.nec-confirmation-number {
    font-size: 1.1rem;
    color: var(--nec-color-text-soft);
    margin-bottom: 1rem;
}

.nec-confirmation-notice {
    text-align: left;
    background: var(--nec-color-bg);
    border: 1px solid var(--nec-color-border);
    border-left: 3px solid var(--nec-color-primary);
    border-radius: var(--nec-radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.nec-confirmation-notice strong {
    display: block;
    margin-bottom: 0.5rem;
}

.nec-confirmation-notice p {
    font-size: 0.95rem;
    color: var(--nec-color-text-soft);
    line-height: 1.6;
    margin: 0;
}

.nec-confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ── Utilities ────────────────────────────────────────────────────────────── */

.nec-hidden {
    display: none !important;
}

.nec-checkout-address h2,
.nec-checkout-shipping h2,
.nec-checkout-payment h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
}
