@import url("https://fonts.googleapis.com/css2?family=Allura&display=swap");

:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #767676;
  --paper: #ffffff;
  --panel: #ffffff;
  --soft: #f6f6f6;
  --line: #e7e7e7;
  --line-strong: #cfcfcf;
  --accent: #b5071e;
  --accent-soft: rgba(181, 7, 30, 0.08);
  --radius: 4px;
  --bottom-safe: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.44;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-mark,
.tagline,
.catalog-stats {
  display: none;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 1px 0 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--accent);
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.cta-link:hover,
.cta-link:focus-visible {
  background: var(--accent-soft);
}

button.cta-link {
  cursor: pointer;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
}

.app-shell {
  display: grid;
  gap: 18px;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 14px 14px calc(96px + var(--bottom-safe));
}

.filter-panel {
  display: grid;
  gap: 12px;
}

.search-field,
.compact-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  outline: none;
}

input {
  padding: 0 12px;
}

select {
  padding: 0 34px 0 10px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.1);
  outline: none;
}

.filter-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-head h2,
.catalog-toolbar h2,
.empty-state h2 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.text-button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.segmented-list {
  display: flex;
  gap: 8px;
  margin-inline: -14px;
  padding: 0 14px 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.segmented-list::-webkit-scrollbar {
  display: none;
}

.segment-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
}

.segment-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.segment-count {
  color: inherit;
  font-size: 0.72rem;
  opacity: 0.72;
}

.compact-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.catalog-view {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 12px;
}

.catalog-toolbar h2 {
  font-size: clamp(1.5rem, 8vw, 2.4rem);
  line-height: 0.95;
  text-transform: none;
}

.result-count {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 10px;
}

.load-more-row {
  display: grid;
  place-items: center;
  padding: 24px 0 4px;
}

.load-more-button {
  min-height: 42px;
  min-width: min(100%, 220px);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 900;
}

.load-more-button:active {
  background: var(--ink);
  color: #fff;
}

.product-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  background: var(--panel);
}

.product-card:hover .product-media img {
  transform: scale(1.015);
}

.product-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--soft);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.status-badge,
.price-badge {
  position: absolute;
  top: 8px;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.price-badge {
  left: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.status-badge {
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

.product-card.is-sold-out .product-media img {
  filter: grayscale(0.55);
}

.product-card.is-sold-out .status-badge {
  color: var(--ink);
}

.product-body {
  display: grid;
  gap: 6px;
}

.product-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: start;
}

.product-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
}

.favorite-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  line-height: 1;
}

.favorite-button::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.favorite-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.favorite-button[aria-pressed="true"]::before {
  background: currentColor;
}

