/* ============================================
   TaniStudio — Página "Arma tu cotización"
   Usa las mismas variables de css/style.css (colores, fuentes, radios).
   Este archivo solo agrega lo nuevo de esta pantalla.
============================================ */

/* ----- Hero chico de la página ----- */
.quote-hero{
  padding:160px 0 40px;
  background:linear-gradient(180deg,var(--pink-50),var(--white));
  text-align:center;
}
.quote-hero__title{
  font-family:var(--font-title);
  font-weight:700;
  font-size:clamp(2rem,4vw,2.8rem);
  color:var(--text-dark);
  margin-bottom:14px;
}
.quote-hero__text{
  color:var(--text-muted);
  max-width:560px;
  margin:0 auto;
}

/* ----- Pasos 1-2-3 ----- */
.quote-steps{
  padding:28px 0 10px;
}
.quote-steps__list{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
}
.quote-steps__item{
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--pink-50);
  border-radius:50px;
  padding:10px 20px;
  font-size:.9rem;
  color:var(--text-dark);
  font-weight:500;
}
.quote-steps__num{
  width:24px;height:24px;
  border-radius:50%;
  background:var(--pink-500);
  color:var(--white);
  display:flex;align-items:center;justify-content:center;
  font-size:.8rem;
  font-weight:700;
  flex-shrink:0;
}

/* ----- Layout principal: catálogo + carrito ----- */
.quote-builder{padding:30px 0 90px;}
.quote-builder__grid{
  display:grid;
  grid-template-columns:1fr 340px;
  gap:28px;
  align-items:start;
}
@media (max-width:900px){
  .quote-builder__grid{grid-template-columns:1fr;}
}

/* ----- Filtros de categoría ----- */
.quote-filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:22px;
}
.quote-filter{
  padding:9px 18px;
  border-radius:50px;
  border:2px solid var(--pink-200);
  background:var(--white);
  color:var(--pink-600);
  font-weight:600;
  font-size:.88rem;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.quote-filter.is-active,
.quote-filter:hover{
  background:linear-gradient(135deg,var(--pink-500),var(--pink-600));
  border-color:transparent;
  color:var(--white);
}

/* ----- Grid de productos (estilo catálogo de app de pedidos) ----- */
.quote-products{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:18px;
}
.product-card{
  background:var(--white);
  border:1px solid var(--pink-100);
  border-radius:var(--radius-md);
  padding:18px;
  box-shadow:var(--shadow-sm);
  display:flex;
  flex-direction:column;
  gap:10px;
  transition:transform .2s ease, box-shadow .2s ease;
}
.product-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow-md);
}
.product-card__media{
  width:100%;
  aspect-ratio:1.4/1;
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,var(--pink-100),var(--pink-50));
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.4rem;
  overflow:hidden;
}
/* El diseño se pinta en un <canvas> (con marca de agua, ver
   pintarDisenoEnCanvas en cotizacion.js), por eso solo hace falta que
   llene el contenedor; el "contain" ya queda resuelto al dibujarlo. */
.product-card__lienzo{width:100%;height:100%;}
.product-card__category{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  color:var(--coral);
  text-transform:uppercase;
}
.product-card__name{
  font-family:var(--font-title);
  font-weight:600;
  font-size:1.05rem;
  color:var(--text-dark);
}
.product-card__price{
  font-weight:700;
  color:var(--pink-600);
}
.product-card__price small{
  font-weight:500;
  color:var(--text-muted);
}
.product-card__cta{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px 16px;
  border-radius:12px;
  background:var(--pink-50);
  color:var(--pink-600);
  font-weight:600;
  font-size:.9rem;
  transition:background .2s ease, color .2s ease;
}
.product-card__cta:hover{
  background:linear-gradient(135deg,var(--pink-500),var(--pink-600));
  color:var(--white);
}

/* ----- Carrito / resumen de cotización ----- */
.quote-cart{
  background:var(--white);
  border:1px solid var(--pink-100);
  border-radius:var(--radius-md);
  padding:22px;
  box-shadow:var(--shadow-sm);
  position:sticky;
  top:110px;
}
.quote-cart h3{
  font-family:var(--font-title);
  margin-bottom:14px;
  color:var(--text-dark);
}
.quote-cart__empty{
  color:var(--text-muted);
  font-size:.9rem;
}
.quote-cart__list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:16px;
}
.cart-item{
  display:flex;
  gap:10px;
  align-items:center;
}
.cart-item__thumb{
  width:46px;height:46px;
  border-radius:10px;
  background:var(--text-dark);
  flex-shrink:0;
  overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  font-size:1.2rem;
  padding:6px;
}
.cart-item__thumb img{width:100%;height:100%;object-fit:cover;}
.cart-item__info{flex:1;min-width:0;}
.cart-item__name{font-weight:600;font-size:.88rem;color:var(--text-dark);}
.cart-item__meta{font-size:.78rem;color:var(--text-muted);}
.cart-item__line{font-weight:700;font-size:.85rem;color:var(--pink-600);white-space:nowrap;}
.cart-item__remove{
  color:var(--text-muted);
  font-size:1rem;
  line-height:1;
  padding:4px;
}
.cart-item__remove:hover{color:var(--pink-600);}

