:root {
  --clay: #b5714a;
  --clay-dark: #8c4f2d;
  --sand: #f6f1ea;
  --sand-dark: #ebe2d6;
  --ink: #2b2420;
  --ink-soft: #6b5f57;
  --line: #d9cfc3;
  --ok: #3f7d4e;
  --bad: #b23a3a;
  --card: #fffdfa;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(60, 40, 20, 0.08);
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
}
a { color: var(--clay-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.hidden { display: none !important; }

.container { width: min(1120px, 100% - 32px); margin: 0 auto; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .container {
  display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap;
}
.brand { font-family: var(--font-head); font-size: 1.35rem; text-decoration: none; color: var(--ink); }
.brand span { color: var(--clay); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--ink-soft); padding: 8px 12px; border-radius: 999px; font-size: 0.95rem;
}
.nav a:hover, .nav a.active { background: var(--sand-dark); color: var(--ink); }
.nav .cart-link { font-weight: 600; color: var(--clay-dark); }
.badge {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--clay); color: #fff; font-size: 0.75rem; text-align: center; line-height: 20px; margin-left: 4px;
}

/* Hero */
.hero { padding: 56px 0 28px; text-align: center; }
.hero p { max-width: 640px; margin: 0 auto 1.4em; color: var(--ink-soft); font-size: 1.1rem; }

/* Category tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 0 28px; }
.tab {
  border: 1px solid var(--line); background: var(--card); padding: 8px 16px; border-radius: 999px;
  cursor: pointer; font: inherit; color: var(--ink-soft);
}
.tab.active, .tab:hover { background: var(--clay); border-color: var(--clay); color: #fff; }
.category-blurb { text-align: center; color: var(--ink-soft); margin-bottom: 24px; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; padding-bottom: 56px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-3px); }
.card img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; }
.card .price { margin-top: auto; font-weight: 600; }
.pill {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--sand-dark); color: var(--ink-soft); padding: 2px 8px; border-radius: 999px;
}
.pill.digital { background: #dde8f0; color: #2f5370; }
.pill.custom { background: #efe0d4; color: #7a4320; }

/* Product page */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 36px 0; }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; } }
.gallery .main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.gallery .main img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img {
  width: 76px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: 0.8;
}
.thumbs img.active { border-color: var(--clay); opacity: 1; }
.buy h1 { margin-bottom: 6px; }
.buy .price { font-size: 1.6rem; font-weight: 600; margin: 10px 0 18px; }
.option { margin-bottom: 18px; }
.option label.title { display: block; font-weight: 600; margin-bottom: 8px; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit;
}
.choice.active { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(181, 113, 74, 0.25); }
.choice.swatch { display: flex; align-items: center; gap: 8px; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); display: inline-block; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty input { width: 64px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; text-align: center; }
textarea, input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--clay); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--clay-dark); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--sand-dark); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 0.9rem; }
.notice {
  background: #fff8ee; border: 1px solid #efd9b8; border-radius: 10px; padding: 10px 14px; margin: 14px 0; font-size: 0.95rem;
}
.notice.ok { background: #eef7f0; border-color: #bfdcc6; }
.notice.bad { background: #fbeeee; border-color: #e5bcbc; color: var(--bad); }
.description { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.files { list-style: none; padding: 0; margin: 0; }
.files li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* Comments */
.comments { padding: 10px 0 60px; max-width: 760px; }
.comment { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.comment .meta { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 6px; }
.stars { color: #d49b2c; letter-spacing: 1px; }
.comment-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.comment-form .row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.rating-input button { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: #cfc4b6; padding: 0 2px; }
.rating-input button.on { color: #d49b2c; }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; padding: 36px 0 60px; }
@media (max-width: 800px) { .cart-layout { grid-template-columns: 1fr; } }
.line { display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line img { width: 90px; height: 72px; object-fit: cover; border-radius: 8px; }
.line .remove { background: none; border: 0; color: var(--bad); cursor: pointer; font: inherit; padding: 0; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.summary .row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.1rem; }
.field { margin: 12px 0; }
.field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }

/* Account / auth */
.account-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; padding: 36px 0 60px; }
@media (max-width: 800px) { .account-layout { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.auth-buttons { display: grid; gap: 10px; margin-bottom: 18px; }
.btn.oauth { background: #fff; color: var(--ink); border: 1px solid var(--line); justify-content: flex-start; }
.btn.oauth:hover { background: var(--sand-dark); }
.divider { text-align: center; color: var(--ink-soft); font-size: 0.85rem; margin: 12px 0; }
.order { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: var(--card); }
.order .head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 8px; }
.order ul { margin: 0; padding-left: 18px; }
.status { font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; background: var(--sand-dark); }
.status.paid { background: #e3f1e6; color: var(--ok); }
.status.pending { background: #fff1d6; color: #8a5b0b; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-soft); font-size: 0.9rem; text-align: center; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); z-index: 50;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---- Share buttons ---- */
.share { margin: 18px 0 4px; }
.share-title { font-weight: 600; margin-bottom: 8px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--c, var(--line));
  background: var(--c, var(--card)); color: #fff; font: inherit; font-size: 0.88rem; font-weight: 600;
  text-decoration: none; cursor: pointer; line-height: 1; transition: filter .15s, transform .15s;
}
.share-btn:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }
.share-hint { margin-top: 8px; }
.share.compact .share-title { display: none; }
.share.compact { margin: 10px 0 0; }
.qr-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; max-width: 360px; width: calc(100% - 32px); background: var(--card); color: var(--ink); }
.qr-dialog::backdrop { background: rgba(0,0,0,.45); }
.qr-dialog h3 { margin: 0 0 12px; }
.qr-dialog .qr { display: flex; justify-content: center; margin: 0 auto 12px; }
.qr-dialog .qr svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
.qr-dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* ---- Free download promotion (/free) ---- */
.container.narrow { max-width: 760px; }
.promo-steps { padding-left: 20px; margin: 10px 0 18px; }
.promo-steps li { margin: 4px 0; }
.oauth-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.promo-form .title { display: block; font-weight: 600; margin: 14px 0 6px; }
.promo-form input#code { width: 100%; max-width: 320px; padding: 11px 14px; font-size: 1.1rem; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 16px 0 18px; }
.promo-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.promo-card:hover { border-color: var(--clay); }
.promo-card.active { border-color: var(--clay); box-shadow: var(--shadow); }
.promo-card input { margin-top: 4px; accent-color: var(--clay); }
.promo-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; }
.promo-card p { margin: 4px 0 0; }

/* ---- About page ---- */
.about-hero { background: linear-gradient(180deg, var(--sand-dark) 0%, var(--sand) 100%); border-bottom: 1px solid var(--line); }
.about-hero .container { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: center; padding: 52px 0 46px; }
.about-photo { width: 260px; height: 260px; border-radius: 50%; object-fit: cover; margin: 0 auto; box-shadow: var(--shadow); outline: 6px solid var(--card); }
.about-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--clay-dark); margin: 0 0 10px; }
.about-hero h1 { margin: 0 0 12px; }
.about-hero .lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.6; max-width: 56ch; margin: 0 0 20px; }
.about-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.about-facts li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: var(--ink-soft); }
.about-facts a { color: var(--clay-dark); text-decoration: none; font-weight: 600; }
.about-facts a:hover { text-decoration: underline; }
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.about-body { padding: 48px 0 60px; }
.story { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 66px; margin-bottom: 30px; }
.timeline li:last-child { margin-bottom: 0; }
.timeline .num { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--clay); color: #fff; font-family: var(--font-head); font-size: 1.1rem; display: grid; place-items: center; box-shadow: 0 0 0 6px var(--sand); }
.timeline h3 { margin: 8px 0 8px; font-size: 1.35rem; }
.timeline p { line-height: 1.75; margin: 0 0 10px; }
.timeline p:last-child { margin-bottom: 0; }
.timeline a { font-weight: 600; }

.quote { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: var(--shadow); }
.quote::before { content: "\201C"; display: block; font-family: var(--font-head); font-size: 4rem; line-height: .6; color: var(--clay); margin-bottom: 12px; }
.quote p { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.45; margin: 0 0 14px; }
.quote footer { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }

.invites { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.invite { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.invite .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sand-dark); color: var(--clay-dark); display: grid; place-items: center; }
.invite h3 { margin: 4px 0 0; font-size: 1.25rem; }
.invite p { color: var(--ink-soft); line-height: 1.65; margin: 0; flex: 1; }
.invite .btn { align-self: flex-start; margin-top: 6px; }

.about-contact { margin-top: 48px; text-align: center; background: linear-gradient(135deg, #efe0d4 0%, var(--card) 70%); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 24px; }
.about-contact h2 { margin: 0 0 8px; }
.about-contact p { margin: 0; line-height: 1.8; }

@media (max-width: 900px) {
  .about-hero .container { grid-template-columns: 1fr; text-align: center; gap: 24px; padding: 40px 0 36px; }
  .about-photo { width: 200px; height: 200px; }
  .about-hero .lead { margin-inline: auto; }
  .about-facts, .about-actions { justify-content: center; }
  .story { grid-template-columns: 1fr; }
  .quote { position: static; }
  .invites { grid-template-columns: 1fr; }
}
.site-footer a { color: inherit; }
.about-teaser { margin: 48px auto 24px; padding: 28px; max-width: 760px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.about-teaser h2 { margin: 0 0 10px; }
.about-teaser p { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.6; margin: 0 0 18px; }

/* ---- About link in the header ---- */
.nav .nav-about { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--clay); color: var(--clay-dark); font-weight: 600; }
.nav .nav-about:hover, .nav .nav-about.active { background: var(--clay); color: #fff; }

/* ---- Store picture ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(60, 40, 20, 0.18); }
.brand .brand-name { color: var(--ink); }
.brand .brand-name span { color: var(--clay); }
