/* ==========================================================================
   MyTeamSites Store Engine — store.css
   All styles are themeable via the CSS custom properties below.
   To stamp a new brand, override the --store-* variables in the brand's
   shop/index.html (or a tiny brand.css) — do not edit this file per-brand.
   Defaults below match Cinder & Oak Coffee Roasters.
   ========================================================================== */

:root {
  /* palette */
  --store-bg: #f8f5f1;
  --store-surface: #ffffff;
  --store-ink: #2b1e15;
  --store-muted: #6e5d50;
  --store-line: #e7e0d7;
  --store-accent: #c8743d;
  --store-accent-ink: #ffffff;
  --store-header: #53392a;
  --store-header-ink: #eadbce;
  --store-header-sub: #dbbfa6;
  --store-dark: #231812;
  --store-dark-ink: #e4d3c4;
  --store-deep: #3a281c;
  /* type */
  --store-font-head: 'Fraunces', serif;
  --store-font-body: 'Inter', sans-serif;
  /* shape (matches brand card/button styles) */
  --store-radius: 14px;
  --store-btn-radius: 9px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--store-font-body);
  background: var(--store-bg);
  color: var(--store-ink);
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.st-wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* --- announcement bar + header (mirrors the brand's main page) ----------- */
.st-bar {
  background: var(--store-dark); color: var(--store-dark-ink);
  font-size: 13.5px; letter-spacing: .02em; text-align: center; padding: 9px 16px;
}
.st-bar b { color: #fff; font-weight: 600; }

.st-header {
  background: var(--store-header); position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.st-hrow { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; gap: 16px; }
.st-brand { color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.st-brand-name { font-family: var(--store-font-head); font-size: 23px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.st-brand-suffix {
  color: var(--store-header-sub); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.st-nav { display: flex; align-items: center; gap: 22px; }
.st-nav a { color: var(--store-header-ink); text-decoration: none; font-size: 15px; font-weight: 600; }
.st-nav a:hover, .st-nav a.is-active { color: #fff; }
.st-cartbtn {
  position: relative; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--store-btn-radius); color: #fff; padding: 8px 10px 6px;
  display: inline-flex; align-items: center;
}
.st-cartbtn:hover { background: rgba(255,255,255,.18); }
.st-cartbtn svg { width: 20px; height: 20px; }
.st-cartcount {
  position: absolute; top: -8px; right: -8px; background: var(--store-accent); color: #fff;
  font-size: 11.5px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* --- page scaffolding ----------------------------------------------------- */
#st-view { padding: 44px 28px 80px; }
.st-pagehead h2 { font-family: var(--store-font-head); font-size: 34px; color: var(--store-deep); }
.st-pagehead p { color: var(--store-muted); margin-top: 8px; font-size: 16.5px; max-width: 560px; }

.st-foot {
  border-top: 1px solid var(--store-line); color: var(--store-muted);
  font-size: 13.5px; text-align: center; padding: 26px 16px 90px;
}
.st-foot a { color: var(--store-muted); }

/* --- filter chips --------------------------------------------------------- */
.st-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.st-chip {
  background: var(--store-surface); border: 1px solid var(--store-line); color: var(--store-ink);
  font-size: 13.5px; font-weight: 600; padding: 8px 15px; border-radius: 20px;
}
.st-chip:hover { border-color: var(--store-accent); }
.st-chip.is-active { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-accent-ink); }

/* --- product grid / cards (matches main-page card style) ------------------ */
.st-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 26px; margin-top: 30px;
}
.st-card {
  background: var(--store-surface); border: 1px solid var(--store-line);
  border-radius: var(--store-radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(43,30,21,.05);
  transition: box-shadow .2s, transform .2s; position: relative;
  display: flex; flex-direction: column;
}
.st-card:hover { box-shadow: 0 10px 28px rgba(43,30,21,.14); transform: translateY(-3px); }
.st-card-link { text-decoration: none; color: inherit; display: block; flex: 1; }
.st-card img { width: 100%; height: 205px; object-fit: cover; }
.st-card-pad { padding: 16px 18px 6px; }
.st-card h4 { font-size: 17.5px; }
.st-notes { font-size: 14px; color: var(--store-muted); margin-top: 5px; line-height: 1.5; }
.st-price { color: var(--store-accent); font-weight: 700; margin-top: 9px; display: block; font-size: 15.5px; }
.st-card-actions { padding: 10px 18px 18px; }

.st-fav {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 1px solid var(--store-line);
  display: flex; align-items: center; justify-content: center;
}
.st-fav svg { width: 18px; height: 18px; fill: none; stroke: var(--store-muted); stroke-width: 2; transition: stroke .15s, fill .15s; }
.st-fav:hover svg { stroke: var(--store-accent); }
.st-fav.is-fav svg { fill: var(--store-accent); stroke: var(--store-accent); }

/* --- buttons --------------------------------------------------------------- */
.st-btn {
  display: inline-block; background: var(--store-accent); color: var(--store-accent-ink);
  border: none; padding: 11px 20px; border-radius: var(--store-btn-radius);
  text-decoration: none; font-weight: 600; font-size: 15px; text-align: center;
}
.st-btn:hover { filter: brightness(1.06); }
.st-btn[disabled] { opacity: .55; cursor: default; }
.st-btn-add { width: 100%; padding: 10px 14px; font-size: 14px; }
.st-btn-big { padding: 14px 28px; font-size: 16px; width: 100%; }
.st-btn-ghost {
  background: transparent; color: var(--store-deep);
  border: 1px solid var(--store-line);
}
.st-btn-ghost:hover { border-color: var(--store-accent); color: var(--store-accent); filter: none; }
.st-btn-sm { padding: 8px 14px; font-size: 13.5px; }

/* --- product detail -------------------------------------------------------- */
.st-crumb { font-size: 13.5px; margin-bottom: 20px; }
.st-crumb a { color: var(--store-muted); text-decoration: none; }
.st-crumb a:hover { color: var(--store-accent); }
.st-detail { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: start; }
.st-detail-photo { border-radius: var(--store-radius); overflow: hidden; border: 1px solid var(--store-line); background: var(--store-surface); }
.st-detail-photo img { width: 100%; height: 460px; object-fit: cover; }
.st-detail h2 { font-family: var(--store-font-head); font-size: 32px; color: var(--store-deep); line-height: 1.12; }
.st-detail .st-notes { font-size: 15px; margin-top: 8px; }
.st-detail-desc { margin-top: 14px; font-size: 15.5px; line-height: 1.6; color: var(--store-ink); }
.st-detail-price { font-size: 24px; font-weight: 700; color: var(--store-accent); margin-top: 16px; }
.st-detail-price .st-was { font-size: 15px; color: var(--store-muted); font-weight: 500; text-decoration: line-through; margin-left: 8px; }

.st-pickuptag {
  display: inline-block; margin-top: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--store-muted); background: var(--store-surface);
  border: 1px solid var(--store-line); padding: 4px 11px; border-radius: 12px;
}

.st-optlabel { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--store-muted); margin: 20px 0 8px; }
.st-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.st-opt {
  background: var(--store-surface); border: 1px solid var(--store-line);
  border-radius: var(--store-btn-radius); padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--store-ink);
}
.st-opt:hover { border-color: var(--store-accent); }
.st-opt.is-sel { background: var(--store-deep); border-color: var(--store-deep); color: #fff; }

.st-purchase { display: grid; gap: 10px; margin-top: 8px; }
.st-pchoice {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%;
  background: var(--store-surface); border: 1px solid var(--store-line);
  border-radius: var(--store-btn-radius); padding: 12px 14px;
}
.st-pchoice.is-sel { border-color: var(--store-accent); box-shadow: 0 0 0 1px var(--store-accent); }
.st-pchoice .st-radio {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--store-line);
  margin-top: 2px; flex: none;
}
.st-pchoice.is-sel .st-radio { border-color: var(--store-accent); background: radial-gradient(var(--store-accent) 0 45%, transparent 50%); }
.st-pchoice h5 { font-size: 14.5px; }
.st-pchoice p { font-size: 13px; color: var(--store-muted); margin-top: 2px; }
.st-pchoice .st-pprice { margin-left: auto; font-weight: 700; color: var(--store-accent); font-size: 14.5px; white-space: nowrap; }

.st-addrow { display: flex; gap: 12px; margin-top: 24px; align-items: stretch; }

/* --- qty stepper ------------------------------------------------------------ */
.st-qty {
  display: inline-flex; align-items: center; border: 1px solid var(--store-line);
  border-radius: var(--store-btn-radius); background: var(--store-surface); overflow: hidden;
}
.st-qty button { background: none; border: none; width: 36px; height: 100%; min-height: 40px; font-size: 17px; font-weight: 600; color: var(--store-deep); }
.st-qty button:hover { background: var(--store-bg); }
.st-qty span { min-width: 30px; text-align: center; font-weight: 600; font-size: 15px; }

/* --- cart drawer ------------------------------------------------------------ */
.st-overlay {
  position: fixed; inset: 0; background: rgba(23,14,8,.45); z-index: 50;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.st-overlay.is-open { opacity: 1; pointer-events: auto; }
.st-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw;
  background: var(--store-bg); z-index: 60; box-shadow: -14px 0 40px rgba(23,14,8,.25);
  transform: translateX(105%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.st-drawer.is-open { transform: translateX(0); }
.st-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--store-line);
}
.st-drawer-head h3 { font-family: var(--store-font-head); font-size: 21px; color: var(--store-deep); }
.st-iconbtn { background: none; border: none; padding: 6px; border-radius: 8px; display: flex; }
.st-iconbtn:hover { background: var(--store-line); }
.st-iconbtn svg { width: 18px; height: 18px; stroke: var(--store-ink); stroke-width: 2; fill: none; }
.st-drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.st-cart-empty { text-align: center; color: var(--store-muted); padding: 48px 10px; font-size: 15px; }
.st-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--store-line); }
.st-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.st-line-info { flex: 1; min-width: 0; }
.st-line-info h5 { font-size: 14.5px; }
.st-line-variant { font-size: 12.5px; color: var(--store-muted); margin-top: 3px; line-height: 1.45; }
.st-line-sub { color: var(--store-accent); font-weight: 600; }
.st-line-row { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.st-line .st-qty button { min-height: 30px; width: 29px; font-size: 15px; }
.st-line .st-qty span { min-width: 24px; font-size: 14px; }
.st-line-price { font-weight: 700; font-size: 14.5px; }
.st-line-remove { background: none; border: none; color: var(--store-muted); font-size: 12.5px; text-decoration: underline; padding: 0; margin-top: 7px; }
.st-line-remove:hover { color: var(--store-accent); }
.st-drawer-foot { border-top: 1px solid var(--store-line); padding: 16px 20px 20px; background: var(--store-surface); }
.st-totrow { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 7px; color: var(--store-ink); }
.st-totrow.st-grand { font-size: 17px; font-weight: 700; margin: 10px 0 14px; }
.st-shipnote { font-size: 12.5px; color: var(--store-muted); margin: -2px 0 10px; }

/* --- forms (checkout) ------------------------------------------------------- */
.st-cols2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; margin-top: 28px; }
.st-panel { background: var(--store-surface); border: 1px solid var(--store-line); border-radius: var(--store-radius); padding: 24px; }
.st-panel h4 { font-family: var(--store-font-head); font-size: 20px; color: var(--store-deep); margin-bottom: 14px; }
.st-field { margin-bottom: 13px; }
.st-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--store-muted); margin-bottom: 5px; }
.st-field input {
  width: 100%; border: 1px solid var(--store-line); border-radius: var(--store-btn-radius);
  padding: 11px 13px; font-size: 15px; background: #fff; color: var(--store-ink);
}
.st-field input:focus { outline: 2px solid var(--store-accent); outline-offset: -1px; border-color: var(--store-accent); }
.st-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-frow3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.st-summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--store-line); }
.st-summary-line:last-of-type { border-bottom: none; }
.st-summary-line .st-muted { color: var(--store-muted); font-size: 12.5px; display: block; margin-top: 2px; }
.st-fineprint { font-size: 12px; color: var(--store-muted); margin-top: 12px; line-height: 1.5; }

