/* ===== Toko Bahan Bangunan — style "Artisan Rustic Heritage" ===== */

:root {
  --bg: #f5ecd9;
  --surface: #fffaf0;
  --text: #3a2a18;
  --text-muted: #7a6248;
  --border: #e0cfa8;
  --wood: #a9673a;
  --wood-dark: #7c4a26;
  --stamp: #8f2d2d;
  --radius: 10px;
  --shadow: 0 14px 34px rgba(58, 42, 24, 0.18);
  --transition: 280ms ease;
}
[data-theme="dark"] {
  --bg: #241a10;
  --surface: #2e2115;
  --text: #f1e4cc;
  --text-muted: #c3ac86;
  --border: #4a3620;
  --shadow: 0 14px 34px rgba(0,0,0,0.5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Inter", sans-serif; background: var(--bg); color: var(--text); transition: background var(--transition), color var(--transition);
  background-image: radial-gradient(circle at 1px 1px, rgba(122,98,72,0.09) 1px, transparent 0);
  background-size: 18px 18px;
}
h1, h2, h3 { font-family: "Playfair Display", serif; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.demo-banner { background: var(--wood-dark); color: #fff2de; text-align: center; font-size: 0.78rem; padding: 6px 12px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; font-weight: 600; border-radius: var(--radius); cursor: pointer; border: none; font-size: 0.88rem; transition: transform var(--transition), background var(--transition); font-family: "Inter", sans-serif; }
.btn:active { transform: translateY(1px); }
.btn-wood { background: var(--wood); color: #fff2de; }
.btn-wood:hover { background: var(--wood-dark); }
.btn-block { width: 100%; justify-content: center; }

.icon-btn { position: relative; background: none; border: none; color: var(--text); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.05rem; border-radius: 50%; }
.icon-btn:hover { background: rgba(122,98,72,0.12); }
.badge { position: absolute; top: 0; right: 0; background: var(--stamp); color: #fff; font-size: 0.58rem; min-width: 15px; height: 15px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.hamburger { display: none; }

/* ===== Navbar ===== */
.navbar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 3px double var(--wood); box-shadow: var(--shadow); }
.navbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 26px; }
.brand { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--wood-dark); }
[data-theme="dark"] .brand { color: #e2b884; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 0.88rem; font-weight: 500; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-color: var(--wood); }
.navbar-actions { display: flex; gap: 2px; }

@media (max-width: 860px) {
  .hamburger { display: inline-flex; }
  .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 250px; background: var(--surface); flex-direction: column; padding: 90px 28px; gap: 22px; transform: translateX(100%); transition: transform var(--transition); box-shadow: var(--shadow); z-index: 45; }
  .nav-links.open { transform: translateX(0); }
}

/* ===== Hero: bingkai bundar + kertas bertekstur (bukan diagonal / full-bleed foto) ===== */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; max-width: 1180px; margin: 0 auto; padding: 70px 26px; }
.hero-script { font-family: "Caveat", cursive; font-size: 1.6rem; color: var(--wood); display: block; margin-bottom: 6px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--text); }
.hero-sub { font-family: "Playfair Display", serif; font-size: 1.1rem; color: var(--text-muted); margin: 6px 0 20px; font-style: italic; }
.hero-desc { color: var(--text-muted); line-height: 1.7; max-width: 460px; margin-bottom: 30px; }
.hero-image img { border-radius: 50%; box-shadow: var(--shadow); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; text-align: center; } .hero-desc { margin-left: auto; margin-right: auto; } .hero-image { max-width: 300px; margin: 0 auto; } }

/* Rope divider — motif khas style ini */
.rope-divider { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0; }
.rope-divider span { height: 2px; width: 120px; background: repeating-linear-gradient(90deg, var(--wood) 0 8px, transparent 8px 14px); }
.rope-divider i { color: var(--wood); font-size: 0.6rem; }

