/* Keripax Mall — shared elegant style for generated pages.
   Cream, gold, ink. Small, refined, dense. */

:root {
  --cream: #FAF6EC;
  --cream-soft: #F5EFE0;
  --cream-deep: #EFE7D2;
  --ink: #0A0A0A;
  --ink-muted: rgba(10,10,10,.62);
  --ink-soft: rgba(10,10,10,.38);
  --gold: #C49A3C;
  --gold-deep: #B98920;
  --gold-light: rgba(196,154,60,.10);
  --line: rgba(10,10,10,.08);
  --line-strong: rgba(10,10,10,.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
}

a { color: var(--gold-deep); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .75; text-decoration: none; }

/* ── Nav ──────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(250,246,236,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.nav .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px; color: var(--ink);
  letter-spacing: -.015em;
}
.nav .logo img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 13px; }
.nav-links a { color: var(--ink-muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); opacity: 1; }
.nav .btn-cta {
  background: var(--ink); color: white !important;
  padding: 8px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -.005em;
  border: none; cursor: pointer;
}
.nav .btn-cta:hover { background: var(--gold-deep); opacity: 1; }
@media (max-width: 640px) {
  .nav-links a:not(.btn-cta) { display: none; }
}

/* ── Page header ──────────────────────────────────────────────── */
.page-head {
  text-align: center;
  padding: 56px 24px 36px;
  max-width: 680px; margin: 0 auto;
}
.eyebrow {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep);
}
.page-head h1 {
  font-size: 32px; line-height: 1.1; letter-spacing: -.025em;
  margin: 12px 0 8px; font-weight: 700;
}
.page-head .sub {
  color: var(--ink-muted); font-size: 14px; margin: 0;
  max-width: 520px; margin-left: auto; margin-right: auto;
}

/* ── Breadcrumbs ──────────────────────────────────────────────── */
.crumbs { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 14px; letter-spacing: .02em; }
.crumbs a { color: var(--ink-muted); font-weight: 500; }
.crumbs span { margin: 0 6px; opacity: .5; }

/* ── Wrap ─────────────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 8px 24px 64px; }
.wrap-narrow { max-width: 980px; }

/* ── Grid + cards ─────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.grid.shops { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  display: block;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10,10,10,.06);
  border-color: var(--line-strong);
  opacity: 1;
}
.card-img {
  aspect-ratio: 1;
  background: var(--cream-soft);
  overflow: hidden;
  position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px 14px; }

.card.shop {
  display: flex; align-items: center; gap: 12px; padding: 14px;
}
.card.shop .card-body { padding: 0; flex: 1; min-width: 0; }
.card-logo {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  background: var(--cream-soft); flex-shrink: 0;
  border: 1px solid var(--line);
}
.card-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-eyebrow {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--gold-deep); text-transform: uppercase; margin-bottom: 3px;
}
.card-title {
  font-weight: 600; font-size: 13.5px; line-height: 1.3;
  color: var(--ink); margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 11.5px; color: var(--ink-soft);
  margin-bottom: 6px; letter-spacing: .005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-price { font-weight: 700; color: var(--ink); font-size: 13px; }

.badge { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge.verified { background: rgba(34,197,94,.12); color: #166534; }
.badge.in-stock { background: rgba(34,197,94,.10); color: #166534; }
.badge.limited { background: rgba(196,154,60,.14); color: var(--gold-deep); }

/* ── Detail pages — hero ──────────────────────────────────────── */
.detail-hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px;
  align-items: start;
}
@media (max-width: 820px) { .detail-hero { grid-template-columns: 1fr; gap: 24px; } }

.image-card {
  background: white; border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; overflow: hidden;
}
.image-card img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 12px; background: var(--cream-soft); display: block;
}
.service .image-card img { aspect-ratio: 16/10; }

.detail-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; color: var(--gold-deep); text-transform: uppercase; }
.detail-title { font-size: 26px; line-height: 1.15; margin: 8px 0 6px; letter-spacing: -.02em; font-weight: 700; }
.detail-byline { font-size: 13px; color: var(--ink-muted); margin: 0 0 14px; }
.detail-byline a { color: var(--ink); font-weight: 600; }
.detail-price { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--gold-light); border: 1px solid rgba(196,154,60,.3); color: var(--gold-deep); font-weight: 700; font-size: 13px; margin-bottom: 18px; }

