﻿:root{
  --bg:#fffdf7; --text:#242424; --muted:#6b6b6b;
  --brand:#ff3e8d; --brand-2:#00d0ff; --brand-3:#ffd401;
  --border:#eae8e1; --card:#ffffff; --shadow:0 8px 20px rgba(0,0,0,.06);
  --radius:14px; --space:16px; --space-lg:24px; --maxw:1280px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial;
  color:var(--text); background:var(--bg);
  background-image:
    radial-gradient(1200px 800px at -20% -20%, var(--brand-3) 0%, transparent 40%),
    radial-gradient(900px 700px at 120% -30%, var(--brand-2) 0%, transparent 40%),
    radial-gradient(900px 700px at 50% 130%, var(--brand) 0%, transparent 35%);
  background-attachment: fixed;
}
.topbar{ position:sticky; top:0; z-index:10; background:rgba(255,255,255,.7);
  backdrop-filter:saturate(140%) blur(8px); border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:10px 16px; }
.logo{font-weight:800; letter-spacing:.4px}
.categories{display:flex; gap:8px; flex-wrap:wrap}
.cat-btn{ border:1px solid var(--border); background:#fff; padding:8px 12px; border-radius:999px; cursor:pointer; }
.cat-btn.active, .cat-btn:hover{border-color:var(--brand); color:#000}
.layout{ display:grid; grid-template-columns: 1fr; gap:24px; max-width:1280px; margin:24px auto; padding:0 16px; }
.sidebar{display:flex; flex-direction:column; gap:24px}
.cart, .checkout{ background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:0 8px 20px rgba(0,0,0,.06); padding:24px; }
.cart-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; max-height:260px; overflow:auto}
.cart-item{display:grid; grid-template-columns:1fr auto; gap:6px; padding:10px; border:1px dashed var(--border); border-radius:10px; background:#fff}
.cart-summary{ display:flex; flex-direction:column; gap:6px; margin-bottom:10px;}
.cart-summary .line{ display:flex; justify-content:space-between; align-items:center; font-size:0.95rem;}
.cart-summary .shipping{ color:#6b6b6b; font-size:0.9rem;}
.shipping-note{ font-size:0.8rem; color:#6b6b6b; text-align:right; margin-top:2px;}
.cart-summary .total{ border-top:1px solid var(--border); padding-top:6px; margin-top:4px; font-weight:700;}
.grid{display:grid; grid-template-columns: 1fr; gap:24px}
.card{ background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:0 8px 20px rgba(0,0,0,.06); overflow:hidden; display:flex; flex-direction:column; }
.thumb{ aspect-ratio:1/1; background:#fff; border:1px solid var(--border); border-radius:12px; overflow:hidden; position:relative; }
.thumb img{ width:100%; height:100%; object-fit:contain; display:block; background:#fff; }
.card-body{padding:16px; display:flex; flex-direction:column; gap:6px}
.price{font-weight:700}
.tag{color:#6b6b6b; font-size:.9rem}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:12px}
.field.two{display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:12px}
label{font-weight:600; display:block; overflow-wrap:anywhere;}
input, select, textarea{ padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; outline:none; width:100%; }
input:focus, select:focus, textarea:focus{border-color:#ff3e8d}
.radio{ display:inline-flex !important; align-items:center; gap:8px; line-height:1.2; white-space:nowrap; overflow-wrap:normal;}
.btn{border:1px solid var(--border); background:#fff; padding:10px 14px; border-radius:10px; cursor:pointer}
.btn:hover{border-color:#ff3e8d}
.btn-primary{background:#ff3e8d; color:#fff; border-color:transparent}
.btn-clear{background:#fff3f7}
/* Botón "Personalizar" más visible */
.customize-btn{
  background-color: #FF5722; /* naranja intenso */
  color: #fff;
  border: none;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.1s;
}
.customize-btn:hover{ background-color:#E64A19; transform:scale(1.03); }

/* (opcional) que ocupe todo el ancho en móviles */
@media (max-width:600px){
  .customize-btn{ width:100%; padding:.75rem 1rem; }
}
.footer{ border-top:1px solid var(--border); margin-top:40px; padding:24px 16px; text-align:center; background:rgba(255,255,255,.6); }
.footer-link{margin:0 10px; color:#333}
.muted{color:#6b6b6b}
.small{font-size:.9rem}
.flex-split{display:grid; grid-template-columns: 1fr; gap:20px; align-items:start}
.preview-wrap{ position:relative; width:min(520px, 100%); background:#fafafa; border:1px solid var(--border); border-radius:12px; padding:12px; box-shadow:0 8px 20px rgba(0,0,0,.06); }
#print-area,.print-area{ position:absolute; inset:auto 12px 12px 12px; height:58%; top:22%; border:2px dashed rgba(255,62,141,.45); border-radius:10px; pointer-events:none }
.pay-options{ display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
@media (max-width:420px){ .field.two{ grid-template-columns:1fr; } }
@media (min-width: 768px){
  .layout{ grid-template-columns: 360px 1fr; }
  .sidebar{ position:sticky; top:70px; align-self:start; }
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .flex-split{ grid-template-columns: 1fr 1.2fr; }
}
@media (min-width: 1100px){
  .grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
.cookie-banner{
  position:fixed; left:16px; right:16px; bottom:16px;
  background:#fff; border:1px solid #eae8e1; border-radius:12px;
  box-shadow:0 8px 20px rgba(0,0,0,.06);
  padding:16px; z-index:9999;
}
.cookie-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
/* Header */
.topbar{ position:sticky; top:0; z-index:10; background:rgba(255,255,255,.8);
  backdrop-filter:saturate(140%) blur(8px); border-bottom:1px solid var(--border); }
.topbar-line{ display:grid; grid-template-columns: 180px 1fr; gap:12px; align-items:center; padding:10px 16px; }
@media (max-width:700px){ .topbar-line{ grid-template-columns: 1fr; gap:8px; } }

/* Buscador */
.searchbar{ display:grid; grid-template-columns: 1fr auto; gap:10px; align-items:center; }
.searchbar input{ height:42px; border-radius:10px; }
.btn-search{ height:42px; border-radius:10px; background:#007BFF; color:#fff; border:none; font-weight:700; }
.btn-search:hover{ background:#0056b3; }

/* Categorías */
.categories{ padding:8px 16px 14px; display:flex; gap:8px; flex-wrap:wrap; }
.categories-scroll{ overflow:auto; white-space:nowrap; scrollbar-width:thin; }
.categories-scroll .cat-btn{ white-space:nowrap; }

/* Slider/Hero */
.hero{ position:relative; max-width:var(--maxw); margin:0 auto 18px; padding:0 16px; }
.hero-slides{ position:relative; width:100%; aspect-ratio: 16/5; border-radius:14px; overflow:hidden;
  border:1px solid var(--border); box-shadow:var(--shadow); background:#f0f0f0; }
.hero-slide{ position:absolute; inset:0; opacity:0; transition:opacity .5s ease;
/* 👉 evita que los slides ocultos capten clics */
  pointer-events: none;
}
.hero-slide.active{
  opacity:1;
/* 👉 solo el activo recibe clics */
  pointer-events: auto;
}
.hero-slide a, .hero-slide img{ display:block; width:100%; height:100%; object-fit:cover; }
.hero-nav{ position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  background:rgba(0,0,0,.35); color:#fff; border:none; width:40px; height:40px; border-radius:50%;
  display:grid; place-items:center; cursor:pointer; }
.hero-nav.prev{ left:26px; } .hero-nav.next{ right:26px; }
.hero-dots{ display:flex; gap:8px; justify-content:center; margin-top:8px; }
.hero-dot{ width:10px; height:10px; border-radius:50%; background:#cfcfcf; cursor:pointer; border:none; }
.hero-dot.active{ background:#007BFF; }

/* Toast centrado en pantalla */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(51, 51, 51, 0.95);
  color: #fff;
  padding: 16px 26px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.logo { text-decoration:none; color:inherit; font-weight:800; }
.logo img { vertical-align:middle; display:inline-block; }
/* Bloque SEO bajo el banner */
.seo-blurb{
  max-width: var(--maxw);
  margin: 10px auto 18px;
  padding: 0 16px;
}
.seo-blurb h1{
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  line-height: 1.25;
}
.seo-blurb p{
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}
/* ===== Móvil: productos primero y grid 2 columnas ===== */
@media (max-width: 700px){
  /* La vista principal pasa a flex y reordenamos sin cambiar HTML */
  .layout{ display:flex; flex-direction:column; }
  .products{ order:1; }
  .sidebar{ order:2; position: static; }

  /* Rejilla de productos a 2 columnas */
  .grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
  }
  .card-body{ padding: 12px; }
  .card .title{ font-size: .95rem; }
  .card .price{ font-size: .95rem; }
}

/* ===== Botón flotante de carrito (solo móvil) ===== */
.fab-cart{
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #ff3e8d;   /* tu color alegre */
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10000;
}
.fab-cart.hidden{ display: none; }
.fab-cart #fab-count{
  background: #fff;
  color: #ff3e8d;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1;
  font-weight: 900;
}
/* Alineado en columna derecha + estilo ticket */
.cart-lines{ margin-top:8px; }

.cart-line{
  display:flex; justify-content:space-between; align-items:baseline; gap:10px;
}
.cart-line .label{ color:var(--muted); }
.cart-line .value{
  text-align:right; font-weight:600;
  font-variant-numeric: tabular-nums; /* números alineados como ticket */
}

#shipping-note{
  text-align:right; color:var(--muted); font-size:.9rem; margin:2px 0 6px;
}

.cart-divider{
  border:0; border-top:1px dashed #e5e2da; margin:8px 0;
}

.cart-line.total .label,
.cart-line.total .value{
  font-weight:800; font-size:1.05rem;
}
/* ==== LOGO ROTULOMANIA ==== */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.logo img {
  height: 60px;     /* antes 36px → más grande */
  width: auto;
  display: block;
}

/* Si usas grid para topbar, da más ancho al logo */
.topbar-line {
  display: grid;
  grid-template-columns: 220px 1fr;  /* logo | buscador */
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

/* Versión móvil */
@media (max-width: 700px) {
  .topbar-line {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .logo img {
    height: 48px; /* más grande también en móvil */
  }
}
/* ===== Precios en oferta + countdown ===== */
.old-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 6px;
}

.new-price {
  color: #e53935;
  font-weight: bold;
  margin-right: 6px;
}

.discount-tag {
  background: #e53935;
  color: #fff;
  font-weight: bold;
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
}

.countdown {
  display: block;
  font-size: 0.85em;
  color: #555;
  margin-top: 4px;
}
.countdown.expired{ color:#999; }

/* ===== Toast centrado ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(51, 51, 51, 0.95);
  color: #fff;
  padding: 16px 26px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== FAB carrito (móvil) ===== */
.fab-cart{
  position: fixed; right: 16px; bottom: 16px;
  background: #ff3e8d; color: #fff; border: none; border-radius: 999px;
  padding: 12px 14px; font-weight: 800; box-shadow: 0 10px 22px rgba(0,0,0,.22);
  display: flex; align-items: center; gap: 8px; z-index: 10000;
}
.fab-cart.hidden{ display:none; }
.fab-cart #fab-count{
  background:#fff; color:#ff3e8d; border-radius:999px; padding:2px 8px; line-height:1; font-weight:900;
}

/* ===== Slider: evitar clicks en slides ocultos ===== */
.hero-slide{ position:absolute; inset:0; opacity:0; transition:opacity .5s ease; pointer-events:none; }
.hero-slide.active{ opacity:1; pointer-events:auto; }
}
/* ===== Hover profesional Rotulomania ===== */
/* Efecto SOLO en el listado */
.products .card {
  transition: transform .25s ease, box-shadow .25s ease;
}
.products .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.products .card .thumb img { transition: transform .4s ease; }
.products .card:hover .thumb img { transform: scale(1.07); }

/* Anular cualquier efecto en páginas de producto */
.product-page .card,
.product-page .card:hover {
  transform: none !important;
  box-shadow: none !important;
}
.product-page .thumb img {
  transform: none !important;
}
/* ===== Hover profesional Rotulomania FINAL ===== */

.options{ display:grid; gap:12px; grid-template-columns: repeat(2,minmax(0,1fr)); margin:12px 0; }
.options .opt{ display:flex; flex-direction:column; gap:6px; }
.options label{ font-weight:600; }
.options .radio{ margin-right:12px; font-weight:500; }
@media (max-width:700px){ .options{ grid-template-columns:1fr; } }
/* === Layout ficha producto tipo "pegatina por superficie" === */

.product-two {
  display: grid;
  grid-template-columns: 1fr auto; /* escritorio: izq = opciones, dcha = preview */
  gap: 1.5rem;
  align-items: start;
}

.product-two .col-left {
  min-width: 0;
}

.product-two .col-right {
  display: flex;
  justify-content: center;   /* centramos el canvas horizontalmente */
  align-items: flex-start;
  padding-left: 1rem;
  padding-right: 1rem;
}

.preview-box {
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

/* En pantallas estrechas (móvil) */
@media (max-width: 700px) {
  .product-two {
    grid-template-columns: 1fr; /* una columna */
  }

  /* Queremos PREVIEW ARRIBA y opciones DEBAJO */
  .product-two .col-right {
    order: 1;          /* preview primero en móvil */
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .product-two .col-left {
    order: 2;          /* opciones debajo en móvil */
  }

  .preview-box {
    margin: 0 auto;
    max-width: 90vw;
  }
}

/* opcional para tablet/escritorio ancho más limpio */
@media (min-width: 701px) {
  .product-two {
    grid-template-columns: minmax(260px, 1fr) minmax(200px, auto);
  }
}


/* Descripción SEO en ficha */
.product-desc{
  margin-top: 16px;
  border-top: 1px dashed var(--border, #ece9e1);
  padding-top: 12px;
}
.product-desc h2{
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
}
.product-desc p{
  margin: 0 0 8px;
  color: var(--muted, #6b6b6b);
  line-height: 1.6;
}
/* Orientación: radios alineados */
.opt .radio-group{
  display: flex;               /* en columna si prefieres: column */
  flex-direction: column;
  gap: 8px;
}
.opt .radio{
  display: inline-flex;
  align-items: center;
  gap: 8px;                    /* espacio entre el círculo y el texto */
  line-height: 1;
}
.opt .radio input{ margin: 0; }
#tamano-nota{
  display:block;
  margin-top:4px;
  font-size:.9rem;
  color:var(--muted, #6b6b6b);
}
/* Estructura de dos columnas */
.product-two{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items:start;
}

/* Columna derecha: preview centrada */
.col-right{
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

/* En móvil pasa a 1 columna y preview arriba */
@media (max-width: 900px){
  .product-two{
    grid-template-columns: 1fr;
  }
  .col-right{
    order: -1;
  }
}

/* Texto SEO debajo */
.product-desc{
  margin-top: 24px;
  border-top: 1px dashed var(--border, #ece9e1);
  padding-top: 16px;
  max-width: 800px;
}

.product-desc h2{
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.product-desc p{
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--muted, #6b6b6b);
}

/* Radios alineados */
.radio-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.radio{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
/* Precio destacado en ficha */
#price-main{
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: .2px;
  margin: .25rem 0 1rem;
}

/* Input cantidad */
#cantidad{
  height: 42px;
  border: 1px solid var(--border, #eae7df);
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
  width: 120px;
}
/* Caja de previsualización alta */
.preview-box {
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fff;
  /* importante: */
  overflow: visible;
  max-height: none;
}

/* El canvas ocupa toda la caja */
.preview-box > canvas{
  width: 100%;
  height: 100%;
  display: block;
}
/* Ajuste solo para el botón "Añadir al carrito" en la ficha del producto */
#add-to-cart {
  height: 45px;
  padding: 0 1.25rem;
  font-size: 1rem;
  border-radius: 8px;
  width: auto;
  display: inline-flex;           /* ✅ cambio importante */
  align-items: center;            /* centra el texto verticalmente */
  justify-content: center;        /* centra el texto horizontalmente */
  line-height: 1;                 /* evita desajustes verticales */
  cursor: pointer;
  background-color: #ff2d7a;
  color: #fff;
  border: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#add-to-cart:hover {
  background-color: #ff1170;
  transform: translateY(-1px);
}

/* En móvil: ocupa todo el ancho */
@media (max-width: 700px) {
  #add-to-cart {
    width: 100%;
  }
  
}
/* --- Badge OFERTA en tarjetas --- */
.offer-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff3e8d;          /* mismo rosa marca */
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 6px 12px rgba(0,0,0,.18);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.offer-flag .fire {
  font-size: .9rem;
  line-height: 1;
}
.promo-badge{
  position:absolute;
  top:8px;
  left:-6px;
  background:#ff3e8d;
  color:#fff;
  font-size:.7rem;
  font-weight:700;
  padding:4px 8px;
  border-radius:4px;
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}
/* agrupador categoría + subcats */
.cat-group {
  position: relative;
}

/* botón padre con subcategorías */
.cat-btn.has-sub {
  position: relative;
}

/* panel desplegable */
.subcat-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  padding: 8px;
  min-width: 160px;
  display: none; /* oculto por defecto */
  z-index: 1000;
}

/* Botones internos (subcategorías) */
.subcat-panel .cat-btn.sub-cat {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  font-size: .9rem;
  padding: 8px 10px;
  white-space: nowrap;
}

/* que el hover se note */
.subcat-panel .cat-btn.sub-cat:hover {
  border-color: var(--brand);
  background: #fff8fb;
}

/* en móvil (barra scrolleable) mejor que los paneles se comporten como lista expandida */
@media (max-width:700px){
  .cat-group {
    position: static;
  }
  .subcat-panel {
    position: static;
    display: none;
    box-shadow: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 6px;
    background: #fff;
  }
  .subcat-panel .cat-btn.sub-cat {
    font-size: .95rem;
  }
}
/* contenedor de la barra de categorías */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative; /* importante para colocar dropdowns relativos a esta barra */
}

/* cada grupo principal (Retro, Animales...) */
.cat-group {
  position: relative;
  display: inline-block;
}

/* botón principal de categoría */
.cat-main-btn {
  border:1px solid var(--border);
  background:#fff;
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-size:.9rem;
  line-height:1.2;
  white-space:nowrap;
}
.cat-main-btn.active,
.cat-main-btn:hover{
  border-color:var(--brand);
  color:#000;
}

/* dropdown flotante de subcategorías */
.subcats-popover {
  position: absolute;
  top: calc(100% + 6px);         /* justo debajo del botón */
  left: 0;
  min-width: 160px;
  max-width: max-content;
  max-height: 220px;             /* por si hay muchas subcats */
  overflow-y: auto;

  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:0 16px 32px rgba(0,0,0,.15);

  padding:8px;
  display:none;                  /* se muestra al abrir */
  z-index:9999;
}

/* cada subcategoria como botón tipo píldora */
.subcat-btn {
  display:block;
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  background:#fff;
  border-radius:8px;
  padding:8px 10px;
  font-size:.9rem;
  line-height:1.2;
  cursor:pointer;
  white-space:nowrap;
}
.subcat-btn + .subcat-btn{
  margin-top:6px;
}
.subcat-btn:hover{
  border-color:var(--brand);
  color:#000;
  background:#fffdf7;
}

/* versión móvil: barra con scroll horizontal como antes */
@media (max-width:700px){
  .categories {
    overflow-x:auto;
    white-space:nowrap;
    scrollbar-width:thin;
  }
  .cat-group {
    flex:0 0 auto;
  }
  .subcats-popover {
    position: fixed;
    left:16px;
    right:16px;
    top:auto;
    bottom:16px;
    max-height:40vh;
    border-radius:12px;
    padding:12px;
  }
}
/* --- Arreglo popover cortado --- */

/* El nav puede seguir scroll horizontal, pero NO debe cortar hacia abajo */
.categories-scroll {
  overflow-x: auto;
  overflow-y: visible;      /* <-- importante */
  position: relative;       /* creamos contexto para z-index internos */
  z-index: 50;              /* nav encima del slider */
}

/* El botón padre (el li/grupo) actúa como ancla del popover */
.cat-group,
.cat-main-btn-wrapper {
  position: relative;       /* el popover se posiciona respecto a esto */
  flex-shrink: 0;
}

/* El popover en sí va por encima y no lo recortan */
.subcats-popover {
  position: absolute;
  left: 0;
  top: 100%;                /* justo debajo del botón */
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border, #ddd);
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(0,0,0,.12);
  padding: 8px;
  display: none;
  z-index: 9999;            /* lo ponemos MUY arriba */
  max-height: 60vh;
  overflow-y: auto;
}

.subcats-popover.show {
  display: block;
}
/* --- HEADER NUEVO --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border, #eae8e1);
}

.topbar-line {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

@media (max-width:600px){
  .topbar-line {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "burger logo"
      "search search";
  }
  #burger-btn { grid-area: burger; }
  .logo { grid-area: logo; justify-self: start; }
  .searchbar { grid-area: search; width: 100%; }
}

/* burger button */
.burger-btn{
  background:none;
  border:1px solid var(--border,#ddd);
  border-radius:8px;
  padding:8px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  cursor:pointer;
  width:40px;
  height:40px;
}
.burger-btn span{
  display:block;
  height:2px;
  background:#333;
  border-radius:2px;
}

/* Logo ajustado */
.logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo img{
  height:40px;
  width:auto;
  display:block;
}

/* searchbar ya la tenías, usamos la tuya */
.searchbar{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}
.searchbar input{
  height:42px;
  border-radius:10px;
}
.btn-search{
  height:42px;
  border-radius:10px;
  background:#007BFF;
  color:#fff;
  border:none;
  font-weight:700;
}
.btn-search:hover{
  background:#0056b3;
}

/* --- PANEL LATERAL --- */

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  box-shadow: 0 0 30px rgba(0,0,0,.2);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 2000;
}

.side-menu.open {
  transform: translateX(0);
}

.side-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1500;
}

.side-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.side-menu-head{
  padding:16px;
  border-bottom:1px solid var(--border,#eee);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.side-menu-title{
  font-weight:700;
  font-size:1rem;
}
.side-close{
  background:none;
  border:none;
  font-size:1.2rem;
  line-height:1;
  cursor:pointer;
}

.side-menu-body{
  flex:1;
  overflow-y:auto;
  padding:8px 16px 24px;
  font-size:1rem;
  line-height:1.4;
}

/* Bloques */
.side-block{
  border-bottom:1px solid var(--border,#eee);
  padding:12px 0;
}

.side-block-toggle,
.side-block-direct{
  width:100%;
  background:none;
  border:none;
  text-align:left;
  font-size:1rem;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  cursor:pointer;
  padding:8px 0;
}

.side-plus{
  font-weight:400;
  font-size:1.1rem;
  color:#444;
}

/* subcategorías plegables */
.side-subcats{
  display:none;
  padding:0 0 8px 14px;
}
.side-subcats.open{
  display:block;
}
.side-link{
  display:block;
  width:100%;
  text-align:left;
  background:none;
  border:none;
  padding:6px 0;
  font-size:.95rem;
  color:#333;
  cursor:pointer;
}
.side-link:hover{
  color:#ff3e8d;
  font-weight:600;
}

.side-sep{
  border:0;
  border-top:1px solid var(--border,#eee);
  margin:16px 0;
}
.side-extra-link{
  display:block;
  color:#333;
  text-decoration:none;
  padding:8px 0;
  font-size:.95rem;
}
.side-extra-link:hover{
  color:#007BFF;
  text-decoration:underline;
}

/* overlay oscuro detrás del panel */
.side-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  z-index:1500;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}
.side-overlay.show{
  opacity:1;
  pointer-events:auto;
}
.offer-badge{
  position:absolute;
  top:8px;
  left:8px;
  background:#ff3e8d;
  color:#fff;
  font-size:.75rem;
  font-weight:700;
  padding:4px 6px;
  border-radius:6px;
  box-shadow:0 4px 10px rgba(0,0,0,.2);
}
/* ====== Botón hamburguesa ====== */
.burger-btn{
  background:#fff;
  border:1px solid var(--border,#e5e2da);
  border-radius:8px;
  height:40px;
  width:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 4px 12px rgb(0 0 0 / .08);
}

/* ====== Panel lateral ====== */
.side-menu-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  z-index:999;
}
.side-menu-backdrop.open{
  opacity:1;
  pointer-events:auto;
}

.side-menu{
  position:fixed;
  top:0;
  left:0; /* si lo quieres deslizar desde la izquierda */
  height:100vh;
  width:280px;
  max-width:80%;
  background:#fff;
  box-shadow: 4px 0 24px rgb(0 0 0 / .18);
  border-right:1px solid var(--border,#e5e2da);
  border-radius:0 12px 12px 0;
  display:flex;
  flex-direction:column;

  transform:translateX(-110%);
  transition:transform .28s cubic-bezier(.2,.8,.3,1);
  z-index:1000;
}
.side-menu.open{
  transform:translateX(0);
}

/* cabecera del panel */
.side-menu-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:16px 16px 12px;
  background:linear-gradient(90deg,#fff 0%, #fff9f2 40%, #fff0f7 100%);
  border-bottom:1px solid var(--border,#ece9e1);
}
.side-menu-title{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.side-menu-logo img{
  width:48px;
  height:auto;
  display:block;
}
.side-menu-shop strong{
  font-size:1rem;
  line-height:1.2;
  font-weight:700;
  color:#222;
  display:block;
}
.side-menu-shop small{
  font-size:.8rem;
  color:#777;
  line-height:1.2;
}

.side-menu-close{
  background:none;
  border:0;
  font-size:1.1rem;
  font-weight:600;
  cursor:pointer;
  color:#444;
  line-height:1;
  padding:4px 8px;
}

/* cuerpo scrollable */
.side-menu-nav{
  flex:1;
  overflow-y:auto;
  padding:8px 0 16px;
}

/* footer fijo abajo */
.side-menu-footer{
  border-top:1px solid var(--border,#ece9e1);
  padding:12px 16px 16px;
  font-size:.8rem;
  color:#777;
  line-height:1.4;
  background:#fafafa;
}

/* ====== Items ====== */
.menu-item{
  all:unset;
  box-sizing:border-box;
  width:100%;
  cursor:pointer;
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 16px;
  border-bottom:1px solid var(--border,#f0ede6);
  background:#fff;
  position:relative;
}
.menu-item:active,
.menu-item:hover{
  background:#fff9f2;
}
.menu-icon{
  font-size:1.2rem;
  line-height:1;
  width:1.6rem;
  text-align:center;
}
.menu-text{
  flex:1;
  min-width:0;
}
.menu-main{
  font-size:.95rem;
  font-weight:600;
  color:#222;
  line-height:1.3;
  display:block;
}
.menu-sub{
  font-size:.8rem;
  color:#888;
  line-height:1.2;
  display:block;
  margin-top:2px;
}

/* flecha de las categorías con subniveles */
.menu-toggle .menu-arrow{
  font-size:.8rem;
  color:#555;
  margin-left:auto;
  align-self:center;
  transition:transform .2s ease;
}
.menu-toggle.open .menu-arrow{
  transform:rotate(180deg);
}

/* ====== Submenú ====== */
.submenu{
  background:#fafafa;
  border-bottom:1px solid var(--border,#f0ede6);
  max-height:0;
  overflow:hidden;
  transition:max-height .25s ease;
}
.submenu.open{
  max-height:400px; /* lo bastante grande para mostrar todo */
}

.submenu-item{
  all:unset;
  cursor:pointer;
  display:block;
  width:100%;
  padding:10px 16px 10px 44px; /* sangría */
  font-size:.9rem;
  border-bottom:1px solid var(--border,#efede6);
  color:#333;
  line-height:1.4;
}
.submenu-item:last-child{
  border-bottom:0;
}
.submenu-item:hover,
.submenu-item:active{
  background:#fff;
  color:#000;
}
/* ===== Select de tamaños mejorado ===== */
#tamano {
  width: 100%;
  max-width: 300px;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: "Poppins", "Segoe UI", sans-serif;
  appearance: none;           /* quita la flecha del sistema */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#tamano:hover {
  border-color: #bbb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#tamano:focus {
  outline: none;
  border-color: #ff006a;
  box-shadow: 0 0 0 3px rgba(255, 0, 106, 0.15);
}

/* Opciones dentro del desplegable */
#tamano option {
  font-size: 0.9rem;
  padding: 6px 10px;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

/* En algunos navegadores el texto no mantiene monoespaciado;
   así se alinean mejor los precios */
#tamano {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
/* ===== Selector de tamaño PRO ===== */

.size-picker-btn {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  text-align: left;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: .95rem;
  line-height: 1.3;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  cursor: pointer;
  position: relative;
  transition: all .18s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "main price"
    "sub  price";
  row-gap: 2px;
}
.size-picker-btn:hover {
  border-color:#bbb;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.size-picker-btn:focus {
  outline:none;
  border-color:#ff006a;
  box-shadow:0 0 0 3px rgba(255,0,106,.15);
}

.size-picker-btn .size-main{
  grid-area: main;
  font-weight:600;
  color:#000;
}
.size-picker-btn .size-sub{
  grid-area: sub;
  font-size:.8rem;
  color:#777;
}
.size-picker-btn .size-price{
  grid-area: price;
  justify-self:end;
  font-weight:700;
  color:#111;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
}
.size-picker-btn .chevron{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  font-size:.8rem;
  color:#777;
  pointer-events:none;
}

/* Dropdown flotante */
.size-picker-dropdown {
  position: absolute;
  z-index: 9999;
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  box-shadow:0 16px 32px rgba(0,0,0,.16);
  margin-top:6px;
  width: 100%;
  max-width: 360px;
  max-height: 260px;
  overflow-y:auto;
  padding:6px 0;
  display:none;
}

/* Lista interna */
.size-picker-dropdown ul{
  list-style:none;
  margin:0;
  padding:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size:.9rem;
  line-height:1.4;
}

/* Cada fila */
.size-option{
  display:grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "main price"
    "sub  price";
  row-gap:2px;

  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #f2f2f2;
}
.size-option:last-child{
  border-bottom:none;
}
.size-option:hover{
  background:#fff6fa;
}
.size-option.active{
  background:#ffe8f4;
}

.size-option .opt-main{
  grid-area:main;
  font-weight:600;
  color:#000;
}
.size-option .opt-sub{
  grid-area:sub;
  font-size:.8rem;
  color:#777;
}
.size-option .opt-price{
  grid-area:price;
  justify-self:end;
  font-weight:700;
  color:#111;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
}

/* scroll bonito */
.size-picker-dropdown::-webkit-scrollbar{
  width:6px;
}
.size-picker-dropdown::-webkit-scrollbar-thumb{
  background:#ccc;
  border-radius:3px;
}
.size-picker-dropdown::-webkit-scrollbar-track{
  background:#f5f5f5;
}

/* Para asegurar stacking correcto en layouts responsive */
.opt {
  position: relative; /* el dropdown se posiciona relativo a este bloque */
  max-width: 360px;
}
/* --- Rejilla de opciones más flexible --- */

/* Por defecto (móvil): una columna, ya estaba bien */
.options {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

/* A partir de 768px: dos columnas para el resto,
   pero forzamos que el bloque "Tamaño" ocupe toda la fila
   y "Color" vaya debajo también ocupando toda la fila */
@media (min-width: 768px) {
  .options {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* Forzamos orden y spans */
  .opt-size {
    grid-column: 1 / span 2; /* Tamaño a todo el ancho */
    order: 10;
  }
  .opt-color {
    grid-column: 1 / span 2; /* Color también a todo el ancho debajo */
    order: 20;
  }

  /* El resto (Acabado, Orientación, Cantidad, botón...) sigue fluyendo */
  .opt-finish { order: 30; }
  .opt-orient { order: 40; }
  .opt-qty    { order: 50; }
  .opt-add    { order: 60; }
}

/* Para que no se vea tan aplastado: */
.size-picker-btn,
.color-picker-btn {
  max-width: 360px;
  width: 100%;
}
.size-picker-dropdown,
.color-picker-dropdown {
  max-width: 360px;
  width: 100%;
}
/* ===== Selector de COLOR PRO ===== */

.color-picker-btn {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  text-align: left;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: .95rem;
  line-height: 1.3;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  cursor: pointer;
  position: relative;
  transition: all .18s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-picker-btn:hover {
  border-color:#bbb;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.color-picker-btn:focus {
  outline:none;
  border-color:#ff006a;
  box-shadow:0 0 0 3px rgba(255,0,106,.15);
}

.color-swatch {
  width:20px;
  height:20px;
  border-radius:4px;
  border:1px solid #ccc;
  background:#000;
  flex-shrink:0;
}
.color-name {
  font-weight:600;
  color:#000;
  font-size:.95rem;
  line-height:1.2;
}
.color-picker-btn .chevron {
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  font-size:.8rem;
  color:#777;
  pointer-events:none;
}

/* Dropdown */
.color-picker-dropdown {
  position: absolute;
  z-index: 9999;
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  box-shadow:0 16px 32px rgba(0,0,0,.16);
  margin-top:6px;
  width:100%;
  max-height:250px;
  overflow-y:auto;
  padding:6px 0;
  display:none;
}

.color-picker-dropdown ul{
  list-style:none;
  margin:0;
  padding:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:.9rem;
  line-height:1.4;
}

.color-option{
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  border-bottom:1px solid #f2f2f2;
}
.color-option:last-child{
  border-bottom:none;
}
.color-option:hover{
  background:#fff6fa;
}
.color-option.active{
  background:#ffe8f4;
}

.color-option .opt-color-swatch{
  width:20px;
  height:20px;
  border-radius:4px;
  border:1px solid #ccc;
  flex-shrink:0;
}
.color-option .opt-color-name{
  font-weight:600;
  color:#000;
  font-size:.9rem;
  line-height:1.2;
}

/* Scroll bonito */
.color-picker-dropdown::-webkit-scrollbar{
  width:6px;
}
.color-picker-dropdown::-webkit-scrollbar-thumb{
  background:#ccc;
  border-radius:3px;
}
.color-picker-dropdown::-webkit-scrollbar-track{
  background:#f5f5f5;
}
/* === Layout 2 columnas producto === */
.product-two {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 320px; /* izquierda grande, derecha preview */
  align-items: start;
}

/* Columna izquierda */
.col-left {
  min-width: 0;
}

/* Columna derecha (preview) */
.col-right {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.preview-box {
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fff; /* caja contenedora */
  padding: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  max-width: 100%;
}

/* Canvas responsive */
.preview-box > canvas{
  width: 100%;
  height: auto;
  display: block;
}

/* Descripción al final */
.product-desc{
  margin-top: 1.5rem;
  border-top: 1px dashed var(--border, #ece9e1);
  padding-top: 1rem;
}
.product-desc h2{
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
}
.product-desc p{
  margin: 0 0 8px;
  line-height: 1.6;
  color: var(--muted, #6b6b6b);
}

/* En pantallas estrechas: preview ARRIBA */
@media (max-width: 768px){
  .product-two {
    grid-template-columns: 1fr;
  }
  .col-right {
    order: -1; /* preview primero en móvil */
    justify-content:center;
  }
  .preview-box {
    max-width: 90vw;
    margin: 0 auto 1rem;
  }
}

/* === Opciones y sus bloques === */

.options {
  display: grid;
  gap: 1rem;
}

/* en desktop: 2 columnas para algunos bloques,
   pero Tamaño/Color/Acabado cada uno ocupa toda la fila para que respiren */
@media (min-width:768px){
  .options {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .opt-size,
  .opt-color,
  .opt-finish {
    grid-column: 1 / span 2;
  }

  .opt-orient {
    grid-column: 1 / span 2;
  }

  .opt-row {
    grid-column: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
  }

  .qty-wrap {
    flex: 0 0 auto;
  }

  .add-wrap {
    flex: 1 1 auto;
  }

  .add-wrap button {
    width: 100%;
    max-width: 240px;
  }
}

label{
  font-weight:600;
  font-size:.9rem;
  display:block;
  margin-bottom:4px;
}

/* Input cantidad */
#cantidad{
  height: 40px;
  border: 1px solid var(--border, #eae7df);
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 600;
  width: 80px;
  font-size: .95rem;
}

/* Orientación radios, más limpios lado a lado */
.orient-group{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem 1.5rem;
  font-size:.9rem;
  line-height:1.2;
}
.orient-group .radio{
  display:flex;
  align-items:center;
  gap:.4rem;
  font-weight:500;
}

#add-to-cart{
  height:44px;
  border:none;
  border-radius:8px;
  background:#ff2d7a;
  color:#fff;
  font-size:1rem;
  font-weight:600;
  line-height:1;
  padding:0 1.25rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .2s, box-shadow .2s;
}
#add-to-cart:hover{
  background:#ff1170;
  box-shadow:0 8px 20px rgba(255,17,112,.3);
}

/* === Botón desplegable genérico (tamaño, color, acabado) === */

.size-picker-btn,
.color-picker-btn,
.finish-picker-btn{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:.5rem 1rem;

  background:#fff;
  border:1px solid #ddd;
  border-radius:8px;
  width:100%;
  text-align:left;
  padding:10px 36px 10px 12px;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:.95rem;
  line-height:1.3;
  cursor:pointer;
  transition:all .18s ease;
}
.size-picker-btn:hover,
.color-picker-btn:hover,
.finish-picker-btn:hover{
  border-color:#bbb;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.size-picker-btn:focus,
.color-picker-btn:focus,
.finish-picker-btn:focus{
  outline:none;
  border-color:#ff006a;
  box-shadow:0 0 0 3px rgba(255,0,106,.15);
}

/* Partes dentro del botón tamaño */
.size-main{
  font-weight:600;
  color:#000;
}
.size-price{
  margin-left:auto;
  font-weight:600;
  color:#000;
}
.size-sub{
  flex-basis:100%;
  font-size:.8rem;
  color:#666;
  line-height:1.3;
}
.size-picker-btn .chevron,
.color-picker-btn .chevron,
.finish-picker-btn .chevron{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  font-size:.8rem;
  color:#777;
  pointer-events:none;
}

/* Partes del botón de color */
.color-swatch{
  width:20px;
  height:20px;
  border-radius:4px;
  border:1px solid #ccc;
  background:#000;
  flex-shrink:0;
}
.color-name{
  font-weight:600;
  color:#000;
  line-height:1.2;
  font-size:.95rem;
}

/* Botón de acabado */
.finish-name{
  font-weight:600;
  color:#000;
  font-size:.95rem;
  line-height:1.2;
}

/* Dropdown base */
.size-picker-dropdown,
.color-picker-dropdown,
.finish-picker-dropdown{
  position:absolute;
  z-index:9999;
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  box-shadow:0 16px 32px rgba(0,0,0,.16);
  margin-top:6px;
  width:100%;
  max-width:360px;
  max-height:260px;
  overflow-y:auto;
  padding:6px 0;
  display:none;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:.9rem;
  line-height:1.4;
}

/* Ítems del dropdown tamaño */
.size-option{
  padding:10px 12px;
  line-height:1.4;
  border-bottom:1px solid #f2f2f2;
  cursor:pointer;
}
.size-option:last-child{
  border-bottom:none;
}
.size-line-top{
  display:flex;
  justify-content:space-between;
  font-weight:600;
  color:#000;
  font-size:.9rem;
}
.size-line-bottom{
  margin-top:4px;
  font-size:.8rem;
  color:#666;
}
.size-option:hover{
  background:#fff6fa;
}
.size-option.active{
  background:#ffe8f4;
}

/* Ítems del dropdown color */
.color-option{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  padding:10px 12px;
  border-bottom:1px solid #f2f2f2;
}
.color-option:last-child{
  border-bottom:none;
}
.color-option .opt-color-swatch{
  width:20px;
  height:20px;
  border-radius:4px;
  border:1px solid #ccc;
  flex-shrink:0;
}
.color-option .opt-color-name{
  font-weight:600;
  color:#000;
  font-size:.9rem;
  line-height:1.2;
}
.color-option:hover{
  background:#fff6fa;
}
.color-option.active{
  background:#ffe8f4;
}

/* Ítems del dropdown acabado */
.finish-option{
  cursor:pointer;
  padding:10px 12px;
  border-bottom:1px solid #f2f2f2;
  font-weight:600;
  font-size:.9rem;
  color:#000;
}
.finish-option:last-child{
  border-bottom:none;
}
.finish-option:hover{
  background:#fff6fa;
}
.finish-option.active{
  background:#ffe8f4;
}

/* Bonito scroll */
.size-picker-dropdown::-webkit-scrollbar,
.color-picker-dropdown::-webkit-scrollbar,
.finish-picker-dropdown::-webkit-scrollbar{
  width:6px;
}
.size-picker-dropdown::-webkit-scrollbar-thumb,
.color-picker-dropdown::-webkit-scrollbar-thumb,
.finish-picker-dropdown::-webkit-scrollbar-thumb{
  background:#ccc;
  border-radius:3px;
}
.size-picker-dropdown::-webkit-scrollbar-track,
.color-picker-dropdown::-webkit-scrollbar-track,
.finish-picker-dropdown::-webkit-scrollbar-track{
  background:#f5f5f5;
}
/* Botón "← Atrás" del header de ficha */
.topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.topbar .logo img {
  height: 40px;
  width: auto;
  display: block;
}

.topbar .back-btn {
  font-size: .9rem;
  line-height: 1;
  color: #444;
  text-decoration: none;
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: .5rem;
  padding: .4rem .6rem;
  white-space: nowrap;
}
.topbar .back-btn:hover {
  background: #eee;
}

/* Bloque de opciones de producto */
.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 1.5rem;
  max-width: 400px;
}

/* Cantidad + botón abajo */
.opt-row.bottom-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-top: .5rem;
  padding-top: .75rem;
  border-top: 1px solid #eee;
}

.qty-wrap label {
  display: block;
  font-size: .9rem;
  margin-bottom: .25rem;
}

.qty-wrap input {
  width: 60px;
}

.add-wrap button {
  white-space: nowrap;
  min-width: 140px;
  font-weight: 600;
}
/* ====== LAYOUT GENERAL DEL DETALLE ====== */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

/* ====== COLUMNA PREVISUALIZACIÓN ====== */
.product-visual {
  background: #f9f9f9;
  border: 1px solid #ececec;
  border-radius: 6px;
  padding: 1rem;
}

#preview-box {
  width: 100%;
  display: block;
}

#design-canvas {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 4px;
  background: #efefef;
  border: 1px solid #dedede;
}

/* ====== COLUMNA CONFIGURACIÓN ====== */
.product-config {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-head {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 1rem;
}

.product-head .title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

#price-main,
.price {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}

/* estilos cuando hay descuento dinámico */
#price-main .old-price,
.price .old-price {
  font-size: .9rem;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
  margin-right: .5rem;
}
#price-main .new-price,
.price .new-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
}
.discount-tag {
  background: #ff3e8d;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: .5rem;
}

.countdown {
  font-size: .75rem;
  color: #ff3e8d;
  font-weight: 600;
  margin-top: .25rem;
  display: inline-block;
}

/* ====== BLOQUES DE FORM ====== */
.form-block {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.form-block.small-inline {
  max-width: 130px;
}

.form-label {
  font-size: .9rem;
  font-weight: 600;
  color: #111;
}

/* ====== SELECT FANCY (tamaño) ====== */

.select-fancy {
  position: relative;
  max-width: 320px;
  font-size: .9rem;
}

.select-fancy-btn {
  width: 100%;
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  padding: .75rem .75rem .5rem .75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  line-height: 1.3;
}

.select-line1 {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: .95rem;
}
.select-line2 {
  font-size: .8rem;
  color: #707070;
  font-weight: 400;
}

.select-fancy-btn .chevron {
  position: absolute;
  right: .75rem;
  top: .75rem;
  font-size: .8rem;
  color: #555;
}

.select-fancy-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
  max-height: 220px;
  overflow-y: auto;
  padding: .5rem 0;
  display: none; /* JS la abre */
  z-index: 20;
}

.size-option {
  padding: .5rem .75rem;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "main price"
    "sub  price";
  gap: .25rem .5rem;
  font-size: .85rem;
}
.size-option:last-child {
  border-bottom: 0;
}
.size-option .opt-main { grid-area: main; font-weight:600; }
.size-option .opt-sub  { grid-area: sub; font-size:.8rem; color:#707070; }
.size-option .opt-price{ grid-area: price; font-weight:600; white-space:nowrap; }

.size-option.active {
  background: #fff4fa;
}

/* nota bajo selector tamaño */
.size-note {
  font-size: .8rem;
  color: #707070;
  line-height: 1.4;
}

/* ====== RADIO ORIENTACIÓN ====== */
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  font-size: .9rem;
}
.radio-pair {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500;
  cursor: pointer;
}
.radio-pair input[type="radio"] {
  accent-color: #ff3e8d; /* rosa marca */
}

/* ====== CANTIDAD ====== */
.qty-input {
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  padding: .5rem .5rem;
  font-size: 1rem;
  width: 100%;
  max-width: 70px;
}

/* ====== BOTÓN PRINCIPAL ====== */
.btn-primary {
  background: #ff3e8d;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: .8rem 1rem;
  cursor: pointer;
  text-align: center;
  width: 100%;
  max-width: 220px;
}
.btn-primary:active {
  transform: scale(.98);
}

/* ====== DESCRIPCIÓN ====== */
.product-desc {
  border-top: 1px solid #e5e5e5;
  padding-top: 1.5rem;
  margin-bottom: 3rem;
}
.desc-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 .5rem;
}
.desc-text {
  font-size: .95rem;
  color: #444;
  line-height: 1.5;
}

/* ====== EL CANVAS DONDE SE MUESTRAN LAS PEGATINAS ====== */
#design-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 420px;      /* 🔹 ajusta este valor según lo alto que quieras el preview */
  margin: 0 auto;
  border-radius: 4px;
  background: #efefef;
  border: 1px solid #dedede;
  object-fit: contain;
}
/* ===== ESTILO BARRA SUPERIOR ===== */
.top-banner {
  background: linear-gradient(90deg, #ff3e8d, #ff8a00);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.scroll-text {
  display: inline-block;
  animation: scrollText 18s linear infinite;
}

@keyframes scrollText {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
/* ===== FOOTER ===== */
.footer-pro {
  background: linear-gradient(90deg, #ff3e8d, #ff8a00);
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
}
.footer-links {
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.75rem;
  font-weight: 500;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-copy {
  font-size: 0.9rem;
  opacity: 0.9;
}
.seo-section {
  max-width: 960px;
  margin: 3rem auto 2rem;
  padding: 0 1rem;
  text-align: left;
  color: #444;
}
.seo-section h2 {
  font-size: 1.4rem;
  color: #222;
  margin-bottom: 0.5rem;
}
/* ===== Ajustes de cards (reducir altura) + botones rosas ===== */

/* Colores de marca */
:root{
  --brand-pink: #ff3e8d;
  --brand-pink-dark: #e93880;
}

/* Grid: mete más tarjetas por fila (reduce el ancho mínimo y el gap) */
.grid{
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); /* antes 260-280 aprox */
  gap: 14px; /* un pelín menos */
}

/* Card más compacta */
.card{
  padding: .75rem .75rem 1rem;
}

/* Miniatura más baja (mantiene hover y object-fit) */
.card .thumb{
  height: 180px;             /* ↓ baja la altura del área de imagen */
  border-radius: 10px;
  overflow: hidden;
}
@media (min-width: 1200px){
  .card .thumb{ height: 200px; } /* un poco más en pantallas grandes */
}

/* Tipografías más compactas dentro de la card */
.card .title{ font-size: 1rem; margin: .55rem 0 .25rem; }
.card .price{ font-size: 1.05rem; margin-bottom: .35rem; }
.card .tag{ font-size: .85rem; }

/* Botones rosas (personalizar, primarios, etc.) */
.btn-personalizar,
.btn-primary,
.btn.btn-search{
  background: var(--brand-pink) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.btn-personalizar:hover,
.btn-primary:hover,
.btn.btn-search:hover{
  background: var(--brand-pink-dark) !important;
}

/* Si tienes botones secundarios con borde, mantenlos neutros */
.btn{
  transition: background .15s ease, transform .06s ease;
}
.btn:active{ transform: translateY(1px); }
/* ===== GRID RESPONSIVE AJUSTADA ===== */

/* Escritorio grande (a partir de 1200px): 4 columnas amplias */
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

/* Tablets y pantallas medianas (600px–1199px): 3 columnas */
@media (min-width: 600px) and (max-width: 1199px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Móviles (menos de 600px): 2 columnas */
@media (max-width: 599px) {
  .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  /* Ajustes visuales para tarjetas compactas */
  .card {
    padding: 0.6rem;
  }

  .card .thumb {
    height: 140px;              /* Imagen más baja */
  }

  .card .title {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .card .price {
    font-size: 1rem;
  }

  .btn-personalizar {
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
    width: 100%;
  }
}
    /* Mini CSS para asegurar el scroll del aviso (si tu styles.css ya lo tiene, no molesta) */   .top-banner{position:sticky;top:0;z-index:1000;background:linear-gradient(90deg,#ff3e8d,#ff8a00);color:#fff;height:36px;display:flex;align-items:center;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.06)}
    .top-banner .scroll-text{white-space:nowrap;font-weight:600;width:100%;animation:rbScroll 18s linear infinite;padding-left:100%}
    @keyframes rbScroll{from{transform:translateX(0)}to{transform:translateX(-100%)}}
	.top-banner{
  position:sticky; top:0; z-index:1000;
  background:linear-gradient(90deg,#ff3e8d,#ff8a00);
  color:#fff; height:36px; overflow:hidden;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.top-banner .marquee{
  display:flex; gap:4rem; align-items:center; height:36px;
  white-space:nowrap; will-change:transform;
  animation:rbMarquee var(--rb-marquee-duration, 20s) linear infinite;
}
.top-banner .marquee:hover{ animation-play-state:paused; } /* pausa al pasar el dedo/ratón */
.top-banner .marquee span{ padding-inline:1rem; font-weight:600; }
@keyframes rbMarquee{
  from{ transform:translateX(0); }
  to  { transform:translateX(-50%); } /* como duplicamos el texto, -50% hace bucle perfecto */
}
#free-shipping-msg{ margin-top:.35rem; color:#555; }
#free-shipping-msg.positive{ color:#008a2e; font-weight:600; }
@media (max-width: 900px) {
  main.layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "products"
      "sidebar";
  }

  .products {
    grid-area: products;
  }

  .product-box {
    grid-area: products;
  }

  .sidebar {
    grid-area: sidebar;
  }
}
/* La miniatura será el contenedor de referencia */
.card .thumb{ position: relative; overflow: hidden; }  /* contenedor de referencia */
.offer-badge-fixed{
  position:absolute; top:8px; left:8px; z-index:10;
  background:#ff3e8d; color:#fff; font-weight:700; font-size:.75rem;
  padding:.22rem .5rem; border-radius:6px; line-height:1; pointer-events:none;
}
/* Sustituye el bloque .back-btn anterior por este */
header.topbar .back-btn,
.back-btn{
  background:#ff3e8d;
  border:1px solid #ff3e8d;
  border-radius:4px;
  padding:.4rem .8rem;
  color:#fff;
  text-decoration:none;
  font-weight:500;
  line-height:1.2;
}

header.topbar .back-btn:hover,
.back-btn:hover{
  background:#e5367d;
  border-color:#e5367d;
}
/* La tarjeta ocupa toda la altura y distribuye el contenido en columna */
.product-card .card{
  display:flex;
  flex-direction:column;
  height:100%;
}

/* Empuja el botón al fondo de la tarjeta */
.product-card .customize-btn{
  margin-top:auto;
}
/* 1) Asegura que cada item de producto estira a todo el alto del grid */
#product-grid > .product-card,
#category-grid > .product-card {
  height: 100%;
}

/* 2) La tarjeta interna en modo columna */
.product-card .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 3) Si tienes bloque de texto, que ocupe el espacio flexible */
.product-card .card-main {
  flex: 1 1 auto;
}

/* 4) El botón siempre pegado abajo */
.product-card .customize-btn {
  margin-top: auto;
}
/* El item que cuelga del grid estira a todo el alto */
#product-grid > .product-card,
#category-grid > .product-card {
  height: 100%;
}

/* El <article class="card"> en modo columna */
.product-card > .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* El cuerpo de la tarjeta también en columna */
.product-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* El botón se empuja hacia abajo */
.product-card .customize-btn {
  margin-top: auto;
}
