/* ============================================================
   DONALINDO TENUN — STYLE UTAMA
   Terinspirasi tata letak Airbnb: bersih, kartu membulat, mobile-first.
   Warna merah-emas sebagai identitas ulos, dipakai sebagai aksen tunggal.
   ============================================================ */

:root {
  --red: #B23A2E;
  --red-dark: #94281D;
  --gold: #C28E3A;
  --ink: #222222;
  --gray-600: #6A6A6A;
  --gray-300: #DDDDDD;
  --gray-100: #F4F4F4;
  --white: #FFFFFF;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 12px 28px rgba(0,0,0,0.14);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Topbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
}
.site-header-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo { font-weight: 800; font-size: 20px; color: var(--ink); }
.site-logo span { color: var(--red); }
.site-nav { display: none; gap: 26px; font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--red); }
.site-cta {
  background: var(--red); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.site-cta:hover { background: var(--red-dark); }
.mobile-menu-btn {
  border: 1px solid var(--gray-300); border-radius: 999px; background: #fff;
  padding: 8px 12px; font-size: 18px; display: inline-flex;
}
@media (min-width: 860px) {
  .site-nav { display: flex; }
  .mobile-menu-btn { display: none; }
}
.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 10px 20px 18px;
  border-bottom: 1px solid var(--gray-300);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 10px 6px; font-weight: 600; border-radius: var(--radius-sm); }
.mobile-nav a:hover { background: var(--gray-100); }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 36px;
  background: linear-gradient(180deg, #FFF8EF 0%, #FFFFFF 100%);
}
.hero-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--red); text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 46px); line-height: 1.15; font-weight: 800;
  margin: 0 0 16px; max-width: 720px;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { font-size: 17px; color: var(--gray-600); max-width: 560px; line-height: 1.6; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: none; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--ink); }
.btn-gold-outline { background: #fff; color: var(--gold); border: 1.5px solid var(--gold); }
.btn-gold-outline:hover { background: var(--gold); color: #fff; }
.btn-block { width: 100%; }

/* ---------- Category pills ---------- */
.pill-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; -ms-overflow-style: none; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--gray-300); background: #fff; color: var(--ink);
}
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill:hover { border-color: var(--ink); }

/* ---------- Section ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-eyebrow { font-size: 13px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 6px; }
.section-head h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.section-head p { color: var(--gray-600); margin: 0; max-width: 560px; font-size: 15px; }
.section-link { font-weight: 700; font-size: 14px; color: var(--red); white-space: nowrap; }
.section-link:hover { text-decoration: underline; }
.section-alt { background: var(--gray-100); }

/* ---------- Product grid & card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 980px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: block; border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-card); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.card-img-wrap { position: relative; aspect-ratio: 4/5; background: var(--gray-100); overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
}
.card-badge.ready { background: #fff; color: var(--ink); }
.card-badge.preorder { background: var(--gold); color: #fff; }
.card-body { padding: 14px 16px 16px; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.card-price { font-size: 14px; color: var(--gray-600); margin: 0 0 12px; }
.card-price strong { color: var(--ink); }
.card-btn {
  display: block; text-align: center; width: 100%; padding: 10px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px;
}
.card-btn.ready { background: var(--red); color: #fff; }
.card-btn.ready:hover { background: var(--red-dark); }
.card-btn.preorder { background: #fff; color: var(--gold); border: 1.5px solid var(--gold); }
.card-btn.preorder:hover { background: var(--gold); color: #fff; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-600); }

/* ---------- Filter bar (catalog page) ---------- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }

/* ---------- Heritage banner ---------- */
.heritage {
  background: var(--ink); color: #fff; padding: 64px 0; text-align: center;
}
.heritage-eyebrow { color: var(--gold); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.heritage h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; line-height: 1.3; max-width: 680px; margin: 0 auto 18px; }
.heritage p { color: #C9C9C9; max-width: 600px; margin: 0 auto 26px; line-height: 1.7; }

/* ---------- Testimonial ---------- */
.testi-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .testi-grid { grid-template-columns: 1fr 1fr; } }
.testi-card { background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 24px; }
.testi-quote { font-size: 16px; line-height: 1.6; font-style: italic; margin: 0 0 14px; }
.testi-name { font-weight: 700; font-size: 14px; color: var(--red); }

