:root {
    /* Slightly below paper-white: more separation from cards without going dark or trendy gradients */
    --background-color: hsl(33, 42%, 94%);
    --surface: hsl(33, 38%, 99%);
    --ink: hsl(22, 35%, 14%);
    --ink-muted: hsl(22, 12%, 38%);
    --accent: hsl(16, 55%, 42%);
    --accent-hover: hsl(16, 55%, 34%);
    --header-bg: hsl(22, 32%, 12%);
    --header-text: hsl(33, 30%, 96%);
    --header-muted: hsl(33, 15%, 72%);
    --focus-ring: hsl(210, 85%, 65%);
    --shadow: 0 4px 24px hsla(22, 35%, 8%, 0.12);
    --header-shadow-rest: 0 2px 10px hsla(22, 35%, 8%, 0.12);
    /* Slightly stronger once scrolled so the cue is visible now that the logo no longer shrinks */
    --header-shadow-scrolled: 0 8px 32px hsla(22, 35%, 8%, 0.28);
    --form-border: hsla(22, 35%, 14%, 0.22);
    --form-radius: 8px;
    font-size: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
    line-height: 1.5;
}

/*
 * Storefront forms (anything inside <main class="site-main">): one type rhythm + Source Sans 3.
 * Nav/footer forms (e.g. logout in header) stay on the global body stack.
 */
.site-main form input:not([type="hidden"]),
.site-main form select,
.site-main form textarea,
.site-main form label,
.site-main form button,
.site-main form legend,
.site-main form .form-help {
    font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

.site-main form label,
.site-main form legend {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.site-main form fieldset.form-fieldset {
    border: 1px solid var(--form-border);
    border-radius: var(--form-radius);
    padding: 1rem 1.1rem 1.1rem;
    margin: 0 0 1.25rem;
}

.site-main form fieldset.form-fieldset > legend.form-fieldset__legend {
    padding: 0 0.35rem;
    font-size: 1rem;
}

.site-main form input[type="text"],
.site-main form input[type="email"],
.site-main form input[type="tel"],
.site-main form input[type="url"],
.site-main form input[type="password"],
.site-main form input[type="search"],
.site-main form input[type="number"]:not(.qty-input),
.site-main form select,
.site-main form textarea {
    width: 100%;
    max-width: 32rem;
    box-sizing: border-box;
    min-height: 2.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--form-border);
    border-radius: var(--form-radius);
    background: var(--surface);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.35;
}

.site-main form textarea {
    min-height: 6rem;
    resize: vertical;
}

.site-main form input:focus-visible,
.site-main form select:focus-visible,
.site-main form textarea:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.site-main form input[type="checkbox"],
.site-main form input[type="radio"] {
    width: auto;
    max-width: none;
    min-height: auto;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.site-main form .form-group--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    max-width: 36rem;
}

.site-main form .form-group--checkbox label input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.site-main form .form-group--checkbox .form-help {
    margin-top: 0.5rem;
    margin-left: 0;
    padding-left: calc(1rem + 0.5rem);
}

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

.site-main form .form-group:last-of-type {
    margin-bottom: 0.75rem;
}

/* Two-column rows on wider viewports (e.g. signup: name + email, password + confirm) */
.site-main form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.site-main form .form-row > .form-group {
    margin-bottom: 0;
}

@media (min-width: 40rem) {
    .site-main form .form-row {
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
        row-gap: 0;
        align-items: start;
    }
}

/* Full-width field inside a form-row (e.g. single address line) */
.site-main form .form-row > .form-group--full {
    grid-column: 1 / -1;
}

.site-main form .form-help {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ink-muted);
    max-width: 32rem;
}

.site-main form label .optional {
    font-weight: 500;
    color: var(--ink-muted);
}

/* Header chrome (logout) — same font as hosted forms */
.site-header form input,
.site-header form button {
    font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

/* Admin shell forms — fonts.css linked in admin layout */
.admin-shell form input:not([type="hidden"]),
.admin-shell form select,
.admin-shell form textarea,
.admin-shell form label,
.admin-shell form button,
.admin-shell form legend {
    font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

/* Admin: Heroicons inline SVG action buttons (list rows) */
.admin-icon-svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.admin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    line-height: 0;
}

.admin-icon-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
    color: #111;
}