.series-name,
.tone-chip {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tone-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.tone-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 50%;
  background: var(--tone, #d8d8d8);
}

.details-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.cart-add-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.cart-add-button:not(:disabled):active {
  background: var(--ink);
  color: #fff;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-size: 0.88rem;
}

.product-dialog,
.cart-dialog {
  width: min(680px, calc(100vw - 18px));
  max-height: calc(100vh - 18px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.product-dialog::backdrop,
.cart-dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.close-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.product-dialog > .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.dialog-content {
  display: grid;
  max-height: calc(100vh - 18px);
  overflow: auto;
}

.dialog-image {
  width: 100%;
  max-height: 58vh;
  object-fit: cover;
  background: var(--soft);
}

.dialog-details {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.dialog-details h2 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(1.7rem, 8vw, 2.6rem);
  line-height: 1;
}

.dialog-meta,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.order-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.cart-shell {
  /* Satu area scroll untuk seluruh isi keranjang, supaya semua item selalu terlihat. */
  max-height: calc(100dvh - 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cart-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 900;
}

.cart-items {
  display: grid;
  gap: 8px;
  padding: 12px;
}

/* Item mendatar: foto | nama, seri, harga | jumlah + hapus */
.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
}

.cart-item img {
  grid-row: 1 / span 2;
  width: 56px;
  height: 75px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--soft);
}

.cart-item-body {
  grid-row: 1 / span 2;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cart-item-body h3,
.cart-item-body p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-body h3,
.cart-empty h3 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
}

.cart-item-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.cart-item-body strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.quantity-control {
  display: grid;
  grid-template-columns: 32px 34px 32px;
  align-items: center;
  justify-self: end;
  align-self: end;
  grid-column: 3;
  grid-row: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.quantity-control button {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
}

.quantity-control span {
  text-align: center;
  font-weight: 900;
}

.remove-cart-button {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  align-self: start;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 230px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.cart-empty p {
  margin: 0;
  font-size: 0.88rem;
}

.cart-footer {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.checkout-fields {
  display: grid;
  gap: 8px;
}

.checkout-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.checkout-fields .wide {
  grid-column: 1 / -1;
}

.checkout-fields input,
.checkout-fields select,
.checkout-fields textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.area-field {
  position: relative;
  display: grid;
  gap: 6px;
}

.area-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.area-results button {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  padding: 10px;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.area-results button:hover,
.area-results button:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.area-results p {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.field-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
}

.field-hint.is-error {
  color: var(--accent);
}

.checkout-fields textarea {
  min-height: 72px;
  padding: 10px;
  resize: vertical;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.cart-total-row strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.cart-footer-actions {
  display: grid;
  gap: 8px;
}

.mobile-cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--bottom-safe));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.mobile-cart-bar strong {
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(74px + var(--bottom-safe));
  z-index: 40;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 900;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.page-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(3px);
}

.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  user-select: none;
  gap: 10px;
}

.loader {
  width: 20px;
  height: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 1.5s linear infinite;
  z-index: 0;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 1px 1px 0 #fff inset,
      0 3px 5px 0 #ff5f9f inset,
      0 4px 4px 0 #0693ff inset;
  }
  50% {
    transform: rotate(270deg);
    background: #7c0911;
    box-shadow:
      0 1px 1px 0 #fff inset,
      0 3px 5px 0 #d60a47 inset,
      0 4px 4px 0 #fbef19 inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 1px 1px 0 #fff inset,
      0 3px 5px 0 #ff5f9f inset,
      0 4px 4px 0 #28a9ff inset;
  }
}

.letter-wrapper {
  display: flex;
  gap: 1px;
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
  text-transform: lowercase;
}

.loader-letter:nth-child(1) { animation-delay: 0s; }
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
.loader-letter:nth-child(4) { animation-delay: 0.3s; }
.loader-letter:nth-child(5) { animation-delay: 0.4s; }
.loader-letter:nth-child(6) { animation-delay: 0.5s; }
.loader-letter:nth-child(7) { animation-delay: 0.6s; }
.loader-letter:nth-child(8) { animation-delay: 0.7s; }
.loader-letter:nth-child(9) { animation-delay: 0.8s; }
.loader-letter:nth-child(10) { animation-delay: 0.9s; }
.loader-letter:nth-child(11) { animation-delay: 1s; }

@keyframes loader-letter-anim {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0);
  }
}

@media (min-width: 740px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 18px 28px;
  }

  .brand-mark,
  .catalog-stats {
    display: initial;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 900;
  }

  .tagline {
    justify-self: center;
    margin: 0;
    color: var(--muted);
    font-family: "Allura", "Segoe Script", "Lucida Handwriting", cursive;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
  }

  .header-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
  }

  .catalog-stats {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .catalog-stats span {
    border: 1px solid var(--line);
    padding: 5px 8px;
  }

  .app-shell {
    padding: 26px 28px 40px;
  }

  .filter-panel {
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr) minmax(260px, 0.7fr);
    align-items: end;
    gap: 18px;
  }

  .segmented-list {
    margin-inline: 0;
    padding-inline: 0;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 16px;
  }

  .dialog-content {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr);
    overflow: hidden;
  }

  .dialog-image {
    height: 100%;
    max-height: none;
  }

  .dialog-details {
    align-content: center;
    padding: 34px;
  }

  .cart-footer-actions {
    grid-template-columns: 1fr auto;
  }

  .checkout-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-cart-bar {
    display: none;
  }
}

