/* Core Headless Shop — standalone frontend for WooCommerce Store API */
:root {
  --paper: #f3ecdf;
  --paper-light: #fbf7ef;
  --paper-deep: #ece2d1;
  --ink: #1b1812;
  --ink-soft: #4f493d;
  --muted: #6b6152;
  --line: rgba(27, 24, 18, .14);
  --wine: #772b36;
  --gold: #c18b2b;
  --gold-ink: #8a5f12;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
#core-shop [hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body.core-shop-page { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.6; }
body.core-shop-page::after { content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .028; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#core-shop { width: min(100% - 48px, 1280px); margin: 0 auto; }
h1, h2, h3, p { margin-top: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 92px; border-bottom: 1px solid var(--line); }
.cs-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.cs-brand__seal { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; }
.cs-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.cs-brand__text strong { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -.03em; }
.cs-brand__text small { margin-top: 4px; color: var(--muted); font-size: 7.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cs-cart-button { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 13px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.cs-cart-button span:last-child { display: grid; place-items: center; min-width: 19px; height: 19px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 9px; }
.cs-main { padding: 64px 0 92px; }
.cs-hero { max-width: 760px; padding: 0 0 54px; }
.cs-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.cs-eyebrow span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.cs-hero h1 { margin-bottom: 18px; font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 7.2rem); font-weight: 300; letter-spacing: -.065em; line-height: .92; }
.cs-hero h1 em { color: var(--wine); font-style: italic; }
.cs-hero p:last-child { max-width: 62ch; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.cs-catalog { padding-top: 34px; border-top: 1px solid var(--line); }
.cs-catalog__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.cs-catalog__head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 400; letter-spacing: -.045em; line-height: 1; }
.cs-api-status { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cs-api-status.is-error { color: var(--wine); }
.cs-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cs-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-pill { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.cs-pill:hover, .cs-pill.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cs-tools { display: flex; gap: 8px; }
.cs-field { display: flex; flex-direction: column; gap: 4px; }
.cs-field > span { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.cs-field input, .cs-field select { height: 38px; min-width: 132px; padding: 0 9px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper-light); color: var(--ink); font-size: 11px; }
.cs-field input:focus, .cs-field select:focus { outline: 2px solid var(--wine); outline-offset: 1px; }
.cs-result-count { min-height: 1.4em; margin: 14px 0 12px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cs-card { display: flex; flex-direction: column; min-height: 360px; border: 1px solid var(--line); background: rgba(251, 247, 239, .55); }
.cs-card__image { display: block; aspect-ratio: 1; display: grid; place-items: center; padding: 16px; background: var(--paper-light); border-bottom: 1px solid var(--line); }
.cs-card__image img { width: 100%; height: 100%; object-fit: contain; }
.cs-card__body { display: flex; flex-direction: column; flex: 1; padding: 13px 14px 12px; }
.cs-card__category { color: var(--wine); font-size: 7.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.cs-card__name { margin: 8px 0 5px; font-family: var(--font-display); font-size: 21px; font-weight: 400; letter-spacing: -.025em; line-height: 1.1; }
.cs-card__desc { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cs-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 15px; }
.cs-card__price { font-size: 16px; font-weight: 700; }
.cs-add { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink); font-size: 18px; line-height: 1; }
.cs-add:hover { background: var(--ink); color: var(--paper); }
.cs-add:disabled, .cs-card.is-out .cs-add { opacity: .35; cursor: not-allowed; }
.cs-card.is-out .cs-card__image { opacity: .55; }
.cs-empty { padding: 40px 0; color: var(--muted); }
.cs-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(23, 21, 15, .35); }
.cs-cart { position: fixed; top: 0; right: 0; z-index: 50; display: flex; flex-direction: column; width: min(440px, 100%); height: 100dvh; background: var(--paper-light); box-shadow: -20px 0 60px rgba(23,21,15,.14); }
.cs-cart__head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 20px 20px 15px; border-bottom: 1px solid var(--line); }
.cs-cart__head h2 { margin: 0; font-family: var(--font-display); font-size: 29px; font-weight: 400; letter-spacing: -.04em; }
.cs-icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 22px; line-height: 1; }
.cs-cart__body { flex: 1; overflow: auto; padding: 18px 20px; }
.cs-cart__footer { padding: 15px 20px 20px; border-top: 1px solid var(--line); }
.cs-cart-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cs-cart-item img { width: 54px; height: 54px; object-fit: contain; background: var(--paper); }
.cs-cart-item__name { margin: 0 0 4px; font-family: var(--font-display); font-size: 15px; line-height: 1.2; }
.cs-cart-item__meta { color: var(--muted); font-size: 9px; }
.cs-cart-item__qty { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; }
.cs-cart-item__qty button { width: 20px; height: 20px; border: 1px solid var(--line); background: transparent; font-size: 12px; }
.cs-cart-item__qty span { min-width: 16px; text-align: center; font-size: 10px; }
.cs-cart-item__price { font-size: 11px; font-weight: 700; white-space: nowrap; }
.cs-cart-summary { display: grid; gap: 5px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.cs-cart-summary div { display: flex; justify-content: space-between; gap: 16px; }
.cs-cart-summary strong { color: var(--ink); }
.cs-cart-total { padding-top: 7px; border-top: 1px solid var(--line); font-size: 14px; }
.cs-cart-total strong { font-size: 18px; }
.cs-checkout-button, .cs-pay-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.cs-checkout-button:hover, .cs-pay-button:hover { background: var(--wine); border-color: var(--wine); }
.cs-cart-empty { padding: 28px 0; color: var(--muted); font-size: 12px; }
.cs-checkout-form { display: grid; gap: 10px; }
.cs-checkout-form h3 { margin: 0 0 3px; font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.cs-checkout-form .cs-field { gap: 3px; }
.cs-checkout-form .cs-field input { min-width: 0; width: 100%; }
.cs-checkout-form .cs-field input:required:invalid { border-color: var(--line); }
.cs-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-checkout-form button { margin-top: 4px; }
.cs-form-error { min-height: 1.3em; margin: 0; color: var(--wine); font-size: 10px; line-height: 1.4; }
.cs-toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 10px 15px; background: var(--ink); color: var(--paper); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.cs-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.cs-loading { grid-column: 1 / -1; padding: 44px 0; color: var(--muted); text-align: center; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.cs-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 980px) { .cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cs-toolbar { align-items: start; flex-direction: column; } .cs-tools { width: 100%; } .cs-field { flex: 1; } .cs-field input, .cs-field select { width: 100%; } }
@media (max-width: 700px) { #core-shop { width: calc(100% - 36px); } .cs-header { min-height: 74px; } .cs-brand__seal { width: 34px; height: 34px; } .cs-brand__text strong { font-size: 18px; } .cs-brand__text small { font-size: 6.5px; } .cs-main { padding-top: 38px; } .cs-hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); } .cs-catalog__head { align-items: start; flex-direction: column; gap: 7px; } .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cs-card { min-height: 300px; } .cs-card__image { padding: 9px; } .cs-card__name { font-size: 17px; } .cs-card__desc { font-size: 9px; } .cs-card__bottom { padding-top: 10px; } .cs-card__price { font-size: 14px; } .cs-add { width: 31px; height: 31px; } .cs-form-row { grid-template-columns: 1fr; } .cs-cart__head, .cs-cart__body, .cs-cart__footer { padding-left: 17px; padding-right: 17px; } }
@media (max-width: 380px) { .cs-grid { grid-template-columns: 1fr; } }
