/* ==========================================================================
   Raqnith — dark design system (HashiCorp-inspired, humanized)
   Canvas #000 · charcoal surface lift · hairline borders · warm amber accent
   Type: Plus Jakarta Sans display / Inter body
   Display type tight (lh 1.17–1.21) · body relaxed (lh 1.5–1.71)
   ========================================================================== */

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/PlusJakartaSansVariable.woff2") format("woff2-variations");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/InterVariable.woff2") format("woff2-variations");
}

:root {
    /* Surfaces — canvas is the whitespace; hierarchy via surface lift */
    --canvas: #000000;
    --surface-1: #15181e;
    --surface-2: #1f232b;
    --surface-3: #3b3d45;

    /* Hairlines — felt more than seen */
    --hairline: rgba(178, 182, 189, 0.1);
    --hairline-strong: #3b3d45;

    /* Ink */
    --ink: #ffffff;
    --ink-muted: #b2b6bd;
    --ink-subtle: #656a76;

    /* Brand / links - warm amber (human, trustworthy) */
    --brand: #f5a623;
    --brand-hover: #ffc14d;
    /* Legacy name kept as alias so stragglers stay on-brand */
    --accent-blue: var(--brand);

    /* Semantic */
    --ok: #00ca8e;
    --success: #00ca8e;
    --warning: #ffcf25;
    --error: #e62b1e;
    --error-bright: #ff5a4f;

    /* Status green - the only chromatic tone besides brand amber */
    --cat-green: #00ca8e;

    /* Radii — CTAs read as engineered, not consumer */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-xxl: 24px;
    --r-pill: 9999px;

    /* Type */
    --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Legacy aliases — keep unthemed sections coherent until their phase */
    --border: var(--hairline-strong);
    --muted: var(--ink-muted);
}

* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
}

/* Keep browser-autofilled text readable on dark surfaces */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--surface-1) inset;
    -webkit-text-fill-color: var(--ink);
    caret-color: var(--ink);
    transition: background-color 99999s ease-out;
}

[hidden] {
    display: none !important;
}

html {
    overflow-x: hidden;
    max-width: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    max-width: 100%;
}

::selection {
    background: rgba(245, 166, 35, 0.92);
    color: #201503;
}

:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

main {
    display: block;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink);
}

p {
    line-height: 1.69;
}

img,
svg {
    vertical-align: middle;
}

a {
    color: var(--brand);
}

a:hover {
    color: var(--brand-hover);
}

input,
button,
select,
textarea {
    font-family: inherit;
}

/* Generic primary button — white on black, 8px radius, >=40px tap height */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 10px 18px;
    background: var(--ink);
    color: var(--canvas);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.29;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
    background: #d9dce1;
    color: var(--canvas);
}

.button:active {
    transform: scale(0.98);
}

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 10px 18px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.29;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.button-outline:hover {
    background: var(--surface-2);
    border-color: var(--ink-subtle);
    color: var(--ink);
}

button.link {
    background: none;
    border: 0;
    color: var(--brand);
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.out-of-stock {
    color: var(--error-bright);
}

/* =========================================
   Cart Page & Layout Styles
   ========================================= */
.cart-page-container {
    max-width: 1100px;
    margin: 1.75rem auto 4rem;
    padding: 0 1.25rem;
}

.cart-header {
    margin-bottom: 2rem;
}

.cart-header-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.cart-header-title-row h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0;
}

.cart-count-pill {
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--hairline-strong);
}

.cart-header-sub {
    font-size: 15px;
    color: var(--ink-muted);
    line-height: 1.69;
    margin: 0;
}

/* Cart Grid */
.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cart-items-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 1.25rem;
}

.cart-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cart-item-card:hover {
    background: var(--surface-2);
    border-color: var(--hairline-strong);
}

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

.cart-item-icon-box {
    width: 52px;
    height: 64px;
    border-radius: var(--r-md);
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cart-item-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.cart-item-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.12s ease;
}

.cart-item-title a:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

.cart-item-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cart-tag-pill {
    font-size: 11px;
    line-height: 1.23;
    font-weight: 600;
    color: #c99df0;
    background: rgba(123, 66, 188, 0.16);
    border: 1px solid rgba(123, 66, 188, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cart-tag-delivery {
    font-size: 11px;
    line-height: 1.23;
    font-weight: 500;
    color: var(--cat-green);
    background: rgba(0, 202, 142, 0.12);
    border: 1px solid rgba(0, 202, 142, 0.35);
    padding: 0.2rem 0.5rem;
    border-radius: var(--r-pill);
}

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

.cart-item-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.cart-item-license {
    font-size: 11px;
    line-height: 1.38;
    color: var(--ink-subtle);
}

.btn-cart-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(230, 43, 30, 0.12);
    color: var(--error-bright);
    border: 1px solid rgba(230, 43, 30, 0.35);
    padding: 0.45rem 0.75rem;
    min-height: 44px;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.btn-cart-remove:hover {
    background: rgba(230, 43, 30, 0.22);
    border-color: rgba(230, 43, 30, 0.55);
}

.btn-cart-remove:active {
    transform: scale(0.96);
    background: rgba(230, 43, 30, 0.3);
}

/* Guarantee Box */
.cart-guarantee-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    padding: 0.85rem 1.25rem;
    flex-wrap: wrap;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
}

.guarantee-icon {
    color: var(--cat-green);
}

/* Summary Section */
.cart-summary-section {
    position: sticky;
    top: 1.5rem;
}

.cart-summary-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.summary-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--ink-muted);
}

.row-value {
    font-weight: 600;
    color: var(--ink);
}

.free-pill {
    color: var(--cat-green);
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--hairline);
    margin: 0.25rem 0;
}

.summary-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.total-label-block strong {
    display: block;
    font-size: 1rem;
    color: var(--ink);
    font-weight: 600;
}

.total-label-block span {
    font-size: 11px;
    line-height: 1.38;
    color: var(--ink-subtle);
}

.total-amount {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.button-checkout-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 60px;
    padding: 0.85rem 1.25rem;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, transform 0.12s ease;
}

.button-checkout-primary:hover {
    background: #d9dce1;
}

.button-checkout-primary:active {
    transform: scale(0.98);
    background: #c7cbd2;
}

.button-continue-shopping {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 0.4rem;
    transition: color 0.12s ease;
}

.button-continue-shopping:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* Cart Payment Badges */
.cart-payment-badges {
    padding-top: 1rem;
    border-top: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pay-tag-label {
    font-size: 11px;
    line-height: 1.23;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ink-subtle);
    letter-spacing: 0.06em;
}

.pay-chips-grid {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.pay-chip-pill {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-sm);
    font-size: 11px;
    line-height: 1.38;
    font-weight: 500;
    color: var(--ink-muted);
}

/* Empty State — friendly marketplace, responsive */
.cart-empty-state {
    text-align: center;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xxl);
    padding: 2.75rem 2rem 2rem;
    max-width: 620px;
    margin: 1.5rem auto 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.empty-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--ink-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
    border: 1px solid var(--hairline-strong);
}

.cart-empty-state h2 {
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.cart-empty-state > p {
    font-size: 15px;
    color: var(--ink-muted);
    margin: 0 0 1.5rem;
    line-height: 1.69;
    max-width: 420px;
}

.cart-empty-state > p strong {
    color: var(--ink);
    font-weight: 600;
}

.button-browse-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    min-height: 60px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.12s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.button-browse-store:active {
    transform: scale(0.98);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .button-browse-store:hover {
        background: #d9dce1;
    }
}

/* Perks row under CTA */
.empty-perks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.empty-perk {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    padding: 0.35rem 0.7rem;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
}

/* Trust strip below perks */
.empty-trust {
    margin-top: 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.empty-trust-label {
    font-size: 11px;
    line-height: 1.23;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-subtle);
}

.empty-pay-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.empty-pay-chip {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-sm);
    font-size: 11px;
    line-height: 1.38;
    font-weight: 500;
    color: var(--ink-muted);
}

.empty-signin-hint {
    margin-top: 1.15rem !important;
    font-size: 14px !important;
    color: var(--ink-subtle) !important;
    margin-bottom: 0 !important;
}

.empty-signin-hint a {
    color: var(--brand-hover);
    font-weight: 600;
    text-decoration: none;
}

.empty-signin-hint a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cart-empty-state {
        padding: 2rem 1.25rem 1.5rem;
        margin: 1rem auto 2rem;
        border-radius: 16px;
    }
    .empty-icon-wrap {
        width: 72px;
        height: 72px;
        margin-bottom: 1rem;
    }
    .empty-perks {
        gap: 0.4rem;
    }
    .empty-perk {
        font-size: 0.76rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 380px) {
    .cart-empty-state {
        padding: 1.75rem 1rem 1.25rem;
    }
    .cart-empty-state > p {
        font-size: 0.88rem;
    }
    .button-browse-store {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 860px) {
    .cart-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .cart-item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .cart-item-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* =========================================
   Product Detail Showcase Styles
   ========================================= */
.product-detail-container {
    max-width: 1100px;
    margin: 1.5rem auto 4rem;
    padding: 0 1.25rem;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    line-height: 1.38;
    color: var(--ink-subtle);
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.breadcrumb-nav a {
    color: var(--ink-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.12s ease;
}

.breadcrumb-nav a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--surface-3);
    font-size: 0.75rem;
}

.breadcrumb-current {
    color: var(--ink);
    font-weight: 600;
}

/* Showcase Grid */
.product-showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.product-showcase-visual {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.product-showcase-banner {
    min-height: 280px;
    border-radius: var(--r-xl);
}

.product-showcase-banner .showcase-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
}

/* Perks Card */
.showcase-perks-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.showcase-perk-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.showcase-perk-item .perk-icon {
    color: var(--ink-subtle);
    flex-shrink: 0;
    margin-top: 2px;
}

.showcase-perk-item strong {
    display: block;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.showcase-perk-item span {
    font-size: 13px;
    line-height: 1.38;
    color: var(--ink-subtle);
}

/* Showcase Panel */
.product-showcase-panel {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-meta-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
    line-height: 1.23;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    width: fit-content;
}

.product-category-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

.product-showcase-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.19;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Price Box */
.product-price-card {
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    padding: 1.25rem 1.5rem;
}

.price-main-row {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
}

.price-figure {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.price-currency-badge {
    background: var(--surface-3);
    color: var(--ink-muted);
    font-size: 11px;
    line-height: 1.23;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: var(--r-pill);
    letter-spacing: 0.06em;
}

.price-note {
    font-size: 13px;
    line-height: 1.38;
    color: var(--ink-subtle);
    margin: 0.4rem 0 0;
}

/* Features Row */
.product-features-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-item-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    padding: 0.35rem 0.75rem;
    border-radius: var(--r-pill);
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 500;
}

.feature-item-pill .pill-icon {
    color: var(--ink-subtle);
}

/* Purchase Actions */
.product-purchase-box {
    margin-top: 0.25rem;
}

.button-showcase-add {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1.75rem;
    min-height: 64px;
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.12s ease;
}

.button-showcase-add:active {
    transform: scale(0.98);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .button-showcase-add:hover {
        background: #d9dce1;
    }
}

.out-of-stock-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    background: rgba(230, 43, 30, 0.1);
    border: 1px solid rgba(230, 43, 30, 0.35);
    color: var(--error-bright);
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 500;
}

/* Payment Strip */
.payment-methods-strip {
    padding: 0.9rem 1.15rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strip-label {
    font-size: 11px;
    line-height: 1.23;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ink-subtle);
    letter-spacing: 0.06em;
}

.strip-badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pay-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--canvas);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-sm);
    font-size: 12px;
    line-height: 1.38;
    font-weight: 600;
    color: var(--ink-muted);
}

/* Back Link */
.product-detail-back {
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hairline);
}

.back-products-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ink-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.12s ease;
}

.back-products-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

@media (max-width: 860px) {
    .product-showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .product-showcase-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    .cart-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
}


/* =========================================
   Modern Checkout & QR Ph Payment Styles (Mobile-First & Touch Optimized)
   ========================================= */

