/* Hereda el lenguaje visual de Saberes que Venden (formulario) */
:root {
  --brand-purple: #92278f;
  --brand-purple-deep: #6e1d6c;
  --brand-teal: #00a09a;
  --brand-orange: #f15a24;
  --brand-green: #8dc63f;
  --brand-amber: #f7941e;
  --brand-blue: #0071bc;
  --ink: #2a2a2a;
  --ink-soft: #555555;
  --paper: #ffffff;
  --paper-soft: #f7f8fc;
  --line: rgba(146, 39, 143, 0.14);
  --shadow: 0 16px 36px rgba(146, 39, 143, 0.1);
  --radius: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(0, 160, 154, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 5%, rgba(146, 39, 143, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 80% 100%, rgba(247, 148, 30, 0.1), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fc 55%, #eef9f8 100%);
  line-height: 1.5;
}

a {
  color: var(--brand-purple);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 30px,
    rgba(146, 39, 143, 0.025) 30px,
    rgba(146, 39, 143, 0.025) 31px
  );
  z-index: 0;
}

.site-header,
.page,
footer {
  position: relative;
  z-index: 1;
}

/* ——— Top nav ——— */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(146, 39, 143, 0.2);
}

.nav-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-org {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-purple);
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a {
  padding: 0.4rem 0.75rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--brand-purple-deep);
  background: rgba(146, 39, 143, 0.1);
  text-decoration: none;
}

.nav-links .btn-nav {
  padding: 0.55rem 1rem;
  color: #fff;
  background: var(--brand-purple);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(146, 39, 143, 0.22);
}

.nav-links .btn-nav:hover {
  background: var(--brand-purple-deep);
  color: #fff;
}

/* ——— Hero marketplace ——— */
.hero-market {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 1.5rem;
  animation: rise 0.7s ease-out both;
}

.hero-market .org {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-purple);
}

.hero-market .brand {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-market .tagline {
  margin: 0 0 1.15rem;
  max-width: 42em;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-teal);
}

.hero-meta span {
  position: relative;
  padding-left: 0.9rem;
}

.hero-meta span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
}

.hero-meta span:nth-child(1)::before { background: var(--brand-teal); }
.hero-meta span:nth-child(2)::before { background: var(--brand-orange); }
.hero-meta span:nth-child(3)::before { background: var(--brand-green); }

.notice-pago {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  max-width: 52em;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 160, 154, 0.08);
  border: 1px solid rgba(0, 160, 154, 0.28);
  border-left: 4px solid var(--brand-teal);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.notice-pago strong {
  color: var(--brand-purple-deep);
}

.notice-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ——— Layout ——— */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem 1.5rem 3.5rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.35rem;
  animation: rise 0.7s ease-out 0.05s both;
}

.toolbar h2 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--brand-purple-deep);
}

.toolbar p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(146, 39, 143, 0.2);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: default;
}

.filter-chip.is-active {
  background: rgba(146, 39, 143, 0.1);
  border-color: var(--brand-purple);
  color: var(--brand-purple-deep);
}

