/* RasyidBook — toko */
.announce { background: var(--ink); color: #f6efe3; font-size: 13px; font-weight: 600; }
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; text-align: center; }
.announce .ic { color: #fdba74; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(250,247,242,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 38px; height: 38px; }
.brand b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand b span { color: var(--accent); }
.search { flex: 1; position: relative; max-width: 560px; }
.search .input { padding-left: 44px; border-radius: 999px; min-height: 44px; background: var(--surface); }
.search .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.head-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.head-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.head-link:hover { background: var(--soft); color: var(--ink); }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.cart-count[hidden] { display: none; }
@media (max-width: 760px) {
  .header .wrap { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .head-link .lbl { display: none; }
  .brand b { font-size: 18px; }
}

main { min-height: 60vh; }
.page { padding-top: 24px; padding-bottom: 56px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { padding: 28px 0 8px; }
.hero-card { border-radius: 24px; background: radial-gradient(120% 140% at 100% 0%, #fde3cf 0%, rgba(253,227,207,0) 55%), linear-gradient(135deg, #1c2541 0%, #2b3a63 100%); color: #fff; padding: 36px 32px; display: grid; gap: 24px; grid-template-columns: 1.3fr 1fr; align-items: center; overflow: hidden; }
.hero-card h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.hero-card p { color: #d9dcea; margin: 12px 0 20px; font-size: 16px; max-width: 46ch; }
.hero-perks { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-perks span { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.hero-books { display: flex; justify-content: center; gap: 0; }
.hero-books img { width: 32%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; box-shadow: 0 16px 32px rgba(0,0,0,.35); }
.hero-books img:nth-child(1) { transform: rotate(-7deg) translate(14px, 10px); }
.hero-books img:nth-child(2) { transform: translateY(-8px); z-index: 2; }
.hero-books img:nth-child(3) { transform: rotate(7deg) translate(-14px, 10px); }
@media (max-width: 760px) { .hero-card { grid-template-columns: 1fr; padding: 28px 20px; } .hero-books { display: none; } }

/* Katalog */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; flex: 1; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.toolbar select.input { width: auto; min-height: 40px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 14px; }
.section-title h2 { font-size: 22px; font-weight: 800; }

.grid { display: grid; gap: 20px 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; } }
.pcard { position: relative; display: flex; flex-direction: column; text-decoration: none; }
.pcard .cover { position: relative; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden; background: var(--soft); box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.pcard:hover .cover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(28,37,65,.14); }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.pcard .tags { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pcard .soldout { position: absolute; inset: 0; background: rgba(255,255,255,.6); display: grid; place-items: center; }
.pcard .soldout span { background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 99px; }
.pcard h3 { font-size: 14.5px; font-weight: 700; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .author { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 6px; }
.price { color: var(--accent-ink); font-weight: 800; font-size: 16px; }
.strike { color: var(--faint); text-decoration: line-through; font-size: 12.5px; }

/* Halaman buku */
.pdp { display: grid; gap: 32px; grid-template-columns: minmax(0, 400px) minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 1080px) { .pdp { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); } .buybox-col { grid-column: 2; grid-row: 1; } .pdp-info { grid-column: 1 / -1; } }
@media (max-width: 720px) { .pdp { grid-template-columns: minmax(0, 1fr); gap: 20px; } .buybox-col, .pdp-info { grid-column: auto; grid-row: auto; } }
.pdp > * { min-width: 0; }
.gallery .main { aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; background: var(--soft); max-height: 600px; margin: 0 auto; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #f1ece3; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.thumbs button { flex: none; width: 64px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--soft); }
.thumbs button[aria-current="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .gallery .main { max-width: 320px; } .thumbs > :first-child { margin-left: auto; } .thumbs > :last-child { margin-right: auto; } }

.pdp-title h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.pdp-title .by { margin-top: 6px; color: var(--ink-2); }
.pdp-title .by a { color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.pdp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pdp-block { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.pdp-block h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.desc { white-space: pre-line; color: var(--ink-2); }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 40%; color: var(--muted); font-weight: 500; }
.spec td { font-weight: 600; }
.spec td a { color: var(--accent-ink); text-decoration: none; } .spec td a:hover { text-decoration: underline; }

.buybox { position: sticky; top: 88px; padding: 20px; }
.buybox .price-big { font-size: 28px; font-weight: 800; color: var(--accent-ink); letter-spacing: -.02em; }
.buybox .save { display: inline-flex; margin-top: 6px; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.stock-line { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; font-size: 14px; }
.stock-ok { color: var(--green); } .stock-low { color: var(--amber); } .stock-out { color: var(--red); }
.po-box { margin-top: 14px; border-radius: 12px; background: var(--soft); padding: 12px 14px; font-size: 13.5px; }
.po-box b { display: block; margin-bottom: 4px; }
.po-box .row { gap: 6px; margin-top: 4px; color: var(--ink-2); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.qty button { width: 40px; height: 42px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.qty button:hover:not([disabled]) { background: var(--soft); } .qty button[disabled] { color: var(--line-2); cursor: not-allowed; }
.qty input { width: 44px; text-align: center; border: 0; font-weight: 700; outline: none; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm button { width: 34px; height: 34px; } .qty-sm input { width: 36px; }
.buy-actions { display: grid; gap: 10px; margin-top: 16px; }
.perks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.perks li { display: flex; gap: 10px; align-items: flex-start; } .perks .ic { color: var(--teal); margin-top: 1px; }
.mobile-buy { display: none; }
@media (max-width: 720px) {
  .buybox { position: static; }
  .mobile-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 10px; align-items: center; box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .mobile-buy .p { flex: 1; min-width: 0; } .mobile-buy .p b { display: block; color: var(--accent-ink); font-size: 18px; }
  body.has-mobile-buy footer { padding-bottom: 90px; }
  body.has-mobile-buy #toasts { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 170px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }

/* Keranjang & checkout */
.two-col { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line:last-child { border-bottom: 0; }
.line img { width: 72px; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; background: var(--soft); }
.line h3 { font-size: 15px; font-weight: 700; } .line h3 a { text-decoration: none; } .line h3 a:hover { text-decoration: underline; }
.line .meta { font-size: 13px; color: var(--muted); }
.line .right { text-align: right; display: grid; gap: 8px; justify-items: end; }
.summary { position: sticky; top: 88px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.sum-row.total { border-top: 1px dashed var(--line-2); margin-top: 8px; padding-top: 14px; font-size: 17px; font-weight: 800; }
.sum-row .free { color: var(--green); font-weight: 700; }
.mini-line { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 13.5px; }
.mini-line img { width: 40px; aspect-ratio: 2/3; object-fit: cover; border-radius: 5px; flex: none; }
.mini-line .t { flex: 1; min-width: 0; } .mini-line .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-section + .form-section { margin-top: 20px; }
.form-section h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 16px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: grid; place-items: center; flex: none; }

/* Pesanan */
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.order-code { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; }
.timeline li { position: relative; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--faint); padding-top: 38px; }
.timeline li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.timeline li:first-child::before { display: none; }
.timeline li .dot { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: grid; place-items: center; z-index: 1; color: var(--faint); }
.timeline li.done { color: var(--ink-2); } .timeline li.done::before { background: var(--green); }
.timeline li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.timeline li.now { color: var(--ink); } .timeline li.now::before { background: var(--green); }
.timeline li.now .dot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 4px rgba(194,65,12,.12); }
@media (max-width: 560px) { .timeline li { font-size: 10.5px; } }
.countdown { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--amber-soft); color: #7c3d06; }
.countdown .time { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pay-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--soft); }
.pay-total .amt { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.bank { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.bank:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bank input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.bank .logo { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; text-align: center; line-height: 1.1; }
.bank .info { flex: 1; min-width: 0; }
.bank .acc { font-size: 18px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* Layar HP: tombol Salin pindah ke bawah nomor rekening supaya nomornya tidak tertimpa */
@media (max-width: 520px) {
  .bank { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px 12px; padding: 14px; }
  .bank .logo { width: 40px; height: 40px; }
  .bank .btn { grid-column: 3; justify-self: start; }
  .pay-total, .resi { padding: 14px 16px; }
  .pay-total .btn, .resi .btn { flex: none; }
}
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.resi { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--teal-soft); }
.resi .no { font-size: 20px; font-weight: 800; letter-spacing: .03em; word-break: break-all; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.saved-orders a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.saved-orders a:last-child { border-bottom: 0; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; margin-top: 24px; font-size: 14px; color: var(--ink-2); }
footer .wrap { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr 1fr; }
footer h4 { font-size: 14px; margin-bottom: 10px; color: var(--ink); }
footer a { text-decoration: none; display: block; padding: 3px 0; } footer a:hover { color: var(--accent-ink); }
footer .copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(31,168,85,.35); }
body.has-mobile-buy .wa-float { bottom: 88px; }
/* Bukti transfer */
.proof { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); padding: 12px; }
.proof.ok { border-style: solid; border-color: #bfe3cb; background: var(--green-soft); }
.proof-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.proof.ok .proof-ic { background: #fff; color: var(--green); }
.proof-img { flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.proof-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.proof-t b { font-size: 14.5px; }
.proof .btn { flex: none; }

/* Galeri: pratinjau layar penuh */
.gallery .main { display: block; width: 100%; padding: 0; border: 0; position: relative; cursor: zoom-in; }
.gallery .main:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.zoom-tag { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(20,20,20,.55); color: #fff; display: grid; place-items: center; pointer-events: none; }
.lb { position: fixed; inset: 0; z-index: 900; background: #0b0b0d; color: #fff; display: flex; flex-direction: column; animation: fade .15s; overscroll-behavior: contain; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); position: relative; z-index: 2; }
.lb-count { font-size: 14px; opacity: .8; padding-left: 6px; font-variant-numeric: tabular-nums; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; cursor: zoom-in; -webkit-user-drag: none; }
.lb-stage img.anim { transition: transform .22s ease; }
.lb.is-zoomed .lb-stage img { cursor: grab; }
.lb.is-zoomed .lb-nav { opacity: 0; pointer-events: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; transition: opacity .2s; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-thumbs > :first-child { margin-left: auto; }
.lb-thumbs > :last-child { margin-right: auto; }
.lb-thumbs { display: flex; gap: 8px; padding: 10px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); overflow-x: auto; position: relative; z-index: 2; }
.lb-thumbs button { flex: none; width: 44px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; padding: 0; border: 2px solid transparent; background: #222; opacity: .55; cursor: pointer; }
.lb-thumbs button[aria-current="true"] { border-color: #fff; opacity: 1; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lb-hint { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(0,0,0,.65); padding: 7px 14px; border-radius: 99px; font-size: 13px; white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.lb.single .lb-hint { bottom: max(24px, env(safe-area-inset-bottom)); }
.lb-hint.gone { opacity: 0; }
@media (max-width: 720px) { .lb-nav { display: none; } }
