﻿/* Reset + variables */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #0f172a;
  background: #f8fafc;
}
:root { scroll-behavior: smooth; --acc-max: 420px; }
:root {
  --primary: #111827;
  --accent: #2563eb;
  --accent-600: #1d4ed8;
  --muted: #64748b;
  --bg: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 25px rgba(2,6,23,.08);
  --radius: 12px;
  --header-h: 56px;
}

/* Layout */
.container { width: min(1100px, 92%); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.header-inner { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary); }
.logo img { height: 28px; width: auto; display: block; border-radius: 6px; }
.logo .brand { font-size: 1.2rem; font-weight: 800; font-style: italic; font-family: Georgia, "Times New Roman", serif; letter-spacing: .3px; white-space: nowrap; }
.nav { margin-left: auto; display: none; gap: 16px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--primary); }
.actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.search {
  width: 210px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #f9fafb; outline: none;
}
.search:focus { border-color: #cbd5e1; background: #fff; }

.btn {
  appearance: none; border: 1px solid var(--border); background: #fff; color: var(--primary);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700;
  transition: transform .04s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-600); }
.btn.full { width: 100%; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; }
.badge { background: #ef4444; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.icon-btn { background: transparent; border: none; font-size: 20px; cursor: pointer; }

.hero { background: radial-gradient(1000px 400px at 10% -10%, #dbeafe, transparent), #f8fafc; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr; align-items: center; padding: 40px 0; min-height: 280px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0 0 18px; }

/* Center hero content and show GIF centered behind the text */
.hero { position: relative; overflow: hidden; }
/* Disable previous right-aligned GIF if present */
.hero::after { content: none !important; }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: image-set(url('/imagen/logo2.webp') type('image/webp'), url('/imagen/logo2.gif') type('image/gif')) no-repeat center center;
  background-size: cover; /* cubrir todo el bloque del hero */
  opacity: .45; /* un poco más visible */
  pointer-events: none;
  z-index: 0;
}
.hero .hero-inner { position: relative; place-items: center; text-align: center; min-height: 360px; }
.hero .hero-inner > div { position: relative; z-index: 1; }
@media (min-width: 900px) { .hero .hero-inner { min-height: 460px; } }

.catalog { padding: 28px 0 44px; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; }
.select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; }

.grid { display: grid; grid-template-columns: repeat(1, minmax(0,1fr)); gap: 16px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); } .nav { display: flex; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* Mobile full-bleed adjustments */
@media (max-width: 520px) {
  .container { width: 100%; }
  .header-inner, .hero-inner, .catalog { padding-left: 12px; padding-right: 12px; }
  /* Make hero fill viewport height under the sticky header */
  .hero-inner { 
    padding-top: 24px; padding-bottom: 24px; 
    min-height: calc(100svh - var(--header-h)); /* small viewport units for mobile chrome */
    min-height: calc(100dvh - var(--header-h)); /* modern devices */
    display: grid; 
    align-content: center; 
    gap: 8px;
  }
  .hero h1 { font-size: clamp(26px, 8vw, 36px); }
  .hero p { font-size: 15px; }

  /* Reflow header: logo + carrito arriba, buscador abajo a todo el ancho */
  .header-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; padding: 10px 12px; }
  .actions { display: contents; margin-left: 0; }
  .logo { grid-column: 1; grid-row: 1; }
  #cartButton { grid-column: 2; grid-row: 1; justify-self: end; }
  #search { grid-column: 1 / -1; width: 100%; }
  .search { width: 100%; }
  .nav { display: none !important; }
}

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card img {
  width: 100%;
  height: clamp(220px, 40vw, 280px);
  object-fit: contain;
  background: #f1f5f9;
  display: block;
}
.card-body { padding: 12px; display: grid; gap: 8px; }
.card-title { font-weight: 700; margin: 0; }
.price { font-weight: 800; }
.meta { color: var(--muted); font-size: 14px; }
.size-row { display: flex; gap: 8px; align-items: center; }
.size { padding: 8px 10px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 700; }
.size.active { background: #111827; color: #fff; border-color: #111827; }
.card-actions { display: flex; gap: 8px; }
.card .btn { flex: 1; }

/* Cart */
.overlay { position: fixed; inset: 0; background: rgba(2,6,23,.35); backdrop-filter: blur(2px); z-index: 70; }
.cart {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 100%);
  background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  display: grid; grid-template-rows: auto 1fr auto; transform: translateX(100%);
  transition: transform .25s ease; z-index: 80;
}
.cart.open { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--border); }
.cart-items { padding: 10px; display: grid; gap: 10px; overflow: auto; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.cart-item img {
  width: 64px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #f1f5f9;
  display: block;
}
.cart-item h4 { margin: 0; font-size: 14px; }
.cart-item .muted { color: var(--muted); font-size: 12px; }
.qty { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; }
.qty button { border: none; background: transparent; font-weight: 800; cursor: pointer; padding: 0 6px; }
.cart-footer { border-top: 1px solid var(--border); padding: 14px; display: grid; gap: 10px; }
.totals { display: flex; align-items: center; justify-content: space-between; }
.checkout-note { color: var(--muted); font-size: 12px; margin: 0; }

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Product page */
.product-page { padding: 24px 0 40px; }
.product-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .product-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.product-figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.product-figure img {
  width: 100%;
  max-height: min(420px, 60vh);
  object-fit: contain;
  border-radius: 8px;
  background: #f1f5f9;
  display: block;
}
.product-info { display: grid; gap: 12px; }
.product-title { margin: 0; font-size: clamp(22px, 3.2vw, 34px); }
.pill { display: inline-block; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--muted); }
.price.xl { font-size: 22px; font-weight: 800; }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 700; }
.actions-row { display: flex; gap: 10px; }
.panels { display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.section-title { margin: 0 0 6px; font-size: 16px; }
.size-guide {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 8px;
  background: #fff;
}
.size-guide img {
  width: 100%;
  height: auto;
  display: block;
}
.list { margin: 6px 0 0; padding-left: 18px; }

/* Accordion */
.accordion { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; cursor: pointer; user-select: none; }
.acc-title { font-weight: 800; margin: 0; }
.acc-icon { font-weight: 900; font-size: 18px; line-height: 1; transition: transform .2s ease; }
.acc-item.open .acc-icon { transform: none; } /* mostramos - cuando abre */
.acc-content { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .35s ease, opacity .25s ease, padding .2s ease; padding: 0 14px; overscroll-behavior: contain; }
.acc-item.open .acc-content { opacity: 1; padding: 10px 14px 14px; max-height: var(--acc-max); overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Estimated delivery banner */
.est-banner { display: flex; align-items: center; gap: 8px; background: #f1f5f9; border: 1px dashed #cbd5e1; color: #0f172a; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.est-banner .emoji { font-size: 18px; }

/* Policy panel under image */
.policy { margin-top: 12px; }
.policy ul { margin: 6px 0 0; padding-left: 18px; }

/* Recommendations slider */
.reco { margin-top: 28px; }
.reco-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.reco-header h2 { margin: 0; font-size: 18px; }
.reco-controls { display: inline-flex; gap: 8px; }
.reco-btn { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 900; line-height: 1; box-shadow: var(--shadow); }
.reco-viewport { position: relative; overflow-x: auto; overflow-y: hidden; -ms-overflow-style: none; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; touch-action: pan-x pan-y; cursor: grab; }
.reco-viewport::-webkit-scrollbar { display: none; }
.reco-track { display: flex; gap: 12px; padding-bottom: 8px; user-select: none; -webkit-user-select: none; }
.reco-viewport.dragging { cursor: grabbing; }
.reco-card { flex: 0 0 auto; width: 200px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.reco-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f1f5f9;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}
.reco-body { padding: 10px; display: grid; gap: 6px; }
.reco-title { font-weight: 700; font-size: 14px; margin: 0; }
.reco-price { font-weight: 800; }

/* Floating arrows */
.reco-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; font-size: 18px; }
.reco-arrow.left { left: 6px; }
.reco-arrow.right { right: 6px; }
@media (max-width: 768px) { .reco-arrow { width: 44px; height: 44px; font-size: 20px; } }

/* Disabled state for arrows */
.reco-btn:disabled, .reco-arrow[aria-disabled="true"] {
  opacity: .4;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

/* Scroll reveal for catalog cards */
.card.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); will-change: transform, opacity; }
.card.reveal.in { opacity: 1; transform: none; transition-delay: var(--reveal-delay, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .card.reveal, .card.reveal.in { opacity: 1; transform: none; transition: none !important; }
}

/* Hero with background GIF */
.hero-gif{ position:relative; overflow:hidden; }
.hero-gif::after{ content:''; position:absolute; inset:0; background:image-set(url('/imagen/logo2.webp') type('image/webp'), url('/imagen/logo2.gif') type('image/gif')) no-repeat right center; background-size:min(60vw,720px) auto; opacity:.32; pointer-events:none; }
.hero-gif .hero-inner{ position:relative; z-index:1; place-items:center; text-align:center; min-height: 360px; }
@media (min-width: 900px){ .hero-gif .hero-inner{ min-height: 440px; } }

/* === BlurText (vanilla) === */
.blur-wrap { display:inline; }
.blur-unit { display:inline-block; opacity:0; filter:blur(10px); will-change: transform, filter, opacity; }
.dir-top .blur-unit { transform: translateY(-40px); }
.dir-bottom .blur-unit { transform: translateY(40px); }

@keyframes blurIn {
  60% { opacity: .5; filter: blur(5px); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}

/* Cuando activamos .animate, cada .blur-unit usa sus delays/durations via CSS vars */
.blur-wrap.animate .blur-unit {
  animation: blurIn var(--dur, 700ms) cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: var(--delay, 0ms);
}

/* ==== Capybara loader (UIverse �?" Novaxlo) ==== */
.capybaraloader{width:14em;height:10em;position:relative;z-index:1;--color:rgb(204,125,45);--color2:rgb(83,56,28);transform:scale(.9)}
.capybara{width:100%;height:7.5em;position:relative;z-index:1}
.loader{width:100%;height:2.5em;position:relative;z-index:1;overflow:hidden}
.capy{width:85%;height:100%;background:linear-gradient(var(--color),90%,var(--color2));border-radius:45%;position:relative;z-index:1;animation:movebody 1s linear infinite}
.capyhead{width:7.5em;height:7em;bottom:0;right:0;position:absolute;background-color:var(--color);z-index:3;border-radius:3.5em;box-shadow:-1em 0 var(--color2);animation:movebody 1s linear infinite}
.capyear{width:2em;height:2em;background:linear-gradient(-45deg,var(--color),90%,var(--color2));top:0;left:0;border-radius:100%;position:absolute;overflow:hidden;z-index:3}
.capyear:nth-child(2){left:5em;background:linear-gradient(25deg,var(--color),90%,var(--color2))}
.capyear2{width:100%;height:1em;background-color:var(--color2);bottom:0;left:.5em;border-radius:100%;position:absolute;transform:rotate(-45deg)}
.capymouth{width:3.5em;height:2em;background-color:var(--color2);position:absolute;bottom:0;left:2.5em;border-radius:50%;display:flex;justify-content:space-around;align-items:center;padding:.5em}
.capylips{width:.25em;height:.75em;border-radius:100%;transform:rotate(-45deg);background-color:var(--color)}
.capylips:nth-child(2){transform:rotate(45deg)}
.capyeye{width:2em;height:.5em;background-color:var(--color2);position:absolute;bottom:3.5em;left:1.5em;border-radius:5em;transform:rotate(45deg)}
.capyeye:nth-child(4){transform:rotate(-45deg);left:5.5em;width:1.75em}
.capyleg{width:6em;height:5em;bottom:0;left:0;position:absolute;background:linear-gradient(var(--color),95%,var(--color2));z-index:2;border-radius:2em;animation:movebody 1s linear infinite}
.capyleg2{width:1.75em;height:3em;bottom:0;left:3.25em;position:absolute;background:linear-gradient(var(--color),80%,var(--color2));z-index:2;border-radius:.75em;box-shadow:inset 0 -.5em var(--color2);animation:moveleg 1s linear infinite}
.capyleg2:nth-child(3){width:1.25em;left:.5em;height:2em;animation:moveleg2 1s linear infinite .075s}
@keyframes moveleg{0%{transform:rotate(-45deg) translateX(-5%)}50%{transform:rotate(45deg) translateX(5%)}100%{transform:rotate(-45deg) translateX(-5%)}}
@keyframes moveleg2{0%{transform:rotate(45deg)}50%{transform:rotate(-45deg)}100%{transform:rotate(45deg)}}
@keyframes movebody{0%{transform:translateX(0)}50%{transform:translateX(2%)}100%{transform:translateX(0)}}
.loaderline{width:50em;height:.5em;border-top:.5em dashed var(--color2);animation:moveline 10s linear infinite}
@keyframes moveline{0%{transform:translateX(0);opacity:0}5%{opacity:1}95%{opacity:1}100%{opacity:0;transform:translateX(-70%)}}

/* ==== Overlay del loader (centra la capybara) ==== */
.loader-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#ead4bd;z-index:9999}
.loader-overlay[hidden]{display:none}
.capywrap{width:260px;height:180px;display:grid;place-items:center}

/* --- Mensaje bajo el loader --- */
.capy-msg{
  margin-top: 16px;
  font-weight: 700;
  font-size: 1.1rem;         /* ajusta a gusto */
  letter-spacing: .2px;
  color: #463421;            /* marrón suave que combina con el capy */
  text-align:center;
}

/* --- Infra de animación blur-por-palabras (vanilla) --- */
.blur-wrap{display:inline-block}
.blur-unit{
  display:inline-block;
  opacity:0;
  filter:blur(10px);
  transform:translateY(var(--y,0));
  transition:
    opacity var(--dur,900ms) ease,
    filter  var(--dur,900ms) ease,
    transform var(--dur,900ms) cubic-bezier(.2,.65,.3,1);
  transition-delay: var(--delay, 0ms);
}
.blur-wrap.animate .blur-unit{
  opacity:1;
  filter:blur(0);
  transform:translateY(0);
}

/* Alineación del bloque de acciones (buscador, login, carrito) */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botón base */
.btn-login, .btn-cart, .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 9999px;
  cursor: pointer;
  line-height: 1;
}
.btn-login svg { display: block; }

/* Contador del carrito */
.cart-count {
  margin-left: 6px;
  font-weight: 700;
}

/* Modal (dialog) */
.login-dialog::backdrop {
  background: rgba(0,0,0,.4);
}
.login-card {
  width: min(90vw, 380px);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
}
.login-card h2 { margin: 0 0 12px; font-size: 1.25rem; }
.field { display: grid; gap: 6px; margin: 10px 0; }
.field input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
}
.actions-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-primary { background: #111827; color: #fff; border: none; }
.btn-secondary { background: #f3f4f6; border: 1px solid #e5e7eb; }

.hint { color: #6b7280; font-size: .85rem; margin-top: 8px; }

/* Usuario autenticado (chip + dropdown) */
.user-menu { position: relative; }
.user-chip { background: #111827; color: #fff; border: none; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; background: #1f2937;
}
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 8px; min-width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.user-dropdown button {
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; border: none; background: transparent; cursor: pointer;
}
.user-dropdown button:hover { background: #f3f4f6; }

/* Responsive: en móviles que no se amontone */
@media (max-width: 640px) {
  .actions { gap: 8px; }
  .btn-login-text { display: none; } /* deja solo el ícono en móvil */
  .btn-login, .btn-cart, .user-chip { padding: 8px 10px; }
}

/* ===== Overlay + modal base ===== */
.auth-ovl[hidden], .auth-modal[hidden]{display:none!important;}
.auth-ovl{
  position:fixed; inset:0; z-index:1001;
  background:rgba(2,6,23,.55);
  backdrop-filter: blur(4px);
}
.auth-modal{
  position:fixed; inset:0; z-index:1002;
  display:grid; place-items:center;
}

/* ===== Card con imagen lateral (inspirado en tu referencia) ===== */
.auth-modal .card{
  background:#ffffff;
  border-radius:30px;
  width:92vw; max-width:880px;
  padding:16px;
  display:flex; flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  position:relative;
}
.auth-modal .card .image{
  position:relative;
  border-radius:20px;
  overflow:hidden;
  width:100%;
  height:220px; /* en m??vil la imagen va arriba */
  align-self:stretch;
}
.auth-modal .card .image > img{
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:cover;
}
.auth-modal .card .content{
  flex:1 1 50%;
  padding:12px 16px 18px;
  display:flex; flex-direction:column;
  justify-content:center; align-items:center;
  text-align:left;
}
.auth-modal .card h2{
  font-weight:600; font-size:22px;
  margin:8px 0 4px; color:#111827;
}
.auth-modal .card .form{ width:100%; max-width:420px; }

/* Inputs estilo "floating label" */
.textbox{ position:relative; margin:14px 0; }
.textbox input{
  font-size:16px; width:100%; height:56px; padding:0 16px;
  border:0; border-radius:12px;
  background:#f3f4f6; color:#111827;
  outline:2px solid transparent; transition:outline-color .2s, background .2s;
}
.textbox label{
  position:absolute; left:16px; top:50%; transform:translateY(-50%);
  color:#6b7280; pointer-events:none; transition: all .2s;
  background:transparent; padding:0 4px;
}
.textbox input:focus{ outline-color:#3b82f6; background:#fff; }
.textbox input:not(:placeholder-shown) + label,
.textbox input:focus + label{
  top:0; transform:translateY(-50%);
  font-size:12px; color:#2563eb;
  background:#fff; border-radius:6px;
}

/* Recordarme + error */
.remember{ display:flex; gap:.5rem; align-items:center; margin:8px 0 14px; color:#111827; }
.form-error{ color:#ef4444; min-height:1.2em; margin-top:6px; }

/* Botones */
.btn{ font:inherit; cursor:pointer; border:0; }
.btn.tab{ background:#eef2ff; color:#1e1b4b; border-radius:8px; padding:10px 14px; }
.btn.tab[aria-pressed="true"]{ background:#6366f1; color:#fff; }
.btn.primary.submit{
  width:100%; height:56px; border-radius:12px;
  background:#2563eb; color:#fff; font-weight:600;
}

/* Cerrar */
.auth-close{
  position:absolute; right:18px; top:18px;
  width:36px; height:36px; border-radius:10px;
  background:#eef2ff; color:#111827; border:1px solid rgba(0,0,0,.06);
}

/* Usuario (chip + dropdown) �?" ya los tenías */
.auth-user{ position:relative; margin-left:.5rem; }
.user-badge{ display:grid; place-items:center; width:36px; height:36px; border-radius:999px; font-weight:700; background:#111827; color:#fff; }
.user-dropdown{ position:absolute; right:0; top:calc(100% + 8px); min-width:220px; background:#fff; color:#111827; border:1px solid rgba(0,0,0,.1); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.18); padding:.5rem; display:none; }
.user-dropdown.open{ display:block; }
.ud-row{ padding:.45rem .6rem; text-align:left; width:100%; }
.ud-row.danger{ color:#ef4444; }
.ud-member{
  margin:8px 0 12px;
  padding:12px;
  border-radius:14px;
  background:linear-gradient(135deg,#111827,#1f2937);
  color:#e2e8f0;
  display:grid; gap:10px;
  border:1px solid rgba(148,163,184,.25);
}
.ud-subtitle{ font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; color:rgba(226,232,240,.72); font-weight:700; }
.ud-deal-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.ud-deal-item{ display:flex; align-items:center; gap:10px; padding:8px; border-radius:12px; background:rgba(15,23,42,.45); }
.ud-deal-thumb{ width:42px; height:42px; border-radius:12px; object-fit:cover; flex-shrink:0; box-shadow:0 0 0 1px rgba(255,255,255,.12); }
.ud-deal-thumb.placeholder{ display:grid; place-items:center; font-weight:700; font-size:.95rem; background:rgba(30,41,59,.6); color:#facc15; }
.ud-deal-copy{ display:grid; gap:2px; line-height:1.2; }
.ud-deal-title{ font-weight:600; font-size:.9rem; color:#f8fafc; }
.ud-deal-desc{ font-size:.75rem; color:rgba(226,232,240,.75); }
.ud-deal-off{ margin-left:auto; font-size:.75rem; font-weight:700; background:#ef4444; color:#fff; padding:2px 8px; border-radius:999px; }
.ud-more{ font-size:.75rem; text-align:right; color:#93c5fd; font-weight:600; text-decoration:none; }
.ud-more:hover{ text-decoration:underline; }
.ud-deal-empty{ text-align:center; font-size:.78rem; color:rgba(226,232,240,.7); }

/* Responsive: a partir de 780px la card se hace de dos columnas */
@media (width >= 780px){
  .auth-modal .card{ width:85%; padding-right:0; flex-direction:row; align-items:center; }
  .auth-modal .card .image{ width:45%; height:auto; align-self:stretch; }
  .auth-modal .card .image > img{ height:100%; }
  .auth-modal .card .content{ align-items:flex-start; padding:0 32px 20px; }
  .auth-modal .card .content > img{ margin-top:8px; margin-bottom:10px; }
}

/* Dark mode */
@media (prefers-color-scheme: dark){
  .auth-modal .card{ background:#0b1220; }
  .auth-modal .card h2, .remember, .form-error{ color:#e5e7eb; }
  .textbox input{ background:#0f172a; color:#e5e7eb; }
  .textbox input:focus{ background:#0b1220; }
  .textbox label{ color:#94a3b8; }
  .textbox input:not(:placeholder-shown) + label,
  .textbox input:focus + label{ background:#0b1220; color:#93c5fd; }
  .btn.tab{ background:#1e293b; color:#e5e7eb; }
  .auth-close{ background:#1e293b; color:#e5e7eb; border-color:#334155; }
  .user-dropdown{ background:#0b1220; color:#e5e7eb; border-color:#22314b; }
}

/* === Bienvenida con logo circular === */
.welcome{ width:100%; max-width:420px; text-align:center; margin:6px 0 14px; }
.logo-circle{
  width:86px; height:86px; margin:0 auto 12px; border-radius:999px;
  display:grid; place-items:center; overflow:hidden;
  background: radial-gradient(120% 120% at 20% 10%, #ffffff 0%, #eef2ff 60%, #e2e8f0 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,.18), inset 0 2px 8px rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
}
.logo-circle img{ width:100%; height:100%; object-fit:cover; }

.welcome-title{
  font-size:22px; font-weight:700; color:#111827; margin:0 0 4px;
}
.welcome-title span{ letter-spacing:.2px; }
.welcome-sub{ margin:0 0 8px; color:#6b7280; }

/* Dark */
@media (prefers-color-scheme: dark){
  .logo-circle{
    background: radial-gradient(120% 120% at 20% 10%, #1f2937 0%, #0f172a 60%, #0b1220 100%);
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 2px 8px rgba(255,255,255,.08);
  }
  .welcome-title{ color:#e5e7eb; }
  .welcome-sub{ color:#94a3b8; }
}

/* En pantallas grandes, alinea a la izquierda para que combine con la card */
@media (width >= 780px){
  .welcome{ text-align:left; }
}

/* Ocultar la columna de imagen del modal de login */
.auth-modal .card .image { display: none !important; }

/* Ajustar ancho/alineación cuando no hay imagen */
.auth-modal .card { max-width: 560px; padding-right: 16px; }
.auth-modal .card .content { align-items: center; }

/* Centrar el encabezado del modal */
.welcome { text-align: center !important; }
.welcome-title { text-align: center; display: inline-block; }

/* Cursor del typewriter */
.type-cursor {
  display:inline-block; margin-left:.25rem;
  animation: blink .9s steps(1) infinite;
  opacity:1;
}
@keyframes blink { 50% { opacity: 0; } }

/* Asegurar que en pantallas grandes siga centrado */
@media (width >= 780px){
  .auth-modal .card.no-image .content,
  .welcome { text-align: center !important; }
}

/* Member Deals */
.member-deals{ margin-top: 32px; }
.member-deals[hidden]{ display:none !important; }
.md-head h2{ font-size:1.4rem; margin:0 0 .3rem; }
.md-head p{ color:#64748b; margin:0 0 1rem; }

.md-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
  gap:14px;
}
.md-card{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:12px;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  display:flex; gap:10px; align-items:center;
}
.md-thumb{
  width:72px; height:72px; border-radius:10px; overflow:hidden;
  background:#f1f5f9; display:grid; place-items:center;
}
.md-thumb img{ width:100%; height:100%; object-fit:cover; }
.md-info{ flex:1; min-width:0; }
.md-title{ font-weight:600; margin:0 0 4px; }
.md-desc{ color:#64748b; font-size:.9rem; margin:0 0 6px; }
.md-badge{
  display:inline-block; background:#16a34a; color:#fff; font-weight:700;
  padding:.2rem .5rem; border-radius:.5rem; font-size:.8rem;
}
@media (prefers-color-scheme:dark){
  .md-card{ background:#0b1220; border-color:#22314b; }
  .md-desc{ color:#94a3b8; }
}

.member-deals{ margin-top: 32px; }
.member-deals[hidden]{ display:none !important; }
.md-head h2{ font-size:1.4rem; margin:0 0 .3rem; }
.md-head p{ color:#64748b; margin:0 0 1rem; }
.md-grid{ display:grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.md-card{ border:1px solid rgba(0,0,0,.08); border-radius:14px; padding:12px; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,.06); display:flex; gap:10px; align-items:center; }
.md-thumb{ width:72px; height:72px; border-radius:10px; overflow:hidden; background:#f1f5f9; display:grid; place-items:center; }
.md-thumb img{ width:100%; height:100%; object-fit:cover; }
.md-info{ flex:1; min-width:0; }
.md-title{ font-weight:600; margin:0 0 4px; }
.md-desc{ color:#64748b; font-size:.9rem; margin:0 0 6px; }
.md-badge{ display:inline-block; background:#16a34a; color:#fff; font-weight:700; padding:.2rem .5rem; border-radius:.5rem; font-size:.8rem; }
@media (prefers-color-scheme:dark){
  .md-card{ background:#0b1220; border-color:#22314b; }
  .md-desc{ color:#94a3b8; }
}




.comments {
  max-width: 780px;
  margin: 3rem auto 4rem;
  padding: 2.5rem 2.75rem;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff 0%, #f7f9ff 45%, #eef3ff 100%);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.18);
  position: relative;
  overflow: hidden;
}

.comments::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(46% 60% at 0% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(40% 55% at 100% 0%, rgba(99, 102, 241, 0.12), transparent 60%);
  pointer-events: none;
}

.comments-title {
  font-size: clamp(1.75rem, 2.2vw, 2.4rem);
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.comments-title-letter {
  display: inline-block;
  transform: translateY(22px) rotate(4deg);
  opacity: 0;
  transition: transform .55s cubic-bezier(.19, 1, .22, 1), opacity .45s ease;
  transition-delay: var(--delay, 0ms);
}

.comments-title.animate .comments-title-letter {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

#comments-counter {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  margin-bottom: 1.4rem;
}

#comments-counter[data-count="0"] {
  color: #475569;
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.22);
}

.comment-empty {
  margin: 1.4rem 0 0;
  padding: 1.2rem 1.4rem;
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.08);
  color: #3730a3;
  font-weight: 500;
  text-align: center;
  border: 1px dashed rgba(79, 70, 229, 0.3);
}

.comment {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 1rem;
  transition: transform .25s ease, box-shadow .25s ease;
}

.comment:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  font-size: .95rem;
  color: #475569;
  margin-bottom: .55rem;
}

.comment-author {
  font-weight: 600;
  color: #0f172a;
}

.comment-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6366f1;
}

.comment-time {
  color: #64748b;
  font-size: .9rem;
}

.comment p {
  margin: 0;
  font-size: 1.02rem;
  color: #1f2937;
  line-height: 1.6;
}

.comment-hint {
  margin: 1.1rem 0 .6rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #475569;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.comment-hint::before {
  content: "\1F512";
}

.comments form {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  padding: 1.6rem 1.9rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 36px rgba(59, 130, 246, 0.08);
}

.comments form label {
  display: grid;
  gap: .55rem;
  font-weight: 600;
  color: #0f172a;
  font-size: .95rem;
}

.comments input,
.comments textarea {
  width: 100%;
  font: inherit;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: .85rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.comments input:focus,
.comments textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}

.comments textarea {
  min-height: 140px;
  resize: vertical;
}

.comments button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .75rem 1.9rem;
  cursor: pointer;
  box-shadow: 0 15px 30px rgba(79, 70, 229, 0.35);
  transition: transform .25s ease, box-shadow .25s ease;
}

.comments button::after {
  content: "\2197";
  font-size: 1rem;
  transform: translateY(-1px);
}

.comments button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.42);
}

.comments button:active {
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.35);
}

.comments button:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

#commentStatus {
  font-size: .9rem;
  font-weight: 500;
  margin-top: .4rem;
  color: #4f46e5;
  transition: color .2s ease, opacity .2s ease;
}

#commentStatus[data-state="success"] {
  color: #059669;
}

#commentStatus[data-state="warn"] {
  color: #d97706;
}

#commentStatus[data-state="error"] {
  color: #dc2626;
}

@media (max-width: 640px) {
  .comments {
    margin: 2.5rem 1rem 3rem;
    padding: 1.8rem 1.4rem;
    border-radius: 20px;
  }

  .comments form {
    padding: 1.2rem 1.2rem;
  }

  .comments button {
    width: 100%;
    justify-content: center;
  }
}










.product-gallery { display: grid; gap: 12px; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-thumb { border: 1px solid var(--border); background: #fff; border-radius: var(--radius); padding: 4px; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.gallery-thumb picture { display: block; width: 100px; }
.gallery-thumb img { width: 100%; height: auto; object-fit: cover; border-radius: calc(var(--radius) - 6px); }
.gallery-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, .18); }
.gallery-thumb:hover { border-color: var(--accent); transform: translateY(-2px); }

