/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #1a1714;
  --white: #faf8f3;
  --cream: #e8dfc8;
  --charcoal: #3a3530;
  --gray-100: #f0ece2;
  --gray-200: #ddd8cc;
  --gray-500: #7a7060;
  --accent: #1a1714;
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'Inter', sans-serif;
  --radius: 4px;
  --max-w: 1060px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Typography ───────────────────────────────────────────── */
.pixel-heading {
  font-family: var(--font-pixel);
  font-size: clamp(1.1rem, 3.5vw, 2rem);
  line-height: 1.9;
}

.pixel-heading-sm {
  font-family: var(--font-pixel);
  font-size: clamp(0.6rem, 2vw, 0.9rem);
  line-height: 2;
  margin-bottom: 2rem;
}

.pixel-small {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  line-height: 2.2;
  color: var(--gray-500);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 0.9rem 1.6rem;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
  line-height: 1.8;
}

.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--charcoal); }

.btn-secondary { background: var(--white); color: var(--black); }
.btn-secondary:hover { background: var(--black); color: var(--white); }

.btn-large { padding: 1.1rem 2.2rem; font-size: 0.6rem; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.45rem; }
.btn-full { width: 100%; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  border-bottom: 2px solid var(--black);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
}

.logo-pixel {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  padding: 0.4rem 0.6rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--gray-500);
  transition: all 0.15s;
}

.lang-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

.lang-btn.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem;
  min-height: 90vh;
}

.hero-sub {
  margin: 1.5rem 0;
  font-size: 1.05rem;
  color: var(--gray-500);
}

.hero-price {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.price-usd {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
}

.price-ton {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--gray-500);
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 3/4;
  box-shadow: 4px 4px 0 var(--gray-200);
}

/* ── Color variants ───────────────────────────────────────── */
.section-colors {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
  border-top: 2px solid var(--gray-200);
}

.colors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.color-variant img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.color-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-label strong { display: block; font-size: 1rem; }
.color-label p { font-size: 0.85rem; color: var(--gray-500); }

.color-swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Sections ─────────────────────────────────────────────── */
.section-details,
.section-gallery,
.section-cta {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
  border-top: 2px solid var(--gray-200);
}

.section-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* ── Detail Cards ─────────────────────────────────────────── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.detail-card {
  padding: 1.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
}

.detail-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.detail-card h3 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.detail-card p { font-size: 0.85rem; color: var(--gray-500); }

/* ── Story (How It's Made) ────────────────────────────────── */
.section-story {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
  border-top: 2px solid var(--gray-200);
}

.story-intro {
  font-size: 1.05rem;
  color: var(--gray-500);
  margin-bottom: 2rem;
}

.story-carousel {
  overflow: hidden;
}

.story-track {
  display: flex;
  transition: transform 0.4s ease;
}

.story-card {
  min-width: 100%;
  padding: 0 1rem;
}

.story-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.story-img-wrap img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
}

.story-num {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  background: var(--black);
  color: var(--white);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.story-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.story-card p {
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 600px;
}

.story-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.story-btn {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  background: var(--black);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.story-btn:hover {
  background: var(--charcoal);
}

.story-dots {
  display: flex;
  gap: 0.5rem;
}

.story-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: background 0.2s;
  cursor: pointer;
}

.story-dot.active {
  background: var(--black);
}

/* ── Gallery ──────────────────────────────────────────────── */
.gallery-grid {
  columns: 3;
  column-gap: 12px;
}

.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--radius);
}

.gallery-item img {
  width: 100%;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: var(--radius);
}

.gallery-item:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

/* ── Order Form ───────────────────────────────────────────── */
.section-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.form-intro {
  margin-bottom: 2.5rem;
  color: var(--gray-500);
}

.order-form { display: flex; flex-direction: column; gap: 1.75rem; }

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-group > label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.15s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--black);
}

.form-hint { font-size: 0.78rem; color: var(--gray-500); }

/* Option cards (size / color selection) */
.option-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.option-card {
  cursor: pointer;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.15s;
  overflow: hidden;
}

.option-card input[type=radio] { display: none; }

.option-card.selected,
.option-card:has(input:checked) {
  border-color: var(--black);
  background: var(--gray-100);
}

.option-body {
  padding: 1rem;
}

.option-body strong { display: block; font-size: 0.9rem; }
.option-body p { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.2rem; }

.option-color { display: flex; align-items: center; gap: 0.75rem; }

.swatch {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.swatch-cream { background: #e8dfc8; border: 2px solid #c8bfa8; }
.swatch-charcoal { background: #3a3530; border: 2px solid #555; }

.form-summary {
  padding: 1rem 1.25rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: 1px solid var(--gray-200);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
}

.summary-divider {
  border-top: 1px solid var(--gray-200);
  margin: 0.4rem 0;
}

.summary-total {
  font-size: 1.05rem;
}

.payment-breakdown {
  width: 100%;
  padding: 0 0.5rem;
}

.payment-breakdown .summary-row {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* ── Payment ──────────────────────────────────────────────── */
.section-payment {
  max-width: 520px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.payment-intro { margin-bottom: 2rem; color: var(--gray-500); }

.payment-card {
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.payment-amount { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }

.ton-amount {
  font-family: var(--font-pixel);
  font-size: 1.5rem;
}

.usd-amount { font-size: 0.9rem; color: var(--gray-500); }

.qr-wrapper { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.qr-label { font-size: 0.8rem; color: var(--gray-500); }

.manual-pay { width: 100%; text-align: left; }
.manual-label { font-size: 0.85rem; margin-bottom: 0.5rem; }

.wallet-address {
  font-family: monospace;
  font-size: 0.78rem;
  background: var(--gray-100);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  word-break: break-all;
  margin-bottom: 0.75rem;
  border: 1px solid var(--gray-200);
}

.payment-instructions { width: 100%; text-align: left; }
.payment-instructions h3 { font-size: 0.9rem; margin-bottom: 0.75rem; }
.payment-instructions ol { padding-left: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.payment-instructions li { font-size: 0.9rem; }

/* ── Success ──────────────────────────────────────────────── */
.section-success {
  max-width: 520px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.success-card {
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.success-dino { font-size: 4rem; }

.order-summary {
  width: 100%;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-200);
}

.order-row:last-child { border-bottom: none; }
.order-row span { color: var(--gray-500); }

.success-next { width: 100%; text-align: left; }
.success-next h3 { font-size: 0.9rem; margin-bottom: 0.75rem; }
.success-next ol { padding-left: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }

.success-note { font-size: 0.85rem; color: var(--gray-500); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert-error { background: #fff0f0; border: 1px solid #ffcccc; color: #cc0000; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--gray-200);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 4rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 800px) {
  .gallery-grid { columns: 2; }
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.5rem;
    min-height: auto;
    gap: 2rem;
  }

  .hero-image { order: -1; }

  .colors-grid { grid-template-columns: 1fr; }

  .option-cards { grid-template-columns: 1fr; }

  .site-header { padding: 1rem 1.5rem; }

  .section-colors,
  .section-details,
  .section-gallery,
  .section-cta,
  .section-form,
  .section-payment,
  .section-success { padding: 2.5rem 1.5rem; }

  .gallery-grid { columns: 2; }
}

@media (max-width: 420px) {
  .gallery-grid { columns: 1; }
}