main.checkout,
main.checkout.checkout-modern {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.25rem 1rem 6.5rem; /* Room for sticky bottom pay bar on phones */
    -webkit-tap-highlight-color: transparent;
}

/* Stepper Progress Bar */
.checkout-stepper {
    margin-bottom: 1.5rem;
}

.stepper-list {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 480px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-subtle);
}

.step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--hairline-strong);
}

.step-item.step-active {
    color: var(--ink);
}

.step-item.step-active .step-badge {
    background: var(--ink);
    color: var(--canvas);
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.step-item.step-completed {
    color: var(--cat-green);
}

.step-item.step-completed .step-badge {
    background: rgba(0, 202, 142, 0.16);
    color: var(--cat-green);
    border-color: rgba(0, 202, 142, 0.45);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--hairline-strong);
    margin: 0 0.5rem;
    max-width: 40px;
}

.step-connector.completed {
    background: var(--cat-green);
}

/* Compact stepper for phones: badges + labels shrink, connectors narrow,
   multi-word labels wrap so nothing overflows on a 320px screen. */
@media (max-width: 480px) {
    .stepper-list {
        max-width: 100%;
    }
    .step-item {
        font-size: 0.72rem;
        gap: 0.3rem;
        min-width: 0;
    }
    .step-label {
        line-height: 1.15;
        overflow-wrap: break-word;
    }
    .step-badge {
        width: 20px;
        height: 20px;
        font-size: 0.66rem;
        flex-shrink: 0;
    }
    .step-connector {
        max-width: 22px;
        margin: 0 0.3rem;
    }
}

@media (max-width: 380px) {
    .step-item {
        font-size: 0.68rem;
        gap: 0.25rem;
    }
    .step-badge {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
    .step-connector {
        max-width: 12px;
        margin: 0 0.25rem;
    }
}

/* Mobile Order Summary Accordion (Visible on Mobile, Hidden on Desktop) */
.mobile-summary-accordion {
    display: block;
    margin-bottom: 1.25rem;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    overflow: hidden;
}

.mobile-summary-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border: 0;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}

.mobile-summary-toggle-btn:active {
    background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
    .mobile-summary-toggle-btn:hover {
        background: var(--surface-2);
    }
}

.summary-toggle-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand);
    font-weight: 600;
}

.summary-toggle-chevron {
    transition: transform 0.2s ease;
}

.mobile-summary-toggle-btn.is-open .summary-toggle-chevron {
    transform: rotate(180deg);
}

.summary-toggle-right .summary-toggle-amount {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
}

.mobile-summary-panel {
    padding: 1rem;
    border-top: 1px solid var(--hairline);
    background: var(--surface-1);
}

.mobile-summary-items {
    list-style: none;
    padding: 0;
    margin: 0 0 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mobile-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
}

.mobile-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mobile-item-name {
    font-weight: 600;
    color: var(--ink);
}

.mobile-item-badge {
    font-size: 0.7rem;
    color: var(--ink-subtle);
    background: var(--surface-2);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    width: fit-content;
}

.mobile-item-price {
    font-weight: 700;
    color: var(--ink);
}

.mobile-summary-breakdown {
    border-top: 1px dashed var(--border);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--ink-subtle);
}

.mobile-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-breakdown-row.discount {
    color: var(--cat-green);
}

.mobile-breakdown-row.total-row {
    border-top: 1px solid var(--hairline);
    padding-top: 0.6rem;
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
}

/* Promo code inside the mobile summary accordion (phones only — the
   accordion itself is display:none at >=768px). */
.mobile-summary-panel .checkout-promo-box {
    margin: 0.9rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--hairline-strong);
}

.mobile-summary-panel .promo-input-group {
    gap: 0.45rem;
}

.mobile-summary-panel .btn-apply-promo {
    padding: 0.4rem 1rem; /* comfortable thumb target */
}

/* Card Sections */
.checkout-section-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.section-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.header-icon-wrap {
    width: 38px;
    height: 44px;
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-text-wrap {
    flex: 1;
    min-width: 180px;
}

.header-text-wrap h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.15rem;
    text-transform: none;
    letter-spacing: normal;
}

.header-text-wrap .section-desc {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    margin: 0;
}

.header-login-link-wrap {
    margin-left: auto;
    align-self: center;
}

.header-login-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand);
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.35);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}

.header-login-link:active {
    background: rgba(245, 166, 35, 0.2);
}

@media (hover: hover) and (pointer: fine) {
    .header-login-link:hover {
        background: rgba(245, 166, 35, 0.2);
        color: var(--brand-hover);
    }
}

.checkout-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 202, 142, 0.1);
    border: 1px solid rgba(0, 202, 142, 0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.user-badge-avatar {
    width: 34px;
    height: 40px;
    border-radius: 50%;
    background: var(--cat-green);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-badge-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    font-size: 0.85rem;
}

.user-badge-title {
    color: var(--cat-green);
    font-size: 0.85rem;
}

.user-badge-email {
    color: var(--cat-green);
    font-weight: 500;
    font-size: 0.8rem;
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(0, 202, 142, 0.16);
    color: var(--cat-green);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 202, 142, 0.45);
}

/* Form Fields */
.form-group {
    margin-bottom: 1.25rem;
}

.field-label {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin-bottom: 0.45rem;
}

.field-label-title {
    font-weight: 700;
    color: var(--ink);
}

.field-label-subtext {
    font-size: 0.78rem;
    color: var(--ink-subtle);
    font-weight: 400;
}

.required-star {
    color: var(--error);
    font-weight: 700;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--ink-subtle);
    pointer-events: none;
}

.form-input {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem 2.5rem 0.75rem 2.6rem;
    background: var(--surface-2);
    border: 1.5px solid var(--hairline-strong);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: var(--ink-subtle);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.form-input.valid {
    border-color: var(--cat-green);
}

.form-input.invalid {
    border-color: var(--error);
    background: rgba(230, 43, 30, 0.06);
}

.input-valid-indicator {
    position: absolute;
    right: 0.9rem;
    color: var(--cat-green);
    display: none;
    pointer-events: none;
}

.form-input.valid + .input-valid-indicator {
    display: flex;
    align-items: center;
}

.field-error {
    display: block;
    min-height: 1.2em;
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 0.3rem;
}

/* Email Domain Pills & Typos */
.checkout-email-group {
    margin-bottom: 1.5rem;
}

.email-input-wrap {
    position: relative;
}

.checkout-email-input {
    font-size: 1rem;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.email-domain-suggestions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.domain-pill {
    display: inline-flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    color: var(--ink-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.12s ease;
}

.domain-pill:hover {
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.35);
    color: var(--brand);
}

.domain-pill:active {
    background: rgba(245, 166, 35, 0.2);
    transform: scale(0.97);
}

.email-typo-notice {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 207, 37, 0.08);
    border: 1px solid rgba(255, 207, 37, 0.3);
    color: var(--warning);
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.email-typo-notice.hidden {
    display: none;
}

.btn-accept-typo {
    background: var(--warning);
    color: #ffffff;
    border: 0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    touch-action: manipulation;
}

.btn-accept-typo:hover {
    background: #e0b400;
}

.email-guarantee-hint {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    color: var(--ink-subtle);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.email-guarantee-hint .hint-icon {
    color: #f59e0b;
    flex-shrink: 0;
}

/* Summary Product Icons & Promo Box */
.summary-item-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.summary-product-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkout-promo-box {
    margin: 1rem 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--hairline);
}

.promo-input-group {
    display: flex;
    gap: 0.4rem;
}

.promo-input {
    flex: 1;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: 6px;
}

.promo-input::placeholder {
    color: var(--ink-subtle);
    text-transform: none;
    letter-spacing: 0;
}

.promo-input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface-2);
}

.btn-apply-promo {
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 0.12s ease;
}

.btn-apply-promo:hover {
    background: #d9dce1;
    color: var(--canvas);
}
.btn-apply-promo:disabled { opacity:0.6; cursor:not-allowed; }
.promo-error { margin-top:0.35rem; }
.promo-input.invalid { border-color: var(--error); background: rgba(230, 43, 30, 0.08); }

.applied-coupon-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 202, 142, 0.1);
    border: 1px solid rgba(0, 202, 142, 0.4);
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--cat-green);
}

.coupon-tag-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-remove-coupon {
    background: transparent;
    border: 0;
    color: var(--error-bright);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    border-radius: 4px;
}

.discount-val {
    color: var(--cat-green);
    font-weight: 700;
}

/* Payment Method Preview Section */
.payment-method-section {
    margin: 1.25rem 0;
}

.payment-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.payment-section-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.security-chip-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.qrph-badge-card {
    background: rgba(0, 202, 142, 0.1);
    border: 1.5px solid rgba(0, 202, 142, 0.45);
    border-radius: 10px;
    padding: 1.1rem;
}

.qrph-badge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.qrph-brand-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qrph-tag {
    background: var(--cat-green);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.qrph-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cat-green);
}

.zero-fee-pill {
    background: rgba(0, 202, 142, 0.16);
    color: var(--cat-green);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 202, 142, 0.45);
}

.qrph-desc {
    font-size: 0.85rem;
    color: var(--ink-muted);
    line-height: 1.45;
    margin: 0 0 0.85rem;
}

.supported-wallets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--canvas);
    border: 1px solid var(--hairline-strong);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
    touch-action: manipulation;
}