/* ——— Product grid ——— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  animation: rise 0.7s ease-out both;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.product-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(146, 39, 143, 0.14);
}

.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.product-card-link:hover {
  text-decoration: none;
}

.product-card:nth-child(1) { animation-delay: 0.08s; border-top: 3px solid var(--brand-teal); }
.product-card:nth-child(2) { animation-delay: 0.12s; border-top: 3px solid var(--brand-orange); }
.product-card:nth-child(3) { animation-delay: 0.16s; border-top: 3px solid var(--brand-purple); }
.product-card:nth-child(4) { animation-delay: 0.2s; border-top: 3px solid var(--brand-green); }
.product-card:nth-child(5) { animation-delay: 0.24s; border-top: 3px solid var(--brand-blue); }
.product-card:nth-child(6) { animation-delay: 0.28s; border-top: 3px solid var(--brand-amber); }
.product-card:nth-child(7) { animation-delay: 0.32s; border-top: 3px solid var(--brand-teal); }
.product-card:nth-child(8) { animation-delay: 0.36s; border-top: 3px solid var(--brand-orange); }

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.product-media.has-photo {
  background-color: var(--paper-soft);
}

.product-media.has-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge-ref {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: auto;
  top: auto;
  padding: 0.28rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(42, 42, 42, 0.82);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.foto-ilustrativa {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.35;
}

.detail-media + .foto-ilustrativa,
.product-media + .foto-ilustrativa {
  margin-top: 0.55rem;
}

.product-media.g1 {
  background-image:
    linear-gradient(160deg, rgba(0, 160, 154, 0.55), rgba(146, 39, 143, 0.45)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='60' cy='60' r='28' fill='none' stroke='rgba(255,255,255,0.25)' stroke-width='3'/%3E%3Cpath d='M40 78 Q60 48 80 78' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3C/svg%3E");
  background-color: #00a09a;
}

.product-media.g2 {
  background-image:
    linear-gradient(160deg, rgba(241, 90, 36, 0.55), rgba(247, 148, 30, 0.4)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect x='35' y='35' width='50' height='50' rx='6' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3C/svg%3E");
  background-color: #f15a24;
}

.product-media.g3 {
  background-image:
    linear-gradient(160deg, rgba(146, 39, 143, 0.55), rgba(0, 113, 188, 0.4)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 28 L78 72 L42 72 Z' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3C/svg%3E");
  background-color: #92278f;
}

.product-media.g4 {
  background-image:
    linear-gradient(160deg, rgba(141, 198, 63, 0.55), rgba(0, 160, 154, 0.4)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='45' cy='55' r='18' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3Ccircle cx='75' cy='55' r='18' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3C/svg%3E");
  background-color: #8dc63f;
}

.product-media.g5 {
  background-image:
    linear-gradient(160deg, rgba(0, 113, 188, 0.5), rgba(146, 39, 143, 0.4)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M30 80 Q60 30 90 80' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3C/svg%3E");
  background-color: #0071bc;
}

.product-media.g6 {
  background-image:
    linear-gradient(160deg, rgba(247, 148, 30, 0.55), rgba(146, 39, 143, 0.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='60' cy='60' r='22' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='3'/%3E%3Ccircle cx='60' cy='60' r='10' fill='rgba(255,255,255,0.25)'/%3E%3C/svg%3E");
  background-color: #f7941e;
}

.badge-cat {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(42, 42, 42, 0.72);
  border-radius: var(--radius);
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.05rem 1.15rem;
  gap: 0.35rem;
}

.product-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.product-seller {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-teal);
}

.product-desc {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-purple-deep);
}

.price-note {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.product-foot-out {
  padding: 0 1.05rem 1.15rem;
}

.btn-agregar {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  color: #fff;
  background: var(--brand-purple);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.btn-agregar:hover {
  background: var(--brand-purple-deep);
}

.contact-actions .btn-agregar {
  width: 100%;
}

.btn-agregar.listo {
  background: var(--brand-teal);
}

#carrito-cuenta {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  margin-left: 0.2rem;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  color: #fff;
  background: var(--brand-orange);
  border-radius: 999px;
}

#carrito-cuenta[hidden] {
  display: none;
}

.carrito-flotante {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  color: #fff;
  background: var(--brand-purple);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(146, 39, 143, 0.35);
  text-decoration: none;
}

.carrito-flotante:hover {
  background: var(--brand-purple-deep);
  color: #fff;
}

.carrito-flotante svg {
  width: 1.55rem;
  height: 1.55rem;
}

.carrito-flotante-cuenta {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  background: var(--brand-orange);
  border-radius: 999px;
}

.carrito-flotante-cuenta[hidden] {
  display: none;
}

.carrito-vacio {
  margin-top: 1.25rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-teal);
}

.carrito-grupos {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.carrito-grupo {
  padding: 1.15rem 1.2rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-purple);
  box-shadow: var(--shadow);
}

.carrito-grupo h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brand-purple-deep);
}

.carrito-linea {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.carrito-linea strong {
  display: block;
}

.carrito-linea p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.carrito-controles {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.carrito-controles button {
  font: inherit;
  font-weight: 700;
  min-width: 2rem;
  padding: 0.25rem 0.45rem;
  color: var(--brand-purple-deep);
  background: #fff;
  border: 1px solid rgba(146, 39, 143, 0.28);
  border-radius: var(--radius);
  cursor: pointer;
}

.carrito-total {
  margin: 0.75rem 0;
  font-weight: 700;
  color: var(--brand-purple-deep);
}

.carrito-aviso {
  position: fixed;
  right: 1.15rem;
  bottom: 5.2rem;
  z-index: 5;
  margin: 0;
  padding: 0.75rem 1rem;
  color: #24520f;
  background: #e8f6e0;
  border-left: 3px solid var(--brand-green);
  box-shadow: var(--shadow);
}

/* ——— Detail page ——— */
.detail-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: start;
  animation: rise 0.7s ease-out both;
}

