/* k&a-shop — estilos del cliente. Tema moderno elegante (relojería + moda). */
:root {
  --bg: #0c0d10;             /* carbón profundo */
  --bg-2: #131419;
  --panel: #1a1c22;
  --panel-2: #23262e;
  --marca: #c8a86a;          /* dorado champagne (relojería de lujo) */
  --marca-2: #b39455;
  --marca-suave: rgba(200,168,106,.14);
  --marca-tinta: #0c0d10;
  --texto: #f2f1ee;          /* blanco cálido */
  --texto-suave: #9b9ba3;
  --linea: rgba(255,255,255,.07);
  --rojo: #e5645d;
  --verde: #5fc28a;
  --radio: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg); color: var(--texto);
  min-height: 100dvh; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

.envoltura { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12,13,16,.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--linea);
}
.cabecera-int { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 23px; letter-spacing: -.5px; color: var(--texto); text-decoration: none; flex-shrink: 0; }
.logo b { color: var(--marca); font-weight: 800; }
.nav-principal { display: flex; gap: 26px; margin-left: 14px; flex: 1; }
.nav-link { color: var(--texto-suave); font-size: 14px; font-weight: 600; cursor: pointer; transition: color .15s; position: relative; padding: 4px 0; letter-spacing: .2px; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--marca); transition: width .25s; }
.nav-link:hover { color: var(--texto); }
.nav-link:hover::after { width: 100%; }
.cab-acciones { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icono-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: transparent; color: var(--texto); position: relative; transition: background .15s, color .15s;
}
.icono-btn:hover { background: var(--panel); color: var(--marca); }
.icono-btn:active { transform: scale(.92); }
.icono-btn svg { width: 21px; height: 21px; }
.badge-carrito {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--marca); color: var(--marca-tinta); border-radius: 9px;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1;
}

/* Buscador */
.caja-buscar { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--linea); border-radius: 14px; padding: 0 16px; margin: 14px 0; height: 52px; }
.caja-buscar svg { width: 20px; height: 20px; color: var(--texto-suave); flex-shrink: 0; }
.caja-buscar input { flex: 1; background: none; border: none; color: var(--texto); font-size: 15px; height: 100%; }
.caja-buscar input:focus { outline: none; }

/* Eyebrow del hero */
.hero-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--marca); margin-bottom: 12px; }

/* Hero */
.hero {
  position: relative; border-radius: var(--radio); overflow: hidden; margin: 16px 0;
  min-height: 260px; display: flex; align-items: flex-end;
  background: linear-gradient(135deg, #1f2128 0%, #0c0d10 100%);
  border: 1px solid var(--linea);
}
.hero-fondo { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; opacity: .45; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,13,16,.9), transparent 60%); z-index: 1; }
.hero-cont { position: relative; padding: 30px; z-index: 2; }
.hero h1 { font-family: 'Outfit', sans-serif; font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; }
.hero h1 span { color: var(--marca); }
.hero p { color: var(--texto-suave); margin-top: 10px; font-size: 15px; max-width: 440px; }

/* Carrusel */
.s-carrusel { position: relative; border-radius: var(--radio); overflow: hidden; margin: 16px 0; aspect-ratio: 21/9; background: var(--panel); border: 1px solid var(--linea); }
.s-carrusel-track { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); height: 100%; }
.s-carrusel-slide { min-width: 100%; height: 100%; position: relative; }
.s-carrusel-slide img { width: 100%; height: 100%; object-fit: cover; }
.s-carrusel-cap { position: absolute; left: 0; bottom: 0; right: 0; padding: 24px; background: linear-gradient(transparent, rgba(12,13,16,.85)); font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -.3px; }
.s-carrusel-dots { position: absolute; bottom: 14px; right: 16px; display: flex; gap: 6px; }
.s-carrusel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); transition: all .3s; }
.s-carrusel-dot.activo { width: 24px; border-radius: 4px; background: var(--marca); }

/* Categorías */
.categorias { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 14px; scrollbar-width: none; }
.categorias::-webkit-scrollbar { display: none; }
.chip-cat {
  flex-shrink: 0; padding: 10px 18px; border-radius: 999px; background: var(--panel);
  color: var(--texto-suave); font-weight: 600; font-size: 14px; white-space: nowrap; transition: all .15s;
}
.chip-cat.activo { background: var(--marca); color: var(--marca-tinta); }

