:root {
  --ink: #1c1917;
  --muted: #78716c;
  --paper: #f6f1ea;
  --card: #fffdfb;
  --line: #e8dfd4;
  --accent: #9a4a45;
  --accent-dark: #7a3531;
  --footer: #2b2420;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.topbar {
  background: var(--ink);
  color: #f5efe8;
  font-size: 13px;
  letter-spacing: .02em;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 38px;
}
.topbar a { color: #f5efe8; text-decoration: none; }
.topbar a:hover { color: #fff; }

.site-header {
  background: rgba(255,253,251,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: nowrap;
}
.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}
.shop-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.shop-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
}
.shop-nav a:hover, .shop-nav a.is-active { background: #f0e7dc; color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-ghost, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.menu-toggle { display: none; }

.page-hero {
  padding: 42px 0 18px;
}
.crumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.page-hero p { color: var(--muted); max-width: 640px; margin-top: 10px; }

.shop-main { padding: 8px 0 72px; }
.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.toc h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.toc a:last-child { border-bottom: 0; }
.legal-card, .shop-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 32px;
  box-shadow: 0 10px 30px rgba(43, 36, 32, .04);
}
.legal-section { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.legal-section:first-child { padding-top: 0; }
.legal-section:last-child { padding-bottom: 0; border-bottom: 0; }
.legal-section h2, .shop-card h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.legal-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}
.legal-section p, .legal-section li, .shop-card p, .shop-card li { color: #44403c; margin-bottom: 10px; }
.legal-section ul, .legal-section ol, .shop-card ul, .shop-card ol { margin: 0 0 14px 20px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shop-card label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.shop-card input:not([type="radio"]):not([type="checkbox"]), .shop-card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
  margin-bottom: 14px;
}
.required { color: #b91c1c; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.success { background: #ecfdf5; color: #047857; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.errors { background: #fef2f2; color: #b91c1c; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.info-box { background: #f7f1ea; border-radius: 16px; padding: 18px 20px; }
.stats-grid, .why-grid, .products-grid {
  display: grid;
  gap: 16px;
}
.stats-grid { grid-template-columns: repeat(3, 1fr); margin: 24px 0; }
.why-grid { grid-template-columns: repeat(4, 1fr); }
.products-grid { grid-template-columns: repeat(3, 1fr); }
.stat-card, .why-card, .product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.stat-card, .why-card { padding: 22px; text-align: center; }
.stat-number { font-family: "Cormorant Garamond", serif; font-size: 2.6rem; color: var(--accent); }
.stat-label, .why-title { font-weight: 600; }
.why-icon { font-size: 1.4rem; margin-bottom: 8px; }
.product-card img { width: 100%; height: 240px; object-fit: cover; display: block; }
.product-content { padding: 18px; }
.product-title { font-size: 1.05rem; margin-bottom: 6px; }
.product-description { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.product-price { display: flex; gap: 10px; align-items: baseline; margin-bottom: 14px; }
.new-price { font-weight: 700; font-size: 1.15rem; }
.old-price { color: var(--muted); text-decoration: line-through; }
.detail-btn {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.product-card a { color: inherit; text-decoration: none; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(43,36,32,.08); transition: .2s ease; }
#headerCartCount {
  display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; margin: 0; flex-shrink: 0;
}
.header-actions .btn-ghost.cart-bump { animation: cartBump .5s ease; }
@keyframes cartBump { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.12); } 60% { transform: scale(.96); } }
.fly-to-cart { position: fixed; width: 50px; height: 50px; border-radius: 8px; overflow: hidden; pointer-events: none; z-index: 9999; box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.fly-to-cart img { width: 100%; height: 100%; object-fit: cover; }
.fly-to-cart.animate { transition: top .5s cubic-bezier(.25,.46,.45,.94), left .5s, width .5s, height .5s, opacity .5s; }

.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: start; }
.pdp-image {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(43, 36, 32, .04);
}
.pdp-image img { width: 100%; display: block; object-fit: contain; background: #fff; min-height: 360px; }
.pdp-placeholder { background: #efe7de; padding: 160px 20px; text-align: center; color: var(--muted); }
.pdp-info {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 32px;
  box-shadow: 0 10px 30px rgba(43, 36, 32, .04);
}
.pdp-info h1 { font-family: "Cormorant Garamond", serif; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; line-height: 1.2; margin-bottom: 14px; }
.pdp-badge { display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.pdp-badge.in-stock { background: #ecfdf5; color: #047857; }
.pdp-badge.out-of-stock { background: #fef2f2; color: #b91c1c; }
.pdp-price { display: flex; gap: 12px; align-items: baseline; margin: 18px 0; flex-wrap: wrap; }
.pdp-price .current { font-size: 2rem; font-weight: 800; color: var(--ink); }
.pdp-price .old { color: var(--muted); text-decoration: line-through; }
.pdp-meta { color: var(--muted); margin-bottom: 8px; }
.pdp-section { margin: 24px 0; }
.pdp-section h2 { font-family: "Cormorant Garamond", serif; font-size: 1.45rem; margin-bottom: 10px; }
.pdp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pdp-actions .btn-primary, .pdp-actions .btn-ghost { width: auto; min-width: 180px; }
.pdp-actions .btn-primary:disabled, .pdp-actions .btn-primary.is-disabled { background: #a8a29e; cursor: not-allowed; }
.pdp-related { margin-top: 48px; }
.pdp-related h2 { font-family: "Cormorant Garamond", serif; font-size: 2rem; margin-bottom: 18px; }
.pdp-related .products-grid { grid-template-columns: repeat(3, 1fr); }
.characteristics-table { width: 100%; border-collapse: collapse; }
.characteristics-table td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.characteristics-table td:first-child { color: var(--muted); width: 42%; font-weight: 600; }
.detail-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.merchant-trust { background: #f7f1ea !important; border-color: var(--line) !important; color: #44403c !important; }

.checkout-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
.pay-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.pay-option input { margin-top: 4px; }
.order-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; padding-top: 16px; }
.empty-cart { text-align: center; color: var(--muted); padding: 20px 0; }
.success-page { max-width: 640px; margin: 8px auto 40px; text-align: center; }
.success-page .icon { width: 72px; height: 72px; border-radius: 50%; background: #ecfdf5; color: #047857; display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 16px; }

.footer { background: var(--footer); color: #efe7de; padding: 56px 0 28px; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.footer-section h3 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-section p, .footer-section a { color: #d7cbbf; text-decoration: none; font-size: 14px; line-height: 1.7; }
.footer-section a:hover { color: #fff; }
.footer .badge { background: #4a3c36; color: #fff; }
.footer-bottom { border-top: 1px solid #3d342f; margin-top: 32px; padding-top: 18px; }
.footer .payment-details, .footer .copyright { color: #b3a79b; }

@media (max-width: 900px) {
  .legal-layout, .contact-grid, .stats-grid, .why-grid, .products-grid, .footer-inner, .pdp, .checkout-wrap { grid-template-columns: 1fr; }
  .toc { position: static; }
  .shop-nav { display: none; position: absolute; top: 100%; left: 16px; right: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; flex-direction: column; align-items: stretch; }
  .shop-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .site-header .container { position: relative; }
  .header-row { min-height: 56px; gap: 10px; }
  .logo { font-size: 22px; }
  .btn-ghost, .menu-toggle { height: 36px; padding: 0 12px; font-size: 12px; }
  .topbar .container { justify-content: center; text-align: center; }
}
