/*
 * BioPaw members' site: sign-up/sign-in pages and the customer account area.
 * Brand: orange #FC6800 and cream #FFFDDC. Orange carries the brand moments
 * (top bar, "next box" card, buttons); page surfaces stay warm-neutral so the
 * cream doesn't turn into a yellow wash.
 */
:root {
    --orange: #fc6800;
    --orange-dark: #e25d00;
    --orange-tint: #fff1e6;
    --cream: #fffddc;
    --ink: #2b1200;
    --soft: #7a5a44;
    --line: #efe9e2;
    --bg: #faf7f3;
    --danger: #c62828;
    --radius: 1.25rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
a { color: var(--orange-dark); font-weight: 600; text-underline-offset: 3px; }
a:hover { color: var(--orange); }

/* ---------- Shared pieces ---------- */
.stack { display: grid; gap: 1.1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .92rem; }
.muted { color: var(--soft); }
.small { font-size: .85rem; }

.eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--orange-dark);
}

.notice {
    padding: .8rem 1rem;
    border-radius: .9rem;
    background: var(--orange-tint);
    color: #8a3a00;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.field { display: grid; gap: .35rem; }
.field-label { font-size: .9rem; font-weight: 600; color: #5a2a06; }
.field input {
    width: 100%;
    padding: .8rem 1rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid rgb(252 104 0 / .25);
    border-radius: .95rem;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgb(252 104 0 / .18); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { color: var(--soft); font-size: .82rem; }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 600; }
.field-error.on-orange { color: #fff; }

.check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--orange); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: translate .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover { translate: 0 -2px; }
.btn:active { translate: 0 0; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(180deg, #ff7a1a, var(--orange) 55%, #ec5f00);
    color: var(--cream);
    box-shadow: 0 14px 24px -12px rgb(252 104 0 / .9), inset 0 1px 0 rgb(255 255 255 / .35);
}
.btn-primary:hover { color: #fff; }
.btn-cream { background: var(--cream); color: var(--orange-dark); box-shadow: 0 10px 20px -12px rgb(80 25 0 / .7); }
.btn-cream:hover { color: var(--orange-dark); background: #fff; }
.btn-ghost { background: transparent; color: var(--soft); border: 1.5px solid var(--line); }
.btn-danger { background: var(--danger); color: #fff; }

.chip {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--line);
    color: var(--soft);
    white-space: nowrap;
}
.chip-scheduled { background: var(--orange-tint); color: #9a4300; }
.chip-packed { background: #fff3c4; color: #7a5b00; }
.chip-shipped { background: #e1efff; color: #124a8a; }
.chip-delivered { background: #e0f5e4; color: #17662b; }
.chip-cancelled { background: #f3e9e9; color: #8a3b3b; }
.chip-on-orange { background: rgb(255 253 220 / .22); color: var(--cream); margin-left: .5rem; vertical-align: middle; }

/* ---------- Sign-in / sign-up (backdrop comes from login.css) ---------- */
body.bp-auth { background: var(--orange); min-height: 100vh; }

.bp-auth-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1rem 2.5rem;
}

.bp-card {
    position: relative;
    width: 100%;
    max-width: 30rem;
    padding: 3.75rem 2.5rem 2.25rem;
    background: var(--cream);
    border-radius: 2rem;
    box-shadow:
        0 50px 90px -30px rgb(110 35 0 / .55),
        0 18px 36px -18px rgb(110 35 0 / .35),
        inset 0 1px 0 rgb(255 255 255 / .7);
    animation: bp-rise .7s .1s cubic-bezier(.2, .8, .2, 1) both;
}

.bp-card::before {
    content: "";
    position: absolute;
    top: -2.4rem;
    left: 50%;
    width: 4.8rem;
    height: 4.8rem;
    translate: -50% 0;
    border: 5px solid var(--cream);
    border-radius: 1.5rem;
    background: var(--orange) url("favicon.svg") center / 108% no-repeat;
    box-shadow: 0 14px 24px -10px rgb(110 35 0 / .6);
    animation: bp-badge .9s .35s cubic-bezier(.3, 1.6, .5, 1) both;
}

.bp-card-logo { display: block; height: 1.75rem; margin: 0 auto 1rem; }
.bp-card h1 { text-align: center; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.bp-card-sub { text-align: center; color: #9a4a12; margin: .4rem 0 1.6rem; }
.bp-card-foot { text-align: center; margin-top: 1.5rem; color: var(--soft); }

@media (min-width: 1024px) {
    .bp-auth-main { justify-content: flex-end; padding-right: clamp(3rem, 11vw, 12rem); }
    .bp-card-logo { display: none; } /* the big logo on the left already says it */
}

@media (max-width: 640px) {
    .bp-card { padding: 3.5rem 1.5rem 2rem; border-radius: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bp-card, .bp-card::before { animation: none; }
    .btn { transition: none; }
}

/* ---------- Account area ---------- */
body.bp-app { background: var(--bg); padding-bottom: 5.5rem; }

.topbar { background: var(--orange); color: var(--cream); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 62rem; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; gap: 2rem; }
.topbar-logo img { display: block; height: 1.7rem; }
.topbar-nav { display: none; gap: .4rem; flex: 1; }
.topbar-nav a { color: var(--cream); text-decoration: none; padding: .45rem 1rem; border-radius: 999px; font-weight: 600; }
.topbar-nav a:hover { background: rgb(255 253 220 / .16); color: #fff; }
.topbar-nav a.is-active { background: var(--cream); color: var(--orange-dark); }
.topbar form { margin-left: auto; display: none; }
.topbar-out { background: none; border: 1.5px solid rgb(255 253 220 / .6); color: var(--cream); font: inherit; font-weight: 600; padding: .4rem 1rem; border-radius: 999px; cursor: pointer; }
.topbar-out:hover { background: var(--cream); color: var(--orange-dark); }

.page { max-width: 62rem; margin: 0 auto; padding: 1.75rem 1.25rem; display: grid; gap: 1.25rem; }
.page > h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.page > .notice { margin-bottom: 0; }
.hello { display: flex; align-items: center; gap: .5rem; }
.hello img { width: 1.6rem; rotate: 8deg; }
.lead { color: var(--soft); margin-top: -.75rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; display: grid; gap: .5rem; align-content: start; }
.card h2 { font-size: 1.2rem; font-weight: 700; }
.card .btn { justify-self: start; margin-top: .5rem; }
.card.narrow, form.narrow { max-width: 34rem; width: 100%; }
.card.stack { gap: 1.1rem; }
.card-cta { background: var(--cream); border-color: rgb(252 104 0 / .25); }
.card-soon { border-style: dashed; background: transparent; }
.price { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.price span { font-size: .95rem; font-weight: 500; color: var(--soft); letter-spacing: 0; }
.plan .btn { justify-self: stretch; }

.delivery { grid-template-columns: 1fr auto; align-items: center; }

/* The "next box" hero */
.nextbox {
    position: relative;
    overflow: hidden;
    padding: 1.9rem 1.6rem;
    border-radius: 1.75rem;
    color: var(--cream);
    background:
        radial-gradient(120% 90% at 90% 0%, #ff8f33 0%, transparent 55%),
        radial-gradient(90% 90% at 0% 100%, #d94f00 0%, transparent 60%),
        var(--orange);
    box-shadow: 0 24px 40px -22px rgb(252 104 0 / .8);
}
.nextbox .eyebrow { color: var(--cream); opacity: .85; }
.nextbox-date { font-size: clamp(1.9rem, 6vw, 2.9rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin: .25rem 0 .4rem; }
.nextbox-in { font-size: 1.05rem; font-weight: 600; }
.nextbox-note { font-size: .9rem; opacity: .9; margin-top: .3rem; }
.nextbox-mark { position: absolute; right: -2.5rem; bottom: -3.5rem; width: 15rem; opacity: .13; rotate: 12deg; pointer-events: none; }

.sooner { position: relative; margin-top: 1.4rem; }
.sooner summary { list-style: none; }
.sooner summary::-webkit-details-marker { display: none; }
.sooner[open] summary { display: none; }
.sooner-form { display: grid; gap: .6rem; max-width: 26rem; font-weight: 600; }
.sooner-form small { font-weight: 400; opacity: .92; }
.sooner-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.sooner-row input { flex: 1; min-width: 11rem; min-height: 3rem; padding: 0 1rem; font: inherit; color: var(--ink); border: 0; border-radius: 999px; background: #fff; }

.danger summary { cursor: pointer; color: var(--danger); font-weight: 600; }
.danger[open] { display: grid; gap: .7rem; }

/* Phone tab bar */
.tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
}
.tabbar a { display: grid; justify-items: center; gap: .15rem; padding: .35rem; border-radius: .9rem; color: var(--soft); text-decoration: none; font-size: .72rem; font-weight: 600; }
.tabbar svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.tabbar a.is-active { color: var(--orange-dark); background: var(--orange-tint); }

@media (min-width: 768px) {
    body.bp-app { padding-bottom: 2rem; }
    .tabbar, .signout-mobile { display: none; }
    .topbar-nav { display: flex; }
    .topbar form { display: block; }
    .page { padding-top: 2.5rem; }
    .nextbox { padding: 2.5rem 2.25rem; }
}

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

/* ---------- Shop ---------- */
.notice-error { background: #fdeaea; color: #8f1d1d; }
.section-title { font-size: 1.15rem; font-weight: 700; margin-top: .5rem; }
.btn-sm { min-height: 2.6rem; padding: 0 1rem; font-size: .95rem; white-space: nowrap; }

.topbar-basket { position: relative; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--cream); margin-left: auto; }
.topbar-basket:hover { background: rgb(255 253 220 / .16); color: #fff; }
.topbar-basket svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.topbar-basket span { position: absolute; top: -.1rem; right: -.2rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--cream); color: var(--orange-dark); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.topbar-basket + form { margin-left: 0; }
.tabbar { grid-template-columns: repeat(4, 1fr); }

.products { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-photo { aspect-ratio: 1; background: var(--cream); display: grid; place-items: center; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-photo .product-placeholder { width: 38%; height: auto; opacity: .55; rotate: -8deg; }
.product-body { padding: .9rem 1rem 1rem; display: grid; gap: .35rem; flex: 1; align-content: start; }
.product-body h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.product-price { font-size: 1.15rem; font-weight: 800; margin-bottom: .3rem; }

.basket { gap: 0; padding-block: .5rem; }
.basket-line { display: grid; grid-template-columns: 1fr auto 4.5rem; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.basket-line:last-child { border-bottom: 0; }
.basket-total { text-align: right; }
.qty { display: inline-flex; align-items: center; gap: .2rem; border: 1px solid var(--line); border-radius: 999px; padding: .2rem; }
.qty button { width: 2.1rem; height: 2.1rem; border: 0; border-radius: 50%; background: var(--orange-tint); color: var(--orange-dark); font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer; }
.qty button:disabled { opacity: .35; cursor: default; }
.qty span { min-width: 1.6rem; text-align: center; font-weight: 700; }

.option { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: 1rem; cursor: pointer; }
.option:has(input:checked) { border-color: var(--orange); background: var(--orange-tint); }
.option input { width: 1.15rem; height: 1.15rem; accent-color: var(--orange); }
.option span { display: grid; }
.option-price { color: var(--orange-dark); }
.summary { max-width: 26rem; }
.summary .btn { justify-self: stretch; }

@media (max-width: 480px) {
    .products { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .product-body { padding: .75rem .8rem .9rem; }
    .basket-line { grid-template-columns: 1fr auto; }
    .basket-total { grid-column: 1 / -1; text-align: left; }
}