/* ---------- CTA strip ---------- */
.cta-strip { background: var(--red); color: #fff; padding: 50px 0; text-align: center; }
.cta-strip h2 { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.cta-strip p { margin: 0 0 22px; opacity: 0.92; }
.cta-strip .btn { background: #fff; color: var(--red); }

/* ---------- Product detail ---------- */
.detail-grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding: 40px 0; }
@media (min-width: 800px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; background: var(--gray-100); }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 30px; font-weight: 800; margin: 14px 0 6px; }
.detail-price { font-size: 22px; font-weight: 800; color: var(--red); margin: 0 0 18px; }
.detail-desc { color: var(--gray-600); line-height: 1.7; margin-bottom: 20px; }
.detail-motif {
  border-left: 3px solid var(--gold); padding-left: 16px; margin-bottom: 22px;
}
.detail-motif-label { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.detail-motif p { font-style: italic; color: var(--gray-600); margin: 0; }
.detail-info-box { background: var(--gray-100); border-radius: var(--radius-md); padding: 16px; margin-bottom: 22px; font-size: 14px; color: var(--gray-600); }
.detail-info-box strong { color: var(--ink); }

/* ---------- Lacak pesanan ---------- */
.lacak-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
@media (min-width: 560px) { .lacak-form { flex-direction: row; } }
.lacak-input {
  flex: 1; padding: 14px 20px; border-radius: 999px; border: 1.5px solid var(--gray-300);
  font-size: 15px; font-family: inherit;
}
.lacak-input:focus { outline: none; border-color: var(--red); }
.order-card { background: var(--gray-100); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 18px; }
.order-card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.order-card-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.order-status { font-size: 12px; font-weight: 800; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.status-Telat { background: #FDE4E1; color: var(--red); }
.status-Mendesak { background: #FCEBD0; color: #92660E; }
.status-Perhatian { background: #FCF4D0; color: #8A7300; }
.status-Aman { background: #DEF3E5; color: #1C7C40; }
.status-Selesai { background: #E3E3E3; color: #555; }

.thread-progress-track { height: 12px; border-radius: 999px; background: #fff; overflow: hidden; position: relative; border: 1px solid var(--gray-300); }
.thread-progress-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); transition: width 0.6s ease; }
.order-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; font-size: 14px; }
@media (min-width: 600px) { .order-meta { grid-template-columns: repeat(4, 1fr); } }
.order-meta-label { font-size: 11px; text-transform: uppercase; font-weight: 700; color: var(--gray-600); margin-bottom: 3px; }
.alert-box { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 18px; font-size: 14px; }
.alert-box.warn { background: #FCEBD0; color: #92660E; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-100); padding: 50px 0 24px; margin-top: 30px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-600); margin: 0 0 12px; }
.footer-grid p, .footer-grid a { color: var(--gray-600); font-size: 14px; line-height: 1.6; }
.footer-grid a { display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--red); }
.footer-bottom { text-align: center; color: var(--gray-600); font-size: 13px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--gray-300); }

/* ---------- Generic page ---------- */
.page-section { padding: 50px 0; }
.page-section h1 { font-size: 30px; font-weight: 800; margin: 0 0 14px; }
.page-section p { color: var(--gray-600); line-height: 1.7; }
.prose { max-width: 680px; }
.prose p { margin-bottom: 18px; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-body { background: var(--gray-100); font-family: var(--font); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--ink); color: #fff; padding: 22px 14px;
  position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; transition: transform 0.2s ease; z-index: 40;
}
.admin-brand { font-weight: 800; font-size: 19px; padding: 6px 10px 24px; }
.admin-brand span { color: var(--gold); }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm);
  color: #D8D8D8; font-weight: 600; font-size: 14.5px; margin-bottom: 2px;
}
.admin-nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-link.active { background: var(--red); color: #fff; }
.admin-sidebar-footer { margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 14px; }
.admin-main { margin-left: 240px; flex: 1; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: #fff; padding: 16px 24px; border-bottom: 1px solid var(--gray-300);
  position: sticky; top: 0; z-index: 20;
}
.admin-topbar h1 { font-size: 18px; margin: 0; }
.admin-user { font-size: 13px; color: var(--gray-600); white-space: nowrap; }
.admin-burger { display: none; border: none; background: none; font-size: 22px; }
.admin-content { padding: 24px; max-width: 1100px; }

@media (max-width: 880px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-burger { display: inline-block; }
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 28px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat-card { background: #fff; border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); }
.stat-card-danger { border: 1.5px solid var(--red); }
.stat-label { font-size: 12px; color: var(--gray-600); margin: 0 0 6px; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; margin: 0; }
.stat-value-sm { font-size: 17px; }

.panel { background: #fff; border-radius: var(--radius-md); padding: 22px; margin-bottom: 24px; box-shadow: var(--shadow-card); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-desc { color: var(--gray-600); font-size: 14px; line-height: 1.6; }
.link-more { font-size: 13.5px; font-weight: 700; color: var(--red); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row-full { grid-column: 1 / -1; }
.form-row label { font-size: 13px; font-weight: 700; color: var(--ink); }
.form-row input, .form-row select, .form-row textarea {
  padding: 10px 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--red); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.img-preview { width: 90px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; }

.btn-primary {
  background: var(--red); color: #fff; border: none; padding: 11px 22px; border-radius: 999px;
  font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--red-dark); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--gray-300); font-size: 12px; text-transform: uppercase; color: var(--gray-600); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--gray-300); vertical-align: middle; }
.empty-row { text-align: center; color: var(--gray-600); padding: 30px !important; }
.thumb { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; }
.table-actions a { margin-right: 12px; font-weight: 700; color: var(--red); }
.table-actions .text-danger { color: var(--red-dark); }
.text-muted { color: var(--gray-600); font-size: 12px; }

.badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.badge-red { background: #FDE4E1; color: var(--red); }
.badge-orange { background: #FCEBD0; color: #92660E; }
.badge-yellow { background: #FCF4D0; color: #8A7300; }
.badge-green { background: #DEF3E5; color: #1C7C40; }
.badge-gray { background: #E3E3E3; color: #555; }

.sync-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.alert-success { background: #DEF3E5; color: #1C7C40; }
.alert-error { background: #FDE4E1; color: var(--red-dark); }

/* ---------- Auth pages (login/setup) ---------- */
.auth-page { background: var(--gray-100); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; font-family: var(--font); }
.auth-card { background: #fff; border-radius: var(--radius-lg); padding: 36px; max-width: 400px; width: 100%; box-shadow: var(--shadow-card-hover); }
.auth-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.auth-sub { color: var(--gray-600); font-size: 14px; margin: 0 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card label { font-size: 13px; font-weight: 700; }
.auth-card input {
  padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--gray-300); font-size: 14px; font-family: inherit;
}
.auth-card input:focus { outline: none; border-color: var(--red); }
.auth-back { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--gray-600); }
.auth-back:hover { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; }
}