.admin-icon-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.admin-icon-btn--danger {
    border-color: #e5c7c7;
    color: #9b3418;
}

.admin-icon-btn--danger:hover {
    background: #fef2f2;
    border-color: #d4a0a0;
    color: #7f1d1d;
}

.admin-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.admin-products-table th,
.admin-products-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.admin-products-table th {
    font-weight: 600;
    background: #fafafa;
}

.admin-products-table td.admin-products-table__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.admin-products-table .admin-products-table__actions form {
    display: inline;
    margin: 0;
}

/* Auth (login / future signup) */
.auth-flash {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.auth-flash--error {
    color: #9b3418;
}

.auth-flash--success {
    color: #166534;
}

.auth-form__submit {
    margin-top: 0.25rem;
}

.auth-form__footer {
    margin: 1.25rem 0 0;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.page-card .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--header-text);
    border: none;
    border-radius: var(--form-radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

.page-card .btn-primary:hover {
    background: var(--accent-hover);
}

/* —— Skip link —— */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 0.65rem 1rem;
    background: var(--header-bg);
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    left: 0.75rem;
    top: 0.75rem;
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* —— Promo banner (scrolls away; nav below stays sticky) —— */
.site-banner {
    background: var(--accent);
    color: hsl(33, 40%, 98%);
    border-bottom: 1px solid hsla(22, 35%, 8%, 0.12);
}

.site-banner__inner {
    max-width: 72rem;
    margin: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 0.55rem 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: 0.03em;
}

@supports (text-wrap: balance) {
    .site-banner__inner {
        text-wrap: balance;
    }
}

@media (min-width: 40em) {
    .site-banner__inner {
        font-size: 0.875rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }
}

/* —— Site header —— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    color: var(--header-text);
    box-shadow: var(--header-shadow-rest);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
    box-shadow: var(--header-shadow-scrolled);
    border-bottom-color: hsla(33, 30%, 96%, 0.15);
}

.site-header__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 0;
}

.site-logo__mark {
    display: block;
    height: 2rem;
    width: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (min-width: 48em) {
    .site-logo__mark {
        height: 2.125rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header {
        transition: none;
    }

    .site-logo__mark {
        transition: none;
    }
}

.site-logo:hover .site-logo__mark {
    opacity: 0.88;
}

.site-logo:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
    border-radius: 4px;
}

/* —— Mobile menu toggle —— */
.nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid hsla(33, 30%, 96%, 0.35);
    border-radius: 6px;
    background: hsla(33, 30%, 96%, 0.08);
    color: var(--header-text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle:hover {
    background: hsla(33, 30%, 96%, 0.14);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.nav-toggle__bars {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
    position: relative;
    top: 0;
}

.nav-toggle__label {
    display: inline;
}

@media (min-width: 48em) {
    .nav-toggle {
        display: none;
    }
}

/* —— Navigation drawer (mobile) / bar (desktop) —— */
.site-nav-drawer {
    flex-basis: 100%;
    order: 3;
    background: var(--header-bg);
    border-top: 1px solid hsla(33, 30%, 96%, 0.12);
    padding: 0.5rem 0 1rem;
    margin: 0 -1.25rem -0.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: 1rem;
}

.site-header {
    position: relative;
}

.site-nav-drawer:not(.is-open) {
    display: none;
}

@media (min-width: 48em) {
    .site-header__bar {
        flex-wrap: nowrap;
    }

    .site-nav-drawer {
        flex-basis: auto;
        order: 0;
        position: static;
        display: block !important;
        flex: 1;
        padding: 0;
        margin: 0 0 0 1.5rem;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .site-nav-drawer:not(.is-open) {
        display: block !important;
    }
}

.site-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 48em) {
    .site-nav {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 1.5rem;
    }
}

.site-nav__list,
.site-nav__actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-nav__list > li,
.site-nav__actions > li {
    display: flex;
    align-items: stretch;
    width: 100%;
}

@media (min-width: 48em) {
    .site-nav__list,
    .site-nav__actions {
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
    }

    .site-nav__list > li,
    .site-nav__actions > li {
        width: auto;
        align-items: center;
    }

    .site-nav__actions {
        margin-left: 0.5rem;
        padding-left: 1rem;
        border-left: 1px solid hsla(33, 30%, 96%, 0.2);
    }
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: 6px;
    color: var(--header-muted);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.2;
}

@media (min-width: 48em) {
    .site-nav__link {
        width: auto;
        justify-content: center;
    }
}

.site-nav__link:hover {
    color: var(--header-text);
    background: hsla(33, 30%, 96%, 0.06);
}

.site-nav__link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.site-nav__link[aria-current="page"] {
    color: var(--header-text);
    background: hsla(33, 30%, 96%, 0.1);
}

.site-nav__link--primary {
    color: var(--header-text);
}

.site-nav__account {
    gap: 0.5rem;
}

.site-nav__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: hsla(33, 30%, 96%, 0.12);
    border: 1px solid hsla(33, 30%, 96%, 0.22);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    color: var(--header-text);
}

.site-nav__link--cta {
    color: var(--header-text);
    background: var(--accent);
    font-weight: 600;
}

.site-nav__link--cta:hover {
    background: var(--accent-hover);
    color: var(--header-text);
}

.site-nav__logout {
    margin: 0;
    display: flex;
    align-items: stretch;
    width: 100%;
}

@media (min-width: 48em) {
    .site-nav__logout {
        width: auto;
        align-items: center;
    }
}

.site-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.2;
}

@media (min-width: 48em) {
    .site-nav__btn {
        width: auto;
    }
}

.site-nav__btn--ghost {
    background: transparent;
    color: var(--header-muted);
    border-color: hsla(33, 30%, 96%, 0.35);
}

.site-nav__btn--ghost:hover {
    color: var(--header-text);
    border-color: hsla(33, 30%, 96%, 0.55);
    background: hsla(33, 30%, 96%, 0.06);
}

.site-nav__btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* —— Cart (Heroicons outline) —— */
.site-nav__cart {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.75rem;
    height: auto;
    flex-shrink: 0;
    padding: 0 0.75rem;
    box-sizing: border-box;
    border-radius: 6px;
    color: var(--header-muted);
    line-height: 0;
    text-decoration: none;
}

.site-nav__cart-hit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
}

@media (min-width: 48em) {
    .site-nav__cart {
        width: 2.75rem;
        height: 2.75rem;
        min-height: 0;
        justify-content: center;
        padding: 0;
    }
}

.site-nav__cart:hover {
    color: var(--header-text);
    background: hsla(33, 30%, 96%, 0.08);
}

.site-nav__cart:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.site-nav__cart[aria-current="page"] {
    color: var(--header-text);
    background: hsla(33, 30%, 96%, 0.1);
}

.site-nav__cart-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    display: block;
}