.wallet-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.wallet-dot.gcash { background: #007dfe; }
.wallet-dot.maya { background: #00d632; }
.wallet-dot.bpi { background: #b11116; }
.wallet-dot.bdo { background: #003087; }
.wallet-dot.ub { background: #ff7900; }
.wallet-dot.shopee { background: #ee4d2d; }
.wallet-dot.gotyme { background: #18d2bb; }
.wallet-dot.seabank { background: #ff5722; }

.wallet-pill.more-banks {
    background: var(--surface-2);
    color: var(--ink-subtle);
    border-style: dashed;
}

/* Compact the QR Ph badge card on phones — fewer pixels, same trust */
@media (max-width: 640px) {
    .payment-method-section {
        margin: 1rem 0;
    }
    .qrph-badge-card {
        padding: 0.8rem 0.75rem;
        border-radius: 9px;
    }
    .qrph-badge-header {
        gap: 0.5rem;
        margin-bottom: 0.65rem;
    }
    .qrph-tag {
        font-size: 0.78rem;
        padding: 0.15rem 0.45rem;
    }
    .qrph-subtitle {
        font-size: 0.74rem;
    }
    .zero-fee-pill {
        font-size: 0.66rem;
        padding: 0.15rem 0.45rem;
        white-space: nowrap;
    }
    .supported-wallets-grid {
        gap: 0.3rem;
    }
    .wallet-pill {
        padding: 0.18rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Touch-Friendly Terms Checkbox */
.terms-container {
    margin-top: 1rem;
}

.terms-touch-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.86rem;
    color: var(--ink-muted);
    line-height: 1.4;
    min-height: 44px;
    padding: 0.25rem 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

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

.custom-checkbox-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--hairline-strong);
    border-radius: 6px;
    background: var(--surface-1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.15s ease;
}

.custom-checkbox-box .check-icon {
    display: none;
    color: #ffffff;
}

.terms-checkbox:checked + .custom-checkbox-box {
    background: var(--accent-blue);
    border-color: var(--brand);
}

.terms-checkbox:checked + .custom-checkbox-box .check-icon {
    display: block;
}

.terms-text a {
    color: var(--brand);
    text-decoration: underline;
    font-weight: 500;
}

/* Primary Pay Button (Desktop & Form Container) */
.desktop-submit-wrap {
    display: none; /* hidden on mobile, shown on desktop >= 768px */
}

.btn-pay-primary {
    width: 100%;
    min-height: 64px;
    padding: 0.9rem 1.5rem;
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    border-radius: 10px;
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-pay-primary:active {
    transform: scale(0.98);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .btn-pay-primary:hover:not(:disabled) {
        background: #d9dce1;
    }
}

.btn-pay-primary:disabled {
    background: var(--surface-3);
    box-shadow: none;
    cursor: not-allowed;
}

.checkout-trust-footer {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--ink-subtle);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Sticky Bottom Pay Bar on Smart Phones */
.pay-bar.mobile-pay-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 1rem max(0.85rem, env(safe-area-inset-bottom));
    background: rgba(8, 9, 12, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--hairline-strong);
}

.mobile-pay-inner {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mobile-pay-total {
    display: flex;
    flex-direction: column;
}

.mobile-total-label {
    font-size: 0.75rem;
    color: var(--ink-subtle);
    font-weight: 500;
}

.mobile-total-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
}

.btn-pay-mobile {
    flex: 1;
    min-height: 60px;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, transform 0.1s ease;
}

.btn-pay-mobile:active {
    transform: scale(0.97);
    background: #c7cbd2;
}

.btn-pay-mobile:disabled {
    background: var(--surface-3);
    box-shadow: none;
    cursor: not-allowed;
}

/* Sidebar Order Summary (Desktop) */
.checkout-sidebar {
    display: none; /* hidden on mobile, shown on desktop */
}

.order-summary-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 1.25rem;
}

.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.summary-card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.item-count-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface-2);
    color: var(--ink-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.summary-lines {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-product-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.product-name {
    font-weight: 600;
    color: var(--ink);
}

.product-badge {
    font-size: 0.72rem;
    color: var(--ink-subtle);
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    width: fit-content;
}

.product-price {
    font-weight: 700;
    color: var(--ink);
}

.summary-totals {
    border-top: 1px solid var(--hairline);
    padding-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--ink-muted);
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.totals-row dt {
    color: var(--ink-subtle);
}

.totals-row dd {
    margin: 0;
    font-weight: 600;
    color: var(--ink);
}

.totals-row.discount-row {
    color: var(--cat-green);
}
.totals-row.discount-row dd {
    color: var(--cat-green);
}

.free-pill {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cat-green);
    background: rgba(0, 202, 142, 0.16);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.totals-row.total-highlight {
    border-top: 1px solid var(--hairline);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.totals-row.total-highlight dt.total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
}

.totals-row.total-highlight dd.total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
}

.summary-guarantee-box {
    margin-top: 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.guarantee-icon {
    color: var(--cat-green);
    flex-shrink: 0;
    margin-top: 1px;
}

.guarantee-text strong {
    display: block;
    font-size: 0.82rem;
    color: var(--ink);
    margin-bottom: 0.15rem;
}

.guarantee-text span {
    font-size: 0.78rem;
    color: var(--ink-subtle);
    line-height: 1.35;
}

/* =========================================
   Dedicated QR Payment Screen Styles
   ========================================= */

.checkout-header {
    margin-bottom: 1.25rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink-subtle);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0;
    margin-bottom: 0.5rem;
    touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
    .back-link:hover {
        color: var(--brand);
    }
}

.back-link:active {
    color: var(--brand-hover);
}

.order-ref-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.order-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
}

.btn-copy-mini {
    background: none;
    border: 0;
    padding: 2px;
    color: var(--ink-subtle);
    cursor: pointer;
    display: flex;
    align-items: center;
    touch-action: manipulation;
}

.btn-copy-mini:active {
    transform: scale(0.9);
    color: var(--brand);
}

.order-email-meta {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    min-width: 0;
    overflow-wrap: anywhere;
}

.qr-payment-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
}

.status-indicator-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: 8px;
    padding: 0.65rem 0.95rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink);
    min-width: 0;
}

.status-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pulsing-dot {
    width: 10px;
    height: 10px;
    background-color: var(--cat-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(0, 202, 142, 0.7);
    animation: pulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

.pulsing-dot.inactive {
    background-color: var(--surface-3);
    animation: none;
    box-shadow: none;
}

.pulsing-dot.success {
    background-color: var(--cat-green);
    animation: none;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 202, 142, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 202, 142, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 202, 142, 0); }
}

.timer-countdown {
    color: var(--error-bright);
    background: rgba(230, 43, 30, 0.14);
    border: 1px solid rgba(230, 43, 30, 0.35);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.timer-icon {
    color: var(--error-bright);
}

/* QR Code Display Container */
.qr-display-container {
    margin: 0.25rem auto 1rem;
    position: relative;
}

.qr-frame {
    position: relative;
    padding: 16px;
    background: #ffffff;
    border: 2px solid var(--hairline-strong);
    border-radius: var(--r-lg);
    display: inline-block;
}

.qr-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--brand);
    border-style: solid;
}
.qr-corner.top-left { top: 6px; left: 6px; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.qr-corner.top-right { top: 6px; right: 6px; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.qr-corner.bottom-left { bottom: 6px; left: 6px; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.qr-corner.bottom-right { bottom: 6px; right: 6px; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

#qr-code-img {
    display: block;
    width: 210px;
    height: 210px;
    max-width: 100%;
    object-fit: contain;
    transition: filter 0.3s ease;
}

#qr-code-img.dimmed {
    filter: blur(4px) grayscale(80%) opacity(0.25);
}

.qr-expired-overlay, .qr-success-overlay, .qr-order-expired-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 15, 19, 0.96);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 10;
}

.qr-expired-overlay[hidden], .qr-success-overlay[hidden], .qr-order-expired-overlay[hidden] {
    display: none !important;
}

.expired-modal, .success-modal {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.expired-icon-wrap {
    color: var(--error-bright);
    margin-bottom: 0.4rem;
}

.success-icon-wrap {
    color: var(--cat-green);
    margin-bottom: 0.4rem;
}

.expired-modal h3, .success-modal h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
}

.expired-modal p, .success-modal p {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    margin: 0 0 1rem;
    line-height: 1.4;
}

.btn-refresh-qr, .btn-view-receipt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-refresh-qr:active, .btn-view-receipt:active {
    transform: scale(0.97);
    background: #c7cbd2;
}

.btn-refresh-qr[aria-busy="true"] {
    opacity: 0.75;
    pointer-events: none;
}

.btn-refresh-qr .btn-refresh-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qr-refresh-spin 0.7s linear infinite;
}

.btn-refresh-qr.is-loading .btn-refresh-spinner {
    display: inline-block;
}

.btn-refresh-qr.is-loading .btn-refresh-icon {
    display: none;
}

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

/* Hidden form that only exists to carry the CSRF token for fetch() calls. */
.csrf-holder {
    display: none;
}

/* QR Action Buttons (Single Device Mobile Helper) */
.qr-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 1.1rem;
}

.btn-qr-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease;
}

.btn-save-photo {
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand);
    border: 1.5px solid rgba(245, 166, 35, 0.35);
}

.btn-save-photo:active {
    transform: scale(0.96);
    background: rgba(245, 166, 35, 0.2);
}

@media (hover: hover) and (pointer: fine) {
    .btn-save-photo:hover {
        background: rgba(245, 166, 35, 0.2);
    }
}

.btn-copy-amt {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1.5px solid var(--hairline-strong);
}

.btn-copy-amt:active {
    transform: scale(0.96);
    background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
    .btn-copy-amt:hover {
        background: var(--surface-2);
    }
}

.copied-pop {
    background: rgba(0, 202, 142, 0.18) !important;
    color: var(--cat-green) !important;
    border-color: rgba(0, 202, 142, 0.5) !important;
}

/* Amount Banner */
.qr-amount-banner {
    width: 100%;
    background: var(--surface-2);
    border: 1px dashed var(--hairline-strong);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.amount-banner-left {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.amount-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
}

.amount-note {
    font-size: 0.75rem;
    color: var(--ink-subtle);
}

.amount-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
}

/* Payment Guide Card */
.payment-guide-card {
    text-align: left;
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 1.1rem;
    margin-bottom: 1.25rem;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.guide-icon-wrap {
    color: var(--brand);
    display: flex;
    align-items: center;
}

.guide-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.guide-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-tab {
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    border-radius: 8px;
    padding: 0.85rem;
}

.guide-tab-title {
    margin-bottom: 0.5rem;
}

.tab-badge {
    display: inline-block;
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    border: 1px solid rgba(245, 166, 35, 0.35);
}

.tab-badge.alt {
    background: var(--surface-2);
    color: var(--ink-subtle);
    border-color: var(--hairline-strong);
}

.guide-steps {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.84rem;
    color: var(--ink-muted);
    line-height: 1.5;
}

.guide-alt-text {
    margin: 0;
    font-size: 0.84rem;
    color: var(--ink-muted);
    line-height: 1.45;
}

.supported-wallets-footer {
    width: 100%;
    text-align: left;
    margin-bottom: 0.5rem;
}

.supported-title {
    font-size: 0.8rem;
    color: var(--ink-subtle);
    font-weight: 600;
    display: block;
    margin-bottom: 0.45rem;
}

.wallet-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--canvas);
    border: 1px solid var(--hairline-strong);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.chip.more {
    background: var(--surface-2);
    color: var(--ink-subtle);
    border-style: dashed;
}

/* =========================================
   Desktop Responsive Layout (Screens >= 768px)
   ========================================= */

@media (min-width: 768px) {
    main.checkout,
    main.checkout.checkout-modern {
        padding-bottom: 2rem;
    }

    .mobile-summary-accordion {
        display: none; /* Hide accordion on desktop */
    }

    .checkout-columns {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 1.5rem;
        align-items: start;
    }

    .checkout-sidebar {
        display: block; /* Show sticky sidebar on desktop */
        position: sticky;
        top: 5rem;
    }

    .desktop-submit-wrap {
        display: block;
        margin-top: 0.5rem;
    }

    .pay-bar.mobile-pay-bar {
        display: none; /* Hide fixed mobile bottom bar on desktop */
    }
}

/* =========================================
   Global Layout, Header & Footer Styles
   ========================================= */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

.site-body {
    flex: 1 0 auto;
}

.site-header {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-brand-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.15rem 0;
    touch-action: manipulation;
}

.brand-logo-img {
    height: 60px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover .brand-logo-img {
    transform: scale(1.06);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--ink-muted);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.45rem 0.7rem;
    border-radius: var(--r-sm);
    transition: color 0.15s ease, background 0.15s ease;
    touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
    .nav-link:hover {
        color: var(--ink);
        background: var(--surface-2);
    }
}

.nav-link:active {
    transform: scale(0.97);
    background: var(--surface-3);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Revised Header Cart Button */
.header-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    min-height: 48px;
    background: var(--surface-1);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.15s ease,
                border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .header-cart-btn:hover {
        background: var(--surface-2);
        border-color: var(--ink-subtle);
        color: var(--ink);
    }
    .header-cart-btn:hover .cart-btn-icon {
        transform: translateY(-1px);
    }
}

.header-cart-btn:active,
.header-cart-btn.is-pressed {
    transform: scale(0.95);
    background: var(--surface-3);
    border-color: var(--ink-subtle);
    color: var(--ink);
}

.header-cart-btn:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.cart-btn-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
}

.cart-btn-icon {
    display: block;
    transition: transform 0.15s ease;
}

.cart-btn-text {
    font-weight: 600;
    color: inherit;
}

.cart-btn-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--ink);
    color: var(--canvas);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--r-pill);
    transform-origin: center;
    will-change: transform;
}

.cart-btn-badge-empty {
    background: var(--surface-3);
    color: var(--ink-muted);
    font-weight: 600;
}

/* Touch-friendly User Profile Menu */
.nav-auth {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Compact account icon for guests — shown instead of the
   Sign In / Register text buttons on small screens */
.auth-mobile-icon {
    display: none; /* mobile-only, revealed in the <=520px breakpoint */
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 46px;
    border: 1px solid var(--hairline-strong);
    border-radius: 8px;
    color: var(--ink-muted);
    background: var(--surface-1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, transform 0.1s ease;
}

.auth-mobile-icon:active {
    transform: scale(0.96);
    background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
    .auth-mobile-icon:hover {
        background: var(--surface-2);
        color: var(--ink);
    }
}

.button-nav-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    min-height: 48px;
    color: var(--ink-muted);
    background: transparent;
    border: 1px solid var(--hairline-strong);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: var(--r-md);
    touch-action: manipulation;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .button-nav-secondary:hover {
        background: var(--surface-2);
        color: var(--ink);
        border-color: var(--ink-subtle);
    }
}

.button-nav-secondary:active {
    transform: scale(0.97);
    background: var(--surface-3);
}

.button-nav-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.95rem;
    min-height: 48px;
    background: var(--ink);
    color: var(--canvas);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: var(--r-md);
    touch-action: manipulation;
    transition: background 0.15s ease, transform 0.12s ease;
}