.detail-media {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-media .product-media {
  height: 100%;
  aspect-ratio: auto;
}

.detail-media .product-media.has-photo {
  aspect-ratio: 1;
}

.block {
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.35rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-purple);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.block.teal { border-left-color: var(--brand-teal); }
.block.orange { border-left-color: var(--brand-orange); }
.block.blue { border-left-color: var(--brand-blue); }
.block.green { border-left-color: var(--brand-green); }

.block h2,
.block h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-purple-deep);
}

.block h1 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
}

.block-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(146, 39, 143, 0.08);
  border: 1px solid rgba(146, 39, 143, 0.18);
  border-radius: var(--radius);
  color: var(--brand-purple-deep);
}

.detail-price {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--brand-purple-deep);
}

.detail-price small {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.seller-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: var(--paper-soft);
  border-radius: var(--radius);
}

.seller-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-purple));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.seller-row strong {
  display: block;
  font-size: 0.98rem;
}

.seller-row span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-primary,
.btn-ghost,
.btn-wa,
.btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  cursor: default;
  border: 2px solid transparent;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s, background 0.2s;
}

.btn-primary {
  color: #fff;
  background: var(--brand-purple);
  box-shadow: 0 8px 20px rgba(146, 39, 143, 0.28);
}

.btn-wa {
  color: #fff;
  background: #128c7e;
  box-shadow: 0 8px 20px rgba(18, 140, 126, 0.28);
}

.btn-call {
  color: var(--brand-blue);
  background: transparent;
  border-color: rgba(0, 113, 188, 0.4);
}

.btn-ghost {
  color: var(--brand-teal);
  background: transparent;
  border-color: rgba(0, 160, 154, 0.45);
}

.pago-aviso {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: #fff8f0;
  border-left: 3px solid var(--brand-amber);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pago-aviso strong {
  color: var(--brand-orange);
}

.breadcrumb {
  margin: 0 0 1.15rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  animation: rise 0.5s ease-out both;
}

.breadcrumb a {
  color: var(--brand-teal);
  font-weight: 600;
  text-decoration: none;
}

/* ——— Forms (publicar) ——— */
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(146, 39, 143, 0.22);
  border-radius: var(--radius);
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

.grid {
  display: grid;
  gap: 0 1rem;
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

.grid.three {
  grid-template-columns: 1fr 1fr 1fr;
}

fieldset.chips {
  margin: 0 0 1.25rem;
  padding: 0;
  border: none;
}

fieldset.chips legend {
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0.45rem 0.45rem 0;
  padding: 0.45rem 0.75rem;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(146, 39, 143, 0.2);
  border-radius: var(--radius);
  cursor: default;
}

.chip.is-on,
.chip:has(input:checked) {
  background: rgba(146, 39, 143, 0.1);
  border-color: var(--brand-purple);
  color: var(--brand-purple-deep);
}

.chip input {
  accent-color: var(--brand-purple);
  width: auto;
  margin: 0;
  pointer-events: none;
}

.upload-zone {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 140px;
  margin-bottom: 1rem;
  padding: 1.25rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: repeating-linear-gradient(
    -12deg,
    #fff,
    #fff 12px,
    rgba(146, 39, 143, 0.03) 12px,
    rgba(146, 39, 143, 0.03) 24px
  );
  border: 2px dashed rgba(146, 39, 143, 0.28);
  border-radius: var(--radius);
}

.upload-zone strong {
  color: var(--brand-purple);
}

.form-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.check-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 400;
  font-size: 0.92rem;
  cursor: default;
}

.check-row input {
  margin-top: 0.25rem;
  width: auto;
  accent-color: var(--brand-purple);
  flex-shrink: 0;
  pointer-events: none;
}

/* ——— Seller profile ——— */
.profile-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-teal);
  box-shadow: var(--shadow);
  animation: rise 0.7s ease-out both;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-purple));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.profile-head h1 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--brand-purple-deep);
}