/* Grid de productos */
.seccion-titulo { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; margin: 18px 0 14px; letter-spacing: -.3px; }
.grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding-bottom: 30px; }
.prod-card { background: var(--panel); border-radius: var(--radio); overflow: hidden; transition: transform .2s, box-shadow .2s; cursor: pointer; border: 1px solid var(--linea); }
.prod-card:active { transform: scale(.98); }
.prod-foto { aspect-ratio: 1; background: var(--panel-2); position: relative; overflow: hidden; }
.prod-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod-card:hover .prod-foto img { transform: scale(1.06); }
.prod-desc-badge { position: absolute; top: 10px; left: 10px; background: var(--marca); color: var(--marca-tinta); font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 8px; letter-spacing: .3px; }
.prod-info { padding: 13px; }
.prod-nombre { font-weight: 600; font-size: 14px; line-height: 1.3; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.prod-precios { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prod-precio { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 17px; color: var(--marca); }
.prod-precio-ant { font-size: 13px; color: var(--texto-suave); text-decoration: line-through; }
.prod-agotado { color: var(--rojo); font-size: 12px; font-weight: 700; margin-top: 4px; }

/* Modales / drawers */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.abierto { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; height: 100dvh; width: min(440px, 100%); z-index: 101;
  right: 0;
  background: var(--bg-2); transition: transform .3s ease;
  display: flex; flex-direction: column; box-shadow: none;
  transform: translateX(100%);
  visibility: hidden;
}
.drawer.abierto { transform: translateX(0); box-shadow: -20px 0 60px rgba(0,0,0,.55); visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--linea); }
.drawer-head h3 { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 800; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-pie { padding: 18px; border-top: 1px solid var(--linea); }

/* Item del carrito */
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.cart-item-foto { width: 64px; height: 64px; border-radius: 12px; background: var(--panel-2); object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-nombre { font-weight: 600; font-size: 14px; }
.cart-item-detalle { color: var(--texto-suave); font-size: 12px; margin: 2px 0; }
.cart-item-precio { color: var(--marca); font-weight: 700; font-size: 14px; }
.cart-cant { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cant-btn { width: 28px; height: 28px; border-radius: 8px; background: var(--panel); display: grid; place-items: center; }
.cant-btn svg { width: 14px; height: 14px; }
.cant-num { font-weight: 700; min-width: 20px; text-align: center; }
.cart-quitar { color: var(--texto-suave); align-self: flex-start; }
.cart-quitar svg { width: 18px; height: 18px; }

/* Botones */
.btn-marca { width: 100%; height: 52px; border-radius: 14px; background: var(--marca); color: var(--marca-tinta); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s; }
.btn-marca:active { transform: scale(.97); }
.btn-marca:disabled { opacity: .4; }
.btn-marca svg { width: 20px; height: 20px; }
.btn-ghost { width: 100%; height: 48px; border-radius: 14px; background: var(--panel); color: var(--texto); font-weight: 700; }

.total-fila { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.total-fila.grande { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; }
.total-fila.grande b { color: var(--marca); }
.total-fila span { color: var(--texto-suave); }

/* Detalle de producto */
.pd-galeria { aspect-ratio: 1; border-radius: var(--radio); overflow: hidden; background: var(--panel-2); margin-bottom: 12px; }
.pd-galeria img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumb { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 2px solid transparent; cursor: pointer; }
.pd-thumb.activo { border-color: var(--marca); }
.pd-nombre { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; margin: 8px 0; }
.pd-precio { font-family: 'Outfit', sans-serif; font-size: 26px; font-weight: 800; color: var(--marca); }
.pd-desc { color: var(--texto-suave); line-height: 1.6; margin: 14px 0; font-size: 14px; }
.pd-variantes { margin: 16px 0; }
.pd-var-grupo { margin-bottom: 14px; }
.pd-var-label { font-size: 13px; font-weight: 700; color: var(--texto-suave); margin-bottom: 8px; }
.pd-var-ops { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-var-op { padding: 8px 16px; border-radius: 10px; background: var(--panel); font-weight: 600; font-size: 14px; border: 2px solid transparent; }
.pd-var-op.activo { border-color: var(--marca); color: var(--marca); }
.pd-var-op:disabled { opacity: .35; text-decoration: line-through; }

/* Formularios */
.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 13px; font-weight: 600; color: var(--texto-suave); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--linea); color: var(--texto); font-size: 15px;
}
.campo textarea { height: auto; padding: 12px 14px; min-height: 80px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--marca); }

/* Vacío / cargando */
.vacio { text-align: center; padding: 40px 20px; color: var(--texto-suave); }
.cargando { text-align: center; padding: 40px; color: var(--texto-suave); }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--panel-2); color: var(--texto); padding: 14px 22px; border-radius: 14px; font-weight: 600; z-index: 200; transition: transform .3s; box-shadow: 0 10px 30px rgba(0,0,0,.4); border: 1px solid var(--linea); }
.toast.ver { transform: translateX(-50%) translateY(0); }
.toast.exito { border-color: var(--marca); }
.toast.error { border-color: var(--rojo); }

/* Pie */
.pie { border-top: 1px solid var(--linea); padding: 28px 0; margin-top: 30px; text-align: center; color: var(--texto-suave); font-size: 13px; }
.pie-redes { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; }
.pie-red { width: 44px; height: 44px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; color: var(--texto); }
.pie-red svg { width: 22px; height: 22px; }
.pie-acceso { color: var(--texto-suave); opacity: .5; font-size: 12px; margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; }
.pie-acceso svg { width: 12px; height: 12px; }

/* ════════════════════════════════════════════════
   RESPONSIVE — 3 ámbitos: móvil, tablet, escritorio
   ════════════════════════════════════════════════ */

/* MÓVIL (base, ≤600px): 2 columnas, drawers a pantalla completa */
@media (max-width: 600px) {
  .envoltura { padding: 0 14px; }
  .nav-principal { display: none; }
  .hero { min-height: 200px; margin: 12px 0; }
  .hero-cont { padding: 22px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .s-carrusel { aspect-ratio: 16/10; }
  .grid-productos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .seccion-titulo { font-size: 19px; }
  .drawer { width: 100%; }
  .cabecera-int { height: 58px; gap: 8px; }
  .logo { font-size: 18px; }
  .logo-img { width: 28px; height: 28px; }
  .cab-acciones { gap: 3px; }
  .icono-btn { width: 40px; height: 40px; }
  .icono-btn svg { width: 20px; height: 20px; }
  .badge-carrito, #badgeFavoritos { min-width: 15px; height: 15px; font-size: 9px; }
}

/* TABLET (601–1024px): 3 columnas, nav visible, drawers más anchos */
@media (min-width: 601px) and (max-width: 1024px) {
  .envoltura { padding: 0 22px; }
  .nav-principal { gap: 20px; }
  .hero { min-height: 280px; }
  .hero h1 { font-size: 38px; }
  .s-carrusel { aspect-ratio: 21/9; }
  .grid-productos { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .drawer { width: min(480px, 90%); }
  .prod-nombre { font-size: 15px; }
}

/* ESCRITORIO (>1024px): 4-5 columnas, hover real, drawers cómodos */
@media (min-width: 1025px) {
  .envoltura { padding: 0 24px; }
  .hero { min-height: 340px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 16px; }
  .grid-productos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
  .drawer { width: 460px; }
  .prod-card { cursor: pointer; }
  .prod-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.3); }
  .seccion-titulo { font-size: 24px; }
  /* En escritorio, categorías centradas si caben */
  .categorias { justify-content: flex-start; }
}

/* Pantallas muy anchas: límite y centrado del contenido */
@media (min-width: 1400px) {
  .envoltura { max-width: 1280px; }
  .grid-productos { grid-template-columns: repeat(5, 1fr); }
}

/* Secciones del checkout */
.co-seccion { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px; color: var(--marca); text-transform: uppercase; letter-spacing: 1.5px; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--linea); }
.co-seccion:first-child { margin-top: 0; }
#checkoutResumen { margin-bottom: 14px; }
#checkoutResumen .total-fila { font-size: 14px; margin-bottom: 6px; }
#checkoutResumen .total-fila.grande { font-size: 20px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--linea); }