.site-nav__cart-badge {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--header-text);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.125rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px var(--header-bg);
    pointer-events: none;
}

/* —— Main content —— */
.site-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 5rem;
    /*
     * Short pages (e.g. home) need document height > viewport so you can scroll and see sticky header.
     * ~4.5rem ≈ one-row header; +4rem guarantees a bit of scroll past the fold without a huge empty gap.
     */
    min-height: calc(100vh - 4.5rem + 4rem);
    min-height: calc(100svh - 4.5rem + 4rem);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-card {
    max-width: 36rem;
    margin-inline: auto;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid hsla(22, 35%, 14%, 0.08);
    box-shadow: var(--shadow);
}

.page-card--wide {
    max-width: 42rem;
}

/* Checkout: need more width for form + order summary; avoid 32rem input cap fighting the grid */
.page-card.page-card--wide.checkout-page {
    max-width: 62rem;
    width: 100%;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-item__thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cart-item__name {
    font-weight: 500;
}

.cart-intro {
    color: var(--ink-muted);
    margin-bottom: 0.5rem;
}

.cart-next {
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.cart-next__checkout {
    font-weight: 600;
}

/* Checkout: form + order summary (1 col mobile, 2 col desktop) */
.checkout-page__grid {
    display: grid;
    gap: 1.75rem;
    margin-top: 1.25rem;
}

.checkout-page__main {
    min-width: 0;
}

@media (min-width: 52rem) {
    .checkout-page__grid {
        grid-template-columns: minmax(0, 1fr) minmax(14rem, 19rem);
        align-items: start;
        column-gap: 2rem;
    }

    .checkout-page__aside {
        position: sticky;
        top: 1rem;
    }
}

.checkout-page__hint {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.checkout-section__title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
}

/* Full-width fields in checkout main column (global forms cap inputs at 32rem) */
.checkout-page__main .checkout-form input[type="text"],
.checkout-page__main .checkout-form input[type="email"],
.checkout-page__main .checkout-form input[type="tel"],
.checkout-page__main .checkout-form input[type="url"],
.checkout-page__main .checkout-form input[type="password"],
.checkout-page__main .checkout-form select,
.checkout-page__main .checkout-form textarea {
    max-width: 100%;
}

.checkout-page__main .checkout-form .form-help {
    max-width: 100%;
}

.checkout-section__placeholder {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.checkout-form {
    margin-top: 0.5rem;
}

.checkout-form .form-fieldset + .form-fieldset {
    margin-top: 1.25rem;
}

.checkout-form__submit {
    margin-top: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.checkout-ship-to {
    margin-top: 0.35rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--form-border);
    border-radius: var(--form-radius);
    background: var(--surface);
}

.checkout-ship-to__block {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink);
}

.checkout-ship-to__meta {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.checkout-ship-to__label {
    font-weight: 600;
    color: var(--ink);
    margin-right: 0.35rem;
}

.checkout-ship-to__edit {
    margin: 0;
    font-size: 0.9rem;
}

.checkout-ship-method {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin: 0.35rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--form-border);
    border-radius: var(--form-radius);
    background: var(--surface);
    font-size: 0.95rem;
}

.checkout-ship-method__price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.checkout-ship-method__hint {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.checkout-packaging {
    margin-top: 0.7rem;
    padding: 0.75rem 0.9rem;
    border: 1px dashed hsla(22, 35%, 8%, 0.18);
    border-radius: var(--form-radius);
    background: hsla(33, 40%, 98%, 0.9);
}

.checkout-packaging__title {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: var(--ink-muted);
}

.checkout-packaging__meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    align-items: baseline;
    font-size: 0.92rem;
    color: var(--ink);
}

.checkout-packaging__note {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--ink-muted);
}

.checkout-section--payment {
    margin-top: 0.25rem;
}

.checkout-pay-hint {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--ink-muted);
    max-width: 32rem;
}