.profile-head .muted {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-teal);
}

/* ——— Footer ——— */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

footer p {
  margin: 0.25rem 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .nav-links {
    width: 100%;
  }

  .actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .btn-wa,
  .btn-call {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

a.product-card,
a.filter-chip,
a.btn-wa,
a.btn-call,
a.btn-ghost,
a.btn-nav,
button.btn-primary {
  cursor: pointer;
}

a.filter-chip:hover,
a.product-card:hover,
a.seller-row:hover {
  text-decoration: none;
}

a.seller-row {
  color: inherit;
  text-decoration: none;
}

.portada {
  max-width: calc(var(--max) - 3rem);
  margin: 1.25rem auto 0;
  padding: 2.4rem 1.75rem 1.6rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-purple);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.portada .org {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-purple);
}

.portada .brand {
  margin: 0 0 0.7rem;
  max-width: 16em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.portada .tagline {
  margin: 0 0 1.25rem;
  max-width: 38em;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.portada-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.portada .hero-meta {
  margin-bottom: 0;
}

.modulos {
  max-width: calc(var(--max) - 3rem);
  margin: 1rem auto 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.modulo {
  display: block;
  padding: 1.2rem 1.15rem 1.15rem;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modulo:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.modulo:nth-child(1) { border-top: 3px solid var(--brand-teal); }
.modulo:nth-child(2) { border-top: 3px solid var(--brand-orange); }
.modulo:nth-child(3) { border-top: 3px solid var(--brand-purple); }

.modulo h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brand-purple-deep);
}

.modulo p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

@media (max-width: 800px) {
  .modulos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portada,
  .modulos {
    margin-right: 1rem;
    margin-left: 1rem;
  }

  .portada {
    padding: 1.6rem 1.15rem 1.25rem;
  }

  .portada-acciones .btn-primary,
  .portada-acciones .btn-ghost {
    width: 100%;
  }
}

.form-error,
.aviso-ok {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.form-error {
  color: #7a1f12;
  background: #fde8e2;
  border-left: 3px solid var(--brand-orange);
}

.aviso-ok {
  color: #24520f;
  background: #e8f6e0;
  border-left: 3px solid var(--brand-green);
}

.galeria-fotos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.galeria-fotos a {
  display: block;
  border-radius: var(--radius);
  border: 2px solid transparent;
}

.galeria-fotos a.activa {
  border-color: var(--brand-purple);
}

.galeria-fotos img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius);
}

.product-card:nth-child(6n + 1) { border-top: 3px solid var(--brand-teal); }
.product-card:nth-child(6n + 2) { border-top: 3px solid var(--brand-orange); }
.product-card:nth-child(6n + 3) { border-top: 3px solid var(--brand-purple); }
.product-card:nth-child(6n + 4) { border-top: 3px solid var(--brand-green); }
.product-card:nth-child(6n + 5) { border-top: 3px solid var(--brand-blue); }
.product-card:nth-child(6n + 6) { border-top: 3px solid var(--brand-amber); }
