/* Promo page (1.9.0), Shopee "Voucher Saya" style: code bar, tabs, tickets with a coloured serrated stub,
   S&K sheet, and the ?promo=ID voucher page with its products and a bottom progress bar. */
.duera-vp {
  --vp-ink: var(--dark, #311b14);
  --vp-muted: #311b14a6;
  --vp-line: #311b1424;
  --vp-soft: #f6f3ef;
  --vp-brand: var(--duera-burgundy, #4f0a09);
  --vp-discount: #4f0a09;
  --vp-shipping: #0f5e57;
  --vp-sale: #8a4b12;
  padding-bottom: 96px;
  color: var(--vp-ink);
}

/* Reset at class specificity (1.9.1): beats global element rules, later class rules keep their margins. */
.duera-vp :where(h1, h2, h3, p, dl, dd) {
  margin: 0;
}

.duera-vp-shell {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Head: eyebrow → title → lead with proportional, consistent spacing. */
.duera-vp-head {
  padding: 56px 0 32px;
}

.duera-vp-eyebrow {
  margin-bottom: 14px;
  color: var(--vp-brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.duera-vp-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.duera-vp-lead {
  max-width: 560px;
  margin-top: 16px;
  color: var(--vp-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Code bar */
.duera-vp-code {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--vp-line);
  border-radius: 12px;
  background: #fff;
}

.duera-vp-code:focus-within {
  border-color: var(--vp-brand);
  box-shadow: 0 0 0 1px var(--vp-brand);
}

.duera-vp-code-icon {
  display: grid;
  color: var(--vp-brand);
}

.duera-vp-code-icon svg {
  width: 22px;
  height: 22px;
}

.duera-vp-code input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  text-transform: uppercase;
}

.duera-vp-code input::placeholder {
  color: #311b1480;
  text-transform: none;
}

.duera-vp-code button {
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--vp-brand);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.duera-vp-code button:disabled {
  background: #d6ccc5;
  cursor: default;
}

.duera-vp-feedback {
  max-width: 560px;
  margin-top: 10px;
  color: #8a1c13;
  font-size: 14px;
}

/* Tabs */
.duera-vp-tabs {
  display: flex;
  gap: 4px;
  margin: 36px 0 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--vp-line);
  scrollbar-width: none;
}

.duera-vp-tabs::-webkit-scrollbar {
  display: none;
}

.duera-vp-tabs button {
  flex: none;
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--vp-muted);
  background: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.duera-vp-tabs button span {
  font-weight: 400;
}

.duera-vp-tabs button[aria-selected="true"] {
  border-bottom-color: var(--vp-brand);
  color: var(--vp-brand);
  font-weight: 600;
}

/* Tickets */
.duera-vp-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.duera-vp-ticket {
  --vp-tone: var(--vp-discount);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 120px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px #311b1414, 0 0 0 1px var(--vp-line);
}

.duera-vp-ticket[hidden] {
  display: none;
}

.duera-vp-ticket.is-shipping {
  --vp-tone: var(--vp-shipping);
}

.duera-vp-ticket.is-sale {
  --vp-tone: var(--vp-sale);
}

.duera-vp-ticket.is-scheduled .duera-vp-stub {
  opacity: 0.75;
}

/* Coloured stub with a serrated left edge, like a torn ticket. */
.duera-vp-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px 14px 16px;
  color: #fff;
  background: var(--vp-tone);
  text-align: center;
}

.duera-vp-stub::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: radial-gradient(circle at 0 50%, #fcfcfc 3px, transparent 3.5px) 0 0 / 6px 10px repeat-y;
}

.duera-vp-stub-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff26;
}

.duera-vp-stub-icon svg {
  width: 24px;
  height: 24px;
}

.duera-vp-stub-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Body: title + minimum next to the button; tags, quota and dates use the full width below, so the button
   never covers text. */
.duera-vp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
  padding: 16px 16px 16px 18px;
}

.duera-vp-copy {
  display: contents;
}

.duera-vp-copy > * {
  grid-column: 1;
  min-width: 0;
}

.duera-vp-copy > :is(.duera-vp-tags, .duera-vp-quota, .duera-vp-meta) {
  grid-column: 1 / -1;
}

.duera-vp-action {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.duera-vp-flag {
  display: inline-block;
  margin-right: 2px;
  padding: 1px 7px;
  border-radius: 4px;
  color: #fff;
  background: #c0441c;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 2px;
}

.duera-vp-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.duera-vp-min {
  color: var(--vp-ink);
  font-size: 14px;
  line-height: 1.4;
}

.duera-vp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.duera-vp-tag {
  max-width: 100%;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid var(--vp-tone);
  border-radius: 4px;
  color: var(--vp-tone);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duera-vp-tag.is-plain {
  border-color: var(--vp-line);
  color: var(--vp-muted);
}

.duera-vp-quota {
  display: block;
  height: 5px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece4de;
}

.duera-vp-quota span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e3a02f, #c0441c);
}

.duera-vp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
  color: var(--vp-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

/* Clock + "Berlaku dalam 3 jam" stay together on one line. */
.duera-vp-when {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.duera-vp-hot {
  color: #c0441c;
  font-weight: 600;
}

.duera-vp-clock {
  flex: none;
  width: 14px;
  height: 14px;
}

.duera-vp-terms-link {
  padding: 0;
  border: 0;
  color: #1f5fbf;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.duera-vp-btn {
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--vp-tone);
  border-radius: 6px;
  color: var(--vp-tone);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.duera-vp-btn:hover {
  color: #fff;
  background: var(--vp-tone);
}

.duera-vp-btn[aria-busy="true"] {
  opacity: 0.6;
}

.duera-vp-btn.is-done {
  border-color: #1b6b3a;
  color: #1b6b3a;
}

.duera-vp-btn.is-done:hover {
  color: #fff;
  background: #1b6b3a;
}

.duera-vp-btn.is-muted {
  border-color: var(--vp-line);
  color: var(--vp-muted);
  background: var(--vp-soft);
  cursor: default;
}

.duera-vp-empty {
  padding: 40px 16px;
  border: 1px dashed var(--vp-line);
  border-radius: 12px;
  color: var(--vp-muted);
  text-align: center;
}

/* Voucher page (?promo=ID) */
.duera-vp.is-detail {
  padding-top: 28px;
}

.duera-vp-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--vp-muted);
  font-size: 14px;
  text-decoration: none;
}

.duera-vp-back svg {
  width: 18px;
  height: 18px;
}

.duera-vp.is-detail .duera-vp-ticket {
  max-width: 640px;
}

.duera-vp-products-title {
  margin: 28px 0 18px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.duera-vp-more {
  display: table;
  margin: 28px auto 0;
  padding: 12px 22px;
  border: 1px solid var(--vp-line);
  border-radius: 10px;
  color: var(--vp-ink);
  font-weight: 600;
  text-decoration: none;
}

.duera-vp-more.is-plain {
  margin-top: 10px;
  border: 0;
  color: var(--vp-muted);
  font-weight: 500;
}

.duera-vp:has(.duera-vp-bar) {
  padding-bottom: 120px;
}

.duera-vp-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--vp-line);
  background: #fff;
  box-shadow: 0 -6px 24px #311b141a;
}

.duera-vp-bar-copy {
  display: grid;
  flex: 1;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 12px max(16px, calc((100vw - 1080px) / 2));
}

.duera-vp-bar-copy p {
  font-size: 14px;
  line-height: 1.4;
}

.duera-vp-bar-track {
  position: relative;
  display: block;
  max-width: 520px;
  height: 8px;
  border-radius: 999px;
  background: #ece4de;
}

.duera-vp-bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--vp-brand);
}

