/* components.css — screen-specific layout. Loaded after styles.css. */

/* ---------- Home ---------- */
.hero-split { display: flex; gap: 48px; align-items: center; flex-wrap: wrap; }
@media (max-width: 860px) { .hero-split { gap: 28px; } }

.showcase-band {
  display: flex; gap: 28px; justify-content: center; align-items: flex-end; flex-wrap: wrap;
  margin-top: 56px; padding: 12px;
}
.showcase-photo { max-width: 1080px; margin: 40px auto 0; position: relative; }

/* Continuous scrolling band of keychains */
.band-marquee {
  margin: 40px 0 0;
  overflow: hidden;
  /* reserve the band's height before the photo loads, so nothing jumps */
  min-height: clamp(180px, 17vw, 240px);
  animation: band-fadein .9s ease both;
  /* fade the left/right edges into the white background */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
@keyframes band-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.band-track {
  display: flex;
  width: max-content;
  animation: band-scroll 36s linear infinite;
}
.band-track:hover { animation-play-state: paused; }
.band-unit {
  position: relative;
  flex: 0 0 auto;
  width: clamp(820px, 78vw, 1080px);
}
@keyframes band-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .band-track { animation: none; }
}
.band-qr { position: absolute; }
.section--bandhero { background: #fff; }
.band-caption { text-align: center; max-width: 900px; margin: 22px auto 0; }
.showcase-item { animation: fadeUp .6s ease both; animation-delay: calc(var(--d) * 80ms); }
@media (prefers-reduced-motion: reduce) { .showcase-item { animation: none; } }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.product-card { overflow: hidden; display: flex; flex-direction: column; position: relative; transition: box-shadow .2s, transform .2s; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card--badged { border-color: var(--line-strong); }
.product-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  padding: 5px 11px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.product-badge--popular { background: var(--accent); color: #fff; }
.product-badge--best { background: #F0832B; color: #fff; }
.product-card__media {
  aspect-ratio: 4 / 3; background: var(--surface-2); position: relative;
  border-bottom: 1px solid var(--line);
}
.product-card__media image-slot { position: absolute; inset: 0; }
.product-card__body { padding: 22px; display: flex; flex-direction: column; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.step-delay { margin-top: 12px; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, #fff); border-radius: 999px; padding: 4px 12px; }

/* shaded home zone: packs → bottom on light gray, cards stay white */
.home-shaded { background: var(--surface-2); }

/* payment page: gray bg, white cards (like home + studio) */
.pay-page { background: var(--surface-2); min-height: 100vh; }
.cart-page { background: var(--surface-2); min-height: 100vh; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px;
}

.final-cta {
  background: var(--ink); border-radius: var(--r-xl); padding: clamp(40px, 7vw, 72px);
  text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.final-cta__slides { position: absolute; inset: 0; }
.final-cta__slides.is-draggable { cursor: grab; touch-action: none; }
.final-cta__slides.is-draggable:active { cursor: grabbing; }
.final-cta__slide {
  position: absolute; inset: 0; background-size: cover; background-position: center 35%;
  opacity: 0; transition: opacity 1.2s ease; pointer-events: none;
}
.final-cta__slide.is-active { opacity: 1; }
.final-cta::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.42); pointer-events: none;
}
.final-cta > h2, .final-cta > button { position: relative; z-index: 1; }

/* ---------- Customize ---------- */
.cust-layout { display: grid; grid-template-columns: 1fr 360px; gap: 34px; margin-top: 30px; align-items: start; }
@media (max-width: 900px) { .cust-layout { grid-template-columns: 1fr; } }
.cust-form { display: flex; flex-direction: column; gap: 14px; }
.form-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.model-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .model-pick { grid-template-columns: 1fr; } }
.model-opt {
  text-align: left; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.model-opt:hover { border-color: var(--ink-faint); }
.model-opt.is-active { border-color: var(--accent); background: var(--accent-soft); }
.cust-preview { position: sticky; top: 76px; }
.colors-block { margin-top: 14px; }
.preview-row { display: flex; gap: 14px; align-items: flex-start; padding: 4px 0 6px; }
.preview-row > div:first-child { flex-shrink: 0; }
.colors-side { display: flex; gap: 12px; flex: 1; min-width: 0; padding-top: 2px; }
.colors-side__group { display: flex; flex-direction: column; gap: 9px; align-items: center; flex: 1; min-width: 0; }
.colors-side__lbl { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.swatches--v { flex-direction: column; gap: 9px; align-items: center; }
.swatches--v .swatch { width: 30px; height: 30px; }
.preview-title { margin: 0 0 14px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.block-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.privacy-hint { margin-top: 14px; font-size: 11.5px; line-height: 1.45; color: var(--ink-faint); display: flex; gap: 6px; }
.privacy-hint::before { content: "🔒"; filter: grayscale(1); opacity: .5; }
@media (max-width: 900px) { .cust-preview { position: static; } }
.preview-card { padding: 22px; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-line { display: flex; gap: 16px; align-items: center; padding: 20px 0; }
.cart-line__qrs { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.cart-line__qr { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex-shrink: 0; line-height: 0; }
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
@media (max-width: 520px) {
  .cart-line { flex-wrap: wrap; }
  .cart-line__right { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
}
.stepper--sm button { width: 32px; height: 32px; font-size: 16px; }
.stepper--sm .val { min-width: 34px; font-size: 14px; }
.linkbtn { background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--accent); padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn--danger { color: var(--ink-soft); }
.linkbtn--danger:hover { color: #d23a31; }
.linkbtn--muted { color: var(--ink-soft); font-size: 12px; }
.linkbtn--muted:hover { color: var(--accent); }

/* ---------- Payment ---------- */
.pay-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; margin-top: 6px; }
@media (max-width: 860px) { .pay-layout { grid-template-columns: 1fr; } }
.pay-form { display: flex; flex-direction: column; gap: 16px; }
.pay-block { padding: 22px; }
.pay-block__title { font-weight: 600; font-size: 16px; margin-bottom: 16px; }
.pay-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .pay-grid-3 { grid-template-columns: 1fr 1fr; } }
.cardbrands { display: flex; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; color: var(--ink-soft); margin-top: 14px; }

/* ---------- Confirmation ---------- */
.conf-check {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 36px; font-weight: 700; animation: pop .5s cubic-bezier(.2,.8,.3,1.2) both;
}
@keyframes pop { from { transform: scale(.7); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .conf-check { animation: none; } }

/* ---------- Admin ---------- */
.admin-table { overflow: hidden; }
.admin-row {
  display: grid; grid-template-columns: 1.1fr 1.4fr 1.2fr 0.8fr 0.8fr 1fr 0.7fr;
  gap: 14px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line);
}
.admin-row--head { border-top: none; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; padding: 12px 22px; }
.status-select {
  font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 5px 10px; background: var(--surface); cursor: pointer; color: var(--ink);
}
.badge--new { color: var(--accent); border-color: var(--accent); }
.badge--printing { color: #b8860b; border-color: #e0c068; }
.badge--shipped { color: #1f9d57; border-color: #7bd0a0; }

@media (max-width: 760px) {
  .admin-row--head { display: none; }
  .admin-row { grid-template-columns: 1fr 1fr; padding: 16px; gap: 10px 14px; }
  .admin-row > div::before {
    content: attr(data-label); display: block; font-size: 10.5px; text-transform: uppercase;
    letter-spacing: .04em; color: var(--ink-faint); margin-bottom: 2px; font-weight: 600;
  }
  .admin-row > div:last-child { grid-column: 1 / -1; text-align: left !important; }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,22,30,.4); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px; z-index: 100; animation: modalIn .2s ease both;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.icon-btn { border: none; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.icon-btn:hover { background: var(--line); }
.modal-body { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.detail-item { display: flex; gap: 16px; align-items: flex-start; }
@media (max-width: 480px) { .detail-item { flex-direction: column; } }
.code-block {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; background: var(--surface-2);
  border-radius: 10px; padding: 10px 12px; margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; color: var(--ink-soft);
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 480px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 600; margin-bottom: 5px; }

/* ---------- Packs: model picker + keychain tabs + preview minis ---------- */
.model-pick--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .model-pick--3 { grid-template-columns: 1fr; } }
.model-tag {
  display: inline-block; margin-bottom: 7px; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px;
}
.model-tag--popular { background: var(--accent); color: #fff; }
.model-tag--best { background: #F0832B; color: #fff; }

.unit-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.unit-tab {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  transition: border-color .15s, background .15s, color .15s;
}
.unit-tab:hover { border-color: var(--ink-faint); }
.unit-tab.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.unit-tab.is-invalid { border-color: #e0473e; color: #c43a31; }
.unit-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

.mini-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.mini-tag {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 11px; padding: 5px;
  cursor: pointer; line-height: 0; transition: border-color .15s, transform .1s, box-shadow .15s;
}
.mini-tag:hover { transform: translateY(-1px); }
.mini-tag.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
