:root {
  --cream: #F1ECE3;
  --cream-2: #E9E3D8;
  --wine: #502527;
  --wine-2: #6A3335;
  --sage: #788175;
  --ink: #5C554C;
  --ink-strong: #2E2A26;
  --silver: #A3A7AB;
  --line: rgba(92, 85, 76, .35);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-strong);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.mono {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
}
.label { color: var(--ink); margin: 0 0 8px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: var(--sage);
  color: var(--cream);
}
.topbar__logo {
  font-family: var(--serif); font-size: 30px; line-height: 1;
  color: var(--cream); text-decoration: none; margin-right: auto;
}
.topbar__nav { display: flex; gap: 24px; }
.topbar__nav a { text-decoration: none; color: var(--cream); opacity: .9; }
.topbar__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.cart-btn {
  background: none; border: 0; cursor: pointer; padding: 8px 0;
  color: var(--cream); white-space: nowrap;
}
.topbar :focus-visible { outline-color: var(--cream); }
.cart-btn.bump { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.08); } }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - 60px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px var(--gutter) 32px;
}
.hero__labels { display: flex; justify-content: space-between; gap: 16px; color: var(--ink); }
.hero__center { text-align: center; padding: 40px 0; }
.orb {
  width: clamp(110px, 16vw, 170px); aspect-ratio: 1; border-radius: 50%;
  margin: 0 auto 8px;
  background: linear-gradient(135deg, #B7BBBE 0%, #9EA2A6 38%, #D9DCDE 52%, #A3A7AB 64%, #B9BCBF 100%);
  box-shadow: inset 0 -6px 14px rgba(0,0,0,.08);
}
.hero__logo {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(96px, 18vw, 200px); line-height: .9;
  color: var(--wine); margin: 0; letter-spacing: -.02em;
}
.hero__tagline {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(28px, 4.4vw, 48px); color: var(--ink);
  margin: 6px 0 36px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px; border: 1px solid var(--wine);
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.btn--primary { background: var(--wine); color: var(--cream); }
.btn--primary:hover { background: var(--wine-2); }
.btn--primary:disabled { background: transparent; color: var(--ink); border-color: var(--line); cursor: not-allowed; }
.btn--block { width: 100%; }
.link-btn { background: none; border: 0; cursor: pointer; color: var(--ink); }

/* ---------- Manifesto ---------- */
.manifesto {
  background: var(--wine); color: var(--cream);
  padding: 40px var(--gutter) 48px;
}
.manifesto__labels { display: flex; justify-content: space-between; opacity: .85; }
.manifesto__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(64px, 11vw, 150px); line-height: 1;
  margin: 64px 0 24px; letter-spacing: -.015em;
}
.manifesto__title .eq { color: #C9B49A; }
.manifesto__text { max-width: 34ch; font-size: clamp(18px, 2.2vw, 26px); line-height: 1.4; margin: 0 0 72px; }
.manifesto__handle { margin: 0; opacity: .85; }

/* ---------- Shop ---------- */
.shop { padding: 40px var(--gutter) 72px; }
.shop__labels { display: flex; justify-content: space-between; color: var(--ink); margin-bottom: 48px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.shop__title {
  font-family: var(--serif); font-weight: 400; color: var(--sage);
  font-size: clamp(56px, 10vw, 128px); line-height: 1; margin: 28px 0 32px;
}
.filters {
  display: flex; gap: 8px; overflow-x: auto; padding: 28px 0 8px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; background: none; border: 1px solid var(--line);
  padding: 10px 14px; cursor: pointer; color: var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.filter:hover { border-color: var(--wine); color: var(--wine); }
.filter[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.shop__status { color: var(--ink); margin: 16px 0 24px; }

.grid {
  display: grid; gap: 40px 20px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card { display: flex; flex-direction: column; }
.card__media {
  position: relative; aspect-ratio: 1; background: var(--cream-2);
  overflow: hidden; border: 0; padding: 0; cursor: pointer; display: block; width: 100%;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.card__media img.alt { position: absolute; inset: 0; opacity: 0; }
.card__media:hover img.alt { opacity: 1; }
.card__media:hover img { transform: scale(1.03); }
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--cream); color: var(--wine); padding: 5px 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
}
.ph-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink); }
.orb--sm { width: 34%; margin: 0; }
.card.is-out .card__media img { filter: grayscale(.6); opacity: .6; }
.card__body { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__name { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.3; }
.card__name button { all: unset; cursor: pointer; }
.card__name button:hover { color: var(--wine); }
.card__size { color: var(--ink); margin: 0; font-size: 11px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.card__price { font-family: var(--serif); font-size: 26px; color: var(--wine); line-height: 1; }
.add-btn {
  background: none; border: 1px solid var(--wine); color: var(--wine);
  padding: 9px 12px; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.add-btn:hover { background: var(--wine); color: var(--cream); }
.add-btn:disabled { border-color: var(--line); color: var(--ink); background: none; cursor: not-allowed; }

/* ---------- Delivery ---------- */
.delivery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--line);
}
.delivery__item { padding: 40px var(--gutter); border-bottom: 1px solid var(--line); }
.delivery__item + .delivery__item { border-left: 1px solid var(--line); }
.delivery h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; color: var(--wine); margin: 0 0 8px; line-height: 1.05; }
.delivery p:last-child { margin: 0; color: var(--ink); max-width: 32ch; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 64px var(--gutter) 48px; }
.footer__logo { font-family: var(--serif); font-size: 72px; color: var(--wine); margin: 0; line-height: 1; }
.footer__tagline { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--ink); margin: 4px 0 24px; }
.footer__links { display: flex; justify-content: center; gap: 12px; color: var(--ink); }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--wine); }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--ink-strong); background: var(--cream); }
dialog::backdrop { background: rgba(46, 42, 38, .45); }

