:root {
  --bg: #0e0c0a;
  --bg-2: #17140f;
  --card: #1d1912;
  --line: #2f281c;
  --text: #f3ece0;
  --muted: #a89c88;
  --gold: #d9a531;
  --gold-2: #f7d77a;
  --gold-dark: #9c6b12;
  --danger: #e06a5a;
  --radius: 14px;
  --serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--gold-2); }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14, 12, 10, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 46px; height: 46px; }
.brand-name {
  font-family: var(--serif); font-weight: 700; font-size: 1.45rem; letter-spacing: .12em;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.search input {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
}
.search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.cart-btn {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
}
.cart-btn:hover { border-color: var(--gold); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--gold); color: #1a1206; font-size: .72rem; font-weight: 700;
  display: grid; place-items: center;
}
.cart-count:empty { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 72px 0 64px;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(217, 165, 49, .18), transparent 55%),
    repeating-linear-gradient(0deg, rgba(217, 165, 49, .045) 0 2px, transparent 2px 9px);
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .25em; font-size: .78rem; font-weight: 600; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.08; margin: 12px 0 16px;
}
.hero h1 span { color: var(--gold); }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 0 0 28px; }
.hero-logo { justify-self: center; width: min(320px, 70%); filter: drop-shadow(0 20px 40px rgba(217, 165, 49, .25)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; transition: transform .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1206; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-wa { background: #25d366; color: #06290f; }
.btn-block { width: 100%; }

/* ---------- Category bar ---------- */
.catbar {
  position: sticky; top: 72px; z-index: 30; background: rgba(14, 12, 10, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.catbar-inner { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.catbar-inner::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.chip:hover, .chip.active { color: #1a1206; background: var(--gold); border-color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: 48px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-family: var(--serif); font-size: 1.7rem; margin: 0; letter-spacing: .04em; }
.section-head h2::after {
  content: ''; display: block; width: 56px; height: 3px; margin-top: 8px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.section-head small { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-align: left; color: inherit; padding: 0;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(217, 165, 49, .6); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.card-media { position: relative; aspect-ratio: 1; background: var(--bg-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .5s; }
.card-media img.alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-media img.alt { opacity: 1; }
.card:hover .card-media img { transform: scale(1.04); }
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--gold); color: #1a1206;
}
.badge.sale { background: var(--danger); color: #fff; left: auto; right: 10px; }
.photo-count {
  position: absolute; bottom: 10px; right: 10px; z-index: 2; padding: 2px 8px; border-radius: 6px;
  font-size: .75rem; background: rgba(0, 0, 0, .6); color: #fff;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.card-body p { margin: 0; color: var(--muted); font-size: .88rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.price { flex-wrap: wrap; row-gap: 0; }
.price strong { color: var(--gold-2); font-size: 1.2rem; white-space: nowrap; }
.price s { color: var(--muted); font-size: .9rem; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: min(1000px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  display: grid; grid-template-columns: 1.1fr 1fr;
}
.close-btn {
  position: absolute; top: 12px; right: 12px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(14, 12, 10, .8); color: var(--text); font-size: 1.3rem; line-height: 1;
}
.gallery { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.gallery-main {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); touch-action: pan-y;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.nav-arrow {
  position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(14, 12, 10, .75); color: var(--gold-2); font-size: 1.4rem;
}
.nav-arrow.prev { left: 10px; } .nav-arrow.next { right: 10px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button {
  flex: 0 0 64px; height: 64px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: var(--bg); opacity: .6;
}
.thumbs button.active { border-color: var(--gold); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail { padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.detail .eyebrow { font-size: .72rem; }
.detail h2 { font-family: var(--serif); font-size: 1.8rem; margin: 0; line-height: 1.2; }
.detail .price { margin-top: 0; padding-top: 0; }
.detail .price strong { font-size: 1.7rem; }
.detail .desc { color: var(--muted); white-space: pre-line; margin: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: none; background: transparent; color: var(--text); font-size: 1.1rem; }
.qty span { min-width: 32px; text-align: center; font-weight: 600; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; }
.hero-actions { flex-wrap: wrap; }

/* ---------- Cart drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(420px, 100%);
  background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--serif); margin: 0; font-size: 1.3rem; }
.drawer-head .close-btn { position: static; }
.drawer-items { flex: 1; overflow: auto; padding: 12px 20px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-item h4 { margin: 0 0 4px; font-size: .95rem; }
.cart-item .qty button { width: 30px; height: 30px; }
.link-btn { background: none; border: none; color: var(--muted); font-size: .8rem; text-decoration: underline; padding: 0; }
.drawer-foot { padding: 18px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.total { display: flex; justify-content: space-between; font-size: 1.15rem; }
.total strong { color: var(--gold-2); }
.note { color: var(--muted); font-size: .82rem; margin: 0; }

/* ---------- Footer ---------- */
.footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer img { height: 54px; width: auto; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--gold-2); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; translate: -50% 20px; opacity: 0;
  padding: 12px 20px; border-radius: 999px; background: var(--gold); color: #1a1206; font-weight: 600;
  transition: opacity .2s, translate .2s; pointer-events: none;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero { padding: 44px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-logo { grid-row: 1; width: 150px; }
  .modal { grid-template-columns: 1fr; }
  .detail { padding: 8px 20px 24px; }
}
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .brand-name { font-size: 1.15rem; }
  .brand img { width: 38px; height: 38px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .cart-btn { margin-left: auto; }
  .catbar { top: 112px; }
  html { scroll-padding-top: 170px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .card-body p { display: none; }
}
