/* HAFRA situs publik - warna dari logo: biru #1640d0 -> ungu #7b37c8, hijau #2BE84A */
:root {
  --h-blue: #1640d0; --h-violet: #7b37c8; --h-green: #2be84a; --h-green-ink: #053d12;
  --h-grad: linear-gradient(135deg, #1640d0 0%, #3d3bd4 55%, #7b37c8 100%);
  --h-bg: #f4f5fb; --h-ink: #0f172a; --h-muted: #64748b; --h-line: #e5e7f0; --h-r: 18px;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--h-ink); --bs-body-bg: var(--h-bg); --bs-link-color: var(--h-blue); --bs-link-color-rgb: 22, 64, 208;
}
body { background: var(--h-bg); padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
h1, h2 { letter-spacing: -0.02em; }

.s-head { background: var(--h-grad); color: #fff; position: sticky; top: 0; z-index: 20; }
.s-head-in { display: flex; align-items: center; gap: .75rem; min-height: 58px; }
.s-brand { display: flex; align-items: center; gap: .45rem; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.s-brand:hover { color: #fff; }
.s-owner { margin-left: auto; font-size: .8rem; opacity: .92; max-width: 55%; }
.s-topnav { display: none; }

.s-main { padding-top: 1rem; padding-bottom: 1.5rem; min-height: 60vh; }
.s-foot { font-size: .78rem; color: var(--h-muted); padding: 1.25rem 0 1.5rem; }
.s-foot a { color: inherit; }

.s-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff;
  border-top: 1px solid var(--h-line); padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 20px rgba(15, 23, 42, .06); }
.s-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem;
  font-size: .7rem; font-weight: 600; color: #8a93a8; text-decoration: none; }
.s-tabs a.on { color: var(--h-blue); }
.s-tab-ic { position: relative; display: inline-flex; }
.s-count { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--h-green); color: var(--h-green-ink); font-size: .65rem; font-weight: 800; line-height: 18px; text-align: center; }
.s-topnav .s-count { position: static; display: inline-block; margin-left: 2px; }

.s-hero { background: #fff; border-radius: var(--h-r); padding: 1.1rem 1.15rem; margin-bottom: 1rem; border: 1px solid var(--h-line);
  background-image: linear-gradient(135deg, rgba(22, 64, 208, .06), rgba(123, 55, 200, .07)); }
.s-hero h1 { font-size: 1.3rem; font-weight: 800; margin: 0 0 .3rem; }
.s-hero p { margin: 0; color: var(--h-muted); font-size: .9rem; }
.s-h1 { font-size: 1.3rem; font-weight: 800; margin: .25rem 0 1rem; }
.s-h2 { font-size: 1rem; font-weight: 700; margin: 1.1rem 0 .5rem; }
.s-back { display: inline-block; font-size: .85rem; margin-bottom: .6rem; text-decoration: none; }

.s-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.s-card { background: #fff; border-radius: var(--h-r); overflow: hidden; border: 1px solid var(--h-line); display: flex; flex-direction: column; }
.s-card-img { position: relative; display: block; aspect-ratio: 1; background: #eef0f8; }
.s-card-img img, .s-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: .1em;
  color: #fff; background: var(--h-grad); opacity: .85; }
.s-badge { position: absolute; top: .5rem; left: .5rem; background: rgba(15, 23, 42, .78); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.s-card-body { padding: .7rem .75rem .8rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.s-card-name { font-size: .88rem; font-weight: 600; line-height: 1.3; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-card-name a { color: inherit; text-decoration: none; }
.s-price { font-weight: 800; color: var(--h-blue); }
.s-price-lg { font-size: 1.45rem; }

.btn.s-btn, .btn.s-btn-wa { font-weight: 700; border-radius: 12px; padding: .65rem 1rem; border: 0; }
.btn.s-btn { background: var(--h-grad); color: #fff; }
.btn.s-btn:hover, .btn.s-btn:focus-visible { color: #fff; filter: brightness(1.08); }
.btn.s-btn-wa { background: var(--h-green); color: var(--h-green-ink); }
.btn.s-btn-wa:hover, .btn.s-btn-wa:focus-visible { color: var(--h-green-ink); filter: brightness(.95); }
.btn.s-btn-sm { padding: .45rem .5rem; font-size: .8rem; border-radius: 10px; }
.btn.s-btn.is-added { background: var(--h-green); color: var(--h-green-ink); }

.s-detail { display: grid; gap: 1rem; }
.s-detail-img { position: relative; aspect-ratio: 1; border-radius: var(--h-r); overflow: hidden; background: #eef0f8; }
.s-detail-info { background: #fff; border-radius: var(--h-r); padding: 1rem 1.1rem 1.2rem; border: 1px solid var(--h-line); }
.s-detail-name { font-size: 1.25rem; font-weight: 800; margin: 0 0 .35rem; }
.s-stock { font-size: .8rem; color: #0f8a2d; font-weight: 600; margin-top: .2rem; }
.s-stock.out { color: #b91c1c; }
.s-buy { display: flex; gap: .6rem; margin-top: 1rem; }
.s-desc { font-size: .92rem; color: #334155; line-height: 1.6; }
.s-qty { display: flex; align-items: center; border: 1px solid var(--h-line); border-radius: 12px; overflow: hidden; background: #fff; flex-shrink: 0; }
.s-qty button { width: 38px; height: 42px; border: 0; background: #f4f5fb; font-size: 1.1rem; font-weight: 700; color: var(--h-ink); }
.s-qty input { width: 44px; height: 42px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.s-qty input::-webkit-outer-spin-button, .s-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.s-list { display: flex; flex-direction: column; gap: .6rem; }
.s-line { display: flex; gap: .75rem; align-items: center; background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: .6rem; }
.s-line-img { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; position: relative; background: #eef0f8; }
.s-line-img img { width: 100%; height: 100%; object-fit: cover; }
.s-line-info { flex: 1; min-width: 0; }
.s-line-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-line .s-qty button { width: 32px; height: 34px; }
.s-line .s-qty input { width: 36px; height: 34px; }
.s-del { border: 0; background: none; color: #b91c1c; font-size: .78rem; font-weight: 600; padding: 0; }
.s-total { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); margin-top: 1rem; background: #fff; border: 1px solid var(--h-line);
  border-radius: var(--h-r); padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }

.s-co { display: grid; gap: 1rem; }
.s-box { background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: 1rem 1.1rem; }
.s-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; padding: .35rem 0; }
.s-row-total { border-top: 1px dashed var(--h-line); margin-top: .35rem; padding-top: .6rem; font-weight: 800; }
.s-pay { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--h-line); border-radius: 12px; padding: .65rem .75rem; margin-bottom: .5rem; cursor: pointer; }
.s-pay input { margin-top: .3rem; accent-color: var(--h-blue); }
.s-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-control, .form-select { border-radius: 12px; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--h-blue); box-shadow: 0 0 0 3px rgba(22, 64, 208, .15); }
.form-label { font-size: .85rem; font-weight: 600; }

.s-bank { background: #f4f6ff; border: 1px solid #dfe4fb; border-radius: 14px; padding: .75rem .9rem; }
.s-bank-no { font-size: 1.25rem; font-weight: 800; letter-spacing: .04em; }
.s-status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; background: #eef0f8; color: #334155; }
.s-status.s-pending { background: #fff7e0; color: #92400e; }
.s-status.s-paid, .s-status.s-processing, .s-status.s-shipped, .s-status.s-completed { background: #e3fbe8; color: #0f6b25; }
.s-status.s-cancelled { background: #fde8e8; color: #991b1b; }

.s-prose { display: grid; gap: .75rem; }
.s-steps { margin: 0; padding-left: 1.2rem; }
.s-steps li { margin-bottom: .35rem; }
.s-cta { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding: .75rem 0 .25rem; }
.s-empty { background: #fff; border: 1px dashed #cfd5e6; border-radius: var(--h-r); padding: 2rem 1.25rem; text-align: center; }

@media (min-width: 576px) { .s-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 768px) {
  .s-detail { grid-template-columns: 1fr 1fr; align-items: start; gap: 1.5rem; }
  .s-co { grid-template-columns: 1fr 1.2fr; align-items: start; }
  .s-prose { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  .s-tabs { display: none; }
  .s-owner { margin-left: 1rem; max-width: 30%; }
  .s-topnav { display: flex; gap: .25rem; margin-left: auto; }
  .s-topnav a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 600; font-size: .9rem; padding: .4rem .85rem; border-radius: 999px; }
  .s-topnav a.on, .s-topnav a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
  .s-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .s-total, .s-cta { bottom: 1rem; }
  .s-hero { padding: 1.5rem 1.75rem; }
  .s-hero h1 { font-size: 1.6rem; }
}
.s-has-cta { margin-bottom: .25rem; }
.s-dl { margin: 0; display: grid; gap: .1rem; }
.s-dl dt { font-size: .75rem; font-weight: 600; color: var(--h-muted); margin-top: .5rem; }
.s-dl dt:first-child { margin-top: 0; }
.s-dl dd { margin: 0; font-weight: 600; }
@media (min-width: 768px) { .s-prose > .s-box:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.s-desc p { margin: 0 0 .6rem; }
.s-desc ul, .s-desc ol { padding-left: 1.2rem; margin: 0 0 .6rem; }
.s-desc h3, .s-desc h4 { font-size: 1rem; font-weight: 700; margin: .8rem 0 .4rem; }
