@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Karla:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  --ivory: #F5EFE6;
  --ivory-deep: #EEE4D6;
  --ink: #241F1C;
  --ink-soft: #4A423C;
  --wine: #7A2C3B;
  --wine-deep: #5C2130;
  --rose: #CFA0AA;
  --gold: #A9895F;
  --sage: #7C8B72;
  --line: rgba(36, 31, 28, 0.14);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-w: 1120px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; }

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

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.wordmark em { font-style: italic; color: var(--wine); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.94rem;
}

.header-nav a { border-bottom: 1px solid transparent; padding-bottom: 2px; transition: border-color .15s ease; }
.header-nav a:hover { border-color: var(--wine); }

.bag-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.bag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--ivory);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ---------- Hero / About ---------- */
.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  gap: 48px;
  align-items: end;
}

.hero-copy p {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.hero-aside {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-aside { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 24px; }
}

/* ---------- Contact block (reused: home + product page) ---------- */
.contact-block h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 0.9em;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.96rem;
}

.contact-list dt { display: inline; color: var(--ink-soft); }
.contact-list dd { display: inline; margin: 0 0 0 6px; }

.contact-list a { border-bottom: 1px solid var(--rose); }
.contact-list a:hover { border-color: var(--wine); color: var(--wine); }

/* ---------- Product list (text-only, home page) ---------- */
.catalog { padding: 56px 0 72px; }

.catalog-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 6px;
}

.catalog-heading .count { color: var(--ink-soft); font-size: 0.9rem; }

.product-list { list-style: none; margin: 0; padding: 0; }

.product-list li {
  border-bottom: 1px solid var(--line);
}

.product-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  transition: padding-left .18s ease, color .18s ease;
}

.product-list a:hover,
.product-list a:focus-visible {
  padding-left: 14px;
  color: var(--wine);
}

.product-list .p-name {
  font-family: var(--serif);
  font-size: 1.35rem;
}

.product-list .p-meta {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-shrink: 0;
}

.product-list .p-tagline {
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: none;
}

.product-list .p-price {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .product-list .p-tagline { display: block; max-width: 34ch; }
}

/* ---------- Product detail page ---------- */
.product-page { padding: 48px 0 24px; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 800px) {
  .product-grid { grid-template-columns: 1fr; gap: 28px; }
}

.product-media { position: sticky; top: 96px; }

.product-media .frame {
  border: 1px solid var(--line);
  background: var(--ivory-deep);
  overflow: hidden;
  margin-bottom: 10px;
}

.thumb-row { display: flex; gap: 10px; }

.thumb-row button {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--ivory-deep);
  width: 76px;
  height: 76px;
  cursor: pointer;
  overflow: hidden;
}

.thumb-row button.active { border-color: var(--wine); }
.thumb-row img { width: 100%; height: 100%; object-fit: cover; }

.product-info .eyebrow-tagline {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 1.1em;
}

.price-display {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--wine-deep);
  margin: 6px 0 22px;
}

.price-display .was { color: var(--ink-soft); font-size: 1rem; margin-left: 10px; text-decoration: line-through; }

.field-group { margin-bottom: 22px; }

.field-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

select {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.tier-table caption {
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.tier-table th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
}

.tier-table td { padding: 0; border-bottom: 1px solid var(--line); }

.tier-table .tier-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.97rem;
  color: var(--ink);
  text-align: left;
}

.tier-table .tier-row .t-price { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.tier-table tr.selected .tier-row { color: var(--wine); }
.tier-table tr.selected .tier-row .t-price { color: var(--wine); }
.tier-table tr.selected { background: rgba(122,44,59,0.06); }

.tier-table .tier-row .t-radio {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--ink-soft);
  display: inline-block; margin-right: 10px; position: relative; flex-shrink: 0;
}
tr.selected .t-radio { border-color: var(--wine); }
tr.selected .t-radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--wine);
}
.tier-row-inner { display: flex; align-items: center; }

.btn-primary {
  width: 100%;
  padding: 15px 20px;
  background: var(--wine);
  color: var(--ivory);
  border: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s ease;
}

.btn-primary:hover { background: var(--wine-deep); }

.btn-secondary {
  display: inline-block;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  background: transparent;
  cursor: pointer;
}

.btn-secondary:hover { background: var(--ink); color: var(--ivory); }

.stock-note { font-size: 0.85rem; color: var(--sage); margin-top: 14px; }

/* ---------- Info sections below product ---------- */
.info-section {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.info-section.alt { background: var(--ivory-deep); }

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 22px;
}

@media (max-width: 760px) { .policy-grid { grid-template-columns: 1fr; } }

.policy-card h4 { font-size: 1rem; margin-bottom: 8px; }
.policy-card p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Collapsible SEO description ---------- */
.accordion {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}

.accordion-trigger .plus {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--wine);
  transition: transform .2s ease;
  line-height: 1;
}

.accordion[open] .accordion-trigger .plus { transform: rotate(45deg); }

.accordion-panel {
  padding: 0 4px 26px;
  color: var(--ink-soft);
}

.accordion-panel p { max-width: 72ch; }

/* Native <details> styling reset */
details.accordion > summary { list-style: none; }
details.accordion > summary::-webkit-details-marker { display: none; }

/* ---------- Related products ---------- */
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.related-list li { border-top: 1px solid var(--line); }
.related-list a { display: flex; justify-content: space-between; padding: 16px 4px; }
.related-list a:hover { color: var(--wine); }

/* ---------- Cart & Checkout ---------- */
.cart-page { padding: 56px 0 80px; }

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); }
.cart-line .l-name { font-family: var(--serif); font-size: 1.05rem; }
.cart-line .l-meta { color: var(--ink-soft); font-size: 0.88rem; }
.cart-line .l-price { font-variant-numeric: tabular-nums; white-space: nowrap; }

.cart-summary {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.empty-state { padding: 40px 0; color: var(--ink-soft); }

table.line-remove { border: none; }
.remove-btn {
  background: none; border: none; color: var(--ink-soft); text-decoration: underline;
  cursor: pointer; font-size: 0.85rem; font-family: var(--sans);
}
.remove-btn:hover { color: var(--wine); }

.checkout-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; margin-top: 32px; }
@media (max-width: 800px) { .checkout-grid { grid-template-columns: 1fr; } }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form-row input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--sans); font-size: 1rem;
}
.form-row-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.order-summary { background: var(--ivory-deep); padding: 24px; border: 1px solid var(--line); }
.order-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.95rem; }
.order-summary .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-family: var(--serif); font-size: 1.2rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Utility ---------- */
.section-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.section-title .rule { flex: 1; height: 1px; background: var(--line); }
.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;
}
