/* Toko & JIOS: etalase, detail produk, keranjang, checkout, alamat, pesanan, lacak kiriman, dan oleh-oleh Tanah Suci. */

/* ---------- Potongan bersama ---------- */

/* Alur vertikal layar toko: jarak antarbagian diatur gap, jadi margin bawaan .section + .section dimatikan. */
.shop-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.shop-flow > .section + .section {
  margin-top: 0;
}

/* .card memaksa display: block, jadi kartu yang isinya bertumpuk/berbaris memakai kelas ini alih-alih .stack-y/.row. */
.shop-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.shop-stack--sm {
  gap: var(--space-2);
}

.shop-stack > .divider {
  width: 100%;
  margin: 0;
}

.shop-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.shop-thumb {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
}

.shop-thumb--sm {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
}

.shop-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  font-variant-numeric: tabular-nums;
}

.shop-price__from {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.shop-price__now {
  font-weight: 800;
}

.shop-price__compare {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.shop-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.shop-rating__star,
.shop-stars__on {
  color: var(--gold);
  fill: currentcolor;
}

.shop-stars {
  display: inline-flex;
  flex: none;
  gap: 2px;
}

.shop-stars__off {
  color: var(--faint);
}

.shop-icon-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  color: var(--muted);
  transition: background-color var(--duration-fast) var(--ease);
}

.shop-icon-btn:active {
  background: var(--hairline);
}

.shop-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.shop-total__sum {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shop-total__amount {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.shop-total .btn {
  flex: none;
  min-width: 132px;
}

.shop-footer-pair {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-3);
}

.shop-footer-pair .btn {
  padding-inline: var(--space-2);
}

.shop-choice__text {
  display: block;
}

.shop-choice[aria-checked="true"] .list__icon {
  background: var(--surface);
}

.shop-choice__mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 50%;
  color: transparent;
}

.shop-choice[aria-checked="true"] .shop-choice__mark {
  border-color: transparent;
  color: var(--on-gold);
  background: var(--gold-gradient);
}

/* Pilihan aktif dinonaktifkan agar tidak bisa diketuk ulang; tampilannya tetap penuh, bukan redup. */
.shop-choice[aria-checked="true"]:disabled {
  opacity: 1;
  cursor: default;
}

.chip:disabled,
.segmented__item:disabled {
  cursor: default;
}

.cart-fly {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--gold-gradient);
  box-shadow: 0 6px 16px rgb(169 131 47 / 45%);
  pointer-events: none;
}

/* ---------- Etalase ---------- */
.shop-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
}

.shop-hero__glyph {
  position: absolute;
  top: -18px;
  right: -26px;
  width: 168px;
  height: 168px;
  color: var(--gold-logo);
  opacity: 0.14;
  stroke-width: 0.8;
}

.shop-hero__title {
  max-width: 88%;
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.shop-hero__cta {
  align-self: flex-start;
  margin-top: var(--space-3);
}

.screen[data-route="shop"] .chips {
  scroll-margin-top: calc(var(--navbar-height) + var(--safe-top) + var(--space-3));
}

.shop-more {
  flex: none;
  white-space: nowrap;
}

.shop-grid-head {
  align-items: center;
}

.shop-sort {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface);
}

.shop-sort:active {
  background: var(--surface-sunken);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-6) var(--space-4);
}

/* Chrome memberi button align-items: flex-start; kolom flex di dalam tombol harus direntangkan eksplisit. */
.shop-product {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
  text-align: left;
  transition: transform var(--duration-fast) var(--ease);
}

.shop-product:active {
  transform: scale(0.975);
}

.shop-product--compact {
  width: 156px;
}

.shop-product__photo {
  align-items: flex-start;
  width: 100%;
  aspect-ratio: 1 / 1.14;
  padding: var(--space-3);
}

.shop-product__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.shop-product__name {
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.shop-feature {
  display: flex;
  align-items: stretch;
}

.shop-feature__photo {
  flex: none;
  width: 112px;
  min-height: 124px;
  border-radius: 0;
}

.shop-feature__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: var(--space-4);
}

.shop-feature__name {
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.shop-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.shop-promise {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.shop-promise__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
  border-radius: 50%;
  color: var(--gold);
  background: var(--gold-soft);
}

.jios-teaser {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.jios-teaser__text {
  display: block;
}

/* ---------- Detail produk ---------- */
.pd-gallery {
  position: relative;
}

.pd-gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pd-gallery__track::-webkit-scrollbar {
  display: none;
}

.pd-gallery__slide {
  flex: none;
  width: 100%;
  aspect-ratio: 1 / 1.04;
  padding: var(--gutter) var(--gutter) 46px;
  border-radius: 0;
  scroll-snap-align: center;
}

.pd-gallery__caption {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--on-onyx-muted);
}

.pd-gallery__dots {
  position: absolute;
  right: 0;
  bottom: var(--space-5);
  left: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.pd-gallery__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 38%);
  transition:
    width var(--duration) var(--ease-ios),
    background-color var(--duration) var(--ease-ios);
}

.pd-gallery__dot[data-active] {
  width: 20px;
  background: var(--gold-logo);
}

.pd__content {
  position: relative;
  margin-top: calc(var(--radius-xl) * -1);
  padding: var(--space-6) var(--gutter) var(--space-8);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--bg);
}

.pd__price .shop-price__now {
  font-size: var(--fs-2xl);
  letter-spacing: -0.015em;
}

.pd__price .shop-price__compare {
  font-size: var(--fs-md);
}

