/* ==========================================================================
   ACATENA — Product page
   ========================================================================== */

@font-face {
  font-family: "Stretch Pro";
  src: url("assets/fonts/StretchPro.otf?v=20260519-6") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --fg: #f5f5f3;
  --muted: #9a9a93;
  --accent: #d8ff4a;
  --line: rgba(255, 255, 255, 0.12);
  --font-display: "Stretch Pro", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Product copy renders clean — Stretch Pro collapses doubled letters via
     its ligatures, so all ligatures are OFF here. The stretched-wordmark
     look is re-enabled only on the brand (see .nav__brand / .brandmark). */
  font-feature-settings: normal;
  font-variant-ligatures: none;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 1rem) clamp(1.25rem, 4vw, 3rem) 1rem;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: 0.2em;
  font-weight: 600;
}

/* Brand wordmark — the only place that uses Stretch Pro's stretched
   ligatures: doubled letters (the NN in ACATENNA) collapse into one
   wide glyph, matching the landing's logo treatment. */
.nav__brand,
.brandmark {
  font-feature-settings: "calt" 1, "liga" 1, "dlig" 1, "ss01" 1, "ss02" 1, "ss03" 1;
  font-variant-ligatures: common-ligatures contextual discretionary-ligatures;
}

.nav__cart {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.45rem 0.3rem;
}

.nav__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   PRODUCT LAYOUT
   ========================================================================== */

.product {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  align-items: start;
}

/* ==========================================================================
   GALLERY
   ========================================================================== */

.gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(165deg, #181818, #0c0c0c);
  overflow: hidden;
}

@media (min-width: 900px) {
  .gallery {
    position: sticky;
    top: 6rem;
  }
}

.gallery__glow {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 255, 74, 0.16), transparent 70%);
  filter: blur(24px);
}

.gallery__img {
  position: relative;
  width: 100%;
  max-width: 470px;
  height: auto;
  filter: drop-shadow(0 30px 54px rgba(0, 0, 0, 0.65));
  transition: opacity 0.25s ease;
}

/* ==========================================================================
   INFO
   ========================================================================== */

.info {
  padding-top: 0.5rem;
}

.info__category {
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.95rem;
}

.info__name {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.info__price {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  margin-top: 0.75rem;
}

.info__desc {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.65;
  color: var(--muted);
  margin-top: 1.4rem;
  max-width: 48ch;
}

/* ==========================================================================
   VARIANTS
   ========================================================================== */

.variant {
  margin-top: 1.9rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}

.variant__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.05rem;
}

.variant__label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.variant__value {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--fg);
}

.variant__guide {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.16s ease;
}

.variant__guide:hover {
  color: var(--fg);
}

/* --- Colour swatches --- */