@media (min-width: 1120px) {
  .topbar {
    grid-template-columns: minmax(260px, 1fr) auto minmax(300px, 1fr);
  }

  .tagline {
    display: initial;
  }

  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.order-panel {
  display: grid;
  gap: 10px;
  padding: 18px 14px;
}

.order-panel[hidden] {
  display: none;
}

.order-panel h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.order-status {
  justify-self: start;
  margin: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.order-lines {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.order-lines li,
.order-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-summary {
  display: grid;
  gap: 6px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.order-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.order-summary .is-total dd {
  font-size: 1.1rem;
}

.order-actions {
  display: grid;
  gap: 8px;
}

button.primary-button {
  cursor: pointer;
}

.primary-button[aria-disabled="true"] {
  opacity: 0.55;
}


/* ---------- Kenyamanan di HP ---------- */

.brand-lockup h1,
.brand-lockup .eyebrow {
  overflow-wrap: normal;
  white-space: nowrap;
}

.cta-icon {
  display: none;
  width: 20px;
  height: 20px;
}

@media (max-width: 479px) {
  .topbar {
    padding: 10px 16px;
  }

  .contact-actions a.cta-link {
    width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .contact-actions .cta-icon {
    display: block;
  }

  .contact-actions a.cta-link .cta-text {
    display: none;
  }

  .cart-button {
    min-height: 40px;
  }
}

.product-media[data-product] {
  cursor: pointer;
}

.zoom-hint {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

@media (max-width: 739px) {
  .dialog-actions {
    position: sticky;
    bottom: 0;
    margin: 0 -18px -18px;
    padding: 12px 18px calc(12px + var(--bottom-safe));
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .dialog-actions .primary-button,
  .dialog-actions .secondary-button {
    flex: 1 1 120px;
    min-height: 46px;
    white-space: nowrap;
  }

  .dialog-actions .primary-button {
    flex-basis: 100%;
  }
}


.image-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border: 0;
  padding: 0;
  background: #000;
}

.image-viewer::backdrop {
  background: #000;
}


.image-viewer .close-button {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 1;
}


/* ---------- Umpan balik tambah keranjang ---------- */

button,
a.primary-button,
a.secondary-button,
.cta-link {
  -webkit-tap-highlight-color: transparent;
}

.cart-add-button,
.primary-button,
.secondary-button,
.cta-link,
.mobile-cart-bar {
  transition: transform 120ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.cart-add-button:not(:disabled):active,
.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active,
.cta-link:active,
.mobile-cart-bar:active {
  transform: scale(0.95);
}

.cart-add-button.is-added,
.primary-button.is-added {
  border-color: #1b7a3d;
  background: #1b7a3d;
  color: #fff;
  animation: added-pop 360ms ease;
}

.cart-flyer {
  position: fixed;
  z-index: 60;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  will-change: transform, opacity;
}

.cart-count.is-bumped {
  animation: cart-bump 420ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.mobile-cart-bar.is-bumped {
  animation: bar-bump 380ms ease;
}

@keyframes added-pop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes cart-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.55); background: var(--accent); }
  100% { transform: scale(1); }
}

@keyframes bar-bump {
  0% { transform: translateY(0); }
  35% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cart-add-button,
  .primary-button,
  .secondary-button,
  .cta-link,
  .mobile-cart-bar {
    transition: none;
  }

  .cart-add-button.is-added,
  .primary-button.is-added,
  .cart-count.is-bumped,
  .mobile-cart-bar.is-bumped {
    animation: none;
  }
}

.cart-item-body strong small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}


/* ---------- Galeri foto (swipe) ---------- */

.gallery {
  position: relative;
  background: var(--soft);
}

.gallery-track {
  display: flex;
  aspect-ratio: 3 / 4;
  max-height: 64vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y pinch-zoom;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

button.gallery-slide {
  cursor: zoom-in;
}

.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: none;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-nav.is-prev { left: 10px; }
.gallery-nav.is-next { right: 10px; }
.gallery.is-first .gallery-nav.is-prev,
.gallery.is-last .gallery-nav.is-next {
  visibility: hidden;
}

/* Panah hanya untuk mouse; di HP cukup digeser. */
@media (hover: hover) and (pointer: fine) {
  .gallery-nav {
    display: grid;
    place-items: center;
  }
}

.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  transition: width 160ms ease, background-color 160ms ease;
}

.gallery-dots span.is-active {
  width: 18px;
  background: #fff;
}

.gallery-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

.photo-count {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.7);
  color: #fff;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  pointer-events: none;
}

@media (min-width: 740px) {
  .dialog-content > .gallery {
    height: 100%;
  }

  .dialog-content > .gallery .gallery-track {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }
}

/* Layar penuh: foto mengisi layar dan tetap bisa digeser. */
.viewer-gallery {
  height: 100%;
  background: #000;
}

.viewer-gallery .gallery-track {
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

.viewer-gallery .gallery-count {
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-dots span {
    transition: none;
  }
}

.status-badge.is-low {
  background: var(--accent);
  color: #fff;
}

/* ---------- Halaman Lacak pesanan ---------- */

.brand-link {
  color: inherit;
  text-decoration: none;
}

.track-shell {
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 16px 16px calc(32px + var(--bottom-safe));
}

.track-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px 16px;
}

.track-card[hidden] {
  display: none;
}

.track-card h2 {
  margin: 0;
  font-size: 1.3rem;
}

.track-form {
  display: grid;
  gap: 10px;
}

.track-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.track-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  font-size: 1rem;
  text-transform: none;
}

.track-form .primary-button {
  min-height: 46px;
  cursor: pointer;
}

.track-error {
  margin: 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.track-resi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--soft);
}

.track-resi span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.track-resi strong {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.track-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding-bottom: 16px;
  color: var(--muted);
}

.track-steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.track-steps li.is-done:not(:last-child)::before {
  background: #1b7a3d;
}

.track-dot {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
}

.track-steps li.is-done .track-dot {
  border-color: #1b7a3d;
  background: #1b7a3d;
}

.track-steps li.is-current .track-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.track-steps li.is-done,
.track-steps li.is-current {
  color: var(--ink);
}

.track-steps strong {
  display: block;
  font-size: 0.9rem;
}

.track-steps small {
  color: var(--muted);
  font-size: 0.75rem;
}

.track-stopped {
  margin: 0;
  border-radius: var(--radius);
  background: #fde8eb;
  color: var(--accent);
  padding: 10px 12px;
  font-weight: 700;
}

.device-orders {
  display: grid;
  gap: 8px;
}

.device-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.device-order small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.device-order-status {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 24px 16px calc(90px + var(--bottom-safe));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
}

.contact-actions a.cta-link.back-link {
  width: auto;
  padding: 0 12px;
}


/* ---------- Pembayaran QR / transfer ---------- */

.pay-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 14px;
  text-align: center;
}

.pay-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pay-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pay-amount strong {
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}

.pay-amount .secondary-button,
.pay-bank .secondary-button {
  min-height: 36px;
}

.pay-hint,
.pay-note,
.pay-deadline {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.pay-note {
  white-space: pre-line;
  color: var(--ink);
}

.pay-qr {
  justify-self: center;
  width: min(280px, 100%);
  height: auto;
  border: 8px solid #fff;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pay-bank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
  text-align: left;
}

.pay-bank span,
.pay-bank small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.pay-bank strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