/* ===== Sections ===== */
.section { max-width: 1100px; margin: 0 auto; padding: 80px 26px; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-kicker { font-family: "Caveat", cursive; font-size: 1.3rem; color: var(--wood); display: block; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 4px; }
.section-desc { color: var(--text-muted); margin-top: 10px; }

.reveal { opacity: 0; transform: translateY(24px) rotate(-1deg); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.in-view { opacity: 1; transform: translateY(0) rotate(0); }

/* ===== Accordion katalog — ciri khas struktural utama style ini ===== */
.accordion { display: flex; flex-direction: column; gap: 14px; }
.accordion-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion-head { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: none; cursor: pointer; text-align: left; font-family: "Playfair Display", serif; font-size: 1.05rem; color: var(--text); }
.accordion-head img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; border: 2px solid var(--wood); }
.accordion-head .count { font-family: "Inter", sans-serif; font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }
.accordion-head .chev { margin-left: auto; transition: transform var(--transition); color: var(--wood); }
.accordion-item.open .chev { transform: rotate(180deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 380ms ease; }
.accordion-item.open .accordion-panel { max-height: 900px; }

.product-row { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--border); }
.product-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.product-row-info { flex: 1; }
.product-row-name { font-size: 0.92rem; font-weight: 500; }
.product-row-price { font-size: 0.82rem; color: var(--wood-dark); font-weight: 600; }
[data-theme="dark"] .product-row-price { color: #e2b884; }
.product-row-stock { font-size: 0.72rem; color: var(--text-muted); }
.product-row-stock.out { color: var(--stamp); }
.product-row-actions { display: flex; align-items: center; gap: 10px; }
.wish-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }
.wish-btn.active { color: var(--stamp); }
.add-btn { background: var(--wood); color: #fff2de; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.add-btn:hover { background: var(--wood-dark); }
.add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.view-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }

/* ===== Andalan — grid bingkai bundar ===== */
.andalan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.andalan-card { text-align: center; }
.andalan-frame { width: 130px; height: 130px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid var(--wood); padding: 4px; }
.andalan-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.andalan-name { font-family: "Playfair Display", serif; font-size: 0.95rem; }
.andalan-price { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 760px) { .andalan-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Stats — cap stempel ===== */
.stats-section { padding: 50px 26px; }
.stamp-row { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.stamp { width: 130px; height: 130px; border-radius: 50%; border: 3px dashed var(--wood); display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-4deg); }
.stamp:nth-child(even) { transform: rotate(4deg); }
.stamp-num { font-family: "Playfair Display", serif; font-size: 1.8rem; font-weight: 700; color: var(--wood-dark); }
[data-theme="dark"] .stamp-num { color: #e2b884; }
.stamp-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-top: 4px; text-align: center; padding: 0 8px; }

/* ===== Kisah + kalkulator ===== */
.kisah-wrap { max-width: 680px; margin: 0 auto; text-align: center; }
.kisah-wrap > p { color: var(--text-muted); line-height: 1.8; margin: 16px 0 36px; font-size: 1.02rem; }
.calc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: left; box-shadow: var(--shadow); }
.calc-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.calc-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 16px; }
.calc-row { display: flex; gap: 10px; }
.calc-row input { flex: 1; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; }
.calc-result { margin-top: 16px; padding: 14px; background: var(--bg); border-radius: 8px; font-size: 0.85rem; line-height: 1.8; }

