:root {
  color-scheme: dark;
  font-family: Arial, sans-serif;
  background: #111;
  color: #fff;
  --grid-line: #ffffff13;
  --edge: #ffffff38;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 38px 38px;
}

.storefront {
  color-scheme: light;
  background: #fff;
  color: #111;
  --grid-line: #0003;
}

.storefront body { min-height: 100vh; }

a { color: inherit; }

main {
  width: min(calc(100% - 32px), 1080px);
  margin-inline: auto;
  padding: clamp(30px, 7vw, 76px) 0 7rem;
}
.store-credit { margin: 12px 0 0; font-size: clamp(.875rem, 2vw, 1rem); line-height: 1.4; }

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: .93;
  letter-spacing: -.045em;
}

#sticker-checkout {
  display: grid;
  gap: 12px;
  width: min(calc(100% - 28px), 680px);
  margin: 0 auto;
  padding: 18px 0 calc(180px + env(safe-area-inset-bottom));
}
.checkout-status { flex-basis: 100%; margin: 0; color: #ff9694; }
.checkout-back {
  width: fit-content;
  padding-block: 10px;
  font-size: .875rem;
  font-weight: 700;
}
.checkout-actions {
  position: fixed;
  z-index: 2;
  bottom: 0;
  inset-inline: 0;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--edge);
  background: #111;
}
.checkout-actions-inner {
  display: grid;
  gap: 8px;
  width: min(100%, 680px);
  margin-inline: auto;
}
.checkout-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.checkout-contact label { display: grid; gap: 6px; font-size: .875rem; }
.checkout-contact input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: #222;
  color: #fff;
  font: inherit;
  font-size: 1rem;
}
.checkout-note { margin: 0; font-size: .875rem; text-align: center; }
.checkout-note:empty { display: none; }
.checkout-invoice {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #111;
}
.checkout-send {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 10px;
  border-radius: 6px;
  background: #25d366;
  color: #102419;
  border: 0;
  font: 700 .94rem Arial, sans-serif;
  cursor: pointer;
}
.checkout-send:disabled { opacity: .65; cursor: default; }

.checkout-thanks {
  width: min(380px, calc(100% - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: #191919;
  color: #fff;
  text-align: center;
}
.checkout-thanks::backdrop { background: #000a; }
.checkout-thanks p { margin: 12px 0 0; font-size: 1.125rem; font-weight: 800; line-height: 1.5; }
.checkout-thanks img { display: block; margin-inline: auto; }
.checkout-thanks-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

.sticker-product {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  margin: 28px 0 48px;
  max-width: 930px;
  padding: clamp(12px, 2vw, 22px);
  border: 1px solid #111113;
  border-radius: 10px;
  background: #fff;
}
/* The preview uses one image. Each layer clips to one of its printed stamps. */
.sticker-card-preview {
  position: relative;
  overflow: hidden;
  background: #111113;
}
.sticker-card-preview img { display: block; width: 100%; height: auto; }
.sticker-reveal { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .sticker-card-preview img {
    position: relative;
    z-index: 1;
    animation: sticker-card-appear 320ms 1220ms ease-out both;
  }
  .sticker-reveal {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url("/assets/stamp-store/emirates-sticker-card.webp") center / 100% 100% no-repeat;
    animation: sticker-appear 380ms var(--reveal-delay) cubic-bezier(.2,.75,.35,1) both;
  }
  .sticker-reveal-first {
    clip-path: inset(29% 66% 19% 4%);
    transform-origin: 19% 55%;
    --reveal-delay: 0ms;
  }
  .sticker-reveal-second {
    clip-path: inset(29% 35% 19% 35%);
    transform-origin: 50% 55%;
    --reveal-delay: 330ms;
  }
  .sticker-reveal-third {
    clip-path: inset(29% 4% 19% 66%);
    transform-origin: 81% 55%;
    --reveal-delay: 660ms;
  }
}
@keyframes sticker-appear {
  from { opacity: 0; transform: translateY(6%) scale(.8); }
  72% { opacity: 1; transform: translateY(0) scale(1.035); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sticker-card-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sticker-product h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 3vw, 2rem); }
.sticker-product p { margin: 0; line-height: 1.5; }
.sticker-product-details {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto auto 1fr;
  text-align: left;
}
.sticker-product-purchase { align-self: end; margin-top: clamp(12px, 3vw, 22px); }
.sticker-product-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 3px 3px 8px;
  border: 1px solid #111;
  background: #fff;
}
.sticker-product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 5px;
  white-space: nowrap;
}
.sticker-product-price strong { font-weight: 800; }
.sticker-product-purchase .checkout-status { margin-top: 8px; color: #a51616; }
.sticker-product button {
  min-height: 44px;
  padding: 8px 20px;
  border: 2px solid #111;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.sticker-product button:disabled { opacity: .65; cursor: default; }
@media (max-width: 650px) {
  .sticker-product {
    grid-template-columns: minmax(0, 1.6fr) minmax(126px, 1fr);
    align-items: start;
    gap: 10px;
  }
  .sticker-product h2 { margin-bottom: 6px; font-size: clamp(1rem, 4vw, 1.35rem); }
  .sticker-product p { font-size: .875rem; line-height: 1.35; }
  .sticker-product-price-box { gap: 5px; padding-inline-start: 6px; font-size: .75rem; }
  .sticker-product-price-box button { padding-inline: 6px; }
}

@media (max-width: 480px) {
  main { padding-top: 30px; }
  h1 { font-size: clamp(2.4rem, 10vw, 4rem); }
}