@media (hover: hover) and (pointer: fine) {
    .button-nav-primary:hover {
        background: #d9dce1;
    }
}

.button-nav-primary:active {
    transform: scale(0.97);
    background: #c7cbd2;
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem;
    min-height: 48px;
    background: var(--surface-1);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

@media (hover: hover) and (pointer: fine) {
    .user-profile-btn:hover {
        background: var(--surface-2);
    }
}

.user-profile-btn:active {
    transform: scale(0.97);
    background: var(--surface-3);
}

.user-menu.is-open .user-profile-btn {
    background: var(--surface-2);
    border-color: var(--ink-subtle);
}

.user-avatar-mini {
    width: 26px;
    height: 26px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--r-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-chevron {
    color: var(--ink-subtle);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-menu.is-open .user-menu-chevron {
    transform: rotate(180deg);
}

.user-dropdown-actions {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface-2);
    min-width: 200px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-lg);
    padding: 0.4rem 0;
    z-index: 150;
}

.user-menu.is-open .user-dropdown-actions {
    display: block;
    animation: dropdownSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    min-height: 44px;
    font-size: 0.88rem;
    color: var(--ink-muted);
    text-decoration: none;
    font-weight: 500;
    touch-action: manipulation;
    transition: background 0.12s ease, color 0.12s ease;
}

@media (hover: hover) and (pointer: fine) {
    .dropdown-item:hover {
        background: var(--surface-3);
        color: var(--ink);
    }
    .dropdown-item:hover .dropdown-item-icon {
        color: var(--ink);
    }
}

.dropdown-item:active {
    background: var(--hairline-strong);
}

.dropdown-item-icon {
    color: var(--ink-subtle);
    flex-shrink: 0;
}

.dropdown-item.logout-link {
    color: var(--error-bright);
    border-top: 1px solid var(--hairline);
    margin-top: 0.25rem;
}

@media (hover: hover) and (pointer: fine) {
    .dropdown-item.logout-link:hover {
        background: rgba(230, 43, 30, 0.12);
        color: var(--error-bright);
    }
    .dropdown-item.logout-link:hover .dropdown-item-icon {
        color: var(--error-bright);
    }
}

.dropdown-item.logout-link:active {
    background: rgba(230, 43, 30, 0.2);
}

.fbadge {
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--r-sm);
    font-weight: 500;
}

.fbadge-icon {
    color: var(--ink-subtle);
}

/* Micro-animations */
@keyframes badgePop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.22);
    }
    85% {
        transform: scale(0.92);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-badge-pop {
    animation: badgePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes dropdownSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-badge-pop,
    .user-menu.is-open .user-dropdown-actions {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
    width: 100%;
}

.toast-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.875rem 0.875rem;
    background: var(--surface-1);
    border-radius: var(--r-md);
    border: 1px solid var(--hairline-strong);
    border-left: 3px solid var(--accent-blue);
    color: var(--ink);
    pointer-events: auto;
    overflow: hidden;
    transform-origin: top right;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.25s ease, opacity 0.25s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    will-change: transform, opacity;
}

.toast-item.toast-success {
    border-color: var(--hairline-strong);
    border-left-color: var(--success);
}
.toast-item.toast-success .toast-icon {
    color: var(--success);
}
.toast-item.toast-success .toast-progress-bar {
    background: var(--success);
}

.toast-item.toast-error,
.toast-item.toast-danger {
    border-color: var(--hairline-strong);
    border-left-color: var(--error);
}
.toast-item.toast-error .toast-icon,
.toast-item.toast-danger .toast-icon {
    color: var(--error-bright);
}
.toast-item.toast-error .toast-progress-bar,
.toast-item.toast-danger .toast-progress-bar {
    background: var(--error);
}

.toast-item.toast-warning {
    border-color: var(--hairline-strong);
    border-left-color: var(--warning);
}
.toast-item.toast-warning .toast-icon {
    color: var(--warning);
}
.toast-item.toast-warning .toast-progress-bar {
    background: var(--warning);
}

.toast-item.toast-info {
    border-color: var(--hairline-strong);
    border-left-color: var(--accent-blue);
}
.toast-item.toast-info .toast-icon {
    color: var(--accent-blue);
}
.toast-item.toast-info .toast-progress-bar {
    background: var(--accent-blue);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.toast-message {
    font-size: 0.885rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink);
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    padding: 0.25rem;
    margin: -0.25rem -0.25rem 0 0;
    color: var(--ink-subtle);
    cursor: pointer;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.toast-close:hover,
.toast-close:focus {
    color: var(--ink);
    background: var(--surface-3);
}

.toast-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
}

.toast-item.is-timed .toast-progress-bar {
    animation: toastCountdown linear forwards;
}

.toast-item:hover .toast-progress-bar,
.toast-item:focus-within .toast-progress-bar {
    animation-play-state: paused;
}

.toast-item.is-dismissing {
    animation: toastSlideOut 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 120px;
        margin-bottom: 0;
    }
    100% {
        opacity: 0;
        transform: translateX(110%) scale(0.95);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: -0.75rem;
    }
}

@keyframes toastCountdown {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@media (max-width: 640px) {
    .toast-container {
        top: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
        max-width: calc(100vw - 1.5rem);
        width: auto;
    }

    @keyframes toastSlideIn {
        from {
            opacity: 0;
            transform: translateY(-80%) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes toastSlideOut {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
            max-height: 120px;
        }
        100% {
            opacity: 0;
            transform: translateY(-80%) scale(0.95);
            max-height: 0;
            padding-top: 0;
            padding-bottom: 0;
            margin-bottom: -0.75rem;
        }
    }
}

/* Site Footer */
.site-footer {
    background: var(--canvas);
    color: var(--ink-muted);
    padding: 4rem 1.5rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--hairline);
    flex-shrink: 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.brand-col .footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.85rem;
}

.footer-logo-img {
    height: 64px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: inline-block;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-size: 14px;
    line-height: 1.71;
    margin: 0 0 1rem;
    color: var(--ink-subtle);
    max-width: 340px;
}

.footer-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.footer-col h3 {
    color: var(--ink-subtle);
    font-size: 12px;
    margin: 0 0 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.71;
    transition: color 0.15s ease;
    touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
    .footer-links a:hover {
        color: var(--ink);
    }
}

.footer-links a:active {
    color: var(--ink);
}

.footer-bottom {
    border-top: 1px solid var(--hairline);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    margin: 0;
    font-size: 13px;
    color: var(--ink-subtle);
}

.supported-payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pay-icon-tag {
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: var(--r-xs);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .header-container {
        padding: 0.5rem 0.85rem;
        gap: 0.5rem;
    }
    .brand-logo-img {
        height: 46px;
        max-width: 110px;
    }
    .footer-logo-img {
        height: 48px;
        max-width: 120px;
    }
    .main-nav {
        gap: 0.6rem;
        min-width: 0;
        flex: 1;
        justify-content: flex-end;
    }
    .nav-links {
        display: none; /* Home & Products stay reachable via footer on phones */
    }
    .header-cart-btn {
        padding: 0.4rem 0.65rem;
        min-height: 46px;
        gap: 0.35rem;
        font-size: 0.84rem;
    }
    .user-profile-btn {
        padding: 0.35rem 0.55rem;
        min-height: 46px;
        font-size: 0.84rem;
    }
    .user-name {
        max-width: 75px;
    }
}

@media (max-width: 520px) {
    .header-container {
        padding: 0.4rem 0.6rem;
        gap: 0.35rem;
    }
    .brand-name {
        font-size: 1.1rem;
    }
    .brand-logo-img {
        height: 40px;
        max-width: 96px;
    }
    .footer-logo-img {
        height: 44px;
        max-width: 110px;
    }
    .cart-btn-text {
        display: none;
    }
    .header-cart-btn {
        padding: 0.35rem 0.5rem;
        min-width: 40px;
        min-height: 36px;
        justify-content: center;
    }
    .user-name {
        display: none;
    }
    .user-profile-btn {
        padding: 0.35rem 0.45rem;
        min-width: 40px;
        min-height: 36px;
        justify-content: center;
    }
    .main-nav {
        gap: 0.35rem;
    }
    .nav-actions {
        gap: 0.28rem;
        flex-shrink: 0;
    }
    /* Collapse the guest Sign In / Register pair into one account icon */
    .auth-buttons {
        display: none;
    }
    .auth-mobile-icon {
        display: inline-flex;
    }
    .button-nav-secondary,
    .button-nav-primary {
        padding: 0.32rem 0.55rem;
        min-height: 36px;
        font-size: 0.8rem;
        white-space: nowrap;
        border-radius: 7px;
    }
}

@media (max-width: 380px) {
    .header-container {
        padding: 0.3rem 0.4rem;
        gap: 0.25rem;
    }
    .brand-logo-img {
        height: 34px;
        max-width: 84px;
    }
    .main-nav {
        gap: 0.2rem;
    }
    .auth-buttons {
        gap: 0.18rem;
    }
    .button-nav-secondary,
    .button-nav-primary {
        padding: 0.24rem 0.38rem;
        min-height: 32px;
        font-size: 0.72rem;
        border-radius: 6px;
    }
    .header-cart-btn,
    .user-profile-btn {
        min-width: 36px;
        min-height: 32px;
        padding: 0.28rem 0.35rem;
    }
}

/* =========================================
   Landing Page Styles
   ========================================= */

.landing-hero {
    position: relative;
    background-color: var(--canvas);
    background-image: radial-gradient(ellipse 60% 50% at 50% -10%, rgba(245, 166, 35, 0.12), transparent 70%),
                      radial-gradient(ellipse 40% 40% at 85% 110%, rgba(123, 66, 188, 0.08), transparent 70%);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--ink);
    padding: 5.25rem 1.5rem 4.5rem;
    text-align: center;
    overflow: hidden;
}

.hero-container {
    max-width: 880px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 1.25rem;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    line-height: 1.69;
    margin: 0 auto 2.25rem;
    max-width: 680px;
    color: var(--ink-muted);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.25rem;
    flex-wrap: wrap;
}

.button-hero-primary {
    background: var(--ink);
    color: var(--canvas);
    padding: 0.85rem 1.85rem;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background 0.12s ease;
}

.button-hero-primary:active {
    transform: scale(0.97);
    background: #d9dce1;
}

@media (hover: hover) and (pointer: fine) {
    .button-hero-primary:hover {
        background: #d9dce1;
        color: var(--canvas);
    }
}

.button-hero-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    padding: 0.85rem 1.65rem;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.button-hero-secondary:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .button-hero-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--ink-subtle);
    }
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 1rem;
    background: var(--surface-1);
    padding: 1.25rem 1.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--hairline);
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.metric-text strong {
    display: block;
    font-size: 0.92rem;
    color: var(--ink);
    font-weight: 600;
}

.metric-text span {
    font-size: 13px;
    line-height: 1.38;
    color: var(--ink-subtle);
}

.metric-divider {
    display: none;
}

@media (max-width: 768px) {
    .hero-metrics {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 1rem;
    }
    .metric-item {
        background: var(--surface-2);
        padding: 0.65rem 0.85rem;
        border-radius: var(--r-md);
        border: 1px solid var(--hairline);
    }
}

/* Landing Sections */
.landing-section {
    padding: 4rem 1.25rem;
}

.section-alternate {
    background: var(--surface-1);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.75rem;
}

/* Eyebrow — mandatory section label */
.section-tag {
    display: inline-block;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.23;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.6rem;
    line-height: 1.19;
    letter-spacing: -0.02em;
}

.section-subtext {
    font-size: 16px;
    color: var(--ink-muted);
    line-height: 1.69;
    margin: 0;
}

/* Catalog Page & Container */
.catalog-page-container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem 4rem;
}

.catalog-page-header {
    margin-bottom: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.catalog-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.catalog-count-pill {
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--hairline-strong);
}