/* --- account ----------------------------------------------------------------- */
.st-account-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.st-account-head .st-email { color: var(--store-muted); font-size: 14.5px; }
.st-stack { display: grid; gap: 22px; margin-top: 26px; }
.st-subcard .st-subrow { display: flex; gap: 16px; align-items: center; }
.st-subcard img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex: none; }
.st-subcard h5 { font-size: 16.5px; }
.st-submeta { font-size: 13.5px; color: var(--store-muted); margin-top: 4px; line-height: 1.5; }
.st-nextship { margin-top: 14px; background: var(--store-bg); border: 1px solid var(--store-line); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; }
.st-nextship b { color: var(--store-deep); }
.st-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 12px;
  background: #3e7a46; color: #fff; vertical-align: middle;
}
.st-badge.is-paused { background: var(--store-muted); }
.st-subactions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.st-subpanel { margin-top: 14px; border-top: 1px dashed var(--store-line); padding-top: 14px; }
.st-subpanel .st-optlabel { margin-top: 0; }
.st-order { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--store-line); font-size: 14.5px; }
.st-order:last-child { border-bottom: none; }
.st-order .st-onum { font-weight: 700; }
.st-order .st-oitems { color: var(--store-muted); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.st-order .st-oright { text-align: right; white-space: nowrap; }
.st-order .st-ostatus { color: var(--store-muted); font-size: 12.5px; margin-top: 3px; }

/* --- confirmation -------------------------------------------------------------- */
.st-confirm { max-width: 620px; margin: 0 auto; text-align: center; }
.st-confirm .st-check {
  width: 58px; height: 58px; border-radius: 50%; background: var(--store-accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.st-confirm .st-check svg { width: 28px; height: 28px; stroke: #fff; stroke-width: 3; fill: none; }
.st-confirm h2 { font-family: var(--store-font-head); font-size: 32px; color: var(--store-deep); }
.st-confirm .st-onum { color: var(--store-accent); }
.st-confirm .st-panel { text-align: left; margin-top: 26px; }

/* --- empty states ---------------------------------------------------------------- */
.st-empty { text-align: center; padding: 70px 20px; color: var(--store-muted); }
.st-empty h3 { font-family: var(--store-font-head); font-size: 24px; color: var(--store-deep); margin-bottom: 8px; }
.st-empty p { font-size: 15px; margin-bottom: 20px; }

/* --- toast ------------------------------------------------------------------------ */
#st-toasts { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 24px); }
.st-toast {
  background: var(--store-dark); color: #fff; border-radius: 10px; padding: 12px 16px;
  font-size: 14px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 24px rgba(23,14,8,.3); animation: st-toast-in .22s ease;
}
.st-toast button { background: none; border: none; color: var(--store-accent); font-weight: 700; font-size: 14px; padding: 0; }
.st-toast button:hover { text-decoration: underline; }
@keyframes st-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- demo ribbon -------------------------------------------------------------------- */
.st-ribbon {
  position: fixed; left: 14px; bottom: 14px; z-index: 30;
  background: var(--store-dark); color: var(--store-dark-ink);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 7px 14px; border-radius: 999px; pointer-events: none;
  box-shadow: 0 4px 14px rgba(23,14,8,.28);
}

/* --- responsive ---------------------------------------------------------------------- */
@media (max-width: 860px) {
  .st-detail { grid-template-columns: 1fr; gap: 26px; }
  .st-detail-photo img { height: 320px; }
  .st-cols2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* long brand names: let the nav wrap under the mark instead of overflowing */
  .st-hrow { padding: 13px 14px; gap: 10px; flex-wrap: wrap; row-gap: 7px; }
  .st-brand-suffix { display: none; }
  .st-brand-name { font-size: 18px; }
  .st-brand { flex: none; }
  .st-nav { gap: 11px; }
  .st-nav a { font-size: 13px; }
  .st-cartbtn { padding: 7px 8px 5px; }
  .st-cartbtn svg { width: 18px; height: 18px; }
  #st-view { padding: 28px 16px 70px; }
  .st-grid { grid-template-columns: 1fr; }
  .st-drawer { width: 100vw; }
  .st-pagehead h2 { font-size: 28px; }
  .st-frow3 { grid-template-columns: 1fr; }
  .st-ribbon { font-size: 11px; padding: 6px 11px; left: 10px; bottom: 10px; }
  #st-toasts { bottom: 52px; }
}