.quote-cart__total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:700;
  font-size:1.1rem;
  color:var(--text-dark);
  border-top:1px dashed var(--pink-200);
  padding-top:14px;
  margin-bottom:16px;
}
.quote-cart__total span:last-child{color:var(--pink-600);}

.quote-cart__fields{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:16px;
}
.quote-cart__field label{
  display:block;
  font-weight:600;
  font-size:.82rem;
  margin-bottom:6px;
  color:var(--text-dark);
}
.quote-cart__field input{
  width:100%;
  padding:11px 14px;
  border-radius:var(--radius-sm);
  border:1.5px solid var(--pink-200);
  background:var(--white);
  font-family:inherit;
  font-size:.9rem;
  color:var(--text-dark);
}
.quote-cart__field input:focus{
  outline:none;
  border-color:var(--pink-500);
}

.quote-cart .btn{width:100%;justify-content:center;}
.quote-cart .btn[aria-disabled="true"],
.quote-cart .btn:disabled{
  opacity:.5;
  pointer-events:none;
}

.quote-cart__mensaje{
  margin-top:12px;
  text-align:center;
  font-size:.85rem;
  font-weight:600;
  border-radius:var(--radius-sm);
  padding:10px 12px;
}
.quote-cart__mensaje--ok{
  color:var(--pink-600);
  background:var(--pink-50);
}
.quote-cart__mensaje--error{
  color:#b42318;
  background:#fdeceb;
}

/* ----- Modal de producto ----- */
.product-modal{
  position:fixed;
  inset:0;
  z-index:2000;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
@media (min-width:640px){
  .product-modal{align-items:center;}
}
.product-modal[hidden]{display:none;}
.product-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(58,38,53,.45);
}
/* Envoltura que recorta las esquinas redondeadas: el scrollbar (sobre
   todo ya estilizado, ver mas abajo) no respeta el border-radius del
   propio elemento con overflow (es una limitante de los navegadores), por
   eso el radio y el overflow:hidden se ponen en este wrapper de afuera, que
   SI lo recorta correctamente; el que hace scroll de verdad es
   .product-modal__panel, adentro. */
.product-modal__mask{
  width:100%;
  max-width:460px;
  max-height:88vh;
  border-radius:24px 24px 0 0;
  overflow:hidden;
  box-shadow:var(--shadow-md);
}
@media (min-width:640px){
  .product-modal__mask{border-radius:var(--radius-lg);}
}
.product-modal__panel{
  position:relative;
  background:var(--white);
  width:100%;
  max-height:88vh;
  overflow-y:auto;
  padding:28px;
  box-sizing:border-box;
}
/* Scrollbar delgado y del color de la marca, en vez del gris feo por
   defecto del navegador (aplica al panel del modal y a la cuadricula de
   disenos, que tambien hace scroll interno). */
.product-modal__panel,
.diseno-grid{
  scrollbar-width:thin;
  scrollbar-color:var(--pink-300) transparent;
}
.product-modal__panel::-webkit-scrollbar,
.diseno-grid::-webkit-scrollbar{
  width:6px;
}
.product-modal__panel::-webkit-scrollbar-track,
.diseno-grid::-webkit-scrollbar-track{
  background:transparent;
}
.product-modal__panel::-webkit-scrollbar-thumb,
.diseno-grid::-webkit-scrollbar-thumb{
  background-color:var(--pink-300);
  border-radius:999px;
}
.product-modal__panel::-webkit-scrollbar-thumb:hover,
.diseno-grid::-webkit-scrollbar-thumb:hover{
  background-color:var(--pink-500);
}
@media (min-width:640px){
  .product-modal__panel{border-radius:var(--radius-lg);}
}
.product-modal__close{
  position:absolute;
  top:16px;right:16px;
  width:34px;height:34px;
  border-radius:50%;
  background:var(--pink-50);
  color:var(--text-dark);
  font-size:1rem;
}
.product-modal__price{
  color:var(--pink-600);
  font-weight:700;
  margin-bottom:20px;
}
.product-modal__field{margin-bottom:22px;}
.product-modal__field label{
  display:block;
  font-weight:600;
  font-size:.9rem;
  margin-bottom:10px;
  color:var(--text-dark);
}
.product-modal__hint{
  font-size:.8rem;
  color:var(--text-muted);
  margin-top:8px;
}

