/* --------- Plata Shop — minimal design system --------- */
:root {
  --bg: #0a0a0a;
  --surface: #111;
  --surface-2: #181818;
  --line: #232323;
  --text: #f4f4f2;
  --text-dim: #9a9a97;
  --accent: #ff5f1f; /* Plata orange */
  --accent-hover: #ff7436;
  --radius: 4px;
  --radius-lg: 12px;
  --max: 1180px;
  --gap: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

/* --------- Nav --------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--text);
  line-height: 0;
}
.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}
.brand-logo--plata {
  /* Clean SVG wordmark on transparent background */
  height: 26px;
}
.brand-logo--hn {
  height: 14px;
  /* HN.svg is authored in black; invert so it reads white on the dark header */
  filter: invert(1) brightness(1.1);
  opacity: 0.95;
}
.brand-lockup__x {
  color: var(--text-dim);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-1px);
}

.nav__meta {
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------- Product layout --------- */
.product {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 40px 80px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--gap);
  align-items: start;
}

/* --------- Carousel --------- */
.carousel {
  position: relative;
  user-select: none;
}
.carousel__viewport {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.carousel__track {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 10, 0.55);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.carousel__nav:hover {
  background: rgba(10, 10, 10, 0.8);
  border-color: var(--accent);
  color: var(--accent);
}
.carousel__nav:active { transform: translateY(-50%) scale(0.95); }
.carousel__nav--prev { left: 14px; }
.carousel__nav--next { right: 14px; }

.carousel__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dot:hover { background: #3a3a3a; }
.dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

/* --------- Info --------- */
.info { padding-top: 8px; }
.info__eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.info__title {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  line-height: 1.15;
}
.info__price {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
}
.info__currency {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 400;
  margin-left: 6px;
}
.info__desc {
  color: var(--text-dim);
  margin: 0 0 20px;
  max-width: 46ch;
}

/* --------- Rows --------- */
.row { margin-bottom: 16px; }
.row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.row__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.linklike {
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.linklike:hover { color: var(--accent); border-color: var(--accent); }

/* --------- Sizes --------- */
.sizes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.size {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.size:hover { border-color: #3a3a3a; }
.size.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* --------- Pickup --------- */
.pickup {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 20px;
}
.pickup svg { flex-shrink: 0; margin-top: 1px; }
.pickup strong { color: var(--text); font-weight: 600; }

/* --------- Form --------- */
.form { display: block; }
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.field { display: block; margin-bottom: 0; }
.field__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
}
.field input::placeholder { color: #555; }
.field__optional {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #555;
  font-weight: 400;
  text-transform: none;
  margin-left: 4px;
}

/* --------- CTA --------- */
.cta {
  margin-top: 12px;
  width: 100%;
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.05s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.cta:hover { background: var(--accent-hover); }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: 0.7; cursor: wait; }

.cta__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10,10,10,0.35);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.cta.is-loading .cta__spinner { display: inline-block; }
.cta.is-loading .cta__label { opacity: 0.6; }

@keyframes spin { to { transform: rotate(360deg); } }

.form__error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}

.legal {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

/* --------- Footer --------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 40px;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

/* --------- Modal --------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.modal__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.modal__title {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.modal__img {
  width: 100%;
  border-radius: var(--radius);
  background: #fff;
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}
.modal__close:hover { background: var(--surface-2); }

/* --------- Responsive --------- */
@media (max-width: 880px) {
  .product {
    grid-template-columns: 1fr;
    padding: 32px 20px 60px;
    gap: 32px;
  }
  .info__title { font-size: 28px; }
  .nav { padding: 18px 20px; }
  .footer { padding: 20px; }
  .brand-logo { height: 28px; }
  .brand-logo--hn { height: 11px; }
}

@media (max-width: 480px) {
  .sizes { grid-template-columns: repeat(3, 1fr); }
  .form__row { grid-template-columns: 1fr; }
  .carousel__nav { width: 34px; height: 34px; }
}

/* --------- Status pages --------- */
.status {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.status__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 32px;
  font-weight: 600;
}
.status__icon--ok { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.status__icon--err { background: rgba(255, 107, 107, 0.15); color: #ff6b6b; }
.status__icon--pending { background: rgba(255, 95, 31, 0.15); color: var(--accent); }
.status__title { font-size: 24px; font-weight: 600; margin: 0 0 10px; }
.status__text { color: var(--text-dim); max-width: 42ch; margin: 0 0 28px; }
.status__btn {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}
.status__btn:hover { background: var(--accent); color: var(--bg); }
