:root {
  /* Brand (dari logo Searasa — dikunci) */
  --brand: #a32707;
  --brand-dark: #7d1d05;
  --brand-light: #c8451f;
  --brand-tint: #f6e9e2;
  /* Palet earthy "Nature Distilled" */
  --cream: #fbf7f0;      /* soft cream background */
  --sand: #efe6d8;       /* sand beige */
  --clay: #b5651d;       /* warm clay */
  --olive: #5f6d33;      /* fresh / tersedia */
  --olive-tint: #eef0e2;
  --gold: #a16207;       /* accent / unggulan (WCAG-safe) */
  --gold-tint: #f7edd6;
  --ink: #2e1c12;        /* warm dark brown */
  --muted: #8a7566;
  --line: #e8ddcf;       /* warm border */
  --white: #ffffff;
  --ok: #5f6d33;
  --shadow: 0 8px 24px rgba(107, 62, 24, 0.09);
  --shadow-lg: 0 22px 50px rgba(107, 62, 24, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Rubik", "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  /* Grain halus untuk kesan artisan */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text b { font-family: var(--font-head); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Aksesibilitas: focus ring & reduced motion */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(124, 29, 5, 0.25);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.brand-group { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand-divider { width: 1px; height: 30px; background: rgba(255,255,255,.28); flex-shrink: 0; }
.managed-by { display: flex; flex-direction: column; line-height: 1.1; color: #fff; }
.managed-by span { font-size: .6rem; font-style: italic; opacity: .82; letter-spacing: .2px; }
.managed-by b { font-size: 1rem; font-weight: 800; font-style: italic; }
.managed-by .huray-logo { height: 18px; width: auto; display: block; margin-top: 3px; }
.managed-by:hover b { text-decoration: underline; }
.managed-by:hover .huray-logo { opacity: .85; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 1.15rem; letter-spacing: .5px; font-weight: 800; }
.brand-text span { font-size: .62rem; letter-spacing: 3px; opacity: .85; }
.header-nav { display: flex; gap: 22px; align-items: center; font-weight: 600; font-size: .95rem; }
.header-nav a { opacity: .9; transition: opacity .2s; }
.header-nav a:hover { opacity: 1; }
.btn-admin {
  border: 1.5px solid rgba(255,255,255,.55); border-radius: 999px;
  padding: 7px 16px; font-size: .85rem; transition: all .2s; white-space: nowrap;
}
.btn-admin:hover { background: var(--white); color: var(--brand); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(140deg, var(--brand-light) 0%, var(--brand) 45%, var(--brand-dark) 100%);
  color: var(--white);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; background-image: var(--grain);
  opacity: .09; mix-blend-mode: overlay; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; right: -80px; bottom: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
.hero .container { padding: 68px 0 76px; position: relative; z-index: 1; }
.hero h1 { letter-spacing: -0.5px; max-width: 760px; }
.hero p { max-width: 600px; }
.hero .eyebrow {
  display: inline-block; background: rgba(255,255,255,.15);
  padding: 6px 14px; border-radius: 999px; font-size: .78rem;
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.hero p { font-size: 1.1rem; opacity: .92; max-width: 560px; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: none; border-radius: 999px; padding: 13px 26px;
  font-family: var(--font); font-weight: 700; font-size: .95rem; transition: all .2s;
}
.btn-primary { background: var(--white); color: var(--brand); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: rgba(255,255,255,.12); color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }

.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div b { font-size: 1.8rem; font-weight: 800; display: block; }
.hero-stats div span { font-size: .85rem; opacity: .82; }

/* ---------- Toolbar ---------- */
.toolbar { padding: 32px 0 8px; }
.toolbar h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.toolbar p { color: var(--muted); margin-bottom: 20px; }
.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search-box {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 11px 18px; box-shadow: var(--shadow);
}
.search-box input { border: none; outline: none; flex: 1; font-family: var(--font); font-size: .95rem; background: transparent; color: var(--ink); }
.search-box svg { flex-shrink: 0; color: var(--muted); }

.chips { display: flex; gap: 9px; flex-wrap: wrap; padding: 18px 0 6px; }
.chip {
  cursor: pointer; border: 1.5px solid var(--line); background: var(--white);
  color: var(--ink); border-radius: 999px; padding: 8px 16px;
  font-size: .88rem; font-weight: 600; font-family: var(--font); transition: all .18s; white-space: nowrap;
}
.chip:hover { border-color: var(--brand-light); color: var(--brand); background: var(--brand-tint); }
.chip.active { background: var(--brand); color: var(--white); border-color: var(--brand); box-shadow: 0 4px 12px rgba(163,39,7,.22); }

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px; padding: 26px 0 60px;
}
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 1/1; background: var(--sand); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-badge {
  position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.card-badge.featured { background: var(--gold); }
.card-badge.soldout { background: var(--muted); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .72rem; color: var(--brand-light); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin: 5px 0 8px; }
.card-desc { font-size: .86rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 14px; gap: 8px; }
.card-price b { font-size: 1.25rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; font-family: var(--font-head); }
.card-price span { font-size: .78rem; color: var(--muted); display: block; }
.card-order {
  background: var(--brand-tint); color: var(--brand); border: none; cursor: pointer;
  border-radius: 999px; padding: 9px 15px; font-weight: 700; font-size: .82rem;
  font-family: var(--font); transition: all .18s; display: inline-flex; align-items: center; gap: 5px;
}
.card-order:hover { background: var(--brand); color: #fff; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); grid-column: 1/-1; }
.empty svg { opacity: .4; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.85); padding: 44px 0 26px; margin-top: auto; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer-brand { max-width: 300px; }
.footer-brand img { height: 38px; margin-bottom: 12px; }
.footer-brand p { font-size: .88rem; opacity: .8; }
.footer-col h4 { font-size: .95rem; margin-bottom: 12px; color: #fff; }
.footer-col a, .footer-col p { display: block; font-size: .88rem; margin-bottom: 7px; opacity: .82; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { padding-top: 20px; font-size: .82rem; opacity: .7; text-align: center; }

/* ---------- Modal (detail produk) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43,26,18,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 20px; max-width: 720px; width: 100%;
  max-height: 90vh; overflow: hidden; box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr 1fr; position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; cursor: pointer;
  background: rgba(255,255,255,.9); border: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; justify-content: center;
}
.modal-img { background: var(--sand); aspect-ratio: 1/1; }
.modal-img img { width: 100%; height: 100%; object-fit: contain; }
.modal-info { padding: 30px; overflow-y: auto; }
.modal-info .card-cat { margin-bottom: 6px; }
.modal-info h2 { font-size: 1.5rem; margin-bottom: 12px; }
.modal-info .desc { color: var(--muted); font-size: .95rem; margin-bottom: 20px; }
.modal-info .price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 22px; }
.modal-info .price-row b { font-size: 2rem; color: var(--brand); font-weight: 800; font-family: var(--font-head); font-variant-numeric: tabular-nums; }
.modal-info .price-row span { color: var(--muted); }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 60px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 900px) {
  .hero .container { padding: 54px 0 60px; }
  .footer-top { gap: 30px; }
}

/* Mobile */
@media (max-width: 640px) {
  .site-header .container { padding: 12px 0; gap: 10px; }
  .header-nav { gap: 12px; }
  .header-nav .nav-link { display: none; }
  .brand img { height: 34px; }
  .brand-text b { font-size: 1.02rem; }
  .brand-text span { font-size: .56rem; letter-spacing: 2.5px; }
  /* Blok "managed by Huray" dibuat lebih kecil dari logo Searasa */
  .brand-group { gap: 10px; }
  .brand-divider { height: 24px; }
  .managed-by span { font-size: .52rem; }
  .managed-by .huray-logo { height: 14px; margin-top: 2px; }

  .hero .container { padding: 40px 0 46px; }
  .hero .eyebrow { font-size: .58rem; padding: 5px 11px; margin-bottom: 14px; letter-spacing: 1px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .hero p { font-size: .98rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 11px; margin-top: 24px; }
  .hero-actions .btn { width: 100%; justify-content: center; padding: 13px 18px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; align-items: start; }
  .hero-stats div b { font-size: 1.4rem; }
  .hero-stats div span { font-size: .72rem; line-height: 1.25; }

  .toolbar { padding: 24px 0 4px; }
  .toolbar h2 { font-size: 1.35rem; }
  .toolbar p { margin-bottom: 16px; }
  .chips { gap: 7px; }
  .chip { padding: 7px 13px; font-size: .82rem; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 18px 0 44px; }
  .card-img { aspect-ratio: 1/1; }
  .card-badge { font-size: .6rem; padding: 4px 9px; top: 9px; left: 9px; }
  .card-body { padding: 11px 12px 13px; }
  .card-cat { font-size: .64rem; letter-spacing: .5px; }
  .card h3 { font-size: .92rem; margin: 4px 0 6px; }
  .card-desc { font-size: .78rem; -webkit-line-clamp: 2; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 9px; margin-top: 11px; }
  .card-price b { font-size: 1.08rem; }
  .card-price span { font-size: .72rem; }
  .card-order { width: 100%; justify-content: center; padding: 10px; font-size: .84rem; }

  #tentang > div { padding: 24px !important; }
  #tentang h2 { font-size: 1.3rem; }

  .modal { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .modal-img { aspect-ratio: 1/1; max-height: 60vh; }
  .modal-info { padding: 22px; }
  .modal-info h2 { font-size: 1.3rem; }
}

/* Small phones (Mobile S ~320px) */
@media (max-width: 360px) {
  .brand-group { gap: 8px; }
  .brand-divider { height: 22px; }
  .managed-by span { font-size: .48rem; }
  .managed-by .huray-logo { height: 12px; }
  .grid { gap: 10px; }
  .card-body { padding: 10px 11px 12px; }
  .card h3 { font-size: .85rem; }
  .card-desc { font-size: .75rem; }
  .card-price b { font-size: 1rem; }
  .card-order { padding: 9px; font-size: .8rem; }
  .hero .container { padding: 32px 0 38px; }
  .hero .eyebrow { font-size: .52rem; padding: 4px 9px; margin-bottom: 12px; letter-spacing: .8px; }
  .hero h1 { font-size: 1.45rem; margin-bottom: 12px; }
  .hero p { font-size: .88rem; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { padding: 12px 16px; font-size: .88rem; }
  .hero-stats { gap: 8px; margin-top: 24px; }
  .hero-stats div b { font-size: 1.2rem; }
  .hero-stats div span { font-size: .66rem; }
  .toolbar h2 { font-size: 1.25rem; }
}