.catalog-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.19;
}

/* Category Filter Nav */
.catalog-category-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.catalog-category-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.category-pill-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    min-height: 44px;
    border-radius: var(--r-pill);
    background: var(--surface-1);
    border: 1px solid var(--hairline-strong);
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-pill-tab:hover {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--ink-subtle);
}

.category-pill-tab.active {
    background: var(--ink);
    color: var(--canvas);
    border-color: var(--ink);
}

.category-count-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    color: var(--ink-muted);
}

.category-pill-tab.active .category-count-badge {
    background: rgba(0, 0, 0, 0.14);
    color: var(--canvas);
}

.catalog-subtext {
    font-size: 16px;
    color: var(--ink-muted);
    line-height: 1.69;
    margin: 0;
    max-width: 720px;
}

.catalog-perks-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 0.5rem;
    flex-wrap: wrap;
}

.catalog-perk-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
}

.catalog-perk-item .perk-icon {
    color: var(--ink-subtle);
}

.catalog-perk-dot {
    color: var(--surface-3);
    font-size: 0.8rem;
}

/* Guest Order Tracking */
.track-order-page {
    max-width: 560px;
}

.track-card {
    padding-bottom: 1.5rem;
}

.track-error-box {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--r-sm);
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #b91c1c;
    font-size: 0.86rem;
    line-height: 1.4;
}

.track-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.55rem;
    font-size: 0.8rem;
    color: var(--ink-subtle);
    line-height: 1.45;
}

.track-hint svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.track-submit-btn {
    margin-top: 1.25rem;
    width: 100%;
}

.track-signedin-note {
    margin-top: 1.15rem;
    text-align: center;
    font-size: 0.84rem;
    color: var(--ink-muted);
}

.track-signedin-note a {
    color: var(--brand);
    font-weight: 600;
}

/* Catalog Search */
.catalog-search {
    margin-top: 0.9rem;
}

.catalog-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 480px;
}

.search-field-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--ink-subtle);
    pointer-events: none;
}

.catalog-search-input {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 2.6rem 0.65rem 2.6rem;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-sm);
    background: var(--surface-1);
    color: var(--ink);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.catalog-search-input::placeholder {
    color: var(--ink-subtle);
}

.catalog-search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-clear-btn {
    position: absolute;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--ink-subtle);
    background: transparent;
    touch-action: manipulation;
}

.search-clear-btn:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.catalog-search-feedback {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* Catalog Pagination */
.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.25rem;
    flex-wrap: wrap;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-sm);
    background: var(--surface-1);
    color: var(--ink-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, transform 0.1s ease;
}

.pager-btn:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .pager-btn:hover:not(.pager-disabled) {
        background: var(--surface-2);
        color: var(--ink);
    }
}

.pager-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pager-pages {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 46px;
    padding: 0 0.4rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-decoration: none;
    touch-action: manipulation;
    transition: background-color 0.12s ease;
}

.pager-num:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.pager-current {
    background: var(--ink);
    color: var(--canvas);
    cursor: default;
}

.pager-current:hover {
    background: var(--ink);
    color: #ffffff;
}

.pager-ellipsis {
    color: var(--ink-subtle);
    padding: 0 0.15rem;
}

/* Fluid Adaptive Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2.5rem;
}

/* Product Card — charcoal surface lift, hairline edge */
.product-card-modern {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
    .product-card-modern:hover {
        border-color: var(--hairline-strong);
        transform: translateY(-2px);
    }
}

/* Product Visual Banner — uniform neutral surface */
.product-visual-banner {
    position: relative;
    background-color: var(--surface-2);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.3)),
                      url('/static/image/card-pattern.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--r-md);
    padding: 0.85rem;
    height: 135px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    overflow: hidden;
    border: 1px solid var(--hairline);
}

.product-visual-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 2;
}

.product-visual-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    z-index: 2;
    padding-bottom: 0.25rem;
}

.product-visual-icon {
    width: 52px;
    height: 64px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.product-category-tag {
    background: rgba(0, 0, 0, 0.45);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 11px;
    line-height: 1.23;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: var(--r-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-status-pill {
    font-size: 11px;
    font-weight: 600;
    color: var(--cat-green);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 202, 142, 0.4);
    padding: 0.15rem 0.55rem;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

.product-status-pill.out-of-stock {
    color: var(--error-bright);
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(230, 43, 30, 0.45);
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.product-title {
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.45rem;
    line-height: 1.35;
}

.product-title a {
    color: var(--ink);
    text-decoration: none;
    touch-action: manipulation;
    transition: color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .product-title a:hover {
        color: var(--brand-hover);
    }
}

.product-desc {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.71;
    margin: 0;
    flex-grow: 1;
}

.product-card-footer {
    border-top: 1px solid var(--hairline);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-price-block,
.product-price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 11px;
    color: var(--ink-subtle);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.price-val,
.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.product-card-buttons {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.form-add-to-cart {
    margin: 0;
}

.btn-add-cart {
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    padding: 0.55rem 0.95rem;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-add-cart:active {
    transform: scale(0.96);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .btn-add-cart:hover {
        background: #d9dce1;
    }
}

.btn-view-details {
    background: transparent;
    color: var(--ink-muted);
    border: 1px solid var(--hairline-strong);
    padding: 0.55rem 0.85rem;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-view-details:active {
    transform: scale(0.96);
    background: var(--surface-3);
}

@media (hover: hover) and (pointer: fine) {
    .btn-view-details:hover {
        background: var(--surface-2);
        border-color: var(--ink-subtle);
        color: var(--ink);
    }
}

/* Empty Catalog State */
.empty-catalog-card,
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--surface-1);
    border: 1px dashed var(--hairline-strong);
    border-radius: var(--r-lg);
}

.empty-state-card h3 {
    color: var(--ink);
    margin: 1rem 0 0.5rem;
}

.empty-state-card p {
    color: var(--ink-muted);
    margin: 0;
}

/* Screen Size Adaptive Grid Breakpoints */
@media (max-width: 640px) {
    .catalog-page-container {
        padding: 1.25rem 1rem 3rem;
    }
    
    .catalog-page-header {
        margin-bottom: 1.5rem;
    }

    /* Perk boxes are redundant here — every card already shows
       Instant Download, and cart/checkout carry the trust pillars */
    .catalog-perks-bar {
        display: none;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .product-card-buttons {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .btn-add-cart, .btn-view-details {
        padding: 0.6rem 0.85rem;
        min-height: 48px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1367px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.75rem;
    }
}

.section-cta-center {
    text-align: center;
    margin-top: 2rem;
}

/* Features Grid — Desktop 4-col, Tablet 2-col, Mobile stacked row */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
    .feature-card:hover {
        transform: translateY(-2px);
        border-color: var(--hairline-strong);
    }
}

.feature-icon-wrapper {
    width: 48px;
    height: 60px;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--hairline-strong);
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.71;
    margin: 0;
}

.feature-card p strong {
    color: var(--ink);
    font-weight: 600;
}

@media (max-width: 1100px) and (min-width: 769px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .feature-card {
        flex-direction: row;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.85rem;
        border-radius: 12px;
    }
    .feature-icon-wrapper {
        width: 42px;
        height: 48px;
        border-radius: 10px;
        margin-top: 1px;
    }
    .feature-card h3 {
        font-size: 0.95rem;
    }
    .feature-card p {
        font-size: 0.84rem;
        line-height: 1.5;
    }
}

@media (max-width: 380px) {
    .feature-card {
        padding: 0.9rem;
        gap: 0.75rem;
    }
    .feature-icon-wrapper {
        width: 38px;
        height: 44px;
        border-radius: 9px;
    }
}

/* Steps Grid — Desktop 3-col with connector, Mobile vertical timeline */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    align-items: stretch;
}

.step-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 1.75rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    transition: border-color 0.16s ease, transform 0.16s ease;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .step-card:hover {
        transform: translateY(-2px);
        border-color: var(--hairline-strong);
    }
}

.step-number-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--r-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.step-icon {
    width: 28px;
    height: 34px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--hairline-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.step-card p {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.71;
    margin: 0;
}

.step-card p strong {
    color: var(--ink);
    font-weight: 600;
}

/* Desktop connector line behind numbers */
@media (min-width: 861px) {
    .steps-grid::before {
        content: "";
        position: absolute;
        top: 50px;
        left: calc(16.66% + 56px);
        right: calc(16.66% + 56px);
        height: 2px;
        background: var(--hairline-strong);
        border-radius: var(--r-pill);
        z-index: 0;
        pointer-events: none;
    }
}

/* Tablet: slightly tighter */
@media (min-width: 769px) and (max-width: 860px) {
    .steps-grid {
        gap: 1.15rem;
    }
    .steps-grid::before {
        content: "";
        position: absolute;
        top: 50px;
        left: calc(16.66% + 40px);
        right: calc(16.66% + 40px);
        height: 2px;
        background: var(--hairline-strong);
        z-index: 0;
        pointer-events: none;
    }
}

/* Mobile: vertical timeline — left-aligned, compact */
@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding-left: 0;
        position: relative;
    }
    .steps-grid::before {
        content: "";
        position: absolute;
        left: 37px;
        top: 32px;
        bottom: 32px;
        width: 2px;
        background: var(--hairline-strong);
        border-radius: var(--r-pill);
        z-index: 0;
        pointer-events: none;
    }
    .step-card {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 1.15rem 1rem 1.15rem 1rem;
        gap: 0.85rem;
        min-height: 88px;
    }
    .step-number-wrap {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
        margin-bottom: 0;
        flex-shrink: 0;
        width: 44px;
        z-index: 1;
    }
    .step-number {
        width: 40px;
        height: 46px;
        font-size: 0.98rem;
    }
    .step-icon {
        width: 24px;
        height: 24px;
    }
    .step-content {
        flex: 1;
        min-width: 0;
        padding-top: 0.15rem;
    }
    .step-card h3 {
        font-size: 1rem;
    }
    .step-card p {
        font-size: 0.85rem;
    }
}

@media (max-width: 380px) {
    .step-card {
        padding: 1rem 0.85rem;
        gap: 0.7rem;
    }
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.92rem;
    }
    .steps-grid::before {
        left: 31px;
        top: 28px;
        bottom: 28px;
    }
}

/* Trust Section */
.section-trust {
    background: var(--surface-1);
    color: var(--ink);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.trust-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.trust-pill {
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.23;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 0.75rem;
}

.trust-text h2 {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.19;
    margin: 0 0 1rem;
}

.trust-text p {
    font-size: 16px;
    line-height: 1.69;
    color: var(--ink-muted);
    margin: 0 0 1.25rem;
}

.trust-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.trust-link {
    color: var(--brand-hover);
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
}

.trust-badge-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.security-chip {
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    padding: 0.8rem 1.25rem;
    border-radius: var(--r-md);
    color: var(--ink);
    font-weight: 500;
    font-size: 15px;
}

@media (max-width: 768px) {
    .trust-box {
        grid-template-columns: 1fr;
    }
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.testimonial-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.testimonial-rating {
    color: var(--ink-subtle);
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.testimonial-quote {
    font-size: 15px;
    line-height: 1.69;
    color: var(--ink-muted);
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}


.author-info strong {
    display: block;
    font-size: 14px;
    color: var(--ink);
}

.author-info span {
    font-size: 12px;
    line-height: 1.38;
    color: var(--ink-subtle);
}

/* CTA Banner — rounded charcoal panel */
.landing-cta-banner {
    padding: 4rem 1.25rem;
    text-align: center;
}

.cta-banner-container {
    max-width: 1080px;
    margin: 0 auto;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xxl);
    padding: clamp(2.5rem, 6vw, 3.5rem) 1.5rem;
}

.cta-banner-container h2 {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.19;
    margin: 0 0 0.75rem;
}

.cta-banner-container p {
    font-size: 16px;
    color: var(--ink-muted);
    line-height: 1.69;
    margin: 0 0 1.75rem;
}

.cta-banner-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.button-cta-white {
    background: var(--ink);
    color: var(--canvas);
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: var(--r-md);
    text-decoration: none;
    transition: background 0.15s ease;
}

.button-cta-white:hover {
    background: #d9dce1;
    color: var(--canvas);
}

.button-cta-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: var(--r-md);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.button-cta-outline:hover {
    background: var(--surface-2);
    border-color: var(--ink-subtle);
}

/* =========================================
   Authentication Pages (Login & Register)
   ========================================= */

.auth-page-container {
    max-width: 480px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 2.25rem;
}

.auth-card-wide {
    max-width: 540px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo-badge {
    width: 64px;
    height: 64px;
    background: rgba(245, 166, 35, 0.12);
    border: 1.5px solid rgba(245, 166, 35, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
}

.auth-logo-plain {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
    background: none;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
}

.auth-logo-img {
    width: 40px;
    height: 46px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.auth-logo-img--plain {
    width: 91px;
    height: 56px;
}

.auth-header h1 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.35rem;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0;
}

.auth-error-alert {
    background: rgba(230, 43, 30, 0.14);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--error);
}

.auth-error-alert p {
    margin: 0 0 0.25rem;
}
.auth-error-alert p:last-child {
    margin-bottom: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 0.35rem;
}

/* :not(.form-input) keeps this rule from overriding the richer
   .form-input styles (padding-left clears the leading icon) */
.form-group input:not(.form-input) {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--hairline-strong);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--ink);
    caret-color: var(--ink);
    background: var(--surface-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input::placeholder {
    color: var(--ink-subtle);
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.field-error {
    color: var(--error);
    font-size: 0.78rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.field-hint {
    color: var(--ink-subtle);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-terms-notice {
    font-size: 0.82rem;
    color: var(--ink-muted);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 0.2rem;
}

.button-auth-submit {
    width: 100%;
    background: var(--ink);
    color: var(--canvas);
    border: 0;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.5rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, transform 0.1s ease;
}

.button-auth-submit:active {
    transform: scale(0.98);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .button-auth-submit:hover {
        background: #d9dce1;
    }
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hairline);
    font-size: 0.88rem;
    color: var(--ink-muted);
}

.auth-footer p {
    margin: 0 0 0.75rem;
}

.auth-action-link {
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
    .auth-action-link:hover {
        text-decoration: underline;
    }
}

.auth-security-notice {
    font-size: 0.75rem;
    color: var(--ink-subtle);
}

/* =========================================
   Dashboard & Profile Styles
   ========================================= */

.dashboard-container {
    max-width: 1040px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

.profile-hero-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar-large {
    width: 64px;
    height: 64px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(245, 166, 35, 0.2);
}

.profile-hero-info h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: var(--ink);
}

.profile-meta {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    margin: 0;
}

.profile-hero-actions {
    display: flex;
    gap: 0.6rem;
}

.button-primary-sm {
    background: var(--ink);
    color: var(--canvas);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, transform 0.1s ease;
}

.button-primary-sm:active {
    transform: scale(0.96);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .button-primary-sm:hover {
        background: #d9dce1;
    }
}

/* Profile hero — phone layout (320–640px) */
@media (max-width: 640px) {
    .profile-hero-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .profile-hero-main {
        width: 100%;
        gap: 0.9rem;
        min-width: 0;
    }

    .profile-avatar-large {
        width: 52px;
        height: 64px;
        flex-shrink: 0;
        font-size: 1.4rem;
    }

    .profile-hero-info {
        min-width: 0;
    }

    .profile-hero-info h1 {
        font-size: 1.15rem;
        margin-bottom: 0.2rem;
    }

    .profile-meta {
        font-size: 0.78rem;
    }

    .profile-meta-sep {
        display: none;
    }

    .profile-meta-email {
        display: block;
        overflow-wrap: anywhere;
    }

    .profile-hero-actions {
        width: 100%;
    }

    .button-primary-sm {
        width: 100%;
        min-height: 44px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .stat-card:hover {
        transform: translateY(-2px);
        border-color: var(--hairline-strong);
    }
}

.stat-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    min-width: 0;
}

.stat-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--ink-muted);
    flex-shrink: 0;
}

.stat-icon-box.stat-icon-success {
    background: rgba(0, 202, 142, 0.12);
    color: var(--ok);
}

.stat-label {
    font-size: 0.72rem;
    color: var(--ink-subtle);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.stat-success {
    color: var(--ok);
}

.stat-help {
    font-size: 0.75rem;
    color: var(--ink-subtle);
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.85rem 0.65rem;
        border-radius: 10px;
    }

    .stat-icon-box {
        display: none;
    }

    .stat-card-top {
        margin-bottom: 0.35rem;
    }

    .stat-label {
        font-size: 0.6rem;
        letter-spacing: 0.02em;
    }

    .stat-value {
        font-size: 1.15rem;
        margin-bottom: 0.1rem;
    }

    .stat-help {
        display: none;
    }
}

.dashboard-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

.card-header {
    margin-bottom: 1.25rem;
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.25rem;
    text-transform: none;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    margin: 0;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row-2col {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.input-readonly {
    background: var(--surface-2) !important;
    color: var(--ink-subtle) !important;
    border-color: var(--border) !important;
    cursor: not-allowed;
}

.button-save-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.2);
    width: fit-content;
    touch-action: manipulation;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}

.shortcut-item:active {
    transform: scale(0.98);
    background: var(--surface-3);
}

@media (hover: hover) and (pointer: fine) {
    .shortcut-item:hover {
        background: var(--surface-1);
        border-color: var(--hairline-strong);
    }
}

.shortcut-icon-box {
    width: 38px;
    height: 44px;
    border-radius: 9px;
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shortcut-text {
    flex: 1;
}

.shortcut-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.1rem;
}

.shortcut-text span {
    font-size: 0.78rem;
    color: var(--ink-subtle);
}

.shortcut-arrow {
    color: var(--ink-subtle);
    display: flex;
    align-items: center;
    transition: transform 0.12s ease, color 0.12s ease;
}

.shortcut-item:hover .shortcut-arrow {
    transform: translateX(3px);
    color: var(--brand);
}

.btn-logout-block {
    width: 100%;
    background: rgba(230, 43, 30, 0.14);
    color: var(--error);
    border: 1px solid #fca5a5;
    padding: 0.6rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, transform 0.1s ease;
}

.btn-logout-block:active {
    transform: scale(0.98);
    background: #fca5a5;
}

@media (hover: hover) and (pointer: fine) {
    .btn-logout-block:hover {
        background: rgba(230, 43, 30, 0.25);
    }
}

/* Orders History Section */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.orders-count-badge {
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--hairline);
}

/* Order History Filter Tabs */
.order-filter-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.order-filter-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.order-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-muted);
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.order-filter-tab:hover {
    color: var(--ink);
    background: var(--surface-3);
}

.order-filter-tab.active {
    background: var(--surface-1);
    color: var(--brand);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-count-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--ink-muted);
}

.order-filter-tab.active .filter-count-badge {
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand);
}

.badge-has-pending {
    background: rgba(255, 207, 37, 0.12) !important;
    color: var(--warning) !important;
}

/* Pagination Bar */
.orders-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    margin-top: 1rem;
    border-top: 1px solid var(--hairline);
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--ink-subtle);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-page-nav:hover:not(.disabled) {
    background: var(--surface-2);
    border-color: var(--hairline-strong);
    color: var(--ink);
}