.pd__qty-label {
  margin: 0 0 2px;
}

.pd__description {
  line-height: 1.7;
  color: var(--ink-2);
}

.pd-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pd-highlights li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.pd-highlights .icon {
  margin-top: 1px;
  color: var(--gold);
}

.pd-rating {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.pd-rating__value {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.pd-reviews {
  display: flex;
  flex-direction: column;
}

.pd-review {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) 0;
}

.pd-review + .pd-review {
  border-top: 1px solid var(--hairline);
}

.pd-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.pd-footer .btn {
  padding-inline: var(--space-2);
}

@media (max-width: 400px) {
  .pd-footer .btn {
    font-size: var(--fs-sm);
  }
}

/* ---------- Keranjang ---------- */
.cart-check {
  flex: none;
  width: auto;
  padding: 10px 10px 10px 0;
}

.cart-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
}

.cart-line__thumb {
  flex: none;
  margin-right: var(--space-1);
  border-radius: var(--radius-md);
}

.cart-line__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-line__name {
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cart-line__controls {
  margin-top: var(--space-1);
}

/* ---------- Checkout ---------- */
.co-address {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.co-address .list__chevron {
  margin-top: 10px;
}

.co-address__text {
  display: block;
}

.shop-address-block {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.co-lines {
  display: flex;
  flex-direction: column;
  padding-block: var(--space-1);
}

.co-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) 0;
  text-align: left;
}

.co-line + .co-line {
  border-top: 1px solid var(--hairline);
}

.co-line--link:active {
  opacity: 0.6;
}

.co-line__name {
  display: block;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.co-line .text-sm {
  display: block;
}

.co-line__total {
  flex: none;
  font-size: var(--fs-sm);
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ship-option__price {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
}

.voucher-input {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voucher-input::placeholder {
  letter-spacing: 0;
  text-transform: none;
}

.voucher-list-label {
  margin-top: var(--space-6);
}

.voucher-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.voucher-card__text {
  display: block;
}

/* ---------- Alamat ---------- */
.shop-address {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: 0;
}

.shop-address__main {
  width: 100%;
  text-align: left;
}

.shop-address__main:active {
  opacity: 0.6;
}

.shop-address__actions {
  display: flex;
  gap: var(--space-6);
  border-top: 1px solid var(--hairline);
}

.shop-address__actions .link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.shop-address-form__remove {
  margin-top: var(--space-6);
}

/* ---------- Pesanan ---------- */
.shop-order {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
}

.shop-order__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.shop-order__number {
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.shop-order__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.shop-order__name,
.shop-order__item .text-sm {
  display: block;
  overflow-wrap: anywhere;
}

.shop-order__name {
  font-weight: 700;
  line-height: 1.35;
}

.shop-order__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
}

.shop-order__total {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.shop-order-hero__number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}

.shop-order-hero__code {
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.shop-order-hero__copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 var(--space-3);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--on-onyx);
}

.shop-order-hero__copy:active {
  background: rgb(255 255 255 / 12%);
}

.shop-resi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.shop-resi__number {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.shop-gift-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.shop-gift-note__message {
  margin: 0;
  font-style: italic;
  line-height: 1.65;
}

.shop-review-stars {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
}

.shop-review-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: var(--faint);
  transition:
    transform var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.shop-review-star:active {
  transform: scale(0.88);
}

.shop-review-star[data-on] {
  color: var(--gold);
}

.shop-review-star[data-on] .icon {
  fill: currentcolor;
}

/* ---------- Lacak kiriman: peta tiruan ---------- */
.track-map {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(0deg, var(--hairline) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, var(--hairline) 0 1px, transparent 1px 34px), var(--surface-sunken);
  box-shadow: var(--shadow-soft);
}

.track-map__svg {
  width: 100%;
  height: auto;
}

.track-map__route {
  fill: none;
  stroke: var(--faint);
  stroke-width: 3;
  stroke-linecap: round;
}

.track-map__route--todo {
  stroke-dasharray: 0.4 2.4;
}

/* Panjang bagian yang sudah ditempuh datang dari atribut stroke-dasharray di markup, jadi tidak diatur di sini. */
.track-map__route--done {
  stroke: var(--gold);
  stroke-width: 4;
}

.track-map__pin {
  fill: var(--surface);
  stroke: var(--gold);
  stroke-width: 3;
}

.track-map__pin--end {
  fill: var(--gold);
  stroke: var(--surface);
}

.track-map__marker circle {
  fill: var(--ink);
}

.track-map__marker use {
  fill: none;
  stroke: var(--bg);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-map__label {
  position: absolute;
  bottom: 9%;
  left: 5%;
  max-width: 46%;
  padding: 3px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 800;
  overflow-wrap: anywhere;
  background: var(--glass);
  backdrop-filter: var(--blur);
}

.track-map__label--end {
  top: 9%;
  right: 4%;
  bottom: auto;
  left: auto;
}

/* ---------- JIOS ---------- */
.jios-hero__rate {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: var(--space-3);
  padding: 6px var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--on-onyx);
  background: rgb(255 255 255 / 10%);
}

.jios-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
}

.jios-item__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jios-item__name {
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.jios-item__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 42px;
  margin-top: var(--space-2);
}

.jios-price {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}

.jios-price__sar {
  font-weight: 800;
}

.jios-price__idr {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.jios-locked__hero {
  min-height: 280px;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
}

.jios-locked__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.jios-locked__content .eyebrow {
  color: #e2c987;
}

.jios-locked__text {
  padding-inline: var(--space-2);
  line-height: 1.65;
}