/* ═══════ MEJORAS: estrellas, paginación, subcategorías, publicidad, promo ═══════ */

/* Estrellas en la card de producto */
.prod-estrellas { font-size: 12px; color: var(--marca); margin: 2px 0 4px; }
.prod-estrellas span { color: var(--texto-suave); }
.prod-stock-info { font-size: 11px; color: var(--texto-suave); margin-top: 2px; }

/* Botón limpiar del buscador (estilo iOS) */
.btn-limpiar-buscar { background: none; border: 0; padding: 0; cursor: pointer; color: var(--texto-suave); display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; }
.btn-limpiar-buscar svg { width: 20px; height: 20px; }
.caja-buscar input { min-width: 0; }

/* Subcategorías */
.subcategorias { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.subcategorias::-webkit-scrollbar { display: none; }
.chip-sub { flex-shrink: 0; padding: 7px 16px; border-radius: 999px; background: var(--panel, #16171b); color: var(--texto-suave); border: 1px solid var(--linea, #2a2c31); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip-sub.activo { background: var(--marca); color: #1a1206; border-color: var(--marca); }

/* Paginación de productos */
.prod-paginacion { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 24px 0 10px; }
.pag-btn { padding: 10px 18px; border-radius: 12px; background: var(--panel, #16171b); border: 1px solid var(--linea, #2a2c31); color: var(--texto, #fff); font-weight: 600; font-size: 14px; cursor: pointer; }
.pag-btn:disabled { opacity: .4; cursor: not-allowed; }
.pag-info { color: var(--texto-suave); font-size: 14px; }

/* Publicidad (banners) */
.pub-banners { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.pub-banner { display: block; border-radius: 16px; overflow: hidden; }
.pub-banner img { width: 100%; display: block; }

/* Popup de promoción */
.promo-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; transition: opacity .3s; padding: 20px; }
.promo-overlay.visible { opacity: 1; }
.promo-modal { background: var(--panel, #16171b); border-radius: 22px; max-width: 380px; width: 100%; overflow: hidden; position: relative; transform: scale(.9); transition: transform .3s; }
.promo-overlay.visible .promo-modal { transform: scale(1); }
.promo-cerrar { position: absolute; top: 10px; right: 14px; background: rgba(0,0,0,.4); border: 0; color: #fff; font-size: 26px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; z-index: 2; line-height: 1; }
.promo-img img { width: 100%; display: block; }
.promo-cuerpo { padding: 20px; text-align: center; }
.promo-cuerpo h3 { font-family: 'Outfit', sans-serif; font-size: 22px; margin-bottom: 8px; color: var(--marca); }
.promo-cuerpo p { color: var(--texto-suave); font-size: 14px; margin-bottom: 12px; }
.promo-cupon { background: rgba(200,168,106,.14); border: 1px dashed var(--marca); border-radius: 10px; padding: 10px; font-size: 14px; margin-bottom: 14px; }
.promo-btn { width: 100%; height: 48px; border: 0; border-radius: 14px; background: var(--marca); color: #1a1206; font-weight: 800; font-size: 15px; cursor: pointer; }

/* Reseñas en el detalle */
.pd-calif { color: var(--marca); font-size: 15px; margin: 4px 0; }
.pd-calif span { color: var(--texto-suave); font-size: 13px; }
.pd-stock { font-size: 13px; color: #5fc28a; margin: 6px 0; }
.pd-agotado { font-size: 13px; color: #e5645d; font-weight: 700; margin: 6px 0; }
.pd-resenas { margin-top: 24px; border-top: 1px solid var(--linea, #2a2c31); padding-top: 16px; }
.pd-resenas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pd-resenas-head h4 { font-family: 'Outfit', sans-serif; font-size: 16px; }
.pd-sin-resenas { color: var(--texto-suave); font-size: 13px; padding: 10px 0; }
.pd-resena { padding: 12px 0; border-bottom: 1px solid var(--linea, #2a2c31); }
.pd-resena-top { display: flex; justify-content: space-between; align-items: center; }
.pd-resena-stars { color: var(--marca); font-size: 13px; }
.pd-resena-com { color: var(--texto-suave); font-size: 13px; margin-top: 4px; }

/* Checkbox de aceptación de datos */
.rg-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 16px; cursor: pointer; }
.rg-check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.rg-check span { font-size: 12px; color: var(--texto-suave); line-height: 1.4; }