.btn-page-nav.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--surface-2);
}

.page-current-pill {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-subtle);
    padding: 0.35rem 0.65rem;
    background: var(--surface-2);
    border-radius: 6px;
}

.orders-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.orders-table-wrapper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.orders-table th {
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    color: var(--ink-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--hairline);
}

.orders-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--hairline);
    vertical-align: middle;
}

.order-table-row:last-child td {
    border-bottom: 0;
}

.order-id-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
}

.order-id-chip code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-weight: 700;
    color: var(--ink);
}

.order-id-chip .btn-copy-mini {
    background: none;
    border: 0;
    padding: 2px;
    color: var(--ink-subtle);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.order-id-chip .btn-copy-mini:hover {
    color: var(--brand);
    background: var(--surface-3);
}

.date-main {
    display: block;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.85rem;
}

.date-sub {
    display: block;
    color: var(--ink-subtle);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.order-item-chip {
    display: inline-block;
    background: var(--surface-2);
    color: var(--ink-muted);
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.1rem;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.amount-val {
    font-weight: 800;
    color: var(--ink);
    font-size: 0.95rem;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-paid {
    background: rgba(0, 202, 142, 0.14);
    color: var(--cat-green);
    border: 1px solid rgba(0, 202, 142, 0.45);
}

.badge-pending {
    background: rgba(255, 207, 37, 0.1);
    color: var(--warning);
    border: 1px solid rgba(255, 207, 37, 0.35);
}

.badge-failed {
    background: rgba(230, 43, 30, 0.14);
    color: var(--error-bright);
    border: 1px solid rgba(230, 43, 30, 0.4);
}

.badge-cancelled {
    background: var(--surface-2);
    color: var(--ink-subtle);
    border: 1px solid var(--hairline-strong);
}

.badge-neutral {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--hairline-strong);
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    background: var(--surface-2);
    color: var(--ink);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-table-action:active {
    transform: scale(0.96);
    background: var(--surface-3);
}

@media (hover: hover) and (pointer: fine) {
    .btn-table-action:hover {
        background: var(--surface-3);
    }
}

.btn-pay-now {
    background: var(--ink);
    color: var(--canvas);
    box-shadow: 0 2px 6px rgba(245, 166, 35, 0.25);
}

.btn-pay-now:active {
    transform: scale(0.96);
    background: #c7cbd2;
}

@media (hover: hover) and (pointer: fine) {
    .btn-pay-now:hover {
        background: #d9dce1;
    }
}

.btn-view-receipt-sm {
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand-hover);
    border: 1px solid rgba(245, 166, 35, 0.35);
}

@media (hover: hover) and (pointer: fine) {
    .btn-view-receipt-sm:hover {
        background: rgba(245, 166, 35, 0.2);
    }
}

.btn-reorder-sm {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--hairline);
}

@media (hover: hover) and (pointer: fine) {
    .btn-reorder-sm:hover {
        background: var(--surface-2);
        color: var(--ink);
    }
}

/* Mobile Order Cards (< 768px) */
.orders-mobile-list {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
}

.order-card-mobile {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.order-card-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.order-card-mobile-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.order-mobile-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.order-mobile-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--ink-subtle);
    margin-top: 0.2rem;
}

.order-card-mobile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
    gap: 0.75rem;
}

.order-mobile-amount-col {
    display: flex;
    flex-direction: column;
}

.mobile-amount-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-subtle);
}

.mobile-amount-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
}

/* Responsive Table vs Card Switch */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .orders-mobile-list.mobile-only {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    .desktop-only {
        display: block !important;
    }
}

