/* ==========================================================================
   base.css — structural layer shared by the portfolio themes.
   Brand look & feel lives in theme.css via the custom properties below.
   ========================================================================== */
:root {
  --page-width: 1240px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --radius: 10px;
  --radius-button: 999px;
  --font-body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: var(--font-body);
  --heading-scale: 1;
  --heading-weight: 600;
  --heading-tracking: -0.01em;
  --section-space: clamp(3rem, 7vw, 6rem);
  --border: color-mix(in srgb, var(--color-text) 14%, transparent);
  --muted: color-mix(in srgb, var(--color-text) 65%, transparent);
  --shadow: 0 20px 50px -20px rgb(0 0 0 / .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: var(--color-text); background: var(--color-bg); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); line-height: 1.12; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--color-text); color: var(--color-bg); }
.skip-link:focus { top: 1rem; }
.text-center { text-align: center; }
.rte > :last-child { margin-bottom: 0; }
.rte ol, .rte ul { padding-left: 1.2em; }
.rte li + li { margin-top: .35em; }
main:focus { outline: none; }
product-form, variant-picker, purchase-options, brew-tabs, brew-calculator, collection-sort, announcement-bar { display: block; }

/* Layout ------------------------------------------------------------------ */
.container { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 760px; }
.section { padding-block: var(--section-space); }
.section--surface { background: var(--color-surface); }
.section--dark { background: var(--color-dark); color: var(--color-bg); --color-text: var(--color-bg); }
.section__header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section__title { font-size: calc(clamp(1.75rem, 3.2vw, 2.6rem) * var(--heading-scale)); }
.section__title--center { text-align: center; margin-bottom: 2.5rem; }
.eyebrow { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--color-accent); margin-bottom: .75rem; }
.section--dark .eyebrow { color: color-mix(in srgb, var(--color-accent) 60%, white); }
.grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 990px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .grid--3 { grid-template-columns: 1fr; } }

