:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --surface-2: #fdf7ef;
  --border: #ece4d8;
  --text: #1f2430;
  --muted: #6b7180;
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --accent: #0e7490;
  --tint: #fff4e8;
  --danger: #e11d48;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31,36,48,.04), 0 8px 24px rgba(31,36,48,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header */
.promo-bar { background: var(--tint); color: var(--primary-dark); text-align: center; font-size: .85rem; font-weight: 500; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,253,249,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 45%, var(--primary) 100%); box-shadow: 0 0 18px rgba(245,158,11,.45); }
.main-nav { display: flex; gap: 20px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .93rem; white-space: nowrap; }
.main-nav a:hover { color: var(--text); }
.cart-link { text-decoration: none; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.badge { background: var(--primary); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font-size: .78rem; }

/* Buttons & form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 12px 20px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .1s, background .15s, border-color .15s; }
.btn:hover { border-color: #d6cab8; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { background: transparent; }
.btn-small { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; }
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 12px 16px; border-radius: 10px; margin: 20px 0 0; }
.flash.error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.note { color: var(--accent); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 64px 0 40px; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.03em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { position: relative; height: 340px; background: radial-gradient(circle at 60% 40%, #fde7c7, transparent 65%); }
.hero-photo { position: absolute; width: 58%; border-radius: 24px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 20px 50px rgba(31,36,48,.12); }
.hero-photo.a { left: 0; top: 20px; transform: rotate(-6deg); }
.hero-photo.b { right: 0; top: 0; transform: rotate(5deg); }
.hero-photo.c { left: 22%; bottom: -10px; width: 50%; }

.cat-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 24px 0 8px; }
.cat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; overflow: hidden; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.cat-tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.cat-tile span { display: block; padding: 10px 14px; font-weight: 600; font-size: .92rem; }
.tile-photo { width: 100%; height: 110px; }

/* Shop grid */
.shop { padding: 40px 0; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.shop-head h2 { margin: 0; }
.count { font-size: .9rem; font-weight: 400; margin-left: 8px; }
.filters { display: flex; gap: 8px; }
.filters input { width: 200px; }
.filters select { width: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-size: .88rem; color: var(--muted); }
.chip.active, .chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--tint); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: #e2d4c0; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(31,36,48,.10); }
.card-img { position: relative; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; }
.card-photo { width: 100%; aspect-ratio: 1 / 1; height: auto; }
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { margin: 0 0 12px; }
.card-cat { color: var(--accent); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin: 0 0 6px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 1.1rem; }
.price.big { font-size: 1.8rem; margin: 8px 0 16px; }
.empty { text-align: center; padding: 60px 0; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 60px; }
.perks div { background: var(--tint); border: 1px solid #f6dfc4; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; }

/* Product page */
.crumbs { margin: 24px 0 0; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 24px 0 48px; }
.product-img { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; align-self: start; box-shadow: var(--shadow); }
.product-photo { width: 100%; height: auto; }
.product-info h1 { font-size: 2rem; }
.buy { display: flex; align-items: center; gap: 10px; margin: 24px 0; }
.buy input { width: 80px; }
.specs { padding-left: 18px; color: var(--muted); }
.specs li { margin: 4px 0; }
.related { padding-bottom: 60px; }

/* Cart & checkout */
.page-title { margin: 32px 0 20px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; margin-bottom: 60px; }
.cart-items, .checkout-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 20px 20px; box-shadow: var(--shadow); }
.cart-row { display: grid; grid-template-columns: 72px 1fr 80px 100px auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-thumb { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.thumb-photo { width: 72px; height: 72px; }
.cart-name { display: flex; flex-direction: column; }
.cart-name a { text-decoration: none; font-weight: 600; }
.line-total { font-weight: 600; text-align: right; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }
.cart-actions a { color: var(--muted); }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; box-shadow: var(--shadow); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.sum-row.item { font-size: .9rem; color: var(--muted); }
.sum-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 1.15rem; }
.summary .btn { margin-top: 12px; }
fieldset { border: 0; padding: 0; margin: 16px 0 8px; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.checkout-form label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.checkout-form label input, .checkout-form label select { margin-top: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }

.confirm { max-width: 620px; margin: 0 auto; text-align: center; padding: 60px 0; }
.check-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--primary); }
.confirm-box { text-align: left; position: static; margin: 28px 0; }
.confirm-box h4 { margin: 20px 0 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 40px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 32px; }
.footer-inner h4 { margin: 0 0 12px; }
.footer-inner a:not(.logo) { display: block; color: var(--muted); text-decoration: none; margin: 4px 0; font-size: .9rem; }
.footer-inner a:not(.logo):hover { color: var(--primary); }
.legal { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 20px; }

/* Product photos */
.card-photo { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; background: var(--surface-2); }
.tile-photo { width: 100%; height: 110px; object-fit: cover; background: var(--surface-2); }
.thumb-photo { width: 72px; height: 72px; object-fit: cover; }
.product-photo { width: 100%; height: auto; }
.hero-photo { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.credits { margin: 32px 0 60px; }
.credits table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.credits th, .credits td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.credits th { background: var(--surface-2); }
.credits img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.credits-wrap { overflow-x: auto; }

/* Square card form */
#card-container { min-height: 90px; }
.card-errors { color: var(--danger); font-size: .88rem; min-height: 1.2em; }
.secure { margin-top: 4px; }
.btn:disabled { opacity: .6; cursor: wait; }

@media (max-width: 900px) {
  .hero, .product, .cart-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero-art { height: 260px; max-width: 420px; }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); }
  .perks, .footer-inner { grid-template-columns: 1fr; }
  .summary { position: static; }
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
}
@media (max-width: 600px) {
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .filters { width: 100%; }
  .filters input { width: auto; flex: 1; min-width: 0; }
  .cart-row { grid-template-columns: 56px 1fr 64px; }
  .thumb-photo { width: 56px; height: 56px; }
  .line-total { grid-column: 2; text-align: left; }
  .cart-row .link-btn { grid-column: 3; justify-self: end; }
  .two, .three { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-foot { flex-direction: column; align-items: stretch; }
}
