/* Estilo Neutro Premium */

/* Global safety: avoid horizontal overflow on mobile */
*,
*::before,
*::after{
  box-sizing: border-box;
}
html, body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
img, svg, video, canvas{
  max-width: 100%;
}


:root{
  --bg: #ffffff;
  --muted: #6b7280;
  --accent: #0ea5e9;
  --card-radius: 12px;
  --shadow: 0 6px 18px rgba(15,22,39,0.06);
  --chip-bg: #ffffff;
  --chip-border: rgba(15,22,39,0.06);

  /* Fuente base (se puede sobrescribir desde el sitio contenedor) */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* layout */
.product-full { font-family: var(--font-sans); color:#111; }
.product-full button,
.product-full input,
.product-full select,
.product-full textarea{ font-family: inherit; }
.product-grid { display:flex; gap:24px; flex-wrap:wrap; align-items:flex-start; }
.gallery { flex:1 1 420px; min-width:300px; }
.info { flex:1 1 360px; min-width:300px; }

/* =====================================================================
   PÁGINA EXTENDIDA (vista híbrida /producto/:sku)
   - Más margen contra bordes
   - Botón "Volver al catálogo" estilizado y centrado
   ===================================================================== */

.product-page-body{
  margin:0;
  background:#f8fafc;
  /* Mantener tipografía consistente en TODA la página (incluye carruseles relacionados) */
  font-family: var(--font-sans);
  color:#111;
}

.product-page-body button,
.product-page-body input,
.product-page-body select,
.product-page-body textarea{
  font-family: inherit;
}

.page-header{
  padding: 18px 16px 0;
}

.page-header-inner{
  max-width: 1120px;
  margin: 0 auto;
  display:flex;
  justify-content:center;
}

.product-page-main{
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
}

.back-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 16px;
  border: 1px solid rgba(107,114,128,.45);
  border-radius: 12px;
  background: #ffffff;
  color: #374151;
  text-decoration:none;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 8px 18px rgba(15,22,39,0.06);
  transition: transform .14s ease, background-color .14s ease, box-shadow .14s ease;
}
.back-btn:hover{
  background:#f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15,22,39,0.10);
}
.back-btn:active{ transform: translateY(0px); }

.back-btn-bottom{
  margin: 34px 0 18px;
  display:flex;
  justify-content:center;
}

@media (max-width:640px){
  .page-header{ padding: 14px 12px 0; }
  .product-page-main{ padding: 12px; }
}

/* main image */
.main-img { position:relative; border-radius:12px; overflow:hidden; background:#ffffff; display:block; }
.main-img img { width:100%; height:420px; object-fit:contain; display:block; background:#ffffff; }

/* AGOTADO badge */
.badge-sold { position:absolute; top:12px; right:12px; background:#e11d48; color:white; padding:6px 10px; border-radius:8px; font-weight:700; font-size:0.85rem; z-index:5; }

/* thumbs */
.thumbs { display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.thumb-img { width:80px; height:80px; object-fit:cover; border-radius:8px; border:1px solid var(--chip-border); cursor:pointer; transition:transform .12s; }
.thumb-img:hover { transform:translateY(-4px); }

/* =========================
   Carrusel de miniaturas (página individual)
   ========================= */

.thumbs-carousel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  max-width: 100%;
}

.thumbs-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.thumb-nav {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.thumb-nav:active { transform: translateY(1px); }

.thumb-btn {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--chip-border);
  background: #fff;
  padding: 0;
  cursor: pointer;
  transition: transform .12s;
}

.thumb-btn:hover { transform: translateY(-4px); }

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-btn.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thumb-btn.is-more img {
  opacity: 0.3;
}

.thumb-btn .more-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
}

/* title & sku */
/*
  Objetivo UI:
  - En escritorio, alinear el chip de SKU visualmente con la PRIMERA línea del título.
    Baseline lo dejaba demasiado "alto"; usamos flex-start + un pequeño offset.
  - En móvil, mantener coherencia y evitar desbordes.
*/
.title-row { display:flex; align-items:flex-start; gap:12px; margin-bottom:8px; }
.sku-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: .22rem;
  height: fit-content;
  line-height: 1;
  white-space: nowrap;
  background:#000;
  color:#fff;
  padding:.25rem .6rem;
  border-radius:999px;
  font-weight:600;
  font-size:0.9rem;
  letter-spacing:0.5px;
}
.product-title { font-size:1.25rem; margin:0; color:#0f172a; font-weight:700; 
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* chips for categories */
.cats { margin:8px 0 12px 0; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.chip { display:inline-flex; align-items:center; padding:.25rem .6rem; font-size:0.9rem; border-radius:999px; background:var(--chip-bg); border:1px solid var(--chip-border); color:var(--muted); 
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chip.cat { border-radius:8px 0 0 8px; }
.chip.subcat { border-radius:0 8px 8px 0; }

/* =======================================================
   BOTONES DE COMPARTIR (modal + página)
   - circulares, ícono blanco, fondo sólido
   - hover con agrandado
   ======================================================= */

.share-section{ margin: 6px 0 10px; }
.share-buttons{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
}
.share-btn{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#fff;
  transition: transform .14s ease, filter .14s ease;
}
.share-btn i{ font-size: 14px; }
.share-btn:hover{ transform: scale(1.12); filter: brightness(1.05); }
.share-btn:active{ transform: scale(1.06); }

/* Colores de marca */
.net-whatsapp{ background:#25D366; }
.net-facebook{ background:#1877F2; }
.net-messenger{ background:#0084FF; }
.net-instagram{ background:#E1306C; }
.net-x{ background:#111111; }
.net-tiktok{ background:#000000; }
.net-telegram{ background:#229ED9; }
.net-wechat{ background:#07C160; }

/* Toast (solo si el JS lo inserta) */
.ui-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(15,23,42,.92);
  color:#fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .92rem;
  z-index: 9999;
  box-shadow: 0 12px 26px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}
.ui-toast.show{ opacity: 1; transform: translateX(-50%) translateY(-2px); }

/* description */
.description h3 { margin:0 0 6px 0; font-size:1rem; color:#0f172a; }
.description p { margin:0; color:var(--muted); line-height:1.45; }

/* attributes */
.attributes { margin-top:14px; background:#fff; padding:12px; border-radius:10px; box-shadow:var(--shadow); }
.attributes h4 { margin:0 0 8px 0; }
.attributes ul { margin:0; padding-left:18px; color:var(--muted); }
.attributes li { margin-bottom:6px; }

/* swatches */
.colors-section { margin-top:10px; text-align:center; }
.colors-title { margin:0 0 6px 0; font-size:0.95rem; font-weight:700; color:#374151; }

/* Modal: un poco más de aire sobre swatches */
.product-modal-root[data-is-modal="1"] .colors-section { margin-top:16px; }
.product-modal-root[data-is-modal="1"] .colors-title { margin-bottom:6px; }

/* Página extendida: compactar vertical */
.product-modal-root[data-is-modal="0"] .colors-section { margin-top:8px; }
.product-modal-root[data-is-modal="0"] .colors-title { margin-bottom:6px; }

.swatches { display:flex; gap:7px; flex-wrap:wrap; justify-content:center; }

/* =========================================================================
   SWATCH BASE + ANTI-COSTURAS
   - Todo se pinta en ::before usando --sw-bg
   - ::before se "sale" del círculo (inset negativo + scale) para ocultar seams
   ========================================================================= */
.color-swatch{
  width:32px;
  height:32px;
  border-radius:999px;
  border: 1px solid var(--chip-border);
  background: transparent;               /* <-- ya no pintamos aquí */
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 10px 22px rgba(0,0,0,.16);
  flex: 0 0 auto;

  /* base por si no setean nada */
  --sw-base: #999;
  --sw-bg: linear-gradient(180deg, var(--sw-base), var(--sw-base));
  --sw-blend: normal;

  transition: transform .12s ease, box-shadow .12s ease;
}
.color-swatch::before{
  content:"";
  position:absolute;
  inset:-2px;                      /* empuja pintura fuera del borde */
  border-radius: inherit;
  background: var(--sw-bg);
  transform: scale(1.06);          /* agranda para esconder costuras */
  transform-origin: center;
  background-repeat: no-repeat;
  background-position: center;
  background-blend-mode: var(--sw-blend);
  z-index: 0;
}
.color-swatch .swatch-inner{
  position: relative;
  z-index: 1;
  font-size:11px;
  color: rgba(0,0,0,.55);
  font-weight:700;
}
.color-swatch.has-fill .swatch-inner{ display:none; }

.color-swatch:hover,
.color-swatch:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }

.color-swatch.active {
  outline:3px solid rgba(14,165,233,0.35);
  box-shadow: 0 10px 24px rgba(15,22,39,0.10);
  transform:translateY(-3px);
}

/* Colores MUY claros (blancos/frosty): borde más marcado */
.color-swatch.is-light{
  border-color: rgba(0,0,0,.20);
}

/* =========================================================================
   ESPECIALES (muestrario)
   ========================================================================= */

/* Azul Rey (ligeramente más oscuro) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="AZUL REY" i]{
  --sw-base:#0F5CB8;
  --sw-bg: linear-gradient(180deg, var(--sw-base), var(--sw-base));
}

/* Bicolor / Blanco con Negro (con micro-gap; el anti-costuras ayuda) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="BICOLOR" i]{
  --sw-bg: linear-gradient(90deg,
    #1E88E5 0 49.6%,
    #E53935 50.4% 100%
  );
}
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="BLANCO CON NEGRO" i]{
  --sw-bg: linear-gradient(90deg,
    #FFFFFF 0 49.6%,
    #000000 50.4% 100%
  );
}

/* Mármol (con vetas) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="MARMOL" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="MÁRMOL" i]{
  --sw-bg:
    radial-gradient(circle at 28% 32%, rgba(255,255,255,0.8), rgba(255,255,255,0) 55%),
    repeating-linear-gradient(120deg, rgba(120,120,120,0.28) 0 2px, rgba(255,255,255,0) 2px 14px),
    repeating-linear-gradient(60deg, rgba(90,90,90,0.22) 0 1px, rgba(255,255,255,0) 1px 12px),
    linear-gradient(180deg, #E0E0E0, #E0E0E0);
  --sw-blend: normal;
}

/* Multicolor SIN seccionado */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="MULTICOLOR" i]{
  --sw-bg: conic-gradient(from -88deg,
    #ff004c,
    #ff7a00,
    #ffd000,
    #00c853,
    #00bcd4,
    #1e88e5,
    #8e24aa,
    #ff004c
  );
}

/* Tornasol: multicolor + sheen MÁS SUAVE (menos brillo) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="TORNASOL" i]{
  --sw-bg:
    linear-gradient(135deg,
      rgba(255,255,255,.28) 0%,
      rgba(255,255,255,.06) 36%,
      rgba(0,0,0,.18) 62%,
      rgba(255,255,255,.14) 100%
    ),
    conic-gradient(from -88deg,
      #ff004c,
      #ff7a00,
      #ffd000,
      #00c853,
      #00bcd4,
      #1e88e5,
      #8e24aa,
      #ff004c
    );
  --sw-blend: overlay, normal;
  filter: saturate(1.10) contrast(1.04);
}

/* Metálicos: brillo diagonal + base (var(--sw-base)) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="METALIC" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="DORADO" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="PLATA" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="COBRE" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="ROSE GOLD" i]{
  --sw-bg:
    linear-gradient(135deg,
      rgba(255,255,255,.28) 0%,
      rgba(255,255,255,0) 22%,
      rgba(255,255,255,.18) 44%,
      rgba(0,0,0,.10) 60%,
      rgba(255,255,255,.18) 78%,
      rgba(255,255,255,0) 100%
    ),
    linear-gradient(180deg, var(--sw-base), var(--sw-base));
  --sw-blend: normal;
}

/* bases metálicas */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="DORADO" i]{ --sw-base:#D4AF37; }
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="PLATA" i]{ --sw-base:#C0C0C0; }
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="COBRE" i]{ --sw-base:#B87333; }
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="ROSE GOLD" i]{ --sw-base:#B76E79; }

/* Traslúcido + Transparente: efecto vidrio + specular */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="TRASLUC" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="TRASLÚC" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="TRANSPARENTE" i]{
  /* base si no viene color */
  --sw-base: rgba(170,220,255,.16);

  --sw-bg:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.55), rgba(255,255,255,0) 52%),
    radial-gradient(circle at 70% 78%, rgba(255,255,255,.18), rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(170,220,255,.18), rgba(255,255,255,.06)),
    linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.04)),
    linear-gradient(180deg, var(--sw-base), var(--sw-base));
  --sw-blend: normal;
  border-color: rgba(209,213,219,.95);
}

/* Brillo especular encima del vidrio */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="TRASLUC" i]::after,
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="TRASLÚC" i]::after,
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="TRANSPARENTE" i]::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events:none;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.60), rgba(255,255,255,0) 55%),
    linear-gradient(135deg,
      rgba(255,255,255,.28) 45%,
      rgba(255,255,255,.20) 58% 100%
    );
  opacity: .80;
  z-index: 2;
}

/* Mate */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="NEGRO MATE" i]{ --sw-base:#111111; }
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color="PLATA MATE" i]{ --sw-base:#B0B0B0; }

/* Pastel (borde claro para favorecer el tono "suave") */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="PASTEL" i]{
  border-color: rgba(229,231,235,.98) !important; /* gris muy claro */
}

/* Neón (menos glow) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="NEON" i],
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="NEÓN" i]{
  filter: drop-shadow(0 0 4px rgba(255,255,255,.10));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 10px 22px rgba(0,0,0,.16);
}

/* Jaspeados (líneas diagonales derecha → izquierda, densas) */
:is(.color-swatch,.color-dot,.color-dot-mini)[data-color*="JASPEADO" i]{
  --sw-bg:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.38) 0 2px,
      rgba(255,255,255,0) 2px 7px
    ),
    repeating-linear-gradient(45deg,
      rgba(0,0,0,.14) 0 1px,
      rgba(0,0,0,0) 1px 10px
    ),
    linear-gradient(180deg, var(--sw-base), var(--sw-base));
  --sw-blend: overlay, soft-light, normal;
}


