:root {
  --bg: #0a0a10;
  --surface: #14121c;
  --surface-2: #1c1826;
  --line: #2a2438;
  --purple: #b026ff;
  --purple-dim: #7c1fd6;
  --magenta: #ff2ec4;
  --cyan: #22e8d4;
  --text: #f0eefc;
  --muted: #9b93b3;
  --muted-2: #6b6383;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Background texture ---- */
.glow-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(176, 38, 255, 0.16), transparent 60%),
    radial-gradient(500px circle at 90% 30%, rgba(255, 46, 196, 0.10), transparent 60%),
    radial-gradient(700px circle at 50% 100%, rgba(34, 232, 212, 0.07), transparent 60%);
}

/* ---- Nav ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.brand .logo-img { width: 34px; height: 34px; object-fit: contain; }

.nav-links { display: flex; gap: 32px; font-size: 0.92rem; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }

/* ---- Grupo carrito + hamburguesa, pegados a la derecha ---- */
.nav-right { display: flex; align-items: center; gap: 6px; }

/* ---- Cart icon in nav ---- */
.nav-cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  color: var(--text);
  transition: color 0.2s ease;
}
.nav-cart-icon:hover { color: var(--purple); }
.nav-cart-icon[hidden] { display: none; }
.nav-cart-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 20px;
  background: var(--magenta);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'Chakra Petch', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav-cart-badge[hidden] { display: none; }

/* ---- Nav dropdown menu ---- */
.nav-menu { position: relative; }
.nav-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--purple);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-menu-toggle:hover { background: rgba(176, 38, 255, 0.14); box-shadow: 0 0 18px rgba(176,38,255,0.4); }

.hamburger { position: relative; width: 18px; height: 13px; }
.hamburger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--purple);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.nav-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) { opacity: 0; }
.nav-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  max-width: calc(100vw - 40px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.nav-menu-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.menu-item[hidden] { display: none; }
.menu-item:hover { background: var(--surface); color: var(--purple); }
.menu-item-accent { color: var(--cyan); }
.menu-item-accent:hover { background: rgba(34,232,212,0.1); color: var(--cyan); }
.menu-divider { height: 1px; background: var(--line); margin: 6px 4px; }
.mobile-only { display: none; }

/* ---- Hero ---- */
.hero {
  padding-top: 96px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  color: var(--muted-2);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--purple); }
.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 2px;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--purple);
  color: #0a0a10;
  box-shadow: 0 0 24px rgba(176, 38, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 34px rgba(176, 38, 255, 0.6); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--muted); }

.hero-visual {
  aspect-ratio: 1;
  position: relative;
}
.hero-visual svg { width: 100%; height: 100%; }

/* ---- Motion: entrance + scroll reveal ---- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up-init {
  opacity: 1;
  animation: heroFadeUp 0.8s ease both;
}
.fade-up-init.d1 { animation-delay: 0.1s; }
.fade-up-init.d2 { animation-delay: 0.2s; }
.fade-up-init.d3 { animation-delay: 0.3s; }
.fade-up-init.d4 { animation-delay: 0.4s; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.about-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.about-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.catalog-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.catalog-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.module-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.module-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.module-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.materials-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.materials-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.materials-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.steps-list .reveal:nth-child(2) { transition-delay: 0.08s; }
.steps-list .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps-list .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---- Section shell ---- */
section { padding: 88px 0; }
.section-head { margin-bottom: 48px; max-width: 62ch; }
.section-tag {
  font-size: 0.82rem;
  color: var(--tag-color, var(--purple));
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

/* ---- Page hero (subpages) ---- */
.page-hero { padding: 64px 0 56px; max-width: 78ch; }
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 18px; line-height: 1.12; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }

/* ---- "Ver más" link ---- */
.link-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  color: var(--tag-color, var(--purple));
  transition: opacity 0.2s ease;
}
.link-more:hover { opacity: 0.75; }