.duera-vp-bar-track.is-done > span {
  background: #1b6b3a;
}

.duera-vp-bar-track svg {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  color: #fff;
  background: #1b6b3a;
  transform: translateY(-50%);
}

.duera-vp-bar-cart {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 150px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border: 0;
  color: #fff;
  background: var(--vp-brand);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.duera-vp-bar-cart:hover {
  color: #fff;
  background: #3a0706;
}

.duera-vp-bar-cart svg {
  width: 24px;
  height: 24px;
}

.duera-vp-bar-cart em {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: var(--vp-brand);
  background: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
}

/* S&K sheet */
html.duera-vp-locked {
  overflow: hidden;
}

.duera-vp-sheet {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: min(86dvh, 760px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  color: var(--vp-ink);
  background: #fff;
}

.duera-vp-sheet[open] {
  display: flex;
  flex-direction: column;
}

.duera-vp-sheet::backdrop {
  background: #1d0e0a80;
}

.duera-vp-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px 14px 20px;
  border-bottom: 1px solid var(--vp-line);
}

.duera-vp-sheet-head h2 {
  font-size: 17px;
  font-weight: 600;
}

.duera-vp-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--vp-ink);
  background: none;
  cursor: pointer;
}

.duera-vp-icon-btn:hover {
  background: var(--vp-soft);
}