.modal { width: min(980px, calc(100vw - 32px)); max-height: calc(100svh - 32px); }
.modal__close { position: absolute; top: 14px; right: 16px; background: none; border: 0; cursor: pointer; color: var(--ink); z-index: 2; }
.pm { display: grid; grid-template-columns: 1.1fr 1fr; }
.pm__gallery { background: var(--cream-2); }
.pm__main { aspect-ratio: 1; }
.pm__main img { width: 100%; height: 100%; object-fit: cover; }
.pm__thumbs { display: flex; gap: 6px; padding: 8px; }
.pm__thumbs button { border: 1px solid transparent; padding: 0; width: 64px; height: 64px; cursor: pointer; background: none; }
.pm__thumbs button[aria-current="true"] { border-color: var(--wine); }
.pm__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pm__info { padding: 48px 32px 32px; display: flex; flex-direction: column; }
.pm__title { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; margin: 0 0 6px; color: var(--wine); }
.pm__size { color: var(--ink); margin: 0 0 18px; }
.pm__price { font-family: var(--serif); font-size: 34px; margin: 0; color: var(--ink-strong); }
.pm__stock { color: var(--sage); margin: 4px 0 18px; font-size: 11px; }
.pm__desc { color: var(--ink); margin: 0 0 18px; font-size: 15px; }
.pm__desc:empty { display: none; }
.pm__specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 24px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.pm__specs dt { color: var(--ink); }
.pm__specs dd { margin: 0; }
.pm__info .btn { margin-top: auto; }

.drawer {
  margin: 0 0 0 auto; height: 100svh; max-height: 100svh;
  width: min(440px, 100vw); max-width: 100vw;
  display: none; flex-direction: column;
}
.drawer[open] { display: flex; animation: slide .25s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer__title { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0; color: var(--wine); }
.drawer__body { overflow-y: auto; padding: 8px 24px 24px; flex: 1; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img, .cart-item .ph { width: 64px; height: 64px; object-fit: cover; background: var(--cream-2); }
.cart-item__name { font-size: 14px; margin: 0; line-height: 1.3; }
.cart-item__meta { color: var(--ink); font-size: 11px; margin: 2px 0 6px; }
.qty { display: inline-flex; border: 1px solid var(--line); }
.qty button { background: none; border: 0; width: 28px; height: 28px; cursor: pointer; }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty span { min-width: 24px; text-align: center; line-height: 28px; font-size: 13px; }
.cart-item__right { text-align: right; }
.cart-item__price { font-family: var(--serif); font-size: 20px; display: block; }
.cart-item__remove { background: none; border: 0; cursor: pointer; color: var(--ink); font-size: 11px; text-decoration: underline; padding: 0; }
.cart-empty { color: var(--ink); padding: 24px 0; margin: 0; }

.order { margin-top: 20px; }
.order[hidden] { display: none; }
.field { display: block; border: 0; padding: 0; margin: 0 0 18px; }
.field input[type="text"] {
  width: 100%; padding: 12px; border: 1px solid var(--line); background: #FBF9F5;
  font: inherit; font-size: 16px; color: var(--ink-strong);
}
.field input[type="text"]:focus { outline: 2px solid var(--wine); outline-offset: -1px; }
.radio { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 15px; cursor: pointer; }
.radio input { accent-color: var(--wine); width: 18px; height: 18px; }
.order__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding: 16px 0 4px; }
#cartTotal { font-family: var(--serif); font-size: 30px; color: var(--wine); }
.order__note { color: var(--ink); font-size: 13px; margin: 0 0 8px; }
.order__error { color: #9A2B2B; font-size: 13px; min-height: 1em; margin: 8px 0; }

.toast {
  position: fixed; inset: auto auto 20px 50%; margin: 0; border: 0; transform: translate(-50%, 20px);
  background: var(--ink-strong); color: var(--cream); padding: 12px 18px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

@media (max-width: 760px) {
  .topbar__nav { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .card__price { font-size: 22px; }
  .card__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .add-btn { width: 100%; }
  .pm { grid-template-columns: 1fr; }
  .pm__info { padding: 24px 20px 24px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 100svh; height: 100svh; margin: 0; }
  .modal__close { background: var(--cream); padding: 8px 10px; }
  .delivery__item + .delivery__item { border-left: 0; }
  .manifesto__title { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