/* ---- Sobre nosotros ---- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 26px;
}
.about-card .num { font-family: 'Chakra Petch', sans-serif; color: var(--purple); font-size: 0.85rem; margin-bottom: 10px; }
.about-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.about-card p { color: var(--muted); font-size: 0.92rem; }

/* ---- Impresión 3D ---- */
#impresion { --tag-color: var(--magenta); }

.quote-box {
  background: linear-gradient(135deg, rgba(255, 46, 196, 0.08), rgba(20,18,28,0.4));
  border: 1px solid rgba(255, 46, 196, 0.28);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 56px;
}
.quote-box h3 { font-size: 1.4rem; margin-bottom: 12px; }
.quote-box p { color: var(--muted); margin-bottom: 0; }
.quote-box .btn-magenta {
  background: var(--magenta);
  color: #0a0a10;
  box-shadow: 0 0 24px rgba(255, 46, 196, 0.35);
  justify-self: end;
  margin-right: 8px;
}
.quote-box .btn-magenta:hover { box-shadow: 0 0 34px rgba(255, 46, 196, 0.55); }

.catalog-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}
.catalog-label h3 { font-size: 1.2rem; }
.catalog-label span { color: var(--muted-2); font-size: 0.85rem; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.catalog-card {
  background: var(--surface);
  border: 1px dashed var(--line);
  aspect-ratio: 4/5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--muted-2);
}
.catalog-placeholder-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--muted-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.catalog-card p { font-size: 0.85rem; max-width: 20ch; }

.catalog-card.catalog-card-filled {
  aspect-ratio: auto;
  border-style: solid;
  padding: 0;
  overflow: hidden;
  text-align: left;
  align-items: stretch;
  justify-content: flex-start;
  color: var(--text);
}
.catalog-card-filled img { width: 100%; height: 160px; object-fit: cover; display: block; }
.catalog-card-filled h4 { font-family: 'Chakra Petch', sans-serif; font-size: 0.95rem; margin: 14px 16px 4px; max-width: none; }
.catalog-card-filled .price { margin: 0 16px 14px; color: var(--magenta); font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 0.9rem; }
.catalog-card-filled .btn-add-cart {
  margin: 0 16px 16px;
  padding: 9px 0;
  background: var(--purple);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.catalog-card-filled .btn-add-cart:hover { box-shadow: 0 0 16px rgba(176,38,255,0.4); }
.catalog-card-filled .btn-add-cart:disabled { opacity: 0.7; cursor: default; }

/* ---- Admin panel ---- */
.admin-tabs { max-width: 520px; margin-bottom: 32px; }
.account-tabs { max-width: 560px; margin-bottom: 32px; }
.admin-form-stack { display: flex; flex-direction: column; gap: 16px; max-width: 520px; margin-bottom: 32px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ---- Calculadora de precios (admin) ---- */
.pricing-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; max-width: 900px; }
@media (max-width: 760px) {
  .pricing-calc { grid-template-columns: 1fr; }
}
.pricing-calc-form { display: flex; flex-direction: column; gap: 16px; }
.pricing-calc-sizes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.calc-stock-warning {
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.3);
  color: #ffc266;
  padding: 10px 14px;
  font-size: 0.82rem;
}
.pricing-calc-breakdown {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-calc-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--muted); gap: 12px; }
.pricing-calc-row[hidden] { display: none; }
.pricing-calc-row strong { color: var(--text); font-family: 'Chakra Petch', sans-serif; font-weight: 600; }
.pricing-calc-final {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
  font-size: 1rem;
  color: var(--text);
}
.pricing-calc-final strong { color: var(--purple); font-size: 1.3rem; }

