/* ============================================================
   Beeswax store

   The palette is taken from the product photographs, not the
   logo. The candles photograph at roughly #E6BF2A — a warm,
   slightly muted gold. The logo's yellow is #FFFF01, much more
   acidic; used across a whole page it gets harsh fast. So the
   site runs on the candle gold and lets the logo be the one
   bright note.

   --panel is matched to the photo backgrounds so product shots
   sit in the grid without a visible grey box around them. If
   the photos are ever reshot on a different backdrop, this is
   the value to change.
   ============================================================ */

:root {
    --paper:   #FFFFFF;
    --panel:   #F2F1EE;
    --panel-dk:#E8E6E0;
    --ink:     #1C1A15;
    --muted:   #6E6A5F;
    --gold:    #E0B520;
    --gold-dk: #8A6B08;
    --gold-hi: #C9A118;
    --rule:    #E2E0D9;
    --error:   #8C2F1F;
    --ok:      #2F5D3A;

    --display: "Fraunces", Georgia, serif;
    --body: "Karla", system-ui, -apple-system, sans-serif;

    --measure: 34rem;
    --gap: 1.5rem;
    --radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-dk); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

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

.wrap {
    width: min(72rem, 100% - 2.5rem);
    margin-inline: auto;
}
.wrap.narrow { width: min(46rem, 100% - 2.5rem); }

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

.skip {
    position: absolute; left: -9999px;
    background: var(--ink); color: var(--paper);
    padding: .75rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------- header */

.site-head {
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
}

.site-head__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    padding-block: 1.25rem;
    flex-wrap: wrap;
}

.logo img { max-height: 62px; width: auto; }

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

.nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}
.nav a:hover { color: var(--gold-dk); }
.nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--gold);
}

.nav__cart { display: inline-flex; align-items: center; gap: .4rem; }

.badge {
    background: var(--ink);
    color: #fff;
    font-size: .8125rem;
    line-height: 1;
    padding: .25rem .45rem;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------ type */

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 .5em;
}

.hero { padding-block: 4rem 2rem; }
.hero__title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    max-width: 18ch;
    margin-bottom: .3em;
}
.hero__body { max-width: var(--measure); font-size: 1.125rem; }

.page-title {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    padding-top: 2.5rem;
}

.section-title {
    font-size: 1.35rem;
    margin-top: 2.5rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--rule);
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }

.muted { color: var(--muted); }
.optional { color: var(--muted); font-weight: 400; }
.empty { color: var(--muted); font-style: italic; }

/* --------------------------------------------------- product grid */

.products { padding-bottom: 4rem; }

.grid {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.card { display: flex; flex-direction: column; }

.card__link { text-decoration: none; color: inherit; }

.card__media {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    aspect-ratio: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: contain;
}

.card__media--empty {
    width: 100%;
    aspect-ratio: 1;
    background:
        repeating-linear-gradient(45deg, var(--panel-dk) 0 12px, var(--panel) 12px 24px);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.card__title {
    font-size: 1.25rem;
    margin: .9rem 0 .25rem;
}
.card__link:hover .card__title { color: var(--gold-dk); }

.card__summary {
    margin: 0 0 .5rem;
    color: var(--muted);
    font-size: .95rem;
}

.card__price {
    font-family: var(--display);
    font-size: 1.2rem;
    margin: 0 0 .9rem;
    font-variant-numeric: tabular-nums;
}

.card__form { margin-top: auto; }

/* ------------------------------------------------------- buttons */

.btn {
    display: inline-block;
    font: inherit;
    font-weight: 700;
    background: var(--gold);
    color: var(--ink);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: .65rem 1.25rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn:hover { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--ink); }

.btn--lg { padding: .85rem 1.75rem; font-size: 1.0625rem; }

.btn--quiet {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule);
}
.btn--quiet:hover { background: var(--panel); color: var(--ink); border-color: var(--ink); }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--gold-dk);
    text-decoration: underline;
    cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* --------------------------------------------------- product page */

.product {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
    padding-block: 2.5rem 4rem;
}

@media (min-width: 48rem) {
    .product { grid-template-columns: 1fr 1fr; align-items: start; }
}

.product__media img {
    width: 100%;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--panel);
}

.product__media > img { aspect-ratio: 1; object-fit: contain; }

.thumbs {
    list-style: none;
    margin: .75rem 0 0; padding: 0;
    display: flex; gap: .5rem; flex-wrap: wrap;
}
.thumb {
    padding: 0; border: 1px solid var(--rule); background: none;
    cursor: pointer; border-radius: var(--radius); overflow: hidden;
    width: 70px; height: 70px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--gold); border-width: 2px; }