/* Buttons ----------------------------------------------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .75rem 1.6rem; border: 1px solid var(--color-accent); border-radius: var(--radius-button); background: var(--color-accent); color: var(--color-accent-contrast); font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px var(--color-accent); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.button--secondary { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.button--secondary:hover { background: var(--color-text); color: var(--color-bg); box-shadow: none; }
.button--ghost { background: transparent; color: inherit; border-color: currentColor; }
.button--small { min-height: 2.4rem; padding: .45rem 1rem; font-size: .875rem; }
.button--full { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer; border-radius: 50%; position: relative; color: inherit; text-decoration: none; }
.icon-button:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
.icon { width: 1.4rem; height: 1.4rem; flex: none; }
.link-button { background: none; border: 0; padding: 0; font-size: .8rem; text-decoration: underline; cursor: pointer; color: var(--muted); }
.link-arrow { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow .icon { width: 1.1rem; transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--color-text); color: var(--color-bg); }
.badge--sale { background: var(--color-accent); color: var(--color-accent-contrast); }

/* Announcement & header --------------------------------------------------- */
.announcement { display: block; background: var(--color-dark); color: var(--color-bg); font-size: .82rem; text-align: center; }
.announcement__track { display: grid; }
.announcement__item { grid-area: 1 / 1; margin: 0; padding: .55rem var(--gutter); opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.announcement__item.is-active { opacity: 1; transform: none; pointer-events: auto; }
.announcement a { text-decoration: none; }
.section-header { position: relative; z-index: 20; }
.header { background: var(--color-bg); border-bottom: 1px solid var(--border); }
.header--sticky { position: sticky; top: 0; }
.shopify-section-group-header-group:has(.header--sticky) { position: sticky; top: 0; z-index: 20; }
.header__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; min-height: 4.5rem; }
.header__logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; }
.header__nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; justify-content: center; }
.header__nav a { text-decoration: none; font-weight: 500; padding-block: .5rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .25s var(--ease); }
.header__nav a:hover, .header__nav a[aria-current] { background-size: 100% 1.5px; }
.header__actions { display: flex; justify-content: end; }
.cart-count { position: absolute; top: .2rem; right: .1rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--color-accent); color: var(--color-accent-contrast); font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.cart-count[hidden] { display: none; }
.header__mobile-menu { display: none; }
@media (max-width: 899px) {
  .header__inner { grid-template-columns: auto 1fr auto; }
  .header__nav { display: none; }
  .header__mobile-menu { display: block; }
  .header__mobile-menu summary { list-style: none; }
  .header__mobile-menu summary::-webkit-details-marker { display: none; }
  .header__logo { justify-self: center; }
  .mobile-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--color-bg); border-bottom: 1px solid var(--border); padding: 1rem var(--gutter) 1.5rem; box-shadow: var(--shadow); }
  .mobile-nav ul { list-style: none; margin: 0; padding: 0; }
  .mobile-nav a { display: block; padding: .8rem 0; font-size: 1.2rem; text-decoration: none; border-bottom: 1px solid var(--border); }
}

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; display: grid; align-items: center; overflow: hidden; background: var(--color-dark); color: #fff; isolation: isolate; }
.hero--large { min-height: clamp(520px, 78vh, 820px); }
.hero--medium { min-height: clamp(380px, 55vh, 600px); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / calc(var(--overlay) + .25)), rgb(0 0 0 / var(--overlay)) 60%, transparent); z-index: -1; }
.hero__content { padding-block: 4rem; max-width: var(--page-width); }
.hero__content > * { max-width: 36rem; }
.hero__content--center { text-align: center; }
.hero__content--center > * { margin-inline: auto; }
.hero__heading { font-size: calc(clamp(2.5rem, 6vw, 4.75rem) * var(--heading-scale)); }
.hero .eyebrow { color: inherit; opacity: .85; }
.hero__text { font-size: 1.15rem; opacity: .92; margin-bottom: 2rem; }
.hero__buttons { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero__content--center .hero__buttons { justify-content: center; }

/* USP bar ----------------------------------------------------------------- */
.usp-bar { border-bottom: 1px solid var(--border); background: var(--color-surface); }
.usp-bar__list { display: flex; justify-content: space-around; flex-wrap: wrap; gap: .75rem 2rem; list-style: none; margin: 0 auto; padding-block: 1rem; }
.usp { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 500; }
.usp .icon { color: var(--color-accent); }

/* Product card ------------------------------------------------------------ */
.card { position: relative; display: flex; flex-direction: column; gap: .9rem; height: 100%; }
.card__media { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--color-surface); aspect-ratio: 1; }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__img { transform: scale(1.04); }
.card__badge { position: absolute; top: .75rem; left: .75rem; }
.card__body { display: grid; gap: .25rem; flex: 1; align-content: start; }
.card__eyebrow { font-size: .78rem; color: var(--muted); margin: 0; }
.card__title { font-size: 1.05rem; margin: 0; }
.card__link { text-decoration: none; }
.card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card__quick-add { position: relative; z-index: 2; }
.price { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.price__current { font-weight: 600; }
.price__compare { color: var(--muted); font-size: .9em; }
.price--on-sale .price__current { color: var(--color-accent); }

/* Split / image with text -------------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--reverse .split__media { order: 2; } }
.split__img { width: 100%; border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; }
.split__content > * + * { margin-top: 1rem; }
.split__content .button { margin-top: 1.5rem; }
.feature { display: flex; gap: 1rem; align-items: start; }
.feature__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--color-bg); color: var(--color-accent); flex: none; }
.feature__title { font-size: 1rem; margin-bottom: .2rem; font-family: var(--font-body); }
.feature p { margin: 0; color: var(--muted); }

/* Testimonials ------------------------------------------------------------ */
.testimonials { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }
.testimonial { margin: 0; padding: 2rem; border-radius: var(--radius); background: var(--color-bg); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.testimonial blockquote { margin: 0; font-size: 1.05rem; flex: 1; }
.testimonial figcaption { font-size: .875rem; color: var(--muted); }
.stars { display: flex; gap: .15rem; color: var(--color-accent); }
.stars .icon { width: 1rem; height: 1rem; }

/* Product page ------------------------------------------------------------ */
.product { display: grid; gap: clamp(2rem, 4vw, 4rem); padding-block: clamp(1.5rem, 4vw, 3.5rem); }
@media (min-width: 990px) { .product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } .product__info { position: sticky; top: 6.5rem; } }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 0; border-radius: var(--radius); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: start; }
.gallery__img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery__thumbs { display: flex; gap: .6rem; margin-top: .75rem; }
.gallery__thumb { padding: 0; border: 1px solid var(--border); border-radius: calc(var(--radius) / 1.5); overflow: hidden; cursor: pointer; background: none; }
.gallery__thumb:hover { border-color: var(--color-text); }
.product__info > * + * { margin-top: 1.25rem; }
.product__title { font-size: calc(clamp(2rem, 4vw, 3rem) * var(--heading-scale)); margin: 0; }
.product__price { font-size: 1.25rem; }
.product__text { font-size: .9rem; color: var(--muted); }
.notes__label { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chip { padding: .3rem .85rem; border-radius: 999px; background: var(--color-surface); font-size: .875rem; }
.variants { display: grid; gap: 1rem; }
.variants__option { border: 0; margin: 0; padding: 0; }
.variants__option legend { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: .5rem; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { display: inline-flex; align-items: center; min-height: 2.6rem; padding: .4rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-button); cursor: pointer; font-size: .9rem; transition: border-color .15s, background .15s, color .15s; }
.pill:hover { border-color: var(--color-text); }
.pill-input:checked + .pill { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.pill-input:focus-visible + .pill { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.pill.is-unavailable { text-decoration: line-through; opacity: .5; }
.product-form__row { display: flex; gap: .75rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-button); }
.qty__btn { width: 2.4rem; height: 2.4rem; border: 0; background: none; cursor: pointer; font-size: 1.1rem; }
.qty__value { width: 2rem; text-align: center; border: 0; background: none; -moz-appearance: textfield; }
.qty__value::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--input { height: 3rem; }
.qty--input .qty__btn { height: 100%; }
.form-error { color: #b42318; font-size: .9rem; margin-top: .75rem; }
.form-success { font-weight: 600; }
.accordion { border-top: 1px solid var(--border); }
.accordion:last-child { border-bottom: 1px solid var(--border); }
.accordion + .accordion { margin-top: 0; }
.accordion summary { display: flex; justify-content: space-between; padding: 1rem 0; cursor: pointer; font-weight: 600; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.accordion[open] summary::after { transform: rotate(45deg); }
.accordion__content { padding-bottom: 1.25rem; color: var(--muted); }

/* Collection -------------------------------------------------------------- */
.collection-header { margin-bottom: 2rem; max-width: 46rem; }
.collection-header__desc { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem; margin-bottom: 2rem; border-block: 1px solid var(--border); }
.toolbar__count { margin: 0; color: var(--muted); font-size: .9rem; }
.toolbar__sort { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.toolbar select, select { padding: .5rem 2rem .5rem .8rem; border: 1px solid var(--border); border-radius: calc(var(--radius) / 1.5); background: var(--color-bg); }

/* Cart drawer & cart contents --------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgb(0 0 0 / .45); opacity: 0; transition: opacity .3s; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--color-bg); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .3s var(--ease); outline: none; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.drawer__title { font-size: 1.35rem; margin: 0; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; display: flex; flex-direction: column; }
.drawer__upsells { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--color-surface); }
.drawer__upsell-title { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-body); margin-bottom: .75rem; }
.upsell-list { display: grid; gap: .75rem; }
.upsell { display: flex; align-items: center; gap: .75rem; }
.upsell__img { width: 3.5rem; height: 3.5rem; border-radius: calc(var(--radius) / 1.5); object-fit: cover; }
.upsell__info { flex: 1; display: grid; font-size: .875rem; }
.upsell__title { text-decoration: none; font-weight: 600; }
.upsell__price { color: var(--muted); }
.shipping-bar { margin-bottom: 1.25rem; }
.shipping-bar__text { font-size: .875rem; margin-bottom: .5rem; text-align: center; }
.shipping-bar__track { height: 6px; border-radius: 999px; background: var(--color-surface); overflow: hidden; }
.shipping-bar__fill { display: block; height: 100%; background: var(--color-accent); border-radius: inherit; transition: width .5s var(--ease); }
.cart-empty { text-align: center; margin: auto 0; padding-block: 2rem; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.cart-line { display: grid; grid-template-columns: 5rem 1fr auto; gap: 1rem; align-items: start; transition: opacity .2s; }
.cart-line.is-loading { opacity: .5; pointer-events: none; }
.cart-line__img { width: 5rem; height: 5rem; object-fit: cover; border-radius: calc(var(--radius) / 1.5); background: var(--color-surface); }
.cart-line__title { font-weight: 600; text-decoration: none; line-height: 1.3; display: block; }
.cart-line__meta { font-size: .8rem; color: var(--muted); margin: .15rem 0 0; }
.cart-line .qty { margin-top: .6rem; }
.cart-line .qty__btn { width: 2rem; height: 2rem; }
.cart-line__end { display: grid; justify-items: end; gap: .3rem; }
.cart-line__price { font-weight: 600; }
.cart-line__compare { font-size: .8rem; color: var(--muted); }
.cart-footer { margin-top: auto; padding-top: 1.5rem; }
.cart-footer__row { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: .25rem; }
.cart-footer__note { font-size: .8rem; color: var(--muted); }
.cart-page { display: flex; flex-direction: column; min-height: 30vh; }
.cart-page .cart-footer { max-width: 360px; margin-left: auto; width: 100%; }

/* Footer ------------------------------------------------------------------ */
.footer { background: var(--color-dark); color: var(--color-bg); padding-block: 4rem 2rem; --color-text: var(--color-bg); }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1.4fr; } }
.footer__logo { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; }
.footer__brand .rte { opacity: .75; max-width: 24rem; }
.footer__heading { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-body); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer a { text-decoration: none; opacity: .8; }
.footer a:hover { opacity: 1; }
.footer__social { display: inline-block; margin-top: 1rem; }
.newsletter { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter input[type="email"] { flex: 1 1 12rem; min-height: 3rem; padding: .5rem 1rem; border-radius: var(--radius-button); border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: transparent; }
.footer__bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); font-size: .8rem; opacity: .6; }