.admin-item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.admin-item-row img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.admin-item-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.admin-item-info span { color: var(--magenta); font-family: 'Chakra Petch', sans-serif; font-size: 0.85rem; }
.btn-ghost-sm {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-family: 'Chakra Petch', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-ghost-sm:hover { border-color: #ff5a5a; color: #ff5a5a; }
.order-status-select {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.8rem;
  font-family: 'Chakra Petch', sans-serif;
  cursor: pointer;
}
.order-status-select:focus { outline: none; border-color: var(--purple); }
.gate-error { color: #ff5a5a; font-size: 0.85rem; margin-top: 4px; }

/* ---- Materials (impresión 3D) ---- */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.material-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  padding: 24px;
}
.material-card h3 { font-size: 1rem; margin-bottom: 8px; }
.material-card p { color: var(--muted); font-size: 0.9rem; }

/* ---- Process steps (impresión 3D) ---- */
.steps-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.step-card { background: var(--surface); border: 1px solid var(--line); padding: 22px; position: relative; }
.step-card .step-num { font-family: 'Chakra Petch', sans-serif; color: var(--magenta); font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.step-card h3 { font-size: 0.98rem; margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: 0.86rem; }

/* ---- Onyx Core ---- */
#core { --tag-color: var(--cyan); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  padding: 28px;
  position: relative;
}
.module-card.disabled { border-left-color: var(--muted-2); opacity: 0.75; }
.module-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.module-card h3 { font-size: 1.1rem; }
.status {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.status.dev { background: rgba(34, 232, 212, 0.12); color: var(--cyan); border: 1px solid rgba(34,232,212,0.3); }
.status.soon { background: rgba(155, 147, 179, 0.1); color: var(--muted); border: 1px solid var(--line); }
.module-card p { color: var(--muted); font-size: 0.92rem; }

/* ---- Specs table (stack tecnológico) ---- */
.specs-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.specs-table th, .specs-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.specs-table th { color: var(--muted-2); font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.specs-table td:first-child { color: var(--cyan); font-family: 'Chakra Petch', sans-serif; white-space: nowrap; }
.specs-table td { color: var(--muted); }

/* ---- Roadmap list ---- */
.roadmap-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.roadmap-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted-2);
}
.roadmap-list li::before {
  content: '○';
  color: var(--cyan);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ---- Redes sociales (Contáctanos) ---- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.social-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.social-card:hover { border-color: var(--purple); transform: translateY(-2px); }
.social-card.disabled { opacity: 0.5; pointer-events: none; }
.social-card .social-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  color: var(--purple);
}
.social-card h3 { font-size: 1.02rem; }
.social-card span { color: var(--muted); font-size: 0.85rem; }

/* ---- Reseñas ---- */
.review-gate {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.review-gate p { color: var(--muted); }

.review-form {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  max-width: 560px;
}
.review-gate[hidden], .review-form[hidden] { display: none; }
.review-as { font-size: 0.85rem; color: var(--muted); }
.review-as strong { color: var(--purple); }

.field textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  border-radius: 2px;
  resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(176,38,255,0.15); }
.field input[type="file"] {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 12px;
  font-size: 0.85rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.review-photo { width: 100%; height: 160px; object-fit: cover; display: block; }
.review-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.review-body strong { font-family: 'Chakra Petch', sans-serif; font-size: 0.95rem; }
.review-date { color: var(--muted-2); font-size: 0.78rem; }
.review-body p { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.reviews-empty { color: var(--muted-2); font-size: 0.9rem; }

/* ---- Cuenta / carrito / pedidos ---- */
#accountDashboard { margin-bottom: 56px; }
.account-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.account-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
}
.account-profile-info { display: flex; flex-direction: column; gap: 2px; }
.account-profile-info h3 { font-size: 1.1rem; }
.account-profile-info span { color: var(--muted); font-size: 0.88rem; }
.account-profile .btn { margin-left: auto; }

.cart-list, .orders-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  flex-wrap: wrap;
}
.cart-row img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.cart-row-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.cart-row-info strong { font-family: 'Chakra Petch', sans-serif; font-size: 0.95rem; }
.cart-row-info span { color: var(--magenta); font-size: 0.85rem; }
.cart-qty { display: flex; align-items: center; gap: 10px; }
.cart-qty button {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.cart-qty span { min-width: 18px; text-align: center; font-size: 0.9rem; }

.cart-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 20px 24px;
  margin: 24px 0 56px;
  gap: 18px;
}
.cart-summary strong { color: var(--purple); font-family: 'Chakra Petch', sans-serif; font-size: 1.2rem; }
.cart-summary[hidden] { display: none; }
.cart-summary-totals { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
#cartSubtotalRow { color: var(--muted); font-size: 0.85rem; }
#cartSubtotalRow strong { color: var(--muted); font-family: 'Chakra Petch', sans-serif; font-size: 0.9rem; }
.cart-summary .btn { align-self: flex-start; }

.wallet-chip {
  background: rgba(176, 38, 255, 0.1);
  border: 1px solid rgba(176, 38, 255, 0.3);
  color: var(--text);
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: 20px;
}
.wallet-chip strong { color: var(--purple); font-family: 'Chakra Petch', sans-serif; }
.wallet-chip[hidden] { display: none; }

.payment-method-picker { display: flex; flex-direction: column; gap: 8px; }
.payment-method-option { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; cursor: pointer; }
.payment-method-option input { width: 16px; height: 16px; accent-color: var(--purple); cursor: pointer; }
.payment-method-option[hidden] { display: none; }

.bank-details {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bank-details[hidden] { display: none; }
.bank-details-note { color: var(--muted); font-size: 0.82rem; margin: 0; }
.bank-accounts-list { display: flex; flex-direction: column; gap: 10px; }
.bank-account-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.82rem;
  color: var(--muted);
}
.bank-account-card strong { color: var(--text); font-family: 'Chakra Petch', sans-serif; font-size: 0.9rem; margin-bottom: 4px; }

.order-proof { margin-top: 10px; }
.order-proof-note { color: var(--muted); font-size: 0.82rem; }
.order-proof-rejected { color: #ff6b8b; }
.order-proof-upload { display: inline-block; cursor: pointer; }
.order-proof-upload-highlight {
  border-color: var(--magenta);
  color: var(--text);
  background: rgba(255, 46, 196, 0.15);
  animation: uploadPulse 1.6s ease-in-out infinite;
}
@keyframes uploadPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 46, 196, 0.5); }
  50% { box-shadow: 0 0 16px rgba(255, 46, 196, 0.8); }
}
.status.rejected { background: rgba(255, 76, 76, 0.1); color: #ff6b6b; border: 1px solid rgba(255,76,76,0.3); }

.discount-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.discount-row[hidden] { display: none; }
.discount-row .btn-ghost { padding: 11px 20px; }
.discount-applied {
  color: var(--cyan);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.discount-applied[hidden] { display: none; }

@media (max-width: 640px) {
  .discount-row { flex-direction: column; align-items: stretch; }
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  padding: 20px;
}
.order-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.order-card-top strong { font-family: 'Chakra Petch', sans-serif; }
.order-items-mini { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; }
.order-date { color: var(--muted-2); font-size: 0.78rem; }

@media (max-width: 640px) {
  .account-profile .btn { margin-left: 0; width: 100%; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

/* ---- Toasts ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple);
  color: var(--text);
  padding: 14px 20px;
  font-size: 0.88rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 320px;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: #ff5a5a; }

/* ---- Loading skeletons ---- */
.skeleton-shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card { aspect-ratio: auto; padding: 0; overflow: hidden; border-style: solid; }
.skeleton-img { height: 160px; }
.skeleton-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; border-radius: 2px; }
.skeleton-btn { height: 32px; border-radius: 2px; margin-top: 6px; }
.skeleton-avatar { width: 56px; height: 56px; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .skeleton-shimmer { animation: none; }
}

/* ---- Micro-interacciones: hover en tarjetas ---- */
.about-card, .material-card, .step-card, .module-card, .review-card, .order-card {
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.about-card:hover, .material-card:hover, .step-card:hover, .module-card:hover:not(.disabled), .review-card:hover, .order-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}
.catalog-card-filled { transition: transform 0.25s ease, border-color 0.25s ease; cursor: pointer; }
.catalog-card-filled:hover { transform: translateY(-4px); border-color: var(--purple); }

/* ---- Modal de detalle de producto ---- */
.modal-panel.item-modal-panel {
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
}
.item-modal-body { display: flex; flex-direction: column; }
.item-modal-gallery { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.item-modal-main { width: 100%; max-height: 420px; object-fit: contain; border: 1px solid var(--line); background: var(--surface); }
.item-modal-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.item-modal-thumbs img {
  width: 56px; height: 56px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.item-modal-thumbs img:hover { opacity: 1; border-color: var(--purple); }
.item-modal-thumbs img.active { opacity: 1; border-color: var(--purple); }
.item-modal-info { display: flex; flex-direction: column; }
.item-modal-info h3 { font-size: 1.3rem; }
.item-modal-price { display: block; margin: 8px 0 14px; color: var(--magenta); font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 1.15rem; }
.item-modal-description { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; white-space: pre-line; line-height: 1.7; }
.item-modal-info .btn { align-self: flex-start; }

@media (min-width: 700px) {
  .modal-panel.item-modal-panel { max-width: 780px; }
  .item-modal-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 36px;
  }
  .item-modal-gallery { flex: 1; margin-bottom: 0; min-width: 0; }
  .item-modal-info { flex: 1; padding-top: 4px; }
  .item-modal-info .btn { align-self: stretch; }
}

.btn:active { transform: scale(0.97); }

/* ---- Brillo que sigue el cursor en el hero ---- */
.hero { position: relative; }
.hero::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, 30%);
  left: var(--mouse-x, 70%);
  width: 420px; height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(176,38,255,0.14), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero:hover::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero::before { display: none; }
}

/* ---- Contacto ---- */
#contacto { --tag-color: var(--purple); }
.contact-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 56px;
  text-align: center;
}
.contact-box h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 16px; }
.contact-box p { color: var(--muted); max-width: 50ch; margin: 0 auto 30px; }

footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted-2);
  font-size: 0.85rem;
}