.product__title { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.product__summary { font-size: 1.125rem; color: var(--muted); margin-top: 0; }

.product__price {
    font-family: var(--display);
    font-size: 2rem;
    margin: 1rem 0 .1rem;
    font-variant-numeric: tabular-nums;
}
.product__shipping { margin: 0 0 1.5rem; color: var(--muted); }

.product__form {
    border-block: 1px solid var(--rule);
    padding-block: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.product__body { margin-top: 1.5rem; }
.product__sku { color: var(--muted); font-size: .9rem; }

/* ------------------------------------------------------ quantity */

.qty label { display: block; font-weight: 500; margin-bottom: .35rem; }

.qty__control {
    display: inline-flex;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.qty__step {
    font: inherit;
    font-size: 1.15rem;
    width: 2.75rem;
    border: 0;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
}
.qty__step:hover { background: var(--panel-dk); }

.qty__control input {
    width: 4rem;
    border: 0;
    border-inline: 1px solid var(--rule);
    padding: .65rem .5rem;
    font: inherit;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- cart */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.cart-table th, .cart-table td {
    text-align: left;
    padding: .85rem .5rem;
    border-bottom: 1px solid var(--rule);
    font-weight: 400;
}

.cart-table thead th {
    font-size: .85rem;
    color: var(--muted);
    font-weight: 700;
}

.cart-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cart-table__product a { color: var(--ink); }

.cart-table input[type="number"] {
    width: 4.5rem;
    padding: .4rem;
    font: inherit;
    text-align: center;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

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

.totals {
    margin: 0 0 2rem;
    margin-left: auto;
    max-width: 22rem;
}
.totals > div {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: .4rem 0;
}
.totals dt, .totals dd { margin: 0; }
.totals dd { font-variant-numeric: tabular-nums; }

.totals__grand {
    border-top: 2px solid var(--ink);
    margin-top: .4rem;
    padding-top: .7rem !important;
    font-family: var(--display);
    font-size: 1.3rem;
}

.cart-checkout {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 4rem;
}

.empty-state {
    padding: 3rem 0 4rem;
}
.empty-state p { color: var(--muted); margin-bottom: 1.25rem; }

/* ------------------------------------------------------ checkout */

.checkout-summary, .checkout-details, .checkout-payment { margin-bottom: 2.5rem; }

.checkout-payment { padding-bottom: 4rem; }

.placeholder-note {
    background: var(--panel);
    border: 1px dashed var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.order-ref { font-size: 1.05rem; }
.address { font-style: normal; line-height: 1.7; }

/* ---------------------------------------------------------- forms */

.form { max-width: var(--measure); padding-bottom: 2rem; }

.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    font-weight: 500;
    margin-bottom: .35rem;
}

.field input, .field textarea {
    width: 100%;
    font: inherit;
    padding: .6rem .7rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}
.field textarea { resize: vertical; }

.field-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 34rem) {
    .field-row { grid-template-columns: 2fr 1fr 1fr; }
}

.honeypot {
    position: absolute;
    left: -9999px;
}

/* --------------------------------------------------------- alerts */

.alert {
    border-radius: var(--radius);
    padding: .9rem 1.15rem;
    margin: 1.5rem 0;
    border: 1px solid;
}
.alert ul { margin: 0; padding-left: 1.2rem; }

.alert--error {
    background: #FBEEEB;
    border-color: var(--error);
    color: var(--error);
}

.alert--ok {
    background: #F1F6F1;
    border-color: var(--ok);
    color: var(--ok);
}

/* ---------------------------------------------------------- lists */

.child-list { padding-left: 1.1rem; }
.child-list li { margin-bottom: .4rem; }

/* --------------------------------------------------------- footer */

.site-foot {
    border-top: 1px solid var(--rule);
    background: var(--panel);
    margin-top: 3rem;
}

.site-foot__inner {
    padding-block: 2.5rem;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-foot__name { font-family: var(--display); font-size: 1.1rem; margin: 0; }

.site-foot ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 1.25rem; flex-wrap: wrap;
}
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

.site-foot__legal { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ------------------------------------------------ payment instructions */

.hint {
    margin: .35rem 0 0;
    font-size: .875rem;
    color: var(--muted);
}

.lede { font-size: 1.15rem; max-width: var(--measure); }

.pay-explainer { margin-bottom: 2.5rem; }

.pay-steps {
    max-width: var(--measure);
    padding-left: 1.2rem;
    margin: 0 0 .75rem;
}
.pay-steps li { margin-bottom: .45rem; }

.pay-box {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0 1.25rem;
}

.pay-box__label {
    margin: 0;
    font-size: .875rem;
    color: var(--muted);
}

.pay-box__amount {
    font-family: var(--display);
    font-size: clamp(2.25rem, 6vw, 3rem);
    line-height: 1.1;
    margin: .1rem 0 1rem;
    font-variant-numeric: tabular-nums;
}

.pay-box__to {
    font-size: 1.25rem;
    font-weight: 700;
    margin: .1rem 0 1rem;
    word-break: break-all;
}

.pay-box__note {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
    max-width: var(--measure);
}

/* ------------------------------------------------------ sold out / closed */

.soldout {
    margin: 0;
    font-weight: 700;
    color: var(--muted);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: .65rem 1.25rem;
    text-align: center;
    background: var(--panel);
}

.soldout--lg {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    margin-block: 1.5rem;
}

.alert--notice {
    background: var(--panel);
    border-color: var(--gold);
    color: var(--ink);
    font-weight: 500;
}