.section-card {
  background: white; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; margin: 16px 0;
}
.section-card h2 { font-size: 14px; margin: 0 0 10px; letter-spacing: -.005em; font-weight: 700; }
.section-card p { margin: 0; color: var(--ink-muted); font-size: 13.5px; white-space: pre-wrap; line-height: 1.6; }

.meta-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.meta-list li { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-muted); }
.meta-list li b { color: var(--ink); font-weight: 600; min-width: 88px; }

.cta-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.btn-big {
  display: block; text-align: center;
  padding: 13px 18px; border-radius: 12px;
  font-weight: 600; font-size: 13.5px; letter-spacing: -.005em;
  cursor: pointer; border: none;
  transition: transform .15s, background .15s;
}
.btn-big.primary { background: var(--ink); color: white; }
.btn-big.primary:hover { background: var(--gold-deep); opacity: 1; }
.btn-big.secondary {
  background: white; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-big.secondary:hover { background: var(--cream-soft); opacity: 1; }

.safety-note {
  margin-top: 14px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--gold-light); border: 1px solid rgba(196,154,60,.2);
  font-size: 12px; line-height: 1.5; color: var(--ink-muted);
}
.safety-note b { color: var(--gold-deep); font-weight: 700; }

/* ── Related ─────────────────────────────────────────────────── */
.related { margin-top: 48px; }
.related h2 { font-size: 15px; margin: 0 0 14px; font-weight: 700; letter-spacing: -.005em; }

/* ── Shop hero ───────────────────────────────────────────────── */
.shop-banner {
  height: 140px;
  background: linear-gradient(135deg, var(--cream-deep), #e6d5a8);
  background-size: cover; background-position: center;
}
.shop-card-hero {
  background: white; border-radius: 18px; padding: 20px 22px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(10,10,10,.04);
  display: flex; gap: 16px; align-items: center;
  margin-top: -52px; position: relative; z-index: 2;
}
.shop-card-hero .logo-img {
  width: 64px; height: 64px; border-radius: 14px; object-fit: cover;
  background: var(--cream-soft); border: 1px solid var(--line);
  flex-shrink: 0;
}
.shop-card-hero h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.015em; line-height: 1.2; }
.shop-card-hero .meta { color: var(--ink-muted); font-size: 12px; }

/* ── Empty + more-in-app ─────────────────────────────────────── */
.empty {
  padding: 56px 24px; text-align: center;
  background: white; border: 1px solid var(--line);
  border-radius: 16px; color: var(--ink-muted); font-size: 13px;
}
.more-in-app {
  text-align: center;
  padding: 24px 16px; margin-top: 32px;
  color: var(--ink-muted); font-size: 12.5px;
  border-top: 1px solid var(--line);
}
.more-in-app a { color: var(--gold-deep); font-weight: 700; }

/* ── Footer ──────────────────────────────────────────────────── */
footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 28px 24px 36px;
  text-align: center; color: var(--ink-soft); font-size: 11.5px; letter-spacing: .02em;
}
footer.site-foot a { color: var(--ink-muted); margin: 0 6px; }

/* ── App modal ───────────────────────────────────────────────── */
.app-modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,10,10,.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.app-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.app-modal {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, calc(-50% + 14px));
  background: var(--cream); border-radius: 22px;
  width: calc(100% - 32px); max-width: 420px;
  padding: 28px 26px 26px; z-index: 101;
  box-shadow: 0 30px 80px rgba(10,10,10,.25);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.app-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.app-modal h3 { font-size: 18px; margin: 0 0 6px; letter-spacing: -.015em; font-weight: 700; }
.app-modal p { margin: 0 0 18px; color: var(--ink-muted); font-size: 13px; }
.app-modal .opts { display: grid; gap: 10px; }
.app-modal .opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white; border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.app-modal .opt:hover { border-color: var(--gold); transform: translateY(-1px); opacity: 1; }
.app-modal .opt .ico { width: 22px; height: 22px; flex-shrink: 0; color: var(--gold-deep); }
.app-modal .opt .sub { font-size: 11px; color: var(--ink-muted); font-weight: 500; margin-top: 1px; }
.app-modal .opt-text { display: flex; flex-direction: column; gap: 0; line-height: 1.3; }
.app-modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  color: var(--ink-muted); font-size: 18px; line-height: 1;
}