.duera-vp-icon-btn svg {
  width: 20px;
  height: 20px;
}

.duera-vp-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.duera-vp-sheet-banner {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.duera-vp-sheet-ticket {
  --vp-tone: var(--vp-discount);
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 20px 4px;
  padding: 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--vp-tone);
}

.duera-vp-sheet-ticket.is-shipping {
  --vp-tone: var(--vp-shipping);
}

.duera-vp-sheet-ticket.is-sale {
  --vp-tone: var(--vp-sale);
}

.duera-vp-sheet-ticket > span:last-child {
  display: grid;
  gap: 2px;
}

.duera-vp-sheet-ticket strong {
  font-size: 17px;
}

.duera-vp-sheet-ticket small {
  font-size: 13px;
  opacity: 0.9;
}

.duera-vp-sheet-list {
  display: grid;
  gap: 18px;
  padding: 16px 20px 20px;
}

.duera-vp-sheet-list dt {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}

.duera-vp-sheet-list dd {
  color: #311b14cc;
  font-size: 14px;
  line-height: 1.6;
}

.duera-vp-sheet-list ul {
  margin: 0;
  padding-left: 18px;
}

.duera-vp-sheet-list a {
  color: inherit;
}

.duera-vp-sheet-code {
  display: flex;
  align-items: center;
  gap: 10px;
}

.duera-vp-sheet-code code {
  padding: 4px 10px;
  border: 1px dashed var(--vp-brand);
  border-radius: 6px;
  color: var(--vp-brand);
  background: #fbf6f4;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.duera-vp-sheet-code button {
  padding: 6px 12px;
  border: 1px solid var(--vp-line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.duera-vp-sheet-foot {
  position: sticky;
  bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vp-line);
  background: #fff;
}

.duera-vp-wide {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--vp-brand);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.duera-vp-wide:hover {
  color: #fff;
  background: #3a0706;
}

.duera-vp-wide.is-muted {
  color: var(--vp-muted);
  background: var(--vp-soft);
  cursor: default;
}

.duera-vp-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 1300;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: #2a1712f2;
  font-size: 14px;
  line-height: 1.45;
  transform: translateX(-50%);
}

.duera-vp:has(.duera-vp-bar) .duera-vp-toast {
  bottom: 96px;
}

@media (max-width: 860px) {
  .duera-vp-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .duera-vp-shell {
    padding-inline: 15px;
  }

  .duera-vp-head {
    padding: 36px 0 24px;
  }

  .duera-vp-eyebrow {
    margin-bottom: 10px;
  }

  .duera-vp-lead {
    margin-top: 12px;
  }

  .duera-vp-head h1 {
    font-size: 30px;
  }

  .duera-vp-lead {
    font-size: 15px;
  }

  .duera-vp-tabs {
    margin: 28px -15px 16px;
    padding-inline: 9px;
  }

  .duera-vp-tabs button {
    padding: 11px 10px;
    font-size: 14px;
  }

  .duera-vp-list {
    gap: 10px;
  }

  .duera-vp-ticket {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 112px;
  }

  .duera-vp-stub-icon {
    width: 40px;
    height: 40px;
  }

  .duera-vp-stub-label {
    font-size: 10.5px;
  }

  .duera-vp-body {
    gap: 5px 10px;
    padding: 14px 12px 14px 14px;
  }

  .duera-vp-title {
    font-size: 15.5px;
  }

  .duera-vp-min {
    font-size: 13px;
  }

  .duera-vp-btn {
    min-width: 64px;
    height: 34px;
    padding: 0 10px;
    font-size: 13.5px;
  }

  .duera-vp-bar-cart {
    min-width: 108px;
    padding-inline: 10px;
    font-size: 12.5px;
  }

  .duera-vp-bar-copy p {
    font-size: 13px;
  }

  .duera-vp-sheet {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-height: 88dvh;
    margin: 0;
    border-radius: 16px 16px 0 0;
  }
}