/* ===== Testimoni — postcard miring ===== */
.postcard-row { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.postcard { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 22px; width: 260px; box-shadow: var(--shadow); transform: rotate(-2deg); }
.postcard:nth-child(even) { transform: rotate(2deg); }
.postcard:hover { transform: rotate(0); }
.postcard-text { font-family: "Caveat", cursive; font-size: 1.25rem; line-height: 1.4; margin-bottom: 14px; color: var(--text); }
.postcard-name { font-weight: 600; font-size: 0.88rem; }
.postcard-role { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Kontak — tiket sobek ===== */
.kontak-ticket { max-width: 480px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.kontak-lead { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }
.ticket-perforation { border-top: 2px dashed var(--border); margin-bottom: 18px; }
.kontak-line { margin-bottom: 12px; font-size: 0.92rem; }
.kontak-line i { margin-right: 8px; color: var(--wood); }
.kontak-form { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.kontak-form input, .kontak-form textarea { padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; resize: vertical; }
.receipt-note { font-size: 0.72rem; color: var(--text-muted); text-align: center; margin-top: 8px; }

/* ===== Footer ===== */
.footer { text-align: center; padding: 60px 26px 36px; border-top: 3px double var(--wood); }
.footer .brand { justify-content: center; }
.footer p { color: var(--text-muted); font-size: 0.85rem; max-width: 420px; margin: 14px auto; }
.footer-bottom { font-size: 0.72rem; color: var(--text-muted); }
.footer-bottom a { color: var(--wood); }

/* ===== Overlay / Modal ===== */
.overlay-backdrop { position: fixed; inset: 0; background: rgba(58,42,24,0.55); z-index: 49; opacity: 0; transition: opacity var(--transition); }
.overlay-backdrop.show { opacity: 1; }
.modal { position: fixed; top: 50%; left: 50%; z-index: 60; background: var(--surface); color: var(--text); width: min(460px, 90vw); max-height: 85vh; overflow: auto; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 28px 28px; transform: translate(-50%, -50%) rotate(-2deg) scale(0.92); opacity: 0; pointer-events: none; transition: transform var(--transition), opacity var(--transition); border: 1px solid var(--border); }
.modal.show { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); pointer-events: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--bg); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--text); }
.seal-modal { text-align: center; }
.seal-stamp { width: 70px; height: 70px; border-radius: 50%; background: var(--stamp); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 16px; border: 3px dashed #fff2de; }
.seal-modal p { color: var(--text-muted); font-size: 0.9rem; margin: 14px 0 22px; line-height: 1.7; }

.quickview-modal { width: min(600px, 92vw); }
.quickview-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quickview-body img { border-radius: 10px; border: 1px solid var(--border); }
.qv-name { font-size: 1.15rem; margin: 8px 0; }
.qv-desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 16px; }
.qv-price { font-size: 1.2rem; color: var(--wood-dark); font-weight: 700; font-family: "Playfair Display", serif; }
[data-theme="dark"] .qv-price { color: #e2b884; }
@media (max-width: 560px) { .quickview-body { grid-template-columns: 1fr; } }

/* ===== Receipt cart — slide dari bawah tengah, gaya struk/nota (ciri khas style ini) ===== */
.receipt-sheet { position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%); z-index: 60; background: var(--surface); width: min(360px, 92vw); max-height: 80vh; border-radius: 14px 14px 0 0; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform var(--transition); border: 1px solid var(--border); border-bottom: none; }
.receipt-sheet.show { transform: translate(-50%, 0); }
.receipt-notch { width: 44px; height: 5px; background: var(--border); border-radius: 4px; margin: 12px auto 0; }
.receipt-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 2px dashed var(--border); }
.receipt-header h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; font-family: "Playfair Display", serif; }
.receipt-body { flex: 1; overflow-y: auto; padding: 10px 20px; }
.receipt-footer { padding: 16px 20px 22px; border-top: 2px dashed var(--border); }
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-family: "Playfair Display", serif; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 30px 0; font-size: 0.85rem; }
.cart-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); align-items: center; }
.cart-line img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }
.cart-line-info { flex: 1; }
.cart-line-name { font-size: 0.8rem; margin-bottom: 3px; }
.cart-line-price { font-size: 0.75rem; color: var(--text-muted); }
.qty-control { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.qty-control button { width: 20px; height: 20px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; border-radius: 4px; font-size: 0.75rem; }
.remove-line { background: none; border: none; color: var(--stamp); cursor: pointer; }

/* ===== Toast ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--wood-dark); color: #fff2de; padding: 12px 18px; border-radius: 8px; font-size: 0.85rem; box-shadow: var(--shadow); animation: toast-in 220ms ease; max-width: 280px; }
.toast.leaving { animation: toast-out 220ms ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px);} to { opacity: 1; transform: translateX(0);} }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px);} }