.checkout-pay-hint--warn {
    margin-top: 0.5rem;
    color: var(--ink);
}

.checkout-code {
    font-size: 0.88em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: hsla(22, 35%, 8%, 0.06);
}

.checkout-paypal-buttons {
    min-height: 2.75rem;
}

.checkout-summary-card__shipping {
    font-weight: 500;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px dashed hsla(22, 35%, 8%, 0.12);
}

.checkout-summary-card__grand-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid hsla(22, 35%, 8%, 0.14);
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.checkout-summary-card {
    padding: 1rem 1.15rem;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid hsla(22, 35%, 8%, 0.08);
    box-shadow: var(--shadow);
}

.checkout-summary-card__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
}

.checkout-summary-card__meta {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.checkout-summary-card__lines {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    border-top: 1px solid hsla(22, 35%, 8%, 0.08);
}

.checkout-summary-card__line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid hsla(22, 35%, 8%, 0.06);
}

.checkout-summary-card__line-name {
    color: var(--ink);
}

.checkout-summary-card__line-total {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.checkout-summary-card__subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding-top: 0.35rem;
}

.checkout-summary-card__edit {
    margin: 0.85rem 0 0;
    font-size: 0.9rem;
}

.page-card h1 {
    margin-top: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    color: var(--ink);
}

