@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Nunito:wght@400;600;700;800&display=swap");

:root {
    --ink: #1a3a32;
    --ink-2: #245249;
    --page: #f3efe6;
    --page-2: #e8f0ec;
    --text: #1c2b26;
    --muted: #5c6f67;
    --link: #0d6e5f;
    --price: #c45c26;
    --search: #f0b429;
    --cart: #f6d45a;
    --buy: #3aa88a;
    --buy-ink: #08352c;
    --line: #d5ddd8;
    --ok: #1b7a5a;
    --danger: #9b1c1c;
    --cream: #fffaf3;
    --paw: rgba(26, 58, 50, .06);
    --shadow: 0 10px 28px rgba(26, 58, 50, .08);
    --font-display: "Fraunces", "Times New Roman", serif;
    --font-body: "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-family: var(--font-body);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 18%, rgba(58, 168, 138, .12), transparent 28%),
        radial-gradient(circle at 88% 8%, rgba(240, 180, 41, .16), transparent 26%),
        linear-gradient(180deg, var(--page-2), var(--page) 40%, #ebe4d6);
    color: var(--text);
}

main { flex: 1; }

a { color: var(--link); }

button, input { font: inherit; }

.page {
    width: min(1280px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 36px;
}

.site-header {
    background: linear-gradient(180deg, #16352e, var(--ink));
    color: #fff;
    box-shadow: 0 8px 24px rgba(16, 40, 34, .25);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    min-width: 132px;
}

.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { font-family: var(--font-display); font-size: 1rem; letter-spacing: .01em; line-height: 1.15; max-width: 12.5rem; }
.brand small { color: #c9e4dc; font-size: 12px; font-weight: 700; }

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #f0b429, #f6d45a);
    color: var(--ink);
    font-weight: 800;
    font-size: 20px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}

.brand-logo {
    height: 42px;
    width: auto;
    max-width: 168px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: #000;
    flex-shrink: 0;
}

.brand-logo.lg {
    height: 52px;
    max-width: 220px;
}

.brand-logo.sm {
    height: 28px;
    max-width: 110px;
    border-radius: 6px;
}

.brand.center {
    justify-content: center;
    color: var(--ink);
    margin-bottom: 12px;
    flex-direction: column;
    gap: 8px;
}

.search { flex: 1; display: flex; min-width: 0; }

.search input {
    flex: 1;
    height: 42px;
    border: none;
    border-radius: 999px 0 0 999px;
    padding: 0 16px;
    background: var(--cream);
}

.search button {
    border: none;
    background: var(--search);
    border-radius: 0 999px 999px 0;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
    color: var(--ink);
}

.account-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-nav a, .linkish {
    color: #fff;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.account-nav a small, .account-nav .linkish { color: #c9e4dc; font-size: 12px; }
.account-nav a strong, .cart-link strong { display: block; }

.cart-link { display: flex; align-items: flex-end; gap: 6px; }

.cart-count {
    background: var(--search);
    color: var(--ink);
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    padding: 1px 6px;
}

.subnav {
    background: var(--ink-2);
    display: flex;
    gap: 4px;
    padding: 8px 14px;
    overflow-x: auto;
}

.subnav a {
    color: #fff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 700;
    font-size: 14px;
}

.subnav a.active, .subnav a:hover { background: rgba(255, 255, 255, .14); }

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 28px;
    align-items: end;
    min-height: min(68vh, 560px);
    margin: 0 calc(50% - 50vw);
    width: 100vw;
    border-radius: 0;
    padding: clamp(28px, 5vw, 56px) max(18px, calc((100vw - 1280px) / 2 + 18px));
    color: #fff;
    background:
        linear-gradient(115deg, rgba(14, 42, 36, .92) 0%, rgba(20, 70, 58, .78) 42%, rgba(240, 180, 41, .35) 100%),
        radial-gradient(circle at 78% 42%, rgba(255,255,255,.2), transparent 28%),
        linear-gradient(160deg, #1f4d42, #3aa88a 55%, #f0b429);
    animation: heroWash 10s ease-in-out infinite alternate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, var(--paw) 0 10px, transparent 11px),
        radial-gradient(circle at 70% 60%, var(--paw) 0 8px, transparent 9px),
        radial-gradient(circle at 40% 80%, var(--paw) 0 12px, transparent 13px);
    background-size: 140px 140px;
    opacity: .55;
    pointer-events: none;
    animation: pawDrift 18s linear infinite;
}

.hero > * { position: relative; z-index: 1; }

.hero-brand {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.6vw, 3.1rem);
    line-height: 1.05;
    margin: 0 0 14px;
    letter-spacing: -.02em;
    max-width: 14ch;
}

.hero h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    font-weight: 600;
    line-height: 1.25;
    max-width: 16ch;
}

.hero-copy {
    margin: 0 0 22px;
    max-width: 36ch;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255,255,255,.92);
}