.qty-stepper{
  display:inline-flex;
  align-items:center;
  border:2px solid var(--pink-200);
  border-radius:12px;
  overflow:hidden;
}
.qty-stepper button{
  width:40px;height:40px;
  font-size:1.1rem;
  color:var(--pink-600);
  font-weight:700;
}
.qty-stepper button:hover{background:var(--pink-50);}
.qty-stepper input{
  width:56px;
  text-align:center;
  border:none;
  border-left:2px solid var(--pink-200);
  border-right:2px solid var(--pink-200);
  height:40px;
  font-weight:700;
  font-family:inherit;
  font-size:1rem;
  color:var(--text-dark);
  /* La cantidad siempre es entera (igual que en el sistema): se ocultan las
     flechitas nativas y se bloquea el scroll del mouse para que no cambie
     el valor sin querer. */
  -moz-appearance:textfield;
  appearance:textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

/* ----- Paso: elegir diseño -----
   La cuadrícula muestra las miniaturas con marca de agua (sin pintar de
   color). La vista grande de arriba ("stage") recibe el diseño ya pintado
   del color elegido y con marca de agua, como un <canvas> (ver
   pintarDisenoEnCanvas en cotizacion.js), por eso aquí solo hace falta que
   ese <canvas> llene el contenedor. */
.diseno-stage{
  width:100%;
  aspect-ratio:16/10;
  background:var(--text-dark);
  border-radius:var(--radius-sm);
  margin-bottom:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding:14px;
}
.diseno-stage__placeholder{
  color:rgba(255,255,255,.65);
  font-size:.8rem;
  text-align:center;
  padding:0 16px;
}
.diseno-swatch--stage{width:100%;height:100%;}

.diseno-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:8px;
  max-height:180px;
  overflow-y:auto;
  padding:8px;
  background:var(--pink-50);
  border-radius:var(--radius-sm);
}
@media (max-width:480px){
  .diseno-grid{grid-template-columns:repeat(4,1fr);}
}
.diseno-option{
  aspect-ratio:1/1;
  border-radius:10px;
  border:2px solid var(--pink-100);
  background:var(--white);
  padding:6px;
}
.diseno-option.is-selected{
  border-color:var(--pink-600);
  box-shadow:0 0 0 2px var(--pink-200);
}
.diseno-option__lienzo{display:block;width:100%;height:100%;}

/* ----- Paso 2: elegir color (repinta el diseño elegido en el paso 1) ----- */
.color-swatches{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}
.color-check{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  gap:.35rem;
  width:62px;
  text-align:center;
  cursor:pointer;
  background:none;
  border:none;
  padding:0;
  font-family:inherit;
}
.color-check__swatch{
  position:relative;
  width:36px;
  height:36px;
  border-radius:50%;
  border:2px solid var(--pink-200);
  box-shadow:0 1px 3px rgba(58,38,53,.12);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.color-check:hover .color-check__swatch{
  transform:scale(1.06);
}
.color-check__badge{
  position:absolute;
  bottom:-3px;
  right:-3px;
  width:17px;
  height:17px;
  border-radius:50%;
  background:var(--white);
  border:1px solid var(--pink-400);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.6rem;
  line-height:1;
  color:var(--pink-600);
  opacity:0;
  transform:scale(.6);
  transition:opacity .12s ease, transform .12s ease;
}
.color-check__label{
  font-size:.72rem;
  color:var(--text-dark);
  line-height:1.15;
  max-width:100%;
}
.color-check.is-selected .color-check__swatch{
  border-color:var(--pink-600);
  box-shadow:0 0 0 3px var(--pink-100);
}
.color-check.is-selected .color-check__badge{
  opacity:1;
  transform:scale(1);
}

/* Miniatura del carrito: aquí se mete el <canvas> ya pintado (ver
   pintarDisenoEnCanvas en cotizacion.js), por eso solo hace falta que
   llene el contenedor; el tamaño/posicionado ya queda resuelto al
   dibujarlo. */

.product-modal__summary{
  display:flex;
  justify-content:space-between;
  font-weight:700;
  color:var(--text-dark);
  background:var(--pink-50);
  padding:12px 16px;
  border-radius:12px;
  margin-bottom:18px;
}
.product-modal__summary span:last-child{color:var(--pink-600);}
.product-modal__add{width:100%;justify-content:center;}
.product-modal__add:disabled{
  opacity:.5;
  cursor:not-allowed;
}

/* Aviso de nota pendiente de back (solo visible en esta vista de diseño) */
.dev-note{
  max-width:var(--container);
  margin:0 auto 30px;
  padding:0 24px;
}
.dev-note__box{
  background:#fff7e6;
  border:1px dashed #e0b84d;
  border-radius:var(--radius-sm);
  padding:14px 18px;
  font-size:.85rem;
  color:#6b5614;
}