/* actions */
.actions { margin-top:16px; display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap; }

.btn-primary,
.btn-whatsapp {
  border:none;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition: background-color .15s ease, transform .12s ease;
}

.btn-primary { background:var(--accent); color:white; }
.btn-primary:hover { background:#0284c7; }

.btn-whatsapp {
  background:#16a34a; /* verde más oscuro (ahora estándar) */
  color:#ffffff;
}
.btn-whatsapp:hover {
  background:#86efac; /* verde claro (ahora hover) */
  color:#064e3b;
}

.btn-primary:active,
.btn-whatsapp:active { transform: translateY(1px); }
.btn-ghost { background:transparent; border:1px solid var(--chip-border); padding:8px 12px; border-radius:10px; cursor:pointer; }

/* responsive */
@media (max-width:980px){
  .main-img img { height:320px; }
}
@media (max-width:640px){
  html, body{ overflow-x:hidden; }

  /* En móvil: imágenes arriba, información abajo */
  .product-grid { flex-direction:column; gap:10px; }
  .gallery, .info { min-width:0; width:100%; flex: 0 0 auto; }
  .product-full { width:100%; max-width:100%; }

  /* Evita que chips/textos largos empujen el layout */
  .sku-chip {
    max-width:100%;
    white-space: normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    /* En móvil lo hacemos un poco más grande (texto + altura) para legibilidad */
    font-size: 0.95rem;
    padding: .32rem .72rem;
    margin-top: 0; /* no offset en columna */
  }

  .main-img img { height:260px; }
  /* Menos "aire" vertical en el header del producto (móvil) */
  .title-row { gap:6px; margin-bottom:6px; flex-direction:column; align-items:flex-start; }

  /* Carrusel de miniaturas: evita desbordes en pantallas estrechas */
  .thumbs-carousel{
    max-width: 100%;
    overflow: hidden;
    gap: 8px;
    margin-top: 10px;
  }
  .thumb-nav{ width: 32px; height: 32px; flex: 0 0 auto; }

  .thumbs-track{
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .thumb-btn{
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .thumb-img{
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
/* =========================
   Productos relacionados (carrusel)
   ========================= */

.related-products{
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.related-title{
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: #0f172a;
}

.related-carousel{
  display:flex;
  align-items:center;
  gap: 12px;
}

.related-nav{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  user-select:none;
}
.related-nav:active{ transform: translateY(1px); }

.related-track{
  flex: 1 1 auto;
  display:flex;
  overflow:auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  /* Para que el snap respete el "aire" lateral */
  scroll-padding-inline: var(--rel-edge);
  overscroll-behavior-x: contain;

  /* Exactamente N tarjetas completas visibles (en escritorio: 5) */
  --visible: 5;
  --rel-gap: 16px;
  /* Más margen a los lados para que no se "corten" las tarjetas (incluye sombra) */
  --rel-edge: 32px;
  gap: var(--rel-gap);
  /* Más padding vertical para que la sombra no se recorte por el overflow del track */
  padding: 16px var(--rel-edge);
}
.related-track::-webkit-scrollbar{ display:none; }

.related-card{
  scroll-snap-align: start;
  scroll-snap-stop: always;
  /*
    Mostrar N tarjetas COMPLETAS (sin “media tarjeta” al final).
    Nota: el 100% ya corresponde al ancho útil del track (content box),
    así que sólo descontamos los gaps entre tarjetas.
  */
  flex: 0 0 calc((100% - (var(--rel-gap) * (var(--visible) - 1))) / var(--visible));
  min-width: 0;
}

/* Replicar estilo de tarjetas del catálogo */
.related-products .product-card{
  background: var(--bg);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
  cursor: pointer;
}
.related-products .product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

.related-card-link{
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding: 12px;
  height:100%;
  color: inherit;
  text-decoration:none;
}

.related-products .card-img{
  width:100%;
  height:160px;
  object-fit:contain;
  background:#fff;
  border-radius:8px;
  display:block;
}

.related-products .chips-row{
  display:flex;
  gap: 6px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom: 4px;
}

.related-products .sku-container{ margin-bottom: 2px; }
.related-products .sku-chip-inline{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#000;
  color:#fff;
  padding:4px 8px;
  border-radius:999px;
  font-size:0.8rem;
  font-weight:600;
}
.related-products .sku-chip-inline .sku-label{
  font-weight:700;
  font-size:0.75rem;
  letter-spacing:0.4px;
}

/* Título/meta como en catálogo (sin afectar el H1 de la ficha) */
.related-products .product-title{
  font-weight:700;
  font-size:0.96rem;
  color:#111;
  margin:0;
}
.related-products .product-meta{
  font-size:0.82rem;
  color: var(--muted);
}

.related-products .card-bottom{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top: auto;
}

.related-products .product-colors{ display:flex; align-items:center; gap: 6px; }

/* Dots de color (misma vibra que catálogo) */
.color-dot{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border:1px solid rgba(0,0,0,0.08);
  background: transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  position:relative;
  overflow:hidden;

  --sw-base: #999;
  --sw-bg: linear-gradient(180deg, var(--sw-base), var(--sw-base));
  --sw-blend: normal;

  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.10);
}
.color-dot::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: inherit;
  background: var(--sw-bg);
  transform: scale(1.06);
  transform-origin:center;
  background-repeat:no-repeat;
  background-position:center;
  background-blend-mode: var(--sw-blend);
  z-index:0;
}
.color-dot .swatch-inner{ position:relative; z-index:1; font-size:10px; font-weight:700; color: rgba(0,0,0,.60); }
.color-dot.has-fill .swatch-inner{ display:none; }
.color-dot.is-light{ border-color: rgba(0,0,0,.18); }

.color-extra{
  background:#f3f4f6;
  padding:2px 6px;
  border-radius: 8px;
  font-size: 0.75rem;
  color:#111827;
}

/* Botón "Ver" como el catálogo */
.btn-detail{
  margin-left:auto;
  padding:6px 10px;
  border-radius: 10px;
  border:1px solid rgba(0,0,0,0.12);
  background:#000;
  color:#fff;
  font-weight: 700;
  min-width: 70px;
  text-align:center;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.related-card:hover .btn-detail{
  background:#e5e7eb;
  color:#111;
  transform: translateY(-1px);
}

@media (max-width:1200px){
  .related-track{ --visible: 4; }
}

@media (max-width:980px){
  .related-track{ --visible: 3; }
}

@media (max-width:640px){
  .related-nav{ width: 34px; height: 34px; }
  .related-track{ --visible: 2; }
}

@media (max-width:520px){
  .related-track{ --visible: 1; }
}
/* Mobile/text safety: prevent long strings from forcing horizontal overflow */
.product-full, #modal, .product-page-main{ max-width: 100%; }
.description p, .attributes li{ overflow-wrap: anywhere; word-break: break-word; }
.chip{ max-width:100%; }


/* Página individual: botón Cotizar ligeramente más grande */
.actions-page .btn-whatsapp{
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 1.06rem;
  font-weight: 700;
}
