:root {
  --analog-blue: #5A6D91;
}

/* ----------------------------------
   GLOBAL
---------------------------------- */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  background: #eee;
  font-family: "Courier New", monospace;

  /* ✅ REQUIRED for Stripe wheel / trackpad scrolling */
  overflow-y: auto;
  overflow-x: hidden;
}


body {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Prevent background scroll bleed */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #eee;
  z-index: -1;
}

/* Utility */
.hidden {
  display: none !important;
}

/* ----------------------------------
   POLAROID FRAME
---------------------------------- */
.polaroid-frame {
  width: min(95vw, 430px);
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  margin: 0 auto;
}


/* ----------------------------------
   POLAROID WINDOW (AUTHORITATIVE SIZE)
---------------------------------- */
.polaroid-window {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;

  /* 🔑 MUST allow scroll for iframe */
  overflow-y: auto;
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;
}
/* =========================================================
   STRIPE EMBEDDED CHECKOUT (FINAL, SCROLL-SAFE)
   ========================================================= */

#cart-root {
  height: 100%;
}

#stripe-checkout-wrapper {
  height: 100%;
}

#stripe-checkout {
  height: 100%;
}

/* Stripe iframe fills container and scrolls internally */
#stripe-checkout iframe {
  width: 100%;
  height: 100%;
  border: none;
}


/* Hide scrollbars (keep scroll functionality) */
.polaroid-window::-webkit-scrollbar,
.vertical-scroll::-webkit-scrollbar,
.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.polaroid-window,
.vertical-scroll,
.horizontal-scroll {
  scrollbar-width: none;
}

/* ----------------------------------
   VIEW ROOT
---------------------------------- */
#view-root {
  width: 100%;
  height: 100%;
}

/* ----------------------------------
   SCROLL CONTAINERS
---------------------------------- */
.vertical-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.horizontal-scroll {
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
}

/* ----------------------------------
   SCROLL ITEMS
---------------------------------- */
.scroll-item {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}

.vertical-scroll .scroll-item img,
.horizontal-scroll img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Horizontal pan spacing */
.horizontal-scroll .scroll-item {
  flex: 0 0 150%;
  margin-right: 60px;
}

.horizontal-scroll .scroll-item:last-child {
  margin-right: 0;
}

/* ----------------------------------
   HOME STATUS LABEL
---------------------------------- */
.home-status-label {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  /* background: rgba(255,255,255,0.55); */
  font-size: 11px;
  color: var(--analog-blue);
  text-transform: lowercase;
  pointer-events: none;
}
.home-price-label {
  margin-top: 2px;
  font-size: 10px;
  opacity: 0.8;
}

/* ----------------------------------
   CAPTION
---------------------------------- */
.polaroid-caption {
  min-height: 40px;
  padding: 6px 0;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.caption-title {
  font-size: 13px;
}

.caption-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

/* ----------------------------------
   NAVIGATION
---------------------------------- */
.polaroid-nav {
  margin-top: 12px;
  min-height: 38px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.polaroid-nav.polaroid-nav--center {
  justify-content: center;
}

.nav-center {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-arrow,
.nav-back,
.nav-add,
.nav-arrange,
.nav-cart {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  appearance: none !important;
  cursor: pointer;

  font-size: 20px;
  color: var(--analog-blue);
}

.nav-back,
.nav-arrange,
.nav-cart {
  font-size: 17px;
  position: relative;
}

.nav-arrange {
  width: 28px;
  height: 24px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0;
}

.nav-arrange span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
}

.nav-add {
  width: 30px;
  height: 30px;
  font-size: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow.is-disabled {
  visibility: hidden;
  pointer-events: none;
}
.nav-forward {
    font-family: "Courier New", monospace;
  background: none;
  border: none;
  font-size: 17px;
  cursor: pointer;
  line-height: -5;
}

/* ----------------------------------
   CART BADGE
---------------------------------- */
.cart-icon {
  font-size: 18px;
  line-height: 1;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;

  background: #000;
  color: #fff;

  font-size: 9px;
  line-height: 14px;
  border-radius: 999px;
}

.cart-badge.is-empty {
  display: none;
}

/* ----------------------------------
   CART VIEW
---------------------------------- */
.cart-view {
  padding: 1rem;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-weight: bold;
}

.checkout-btn {
  margin-top: 1rem;
  width: 100%;
  padding: 0.75rem;
  font-family: "Courier New", monospace;
  background: none;
  border: 1px solid var(--analog-blue);
  color: var(--analog-blue);
  cursor: pointer;
}
/* ----------------------------------
   TERMINAL — CART
---------------------------------- */

.cart-view {
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
}

.cart-view > div:first-child {
  margin-bottom: 12px;
}

/* Order header */
.cart-view .order-header {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 10px;
}

/* Cart lines */
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px; /* more breathing room */
  align-items: center;
  margin-bottom: 6px;
}


/* Quantity controls */
.cart-line-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  background: none;
  border: 1px solid #999;  /* thin terminal outline */
  font-family: inherit;
  font-size: 12px;
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
}


.qty-btn:hover {
  opacity: 0.6;
}

/* Total block */
.cart-total {
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px dashed #999;
  font-size: 12px;
}

/* Checkout button — terminal style */
.checkout-btn {
  margin-top: 14px;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.checkout-btn::before {
  content: "> ";
}

.checkout-btn:hover {
  opacity: 0.7;
}

/* ----------------------------------
   TERMINAL - ARRANGE OVERLAY
---------------------------------- */
.arrange-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.66);
  color: #f5f1e8;
  padding: 18px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrange-overlay[hidden] {
  display: none;
}

.arrange-terminal {
  width: min(100%, 330px);
  max-height: 100%;
  overflow: auto;
  border: 1px solid rgba(245, 241, 232, 0.45);
  background: rgba(0, 0, 0, 0.22);
  padding: 14px;
  box-sizing: border-box;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.arrange-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(245, 241, 232, 0.36);
}

.arrange-close,
.arrange-option {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.arrange-close {
  color: #fff;
  text-transform: uppercase;
}

.arrange-group {
  padding: 13px 0 0;
}

.arrange-label {
  color: rgba(245, 241, 232, 0.68);
  margin-bottom: 7px;
}

.arrange-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.arrange-option {
  border: 1px solid rgba(245, 241, 232, 0.28);
  padding: 4px 7px;
  color: rgba(245, 241, 232, 0.82);
  text-transform: lowercase;
}

.arrange-option::before {
  content: "> ";
  opacity: 0;
}

.arrange-option.is-active {
  border-color: rgba(245, 241, 232, 0.82);
  color: #fff;
}

.arrange-option.is-active::before {
  opacity: 1;
}

.arrange-current {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(245, 241, 232, 0.36);
  color: rgba(245, 241, 232, 0.72);
}
/* ----------------------------------
   TERMINAL — CONFIRMATION
---------------------------------- */

.terminal {
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
}

.terminal p {
  margin: 0 0 6px 0;
}

.nav-arrow.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
