/* Online shop styles (shop.html, checkout.html, policies.html) */
:root {
  --ink: #2c2a26;
  --muted: #6b665d;
  --line: #e7e2d9;
  --paper: #fbfaf7;
  --card: #ffffff;
  --accent: #b5452f;
  --accent-ink: #ffffff;
  --silver: #8d96a0;
  --ok: #2f7d4f;
}
body.shop-body { background: var(--paper); color: var(--ink); }

.shop-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--line);
}
.shop-header .shop-bar {
  max-width: 1200px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 16px;
}
.shop-brand { text-decoration: none; color: var(--ink); line-height: 1.15; }
.shop-brand strong { font-family: 'Playfair Display', serif; font-size: 1.25rem; display: block; }
.shop-brand small { color: var(--muted); font-size: 0.75rem; }
.shop-nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.shop-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.shop-nav a:hover { color: var(--accent); }
.cart-btn {
  position: relative; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font: inherit; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.cart-count {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  min-width: 20px; height: 20px; font-size: 0.75rem; display: inline-grid; place-items: center; padding: 0 6px;
}
@media (max-width: 720px) {
  .shop-nav a.hide-sm { display: none; }
  .shop-brand strong { font-size: 1.05rem; }
}

.shop-hero { max-width: 1200px; margin: 0 auto; padding: 32px 16px 8px; }
.shop-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 6px; }
.shop-hero p { color: var(--muted); max-width: 720px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.trust-row span {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 0.85rem; color: var(--ink);
}

.rate-note {
  max-width: 1200px; margin: 12px auto 0; padding: 0 16px; color: var(--muted); font-size: 0.9rem;
}

.cat-row { max-width: 1200px; margin: 18px auto 0; padding: 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.cat-row button {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font: inherit; font-size: 0.9rem;
}
.cat-row button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.shop-grid {
  max-width: 1200px; margin: 20px auto 48px; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.p-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.p-card .p-img { aspect-ratio: 1 / 1; background: #f1efea; overflow: hidden; }
.p-card .p-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-card .p-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.p-card h2 { font-size: 1.05rem; line-height: 1.3; }
.p-card .hi { color: var(--muted); font-size: 0.85rem; }
.p-card .desc { color: var(--muted); font-size: 0.88rem; flex: 1; }
.p-card .price { font-weight: 600; font-size: 1.05rem; }
.p-card .breakup { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.rate-note strong { color: var(--ink); }
.p-card .price.req { color: var(--silver); font-weight: 500; font-size: 0.95rem; }
.p-card .actions { display: flex; gap: 8px; margin-top: 6px; }

.s-btn {
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font: inherit; font-weight: 500;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.s-btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.s-btn.wa { background: #1f9d55; }
.s-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.s-btn.block { width: 100%; }

/* Cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 90; display: none; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: #fff; z-index: 100;
  transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-backdrop.open { display: block; }
.drawer header { padding: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.drawer header h2 { font-size: 1.2rem; }
.drawer header button { margin-left: auto; border: 0; background: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
.drawer .items { flex: 1; overflow-y: auto; padding: 8px 16px; }
.drawer footer { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; }
.c-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.c-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.c-item .nm { font-weight: 500; font-size: 0.95rem; }
.c-item .sub { color: var(--muted); font-size: 0.85rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty button { border: 0; background: none; width: 30px; height: 30px; cursor: pointer; font-size: 1rem; color: var(--ink); }
.qty span { min-width: 24px; text-align: center; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.sum-row { display: flex; justify-content: space-between; }
.small-note { color: var(--muted); font-size: 0.82rem; }

/* Checkout */
.co-wrap { max-width: 1100px; margin: 24px auto 56px; padding: 0 16px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
@media (max-width: 860px) { .co-wrap { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.panel h2 { font-size: 1.2rem; margin-bottom: 12px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .f-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.pay-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; cursor: pointer; }
.pay-opt input { margin-top: 4px; }
.pay-opt strong { display: block; }
.err { color: var(--accent); font-size: 0.9rem; min-height: 1.2em; }
.success { text-align: center; padding: 32px 20px; }
.success h2 { font-size: 1.6rem; margin-bottom: 8px; color: var(--ok); }
.success .oid { font-family: ui-monospace, Menlo, monospace; background: #f1efea; padding: 4px 10px; border-radius: 8px; }

/* Policies */
.policy { max-width: 820px; margin: 24px auto 56px; padding: 0 16px; }
.policy h1 { font-size: 2rem; margin-bottom: 8px; }
.policy h2 { font-size: 1.3rem; margin: 28px 0 8px; }
.policy p, .policy li { color: var(--ink); margin-bottom: 8px; }
.policy ul { padding-left: 20px; }

.shop-footer { border-top: 1px solid var(--line); background: #fff; }
.shop-footer .in { max-width: 1200px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: 0.88rem; }
.shop-footer a { color: var(--muted); }

/* many categories: one scrollable row on phones */
@media (max-width: 720px) {
  .cat-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scrollbar-width: none; }
  .cat-row::-webkit-scrollbar { display: none; }
  .cat-row button { flex: 0 0 auto; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-card .desc { display: none; }
  .p-card .p-body { padding: 10px; }
  .p-card .actions { flex-direction: column; }
}
.p-card .p-img { background: #0a0a0a; }
.cat-row button small { color: inherit; opacity: 0.6; margin-left: 4px; }

/* Product page */
.pd-wrap { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.pd { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .pd { grid-template-columns: 1fr; gap: 18px; } }
.pd-main { background: #0a0a0a; border-radius: 14px; overflow: hidden; aspect-ratio: 1 / 1; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pd-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.pd-thumbs .th { border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; background: #0a0a0a; aspect-ratio: 1 / 1; }
.pd-thumbs .th.on { border-color: var(--accent); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-cat { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.pd-info h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); line-height: 1.2; margin: 4px 0; }
.pd-info .hi { color: var(--muted); margin-bottom: 12px; }
.pd-price { font-size: 1.6rem; font-weight: 600; }
.pd-price .req { font-size: 1.1rem; color: var(--silver); font-weight: 500; }
.pd-info .breakup { font-size: 0.85rem; margin: 4px 0 14px; }
.pd-desc { margin-bottom: 16px; }
.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-actions .s-btn { flex: 1 1 140px; }
.pd-points { list-style: none; display: grid; gap: 6px; margin-bottom: 14px; font-size: 0.92rem; }
.pd-related { margin-top: 40px; }
.pd-related h2 { font-size: 1.3rem; margin-bottom: 12px; }
.rel-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.rel { text-decoration: none; color: var(--ink); font-size: 0.85rem; }
.rel img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 6px; background: #0a0a0a; }
.p-card a.p-link { color: inherit; text-decoration: none; }