/* ---- Auth modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: 0 0 60px rgba(176,38,255,0.15);
  padding: 56px 32px 32px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-panel { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: all 0.15s ease;
}
.modal-close:hover { color: var(--text); border-color: var(--muted); }

.auth-tabs { display: flex; gap: 4px; margin-bottom: 28px; border: 1px solid var(--line); padding: 4px; }
.auth-tab {
  flex: 1;
  padding: 9px 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-tab.active { background: var(--purple); color: var(--bg); }

.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }
.auth-heading { font-size: 1.25rem; margin-bottom: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.field input {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  border-radius: 2px;
}
.field input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(176,38,255,0.15); }
.field select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  border-radius: 2px;
  cursor: pointer;
}
.field select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(176,38,255,0.15); }

.btn-block { width: 100%; text-align: center; border: none; cursor: pointer; }
.auth-note { text-align: center; font-size: 0.78rem; color: var(--muted-2); margin-top: -4px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-visual { max-width: 280px; margin: 0 auto; order: -1; }
  .nav-links { display: none; }
  .mobile-only { display: block; }
  .about-grid, .module-grid, .materials-grid, .steps-list, .social-grid, .reviews-grid { grid-template-columns: 1fr; }
  .field input, .field textarea { font-size: 16px; }
  .quote-box { grid-template-columns: 1fr; }
  .contact-box { padding: 36px 24px; }
  footer { flex-direction: column; gap: 10px; text-align: center; }

  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .catalog-card { padding: 14px; }
  .catalog-placeholder-icon { width: 30px; height: 30px; margin-bottom: 10px; }
  .catalog-card p { font-size: 0.78rem; }
  .catalog-card-filled h4 { font-size: 0.85rem; margin: 10px 12px 4px; }
  .catalog-card-filled .price { font-size: 0.82rem; margin: 0 12px 10px; }
  .catalog-card-filled .btn-add-cart { margin: 0 12px 12px; font-size: 0.76rem; padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