.page-card a {
    color: var(--accent);
    font-weight: 500;
}

.page-card a:hover {
    color: var(--accent-hover);
}

.page-card a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* —— Cart page (non-empty) —— */
.cart-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid hsla(22, 35%, 14%, 0.1);
    border-radius: 8px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.cart-table th,
.cart-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid hsla(22, 35%, 14%, 0.08);
}

.cart-table th {
    font-weight: 600;
    color: var(--ink-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-table tbody tr:last-child td {
    border-bottom: 0;
}

.cart-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cart-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsla(22, 35%, 14%, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
}

.cart-summary__total {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.cart-row-form {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
}

.qty-input {
    width: 4.25rem;
    min-height: 2.8rem;
    border: 1px solid var(--hl-border-warm, var(--border-warm));
    border-radius: 8px;
    padding: 0 0.6rem;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface-card);
}

.qty-input--compact {
    min-height: 2rem;
    width: 3.75rem;
    border-radius: 6px;
    padding: 0 0.45rem;
    font-size: 0.9rem;
}

.qty-input:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.cart-row-btn {
    border: 1px solid hsla(22, 35%, 14%, 0.18);
    background: #fff;
    color: var(--ink);
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.cart-row-btn:hover {
    background: #f6f2ed;
}

.cart-row-form--remove {
    margin-top: 0.45rem;
}

.cart-row-btn--remove {
    border-color: #dcb9b9;
    color: #7f1d1d;
}

.cart-row-btn--remove:hover {
    background: #fdf0f0;
}

/* ===== Home landing block (ported from public/hair/index.html <main>) ===== */
.home-landing {
    --hl-primary-cta: #b55a2e;
    --hl-primary-cta-hover: #994a24;
    --hl-accent-deep: #2c1a22;
    --hl-accent-plum: #3d2435;
    --hl-accent-gold: #a67c29;
    --hl-accent-moss: #3d5c4f;
    --hl-text-dark: #2a2422;
    --hl-text-light: #5c534f;
    --hl-white: #ffffff;
    --hl-border-warm: #e8dcd6;
    --hl-surface-page: #faf6f1;
    --hl-surface-card: #fffaf6;
    --hl-radius: 10px;
    --hl-shadow: 0 4px 28px rgba(44, 26, 34, 0.1);
    --hl-max: 1100px;
    width: 100%;
    margin-inline: 0;
}

.home-landing .hero {
    max-width: var(--hl-max);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .home-landing .hero {
        grid-template-columns: 1fr 1fr;
        padding-top: 3.5rem;
    }
}

.home-landing .hero-visual {
    margin: 0;
    background: linear-gradient(145deg, #ebe3dc 0%, #f5ebe4 45%, var(--hl-surface-card) 100%);
    border-radius: var(--hl-radius);
    /* Match hero source assets (526×711) to avoid wrong crop vs intrinsic ratio */
    aspect-ratio: 526 / 711;
    overflow: hidden;
    box-shadow: var(--hl-shadow);
    border: 1px solid var(--hl-border-warm);
    position: relative;
}

.home-landing .hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
}

.home-landing .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hl-accent-gold);
    margin: 0 0 0.75rem;
}

.home-landing .hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    line-height: 1.2;
    color: var(--hl-accent-plum);
}

.home-landing .hero-lead {
    margin: 0 0 1.5rem;
    color: var(--hl-text-light);
    font-size: 1.05rem;
}

.home-landing .price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
}

.home-landing .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--hl-accent-plum);
}

.home-landing .price-note {
    font-size: 0.9rem;
    color: var(--hl-text-light);
}

.home-landing .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.home-landing .home-unavailable {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted, #5c5c5c);
}