.hero a { color: #fff; }
.eyebrow { letter-spacing: .12em; text-transform: uppercase; font-size: 12px; margin: 0 0 10px; opacity: .85; font-weight: 800; }

.hero-actions, .buy-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }

.hero-visual {
    justify-self: end;
    align-self: center;
    width: min(100%, 360px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 36% 64% 48% 52% / 42% 38% 62% 58%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.12), transparent 40%),
        linear-gradient(160deg, #1a1a1a, #2a2a2a 70%);
    box-shadow: 0 24px 48px rgba(0,0,0,.18);
    animation: floatPet 4.5s ease-in-out infinite;
    overflow: hidden;
    padding: 12%;
}

.hero-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.steps {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.steps li {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, .18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.steps span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--search);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

@keyframes floatPet {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes heroWash {
    from { filter: saturate(1); }
    to { filter: saturate(1.08); }
}

@keyframes pawDrift {
    from { background-position: 0 0, 40px 20px, 10px 60px; }
    to { background-position: 140px 80px, 180px 100px, 150px 140px; }
}

.section { margin-top: 28px; }
.section h2, .section-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
}
.section-head, .price-row, .summary p, .order-card, .cart-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.section-head { align-items: end; margin-bottom: 12px; }
h1, h2 { margin: 0 0 8px; }
.muted { color: var(--muted); }

.cat-tiles, .grid {
    display: grid;
    gap: 14px;
}

.cat-tiles { grid-template-columns: repeat(6, 1fr); }
.grid { grid-template-columns: repeat(4, 1fr); }

.cat-tiles a {
    background: var(--cream);
    color: var(--text);
    text-decoration: none;
    border-radius: 18px;
    padding: 18px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(26, 58, 50, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cat-tiles a:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(26, 58, 50, .12);
}

.cat-tiles span { display: block; font-size: 32px; }

.card, .panel, .auth-card, .hint {
    background: var(--cream);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(26, 58, 50, .05);
}

.card { display: flex; flex-direction: column; overflow: hidden; }
.card-media { position: relative; }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { color: var(--text); text-decoration: none; font-weight: 750; }
.card-title:hover { color: var(--link); }
.card-summary {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thumb {
    --h: 160;
    aspect-ratio: 1.15;
    display: grid;
    place-items: center;
    font-size: 64px;
    background:
        radial-gradient(circle at 30% 20%, hsl(var(--h) 70% 82%), transparent 42%),
        linear-gradient(160deg, hsl(var(--h) 42% 52%), hsl(calc(var(--h) + 28) 38% 32%));
}

.thumb.small { width: 84px; aspect-ratio: 1; font-size: 34px; border-radius: 12px; }
.thumb.xl { aspect-ratio: 1; border-radius: 18px; font-size: 120px; min-height: 320px; }

.thumb-img {
    display: block;
    width: 100%;
    aspect-ratio: 1.15;
    object-fit: cover;
    background: #e8f0ec;
}

.thumb-img.small {
    width: 84px;
    aspect-ratio: 1;
    border-radius: 12px;
    flex-shrink: 0;
}

.thumb-img.xl {
    aspect-ratio: 1;
    border-radius: 18px;
    min-height: 320px;
}

.card-media .thumb-img { border-radius: 0; }

.card-reviews {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 4px;
}

.card-review {
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: #eef4f0;
    border: 1px solid rgba(26, 58, 50, .06);
}

.card-review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
}

.card-review p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stars.sm { font-size: 11px; letter-spacing: 0; }

.off {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c45c26;
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
}

.off.static { position: static; }

.off.dollar-tag {
    background: #0f3d34;
    font-size: 14px;
    padding: 4px 10px;
}

.card-dollar {
    border: 2px solid rgba(196, 92, 38, .35);
    box-shadow: 0 10px 24px rgba(196, 92, 38, .12);
}

.card-dollar .price {
    color: #9a2a1d;
    font-size: 1.35rem;
}

.stars {
    --rating: 0;
    --percent: calc(var(--rating) / 5 * 100%);
    background: linear-gradient(90deg, #e0a100 var(--percent), #d5ddd8 var(--percent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.stars::before { content: "★★★★★"; }
.rating { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }

.price { color: var(--price); font-size: 20px; font-weight: 800; }
.price-row.big .price { font-size: 28px; }
.list { color: var(--muted); text-decoration: line-through; font-size: 13px; }

.btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    color: var(--buy-ink);
}

.btn-cart { background: var(--cart); }
.btn-buy { background: var(--buy); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.45); color: #fff; }
.page .btn-ghost { background: #fff; border-color: #9bb0a7; color: var(--text); }
.btn-block { width: 100%; }
.btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.flash { border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.flash.ok { background: #e5f6ef; color: #065f46; }
.flash.err { background: #fde8e8; color: var(--danger); }

.panel { padding: 16px 18px; }
.panel + .panel { margin-top: 14px; }
.split { display: grid; grid-template-columns: 1.5fr .8fr; gap: 16px; align-items: start; }
.summary p, .order-card { margin: 8px 0; }
.total { font-size: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.total span:last-child { color: var(--price); }
.discount-line { color: var(--ok); font-weight: 700; }
.coupon-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 12px 0 16px;
    padding: 12px;
    border-radius: 12px;
    background: #eef7f3;
    border: 1px solid #b7e0d0;
}

.welcome-promo,
.dollar-promo {
    margin: 0 0 12px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    color: #fff;
}

.welcome-promo {
    background:
        linear-gradient(90deg, #7a1810 0%, #c45c26 42%, #f0b429 100%);
    box-shadow: 0 12px 32px rgba(154, 42, 29, .28);
}

.welcome-promo-loud {
    border-bottom: 3px solid #fff3;
}

.dollar-promo {
    background:
        linear-gradient(90deg, #0f3d34 0%, #1f6b5a 45%, #3aa88a 100%);
    box-shadow: 0 12px 32px rgba(15, 61, 52, .28);
    margin-bottom: 18px;
}

.welcome-promo-inner,
.dollar-promo-inner {
    width: min(1280px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 4px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.welcome-promo-badge,
.dollar-promo-badge {
    flex: 0 0 auto;
    min-width: 96px;
    text-align: center;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: .04em;
    padding: 14px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .22);
    border: 2px solid rgba(255, 255, 255, .5);
    font-family: var(--font-display);
}

.dollar-promo-badge {
    font-size: 1.6rem;
    min-width: 72px;
}

.welcome-promo-badge.soft {
    font-size: 1rem;
}

.promo-kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .9;
}

.welcome-promo-copy,
.dollar-promo-copy {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.welcome-promo-copy strong,
.dollar-promo-copy strong {
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-family: var(--font-display);
    line-height: 1.2;
}

.welcome-promo-copy span,
.dollar-promo-copy span {
    color: rgba(255, 255, 255, .94);
    font-size: 1rem;
}

.welcome-promo-copy a,
.dollar-promo-copy a {
    color: #fff;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.welcome-promo .btn-buy,
.dollar-promo .btn-buy {
    background: #fff;
    color: #8a3414;
    font-size: 1.02rem;
    padding: 12px 20px;
}

.dollar-promo .btn-buy {
    color: #0f3d34;
}

.welcome-promo .btn-ghost.dark {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

@keyframes promoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,.35); }
    50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

.pulse {
    animation: promoPulse 1.8s ease-in-out infinite;
}

.coupon-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: .02em;
}

.coupon-countdown.is-expired {
    color: #fecaca;
}

.account-page .account-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.account-page h1 {
    margin: 0 0 4px;
    font-family: var(--font-display);
}

.account-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.account-links .btn-ghost {
    background: #fff;
    border-color: #9bb0a7;
    color: var(--text);
}

.coupon-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.coupon-ticket {
    display: grid;
    grid-template-columns: 110px 1fr;
    overflow: hidden;
    border-radius: 18px;
    background: var(--cream);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    min-height: 148px;
}

.coupon-ticket-amount {
    display: grid;
    place-content: center;
    text-align: center;
    background: linear-gradient(160deg, #1f4d42, #3aa88a);
    color: #fff;
    padding: 16px 10px;
}

.coupon-ticket-amount strong {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
}

.coupon-ticket-amount span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .9;
}

.coupon-ticket-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coupon-ticket-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.coupon-code {
    font-size: 1.05rem;
    letter-spacing: .04em;
}

.coupon-status {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e5f6ef;
    color: var(--ok);
}

.coupon-ticket.status-expired .coupon-status,
.coupon-ticket.status-used .coupon-status {
    background: #f1f1f1;
    color: var(--muted);
}

.coupon-ticket.status-expired,
.coupon-ticket.status-used {
    opacity: .78;
}

.coupon-ticket.status-expired .coupon-ticket-amount,
.coupon-ticket.status-used .coupon-ticket-amount {
    background: linear-gradient(160deg, #5c6f67, #8aa399);
}

.coupon-timer-line {
    margin: 4px 0;
    font-size: 1.05rem;
}

.coupon-timer-line .coupon-countdown {
    color: var(--price);
    font-size: 1.2rem;
}

.coupon-empty { text-align: left; }
.tiny { font-size: 12px; }
.btn-sm { padding: 8px 14px; font-size: 14px; margin-top: 8px; align-self: start; }

.dollar-zone .section-head h2 {
    color: #9a2a1d;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-note {
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 1.02rem;
}

.dollar-zone {
    padding: 22px 20px 12px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(196, 92, 38, .14), rgba(240, 180, 41, .2));
    border: 2px solid rgba(196, 92, 38, .35);
    box-shadow: 0 14px 36px rgba(196, 92, 38, .12);
}

.cat-tiles a.cat-tile-hot {
    background: linear-gradient(145deg, #fff7e8, #ffe0b8);
    border: 2px solid #c45c26;
    box-shadow: 0 8px 20px rgba(196, 92, 38, .16);
}

.promo-callout {
    margin: 10px 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: .95rem;
}

.promo-callout strong { display: block; margin-bottom: 2px; }
.promo-callout p { margin: 0; }

.dollar-callout {
    background: #e8f6f1;
    border: 1px solid #7ec9b0;
    color: #0f3d34;
}

.coupon-box.is-blocked {
    background: #f5f1ea;
    border-color: #cfc4b4;
    color: var(--muted);
    opacity: .95;
}

.cart-row { padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row.plain { border-bottom: none; }
.qty-form { display: flex; gap: 6px; }
.qty-form input, .buy-row input[type="number"] {
    width: 72px;
    height: 36px;
    border: 1px solid #9bb0a7;
    border-radius: 10px;
    padding: 0 8px;
}

.text-btn { background: none; border: none; color: var(--link); cursor: pointer; }

.detail { display: grid; grid-template-columns: 420px 1fr; gap: 28px; }

.detail-media {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-video {
    border-radius: 18px;
    overflow: hidden;
    background: #0f2420;
    box-shadow: var(--shadow);
}

.video-label {
    margin: 0;
    padding: 8px 12px 0;
    color: #c9e4dc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.product-video video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #0f2420;
}

.video-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    background: rgba(15, 36, 32, .82);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}

.card-media { position: relative; }
.crumb { display: flex; gap: 8px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }

.sorts { display: flex; gap: 8px; flex-wrap: wrap; }
.sorts a, .pager a {
    text-decoration: none;
    background: var(--cream);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
}
.sorts a.on, .pager a.on { background: var(--ink); color: #fff; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

.empty { background: var(--cream); border-radius: 16px; padding: 32px; text-align: center; }

.auth-wrap { max-width: 400px; margin: 12px auto 20px; }
.auth-card, .hint { padding: 20px 22px; }
.hint { margin-top: 14px; }
.hint code { background: #eef4f0; padding: 1px 4px; border-radius: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field input, .buy-row input {
    height: 40px;
    border: 1px solid #9bb0a7;
    border-radius: 10px;
    padding: 0 10px;
}
.field input:focus { outline: 2px solid #3aa88a; border-color: #3aa88a; }
.field-error, .validation-summary-errors { color: var(--danger); font-size: 13px; }
.validation-summary-errors ul { margin: 0 0 8px; padding-left: 18px; }
.input-validation-error { border-color: var(--danger) !important; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { color: var(--text); text-decoration: none; }
.pill { border-radius: 999px; padding: 4px 10px; font-size: 13px; background: #fff4d6; font-weight: 700; }
.pill.paid { background: #e5f6ef; color: var(--ok); }
.pill.shipped { background: #e8f1fb; color: #1d4f91; }
.pill.delivered { background: #eef6e8; color: #3d6b1e; }
.pill.cancelled { background: #eee; color: #555; }
.pill.pending { background: #fff4d6; color: #8a5a00; }

.field select, .field textarea, .admin-form textarea {
    width: 100%;
    border: 1px solid #9bb0a7;
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
}
.field select { height: 40px; }
.field textarea, .admin-form textarea { min-height: 96px; resize: vertical; }
.field select:focus, .field textarea:focus { outline: 2px solid #3aa88a; border-color: #3aa88a; }

.review-form { margin-bottom: 14px; }
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-item h3 { margin: 0 0 6px; font-size: 16px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.admin-stats a {
    text-decoration: none;
    color: var(--text);
    text-align: center;
}
.admin-stats strong { display: block; font-size: 28px; }
.admin-search { max-width: 420px; margin: 12px 0 16px; }
.admin-table { overflow-x: auto; padding: 0; }
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.admin-table th { background: #eef4f0; font-size: 13px; color: var(--muted); }
.admin-form { max-width: 720px; }
.check-stack { justify-content: center; gap: 4px; }
.cancel-after { margin-top: 10px; }

.site-footer {
    background: linear-gradient(180deg, #16352e, #0f2420);
    color: #c9e4dc;
    padding: 28px 18px;
}
.site-footer .inner {
    width: min(1280px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.site-footer strong { color: #fff; font-family: var(--font-display); }
.site-footer p { line-height: 1.6; }

/* —— Secure checkout —— */
.checkout-body {
    background: linear-gradient(180deg, #eef4f0, #f3efe6);
    min-height: 100vh;
}

.checkout-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(180deg, #16352e, var(--ink));
    color: #fff;
    border-bottom: 1px solid #2f5a4e;
}

.checkout-header .brand {
    justify-self: start;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-title {
    margin: 0;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 26px;
    font-weight: 600;
    font-family: var(--font-display);
    color: #c9e4dc;
}

.checkout-cart {
    justify-self: end;
    display: grid;
    place-items: center;
}

.lock-ico { width: 18px; height: 18px; opacity: .85; }

.checkout-main {
    width: min(1100px, calc(100% - 28px));
    margin: 18px auto 40px;
}

.checkout-footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.secure-grid {
    display: grid;
    grid-template-columns: 1.55fr .7fr;
    gap: 22px;
    align-items: start;
}

.secure-block {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    background: var(--cream);
}

.secure-block-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.secure-block-head h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
    font-family: var(--font-display);
}

.pay-banner {
    background: #eef7f3;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0;
    font-size: 13px;
}

.pay-balance {
    border-top: 1px solid #e7e7e7;
    padding-top: 12px;
    margin-top: 12px;
}

.pay-code-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.pay-code-row input {
    flex: 1;
    height: 36px;
    border: 1px solid #9bb0a7;
    border-radius: 10px;
    padding: 0 10px;
    background: #eef4f0;
}

.pay-cards { margin-top: 16px; }
.pay-cards h3 { margin: 0 0 10px; font-size: 15px; }

.selected-card.is-empty {
    border: 1px dashed #9bb0a7;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
}

.card-choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #f0b429;
    background: #fff6df;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: default;
}

.card-choice strong, .card-choice small { display: block; }
.card-choice small { color: var(--muted); margin-top: 2px; }

.link-add-card {
    background: none;
    border: none;
    color: var(--link);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.link-add-card:hover { text-decoration: underline; color: #c45c26; }

.learn-note { margin-top: 14px; font-size: 13px; line-height: 1.5; }

.secure-summary {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    background: var(--cream);
    position: sticky;
    top: 12px;
}

.secure-summary hr {
    border: none;
    border-top: 1px solid #e7e7e7;
    margin: 14px 0;
}

.secure-summary h2 { font-size: 16px; margin: 0 0 10px; font-family: var(--font-display); }
.sum-line, .sum-total {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 0;
    font-size: 14px;
}
.sum-total {
    font-size: 18px;
    font-weight: 800;
    color: var(--price);
    margin-top: 10px;
}
.center-note { text-align: center; font-size: 12px; margin: 8px 0 0; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 40, 34, .55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    z-index: 1000;
    overflow-y: auto;
}

.modal-backdrop.is-open { display: flex; }
body.modal-open { overflow: hidden; }

.card-modal {
    position: relative;
    width: min(460px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
    padding: 22px 24px 20px;
}

.card-modal-wide { width: min(560px, 100%); }

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #555;
    cursor: pointer;
}

.modal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: 800;
}

.brand-mark.sm {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.modal-brand .brand-logo.sm {
    background: #000;
}

.card-modal h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-family: var(--font-display);
}

.secure-line {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ok);
    font-size: 13px;
    margin: 14px 0 0;
}

.modal-learn {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 13px;
}

.modal-learn .hero-actions { margin-top: 8px; }

@media (max-width: 900px) {
    .secure-grid { grid-template-columns: 1fr; }
    .checkout-title { font-size: 22px; }
    .secure-summary { position: static; }
}

@media (max-width: 1000px) {
    .grid, .cat-tiles { grid-template-columns: repeat(3, 1fr); }
    .detail, .hero, .split { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding-bottom: 36px; }
    .hero-visual { justify-self: start; width: min(220px, 70%); }
    .thumb.xl { min-height: 220px; font-size: 88px; }
}

@media (max-width: 720px) {
    .topbar { flex-wrap: wrap; }
    .search { order: 3; flex-basis: 100%; }
    .grid, .cat-tiles { grid-template-columns: repeat(2, 1fr); }
    .account-nav { gap: 10px; }
    .cart-row { flex-wrap: wrap; }
    .site-footer .inner { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
}