.swatches {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.swatch {
  position: relative;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.18s ease;
}

.swatch::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.swatch:hover {
  transform: scale(1.09);
}

.swatch.is-active::after {
  opacity: 1;
}

/* --- Size buttons --- */

.sizes {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.size {
  min-width: 3.3rem;
  height: 3.1rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.size:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

.size.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0a0a;
}

.sizes.is-error .size {
  border-color: rgba(255, 96, 96, 0.7);
}

.sizes.is-error {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* --- Size guide --- */

.size-guide {
  width: 100%;
  margin-top: 1.1rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.size-guide th,
.size-guide td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.size-guide th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.size-guide td {
  color: var(--fg);
}

/* ==========================================================================
   ACTIONS
   ========================================================================== */

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.15rem 1.6rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: 0 12px 36px rgba(216, 255, 74, 0.26);
}

.btn--primary::after {
  content: "→";
  font-size: 1.1em;
  transition: transform 0.2s ease;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 46px rgba(216, 255, 74, 0.42);
}

.btn--primary:hover::after {
  transform: translateX(4px);
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   MINI FEATURES
   ========================================================================== */

.info__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.9rem;
}

.info__features li {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  padding: 2.5rem 1.5rem calc(2.5rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   TOAST
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + var(--safe-bottom));
  z-index: 100;
  max-width: 90vw;
  padding: 0.95rem 1.55rem;
  border-radius: 999px;
  background: #1b1b1b;
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translate(-50%, 130%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 899px) {
  .product {
    grid-template-columns: 1fr;
  }
  .gallery {
    min-height: 46vh;
  }
  .gallery__img {
    max-width: 340px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   CART + CHECKOUT — shared by carrito.html and pago.html
   ========================================================================== */

/* Empty nav badge — dim instead of accent */
.nav__cart-count.is-empty {
  background: rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
}

.page__title {
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

/* --- Empty state --- */

.empty {
  text-align: center;
  padding: clamp(2.5rem, 9vw, 5.5rem) 1rem;
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.empty__title {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
}

.empty__text {
  color: var(--muted);
  margin: 0.8rem 0 1.8rem;
}

.empty .btn {
  width: auto;
  display: inline-flex;
}

/* --- Cart layout --- */

.cart {
  display: grid;
  grid-template-columns: 1fr 348px;
  gap: clamp(1.5rem, 3vw, 2.6rem);
  align-items: start;
}

.cart__items {
  border-top: 1px solid var(--line);
}

.line {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.3rem);
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.line__img {
  width: clamp(84px, 12vw, 116px);
  height: clamp(84px, 12vw, 116px);
  flex-shrink: 0;
  object-fit: contain;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}

.line__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.line__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.line__name {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.line__meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.line__prices {
  text-align: right;
  white-space: nowrap;
}

.line__price {
  font-size: 1.05rem;
  font-weight: 700;
}

.line__each {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.line__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.qty__btn {
  width: 2.3rem;
  height: 2.3rem;
  font-size: 1.15rem;
  color: var(--fg);
  transition: background 0.16s ease;
}

.qty__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.qty__val {
  min-width: 2.2rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.line__remove {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.16s ease;
}

.line__remove:hover {
  color: #ff6b6b;
}

/* --- Summary card (cart + checkout) --- */

.summary,
.co-summary {
  background: linear-gradient(165deg, #181818, #0c0c0c);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.3rem, 2.6vw, 1.85rem);
}

@media (min-width: 861px) {
  .summary,
  .co-summary {
    position: sticky;
    top: 6rem;
  }
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.summary__title,
.co-summary__title {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.summary__free {
  color: var(--accent);
}

.summary__row--total {
  margin-top: 0.45rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
}

.summary .btn {
  margin-top: 0.55rem;
}

/* Summary / checkout buttons sit in a narrow column — keep them one line */
.summary .btn,
.co-form > .btn {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

/* Drop the arrow on the narrow cart-summary button so the label fits */
.summary .btn--primary::after {
  content: none;
}

/* --- Checkout layout --- */

.checkout {
  display: grid;
  grid-template-columns: 1fr 372px;
  gap: clamp(1.5rem, 3vw, 2.8rem);
  align-items: start;
}

.co-form {
  min-width: 0;
}

.form-section {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
  border-top: none;
}

.form-section__title {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
}

.field {
  margin-bottom: 0.95rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.field input {
  width: 100%;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  font-size: 0.95rem;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.26);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.field input.is-invalid {
  border-color: #ff6b6b;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.1rem;
  padding: 0.75rem 0.95rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.co-form .btn {
  margin-top: 1.6rem;
}

.co-back {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.16s ease;
}

.co-back:hover {
  color: var(--fg);
}

/* --- Checkout order summary --- */

.co-items {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 1.1rem 0 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.co-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.co-item__img {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  object-fit: contain;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px;
}

.co-item__info {
  flex: 1;
  min-width: 0;
}

.co-item__name {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.co-item__meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.28rem;
}

.co-item__price {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 0.4rem;
}

.co-summary .summary__row {
  margin-top: 0.55rem;
}

/* --- Cart / checkout responsive --- */

@media (max-width: 860px) {
  .cart,
  .checkout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .line__top {
    flex-direction: column;
    gap: 0.5rem;
  }
  .line__prices {
    text-align: left;
  }
}