.home-landing .add-to-bag-form {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.home-landing .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.75rem;
    background: var(--hl-primary-cta);
    color: var(--hl-white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.home-landing .btn-primary:hover {
    background: var(--hl-primary-cta-hover);
}

.home-landing .btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 1.25rem;
    background: transparent;
    color: var(--hl-accent-plum);
    border: 2px solid var(--hl-accent-plum);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.home-landing .micro-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.85rem;
    color: var(--hl-text-light);
}

.home-landing .micro-trust span::before {
    content: "✓ ";
    color: var(--hl-accent-moss);
    font-weight: 700;
}

.home-landing section {
    padding: 3rem 1.5rem;
}

.home-landing section:nth-of-type(even) {
    background: var(--hl-surface-card);
}

.home-landing .section-inner {
    max-width: var(--hl-max);
    margin: 0 auto;
}

.home-landing .section-title {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    color: var(--hl-accent-plum);
}

.home-landing .section-intro {
    margin: 0 0 2rem;
    color: var(--hl-text-light);
    max-width: 640px;
}

.home-landing .features {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.home-landing .feature-card {
    padding: 1.25rem 1.5rem;
    border-radius: var(--hl-radius);
    border: 1px solid var(--hl-border-warm);
    background: var(--hl-surface-card);
}

.home-landing .feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--hl-accent-plum);
}

.home-landing .feature-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--hl-text-light);
}

.home-landing .steps {
    display: grid;
    gap: 1.25rem;
    counter-reset: step;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 700px) {
    .home-landing .steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.home-landing .step {
    position: relative;
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: 0.4rem;
    align-items: start;
    align-content: start;
    margin: 0;
    padding: 1.35rem 1.25rem 1.35rem 1.2rem;
    background: var(--hl-surface-card);
    border: 1px solid var(--hl-border-warm);
    border-radius: var(--hl-radius);
    box-shadow: var(--hl-shadow);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.home-landing .step::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--hl-radius) var(--hl-radius) 0 0;
    background: linear-gradient(
        90deg,
        var(--hl-accent-moss) 0%,
        hsl(16, 42%, 48%) 55%,
        var(--hl-accent-gold) 100%
    );
    opacity: 0.85;
    pointer-events: none;
}

@media (hover: hover) {
    .home-landing .step:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 36px rgba(44, 26, 34, 0.14);
    }
}

.home-landing .step:focus-within {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.home-landing .step::before {
    counter-increment: step;
    content: counter(step);
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 0.2rem;
    position: static;
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--hl-accent-moss) 0%, hsl(152, 28%, 32%) 100%);
    color: var(--hl-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow:
        0 2px 8px hsla(152, 35%, 22%, 0.35),
        0 0 0 2px var(--hl-surface-card);
}

.home-landing .step h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--hl-accent-plum);
    letter-spacing: -0.01em;
}

.home-landing .step p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--hl-text-light);
}

.home-landing .quote {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
    border-left: 4px solid var(--hl-primary-cta);
    background: var(--hl-surface-page);
    border-radius: 0 var(--hl-radius) var(--hl-radius) 0;
}

.home-landing .quote p {
    margin: 0 0 0.75rem;
    font-style: italic;
    color: var(--hl-text-dark);
}

.home-landing .quote cite {
    font-size: 0.9rem;
    color: var(--hl-text-light);
    font-style: normal;
}

.home-landing details {
    border: 1px solid var(--hl-border-warm);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--hl-surface-card);
}

.home-landing summary {
    font-weight: 600;
    color: var(--hl-accent-plum);
    cursor: pointer;
}

.home-landing details p {
    margin: 0.75rem 0 0;
    color: var(--hl-text-light);
    font-size: 0.95rem;
}

.home-landing .cta-final {
    text-align: center;
    background: linear-gradient(135deg, var(--hl-accent-deep) 0%, #5a3d48 100%);
    color: var(--hl-white);
    padding: 3rem 1.5rem;
}

.home-landing .cta-final h2 {
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
}

.home-landing .cta-final p {
    margin: 0 0 1.5rem;
    opacity: 0.92;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.home-landing .cta-final .btn-primary {
    background: var(--hl-surface-card);
    color: var(--hl-accent-deep);
}

.home-landing .cta-final .btn-primary:hover {
    background: var(--hl-white);
    color: var(--hl-accent-deep);
}