.empty-orders-box {
    text-align: center;
    padding: 2.5rem 1rem;
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.empty-orders-box h3 {
    font-size: 1.15rem;
    margin: 0 0 0.35rem;
}

.empty-orders-box p {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0 0 1.25rem;
}

/* =========================================
   Profile Shortcuts Hub & Settings Styles
   ========================================= */

.profile-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.profile-shortcut-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.25rem;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-shortcut-card:hover {
    transform: translateY(-2px);
    border-color: var(--hairline-strong);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.profile-shortcut-card:active {
    transform: scale(0.98);
}

.profile-shortcut-card:hover .shortcut-arrow {
    transform: translateX(3px);
    color: var(--brand);
}

/* Pending payment — attention variant */
.profile-shortcut-attention {
    border-color: rgba(245, 166, 35, 0.45);
    background: linear-gradient(0deg, rgba(245, 166, 35, 0.06), rgba(245, 166, 35, 0.06)), var(--surface-1);
}

.shortcut-icon-attention {
    background: rgba(245, 166, 35, 0.14);
    color: #f5a623;
}

/* =========================================
   Seller Pages — Apply as Seller (Phased)
   ========================================= */

.seller-apply-card {
    max-width: 720px;
}

.seller-form-alert {
    margin-bottom: 1.25rem;
}

/* Phase progress header */
.apply-progress {
    max-width: 720px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.apply-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.apply-step-dot {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink-subtle);
    transition: color 0.2s ease;
}

.dot-num {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--hairline-strong);
    background: var(--surface-2);
    color: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dot-label {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.apply-step-dot.is-active {
    color: var(--brand);
}

.apply-step-dot.is-active .dot-num {
    border-color: var(--brand);
    background: rgba(245, 166, 35, 0.12);
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.12);
}

.apply-step-dot.is-done {
    color: var(--ok);
}

.apply-step-dot.is-done .dot-num {
    border-color: transparent;
    background: rgba(0, 202, 142, 0.14);
}

.apply-step-dot.is-done .dot-num::before {
    content: "✓";
}

.apply-step-dot.is-done .dot-num {
    font-size: 0;
}

.apply-progress-track {
    height: 4px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.apply-progress-bar {
    height: 100%;
    min-width: 12%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ok), var(--brand));
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Phase panels — section.* keeps specificity above .seller-form-section below */
section.apply-panel {
    display: none;
}

.apply-panel.is-active {
    display: flex;
    animation: apply-panel-in 0.25s ease;
}

@keyframes apply-panel-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inline validation state from the phase checker */
.form-group.has-js-error input,
.form-group.has-js-error select,
.form-group.has-js-error textarea {
    border-color: var(--error);
}

@media (max-width: 560px) {
    .dot-label {
        display: none;
    }

    .apply-steps {
        justify-content: flex-start;
        gap: 1.25rem;
    }
}

/* Trust strip under the nav buttons */
.apply-trust-row {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.seller-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seller-form-section-divided {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--hairline);
}

.seller-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.seller-section-badge {
    width: 34px;
    height: 40px;
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--ink-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.seller-section-badge.badge-green {
    background: rgba(0, 202, 142, 0.12);
    color: var(--ok);
}

.seller-section-head h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ink);
}

.seller-section-head p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-subtle);
}

/* Select & textarea parity with inputs */
.form-group select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 0.65rem 2.4rem 0.65rem 0.85rem;
    border: 1px solid var(--hairline-strong);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--surface-1);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--hairline-strong);
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--surface-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group textarea::placeholder {
    color: var(--ink-subtle);
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.select-wrap {
    position: relative;
}

.select-caret {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-subtle);
    pointer-events: none;
}

/* Price field clears the ₱ prefix */
.price-prefix {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--ink-subtle);
    pointer-events: none;
}

/* Honeypot — visually removed, still in the DOM for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Application received panel */
.seller-success-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.seller-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(0, 202, 142, 0.12);
    color: var(--ok);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.seller-success-card h2 {
    margin: 0 0 0.6rem;
    font-size: 1.35rem;
    color: var(--ink);
}

.seller-success-card > p {
    margin: 0 auto 1.5rem;
    max-width: 46ch;
    color: var(--ink-muted);
    line-height: 1.6;
}

.seller-success-points {
    list-style: none;
    margin: 0 auto 1.75rem;
    padding: 0;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-align: left;
}

.seller-success-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--ink-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.seller-success-points li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--ok);
}

.seller-success-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.seller-create-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkout-trust-strip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: var(--ink-subtle);
}

@media (max-width: 640px) {
    .seller-create-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .seller-create-footer .button-save-settings {
        width: 100%;
        min-height: 44px;
    }

    .checkout-trust-strip {
        justify-content: center;
    }
}

/* Track order — steps, reassurance, inline notes */
.track-reassure-strip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.field-step-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.track-inline-note {
    font-size: 0.75rem;
    margin: 0.3rem 0 0;
}

.track-inline-note.note-ok {
    color: var(--ok);
}

.track-inline-note.note-err {
    color: #ff6b6b;
}

.track-help-box {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--hairline-strong);
    border-radius: 10px;
    background: var(--surface-2);
}

.track-help-box strong {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--ink);
}

.track-help-box p {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--ink-subtle);
}

/* Settings Container & Header */
.settings-page-container {
    max-width: 1060px;
    margin: 1.5rem auto 4rem;
    padding: 0 1.25rem;
}

.settings-page-header {
    margin-bottom: 1.5rem;
}

.settings-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.settings-title-row h1 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.settings-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 202, 142, 0.1);
    color: var(--cat-green);
    border: 1px solid rgba(0, 202, 142, 0.35);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cat-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Summary Banner */
.settings-summary-banner {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    flex-wrap: wrap;
}

.settings-user-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-avatar-circle {
    width: 48px;
    height: 60px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.settings-user-meta h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.15rem;
    color: var(--ink);
}

.user-meta-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.user-username-tag {
    color: var(--brand);
    font-weight: 700;
    background: rgba(245, 166, 35, 0.12);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.user-email-text {
    color: var(--ink-subtle);
}

.settings-quick-metrics {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.metric-pill {
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-subtle);
    font-weight: 700;
}

.metric-value {
    font-size: 0.88rem;
    color: var(--ink);
    font-weight: 800;
}

/* App Layout: Sidebar Tabs + Panels */
.settings-app-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.settings-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 0.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.settings-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-muted);
    cursor: pointer;
    text-align: left;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
}

.settings-tab-btn:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.settings-tab-btn.active {
    background: var(--ink);
    color: var(--canvas);
    font-weight: 700;
}

.settings-tab-btn.active .tab-icon {
    color: var(--canvas);
}

.settings-content-area {
    min-width: 0;
}

.settings-tab-panel {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-tab-panel.active {
    display: flex;
    animation: fadeInTab 0.15s ease-out forwards;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-main-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

.card-header-with-icon {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--hairline);
}

.settings-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-header-with-icon h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.card-header-with-icon .card-subtitle {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    margin: 0;
}

.settings-form, .preferences-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-action-row {
    margin-top: 0.5rem;
}

.button-save-settings {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    touch-action: manipulation;
}

.input-with-badge {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-badge input {
    width: 100%;
    padding-right: 6.5rem;
}

.input-inline-badge {
    position: absolute;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cat-green);
    background: rgba(0, 202, 142, 0.1);
    border: 1px solid rgba(0, 202, 142, 0.35);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

/* Password Input & Show/Hide Toggle */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap input {
    width: 100%;
    padding-right: 2.75rem;
}

.btn-toggle-password {
    position: absolute;
    right: 0.65rem;
    background: transparent;
    border: 0;
    color: var(--ink-subtle);
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.12s ease;
}

.btn-toggle-password:hover {
    color: var(--ink);
}

.btn-toggle-password .hidden {
    display: none;
}

/* Password Strength Bar */
.password-strength-container {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-bar-track {
    flex: 1;
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.strength-weak {
    background-color: var(--error-bright);
}

.strength-medium {
    background-color: #f59e0b;
}

.strength-strong {
    background-color: var(--cat-green);
}

.strength-text-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-subtle);
    min-width: 105px;
}

.strength-weak-text {
    color: var(--error-bright);
}

.strength-medium-text {
    color: var(--warning);
}

.strength-strong-text {
    color: var(--cat-green);
}

.header-with-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-main-left {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.btn-generate-password {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    color: var(--ink-muted);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.12s ease;
}

.btn-generate-password:hover {
    background: rgba(245, 166, 35, 0.12);
    border-color: var(--brand-hover);
    color: var(--brand);
}

.btn-generate-password.copied {
    background: rgba(0, 202, 142, 0.1);
    border-color: rgba(0, 202, 142, 0.45);
    color: var(--cat-green);
}

/* Password Rules Checklist */
.password-rules-checklist {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.rule-check-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-subtle);
    transition: color 0.15s ease;
}

.rule-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--surface-3);
    transition: background-color 0.15s ease;
}

.rule-check-item.passed {
    color: var(--cat-green);
}

.rule-check-item.passed .rule-dot {
    background: var(--cat-green);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* Live Password Match Label */
.match-status-label {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.match-status-label.hidden {
    display: none;
}

.match-ok {
    color: var(--cat-green);
}

.match-err {
    color: var(--error-bright);
}

/* Subcard: Security Info */
.settings-subcard {
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
}

.subcard-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--ink);
}

.subcard-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.subcard-icon {
    color: var(--brand);
}

.security-features-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.security-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.feat-icon-ok {
    color: var(--cat-green);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.security-feature-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--ink);
}

.security-feature-item p {
    font-size: 0.78rem;
    color: var(--ink-subtle);
    margin: 0.1rem 0 0;
}

/* Custom Toggle Switches */
.preference-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--hairline);
}

.toggle-switch-label {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    cursor: pointer;
}

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

.toggle-custom-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--surface-3);
    border-radius: 999px;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.toggle-custom-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--surface-1);
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-checkbox:checked + .toggle-custom-slider {
    background: var(--brand);
}

.toggle-checkbox:checked + .toggle-custom-slider::after {
    transform: translateX(18px);
}

.toggle-custom-slider.disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.preference-text strong {
    display: block;
    font-size: 0.88rem;
    color: var(--ink);
}

.preference-text small {
    display: block;
    color: var(--ink-subtle);
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Metadata & Interactive Copy */
.meta-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--hairline);
}

.meta-key {
    color: var(--ink-subtle);
    font-weight: 500;
}

.meta-val {
    font-weight: 600;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-copy-interactive {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.12s ease;
}

.btn-copy-interactive:hover {
    background: var(--surface-3);
    color: var(--ink);
}

.btn-copy-interactive.copied {
    background: rgba(0, 202, 142, 0.1);
    border-color: rgba(0, 202, 142, 0.45);
    color: var(--cat-green);
}

/* Legal Links in Data Tab */
.meta-links-box {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hairline);
}

.meta-links-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.3rem;
}

.meta-links-box p {
    font-size: 0.82rem;
    color: var(--ink-subtle);
    margin: 0 0 1rem;
}

.meta-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.button-legal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.12s ease;
}

.button-legal-link:hover {
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.35);
    color: var(--brand);
}

@media (max-width: 768px) {
    .settings-app-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .settings-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.35rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .settings-sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .settings-tab-btn {
        white-space: nowrap;
        padding: 0.55rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* =========================================
   Legal & Privacy Policy Document Styles
   ========================================= */

.document-page-container {
    max-width: 820px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

.document-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.document-header {
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
}

.document-tag {
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.document-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0.35rem 0 0.5rem;
}

.document-meta {
    font-size: 0.85rem;
    color: var(--ink-subtle);
    margin: 0;
}

.document-intro-box {
    background: var(--surface-2);
    border-left: 4px solid var(--brand);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--ink-muted);
    line-height: 1.6;
}

.document-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.doc-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.75rem;
}

.doc-section p {
    font-size: 0.92rem;
    color: var(--ink-muted);
    line-height: 1.65;
    margin: 0 0 0.75rem;
}

.doc-section ul {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
    font-size: 0.92rem;
    color: var(--ink-muted);
    line-height: 1.65;
}

.doc-section li {
    margin-bottom: 0.4rem;
}

.highlight-notice {
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.35);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.highlight-notice strong {
    color: var(--canvas);
    display: block;
    margin-bottom: 0.25rem;
}

.highlight-notice p {
    color: #1e3a8a;
    margin: 0;
    font-size: 0.88rem;
}

.contact-info-block {
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink-muted);
}

.document-footer-nav {
    border-top: 1px solid var(--hairline);
    padding-top: 1.75rem;
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Error Pages (404, 403, 400)
   ========================================================================== */
.error-page-container {
    max-width: 680px;
    margin: 2.5rem auto 4rem;
    padding: 0 1rem;
}

.error-page-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.error-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.error-icon-404 {
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand-hover);
    border: 1px solid rgba(245, 166, 35, 0.35);
}

.error-icon-403 {
    background: rgba(255, 207, 37, 0.08);
    color: var(--warning);
    border: 1px solid rgba(255, 207, 37, 0.35);
}

.error-icon-400 {
    background: rgba(230, 43, 30, 0.08);
    color: var(--error-bright);
    border: 1px solid rgba(230, 43, 30, 0.35);
}

.error-code-badge {
    display: inline-block;
    background: rgba(245, 166, 35, 0.12);
    color: var(--brand-hover);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(245, 166, 35, 0.25);
}

.error-badge-warning {
    background: rgba(255, 207, 37, 0.08);
    color: var(--warning);
    border-color: rgba(255, 207, 37, 0.35);
}

.error-badge-danger {
    background: rgba(230, 43, 30, 0.08);
    color: var(--error-bright);
    border-color: rgba(230, 43, 30, 0.4);
}

.error-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.85rem;
    letter-spacing: -0.02em;
}

.error-description {
    font-size: 1rem;
    color: var(--ink-subtle);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.error-actions-group {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.error-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.error-action-btn:hover {
    transform: translateY(-1px);
}

.button-hero-secondary {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--hairline-strong);
}

.button-hero-secondary:hover {
    background: var(--surface-3);
    color: var(--ink);
}

.error-help-box {
    border-top: 1px solid var(--hairline);
    padding-top: 1.5rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--ink-subtle);
    line-height: 1.5;
}

.error-help-box a {
    color: var(--brand);
    text-decoration: underline;
    font-weight: 500;
}

@media (max-width: 640px) {
    .error-page-container {
        margin: 1.5rem auto 3rem;
    }
    .error-page-card {
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }
    .error-actions-group {
        flex-direction: column;
        width: 100%;
    }
    .error-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   Success / Receipt / Status State Modern
   ========================================= */
.checkout-success-modern,
.checkout-receipt-modern {
    max-width: 880px;
}
.success-hero-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 2.5rem 2rem;
    text-align: center;
}
.success-check-wrap { display:flex; justify-content:center; margin-bottom:1rem; }
.success-check-circle {
    width:72px; height:72px; border-radius:50%;
    background:rgba(0,202,142,0.12); border:1.5px solid rgba(0,202,142,0.4);
    display:flex; align-items:center; justify-content:center;
    color:var(--cat-green);
    animation: successPop 0.45s cubic-bezier(0.16,1,0.3,1);
}
.success-check-icon { color:var(--cat-green); }
@keyframes successPop { 0%{transform:scale(0.7);opacity:0} 100%{transform:scale(1);opacity:1} }
.success-pill {
    display:inline-flex; align-items:center; gap:0.35rem;
    background:rgba(0,202,142,0.14); color:var(--cat-green); font-size:12px; line-height:1.23; font-weight:600;
    padding:0.25rem 0.7rem; border-radius:var(--r-pill); border:1px solid rgba(0,202,142,0.45); margin-bottom:0.75rem;
}
.success-title { font-size: clamp(1.6rem,3vw,2rem); font-weight:700; color:var(--ink); margin:0 0 0.4rem; line-height:1.19; letter-spacing:-0.02em; }
.success-subtitle { color:var(--ink-muted); font-size:15px; margin:0 0 1.5rem; line-height:1.69; }
.success-order-summary {
    background:var(--surface-2); border:1px solid var(--hairline-strong); border-radius:var(--r-md);
    padding:1.1rem 1.25rem; text-align:left; margin:0 auto 1.25rem; max-width:520px;
    display:flex; flex-direction:column; gap:0.6rem;
}
.success-summary-row { display:flex; justify-content:space-between; align-items:center; gap:0.75rem; font-size:14px; }
.success-label { color:var(--ink-subtle); font-weight:500; }
.success-value { color:var(--ink); font-weight:600; display:inline-flex; align-items:center; gap:0.35rem; }
.success-amount { font-size:1.15rem; font-weight:700; color:var(--ink); }
.success-email-note {
    display:flex; align-items:center; justify-content:center; gap:0.45rem;
    font-size:13px; color:var(--ink-muted); background:rgba(245,166,35,0.1); border:1px solid rgba(245,166,35,0.3);
    padding:0.6rem 0.85rem; border-radius:var(--r-md); margin:0 auto 1.5rem; max-width:520px;
}
.success-actions { display:flex; flex-direction:column; align-items:center; gap:0.75rem; margin-bottom:1.25rem; }
.success-cta { max-width:520px; width:100%; justify-content:center; }
.success-trust-strip { display:flex; justify-content:center; gap:1rem; flex-wrap:wrap; font-size:13px; color:var(--ink-subtle); }
.success-trust-strip span { display:inline-flex; align-items:center; gap:0.3rem; }

/* Receipt */
.receipt-header-card {
    display:flex; justify-content:space-between; align-items:flex-start; gap:1rem;
    background:var(--surface-1); border:1px solid var(--hairline); border-radius:var(--r-lg); padding:1.25rem 1.5rem; margin-bottom:1.25rem;
}
.receipt-pill { display:inline-flex; align-items:center; gap:0.35rem; background:rgba(245,166,35,0.12); color:var(--brand-hover); font-size:11px; line-height:1.23; font-weight:600; padding:0.25rem 0.55rem; border-radius:var(--r-pill); border:1px solid rgba(245,166,35,0.35); margin-bottom:0.4rem; }
.receipt-header-card h1 { font-size:1.5rem; font-weight:700; color:var(--ink); margin:0 0 0.35rem; line-height:1.19; }
.receipt-order-meta { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; margin:0; font-size:13px; color:var(--ink-subtle); }
.receipt-paid-date { font-size:13px; color:var(--ink-subtle); }
.receipt-header-right { display:flex; flex-direction:column; align-items:flex-end; gap:0.4rem; }
.receipt-method-badge { background:var(--surface-2); border:1px solid var(--hairline-strong); padding:0.25rem 0.55rem; border-radius:var(--r-sm); font-size:12px; line-height:1.38; font-weight:500; color:var(--ink-muted); }
.receipt-grid { display:grid; grid-template-columns: 1fr 340px; gap:1.25rem; align-items:start; }
.receipt-items-card { padding:1.25rem; }
.receipt-card-title { font-size:15px; font-weight:600; color:var(--ink); margin:0 0 0.85rem; display:flex; align-items:center; gap:0.4rem; }
.receipt-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 -0.25rem; }
.receipt-table { width:100%; border-collapse:collapse; font-size:14px; min-width:320px; }
.receipt-table th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--ink-subtle); padding:0.5rem; border-bottom:1px solid var(--hairline-strong); font-weight:600; }
.receipt-table td { padding:0.75rem 0.5rem; border-bottom:1px solid var(--hairline); vertical-align:top; }
.receipt-table .text-right { text-align:right; }
.receipt-item-name { display:block; font-weight:600; color:var(--ink); }
.receipt-item-sub { font-size:11px; line-height:1.38; color:var(--ink-subtle); }
.receipt-totals { margin-top:1rem; }
.receipt-payment-meta { display:flex; justify-content:space-between; gap:0.5rem; flex-wrap:wrap; margin-top:0.85rem; padding-top:0.75rem; border-top:1px dashed var(--hairline-strong); font-size:13px; color:var(--ink-subtle); }
.receipt-contact-card .receipt-email-line { font-size:14px; color:var(--ink-muted); margin:0 0 0.85rem; }
.receipt-address-block { background:var(--surface-2); border:1px solid var(--hairline-strong); border-radius:var(--r-md); padding:0.85rem; margin-bottom:1rem; }
.receipt-address-block h3 { font-size:13px; font-weight:600; color:var(--ink); margin:0 0 0.35rem; }
.receipt-address-block address { font-style:normal; font-size:13px; color:var(--ink-muted); line-height:1.69; }
.receipt-actions { display:flex; flex-direction:column; gap:0.6rem; }

/* Receipt downloads card */
.receipt-downloads-card { margin-top:1rem; background:var(--surface-2); border:1px solid var(--hairline-strong); border-radius:var(--r-md); padding:1rem; scroll-margin-top:90px; }
.downloads-title { display:flex; align-items:center; gap:0.4rem; font-size:14px; font-weight:700; color:var(--ink); margin:0 0 0.25rem; }
.downloads-hint { font-size:12px; color:var(--ink-subtle); margin:0 0 0.75rem; }
.downloads-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.5rem; }
.download-row { display:flex; align-items:center; justify-content:space-between; gap:0.6rem; background:var(--surface-1); border:1px solid var(--hairline); border-radius:var(--r-sm); padding:0.6rem 0.7rem; }
.download-name { display:inline-flex; align-items:center; gap:0.45rem; font-size:13px; font-weight:600; color:var(--ink); min-width:0; overflow-wrap:anywhere; }
.btn-download-file { display:inline-flex; align-items:center; gap:0.3rem; background:var(--ink); color:var(--canvas); font-size:12px; font-weight:700; text-decoration:none; padding:0.5rem 0.8rem; border-radius:8px; white-space:nowrap; touch-action:manipulation; -webkit-tap-highlight-color:transparent; transition:transform 0.1s ease, opacity 0.15s ease; min-height:36px; }
.btn-download-file:hover { opacity:0.9; }
.btn-download-file:active { transform:scale(0.97); }
.downloads-note { font-size:11px; color:var(--ink-subtle); margin:0.75rem 0 0; line-height:1.5; }
.success-downloads-card { width:100%; max-width:440px; margin:1.25rem auto 0.5rem; text-align:left; background:var(--surface-2); border:1px solid var(--hairline-strong); border-radius:var(--r-md); padding:1rem; scroll-margin-top:90px; }
.license-row { gap:0.75rem; }
.license-meta { display:flex; flex-direction:column; min-width:0; }
.license-key-value { font-family:"SFMono-Regular",Menlo,Consolas,monospace; font-size:14px; font-weight:700; letter-spacing:0.06em; color:var(--ink); }
.license-product { font-size:11px; color:var(--ink-subtle); margin-top:0.15rem; }
.membership-expired-card { margin-top:1rem; background:#fffbeb; border:1px solid #fde68a; border-radius:var(--r-md); padding:1rem; }
.membership-expired-card .downloads-title { color:#92400e; }
@media (max-width:480px){
    .download-row { flex-direction:column; align-items:stretch; }
    .btn-download-file { justify-content:center; }
}
@media (max-width:860px){
    .receipt-header-card{flex-direction:column}
    .receipt-header-right{align-items:flex-start; flex-direction:row}
    .receipt-grid{grid-template-columns:1fr}
}

/* Status state cards */
.status-state-card {
    background:var(--surface-1); border:1px solid var(--hairline); border-radius:var(--r-xl);
    padding:2.5rem 2rem; text-align:center;
    max-width:560px; margin:0 auto;
}
.state-icon-wrap { width:72px; height:72px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; margin:0 auto 1rem; }
.state-icon-wrap.failed { background:rgba(230,43,30,0.12); border:1.5px solid rgba(230,43,30,0.35); color:var(--error-bright); }
.state-icon-wrap.confirming { background:rgba(245,166,35,0.12); border:1.5px solid rgba(245,166,35,0.35); color:var(--brand-hover); }
.state-icon-wrap .confirming-spinner {
    width:36px; height:36px; border:3px solid rgba(245,166,35,0.25); border-top-color:var(--brand-hover);
    border-radius:50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to{ transform:rotate(360deg)} }
.status-state-card h1 { font-size:1.5rem; font-weight:700; color:var(--ink); margin:0 0 0.5rem; line-height:1.19; }
.status-state-card p { color:var(--ink-muted); font-size:15px; line-height:1.69; margin:0 0 1rem; max-width:420px; margin-left:auto; margin-right:auto; }
.state-amount-pill { display:inline-block; background:var(--surface-2); border:1px solid var(--hairline-strong); padding:0.4rem 0.85rem; border-radius:var(--r-pill); font-size:14px; color:var(--ink); margin-bottom:1.25rem; }
.status-state-card .btn-pay-primary { max-width:340px; margin:0 auto; justify-content:center; }
.status-dots { display:flex; justify-content:center; gap:0.35rem; margin:0.85rem 0; }
.status-dots span { width:8px; height:8px; border-radius:50%; background:var(--surface-3); animation: dotPulse 1.2s infinite; }
.status-dots span:nth-child(2){animation-delay:0.2s} .status-dots span:nth-child(3){animation-delay:0.4s}
@keyframes dotPulse { 0%,80%,100%{opacity:0.3; transform:scale(0.85)} 40%{opacity:1; transform:scale(1)} }
.state-hint { font-size:13px; color:var(--ink-subtle); margin-top:0.75rem; }

/* Landing hero fallback for no radial-gradient support is unnecessary — canvas base */

