/* ============================================================
   Crea3D_AG — estilos
   ============================================================ */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #16181d;
  --text-muted: #667085;
  --brand: #2f5bea;
  --brand-dark: #1f3fb0;
  --brand-light: #eaf0ff;
  --accent: #ff7a1a;
  --success: #1ba672;
  --danger: #e0335a;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
  --header-h: 96px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --surface: #171a21;
    --border: #262b34;
    --text: #f0f2f5;
    --text-muted: #9aa2b1;
    --brand: #5b81f2;
    --brand-dark: #3f5fd6;
    --brand-light: #1b2340;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

/* Elección manual del usuario (botón de tema), tiene prioridad sobre el sistema */
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --border: #262b34;
  --text: #f0f2f5;
  --text-muted: #9aa2b1;
  --brand: #5b81f2;
  --brand-dark: #3f5fd6;
  --brand-light: #1b2340;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
/* Garantiza que el atributo hidden siempre oculte, incluso en elementos
   cuya clase (ej. .btn) también define su propio "display". */
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  /* Evita el "scroll fantasma" horizontal en iOS: el cart-drawer y el
     account-modal se posicionan fuera de pantalla con transform cuando
     están cerrados, pero WebKit los sigue contando en el ancho
     desplazable de la página, dejando ver un espacio en blanco/negro al
     desplazar hacia la derecha. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Top bar ---------------- */
.topbar {
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
  padding: 7px 12px;
}

/* ---------------- Header ---------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}

.logo .logo-mark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  margin-bottom: -26px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.35), 0 0 0 4px var(--surface);
  transition: transform 0.2s ease;
}
.logo:hover .logo-mark { transform: scale(1.05) rotate(-3deg); }

.logo .logo-text small {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--text-muted);
}

nav.main-nav {
  display: flex;
  gap: 28px;
  font-weight: 500;
  font-size: 0.92rem;
}

nav.main-nav a {
  color: var(--text-muted);
  transition: color 0.15s;
}
nav.main-nav a:hover { color: var(--brand); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--text);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------------- Menú móvil (hamburguesa) ---------------- */
.mobile-menu-btn { display: none; }
.mobile-menu-dropdown { display: none; }

@media (max-width: 640px) {
  .header-icon-item { display: none !important; }
  .mobile-menu-btn { display: flex; }

  .mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 20px;
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 230px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 70;
  }
  .mobile-menu-dropdown.open { display: flex; }

  .mobile-menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    text-align: left;
    text-decoration: none;
  }
  .mobile-menu-row:hover { background: var(--bg); }
  .mobile-menu-whatsapp {
    background: #22c55e;
    color: #fff;
    justify-content: center;
    font-weight: 600;
    margin-top: 4px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

.btn-whatsapp { background: #22c55e; color: #fff; }
.btn-whatsapp:hover { background: #16a34a; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(47, 91, 234, 0.14), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255, 122, 26, 0.14), transparent 45%),
    var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
}
.hero h1 span { color: var(--brand); }

.hero p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 46ch;
  margin: 0 0 26px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}

.hero-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 91, 234, 0.35), rgba(255, 122, 26, 0.22) 60%, transparent 75%);
  filter: blur(34px);
  z-index: 0;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: min(280px, 68%);
  border-radius: 50%;
  box-shadow: 0 24px 50px rgba(16, 24, 40, 0.35), 0 0 0 6px var(--surface);
  animation: hero-float 5s ease-in-out infinite;
}

.hero-logo.hero-photo {
  width: min(460px, 92%);
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(16, 24, 40, 0.35), 0 0 0 6px var(--surface);
}

/* Muestra la foto del hero acorde al tema activo (claro por defecto) */
.hero-photo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-photo-light { display: none; }
  :root:not([data-theme="light"]) .hero-photo-dark { display: block; }
}

:root[data-theme="dark"] .hero-photo-light { display: none; }
:root[data-theme="dark"] .hero-photo-dark { display: block; }

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.floating-badge {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}
.badge-top { top: 8%; right: 2%; }
.badge-bottom { bottom: 10%; left: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
}

/* ---------------- Benefits bar ---------------- */
.benefits {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.benefits-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 24px 0;
}
.benefit {
  display: flex;
  align-items: center;
  gap: 12px;
}
.benefit .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.benefit .label { font-weight: 600; font-size: 0.88rem; }
.benefit .sub { color: var(--text-muted); font-size: 0.76rem; }

/* ---------------- Shop layout ---------------- */
.shop-section { padding: 44px 0 80px; }

.shop-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.shop-header h2 { margin: 0 0 4px; font-size: 1.5rem; }
.shop-header p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.sidebar h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.sidebar h3:not(:first-child) { margin-top: 22px; }

.cat-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
}
.cat-list button:hover { background: var(--bg); }
.cat-list button.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.cat-list button .count { color: var(--text-muted); font-size: 0.78rem; }
.cat-list button.active .count { color: var(--brand); }

.price-info {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}
.search-box input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

select#sort-select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
}

.category-tabs {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.category-tabs button {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}
.category-tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.results-count {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}

/* ---------------- Product grid ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.product-media {
  aspect-ratio: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, var(--bg), var(--surface));
  position: relative;
  padding: 18px;
  cursor: pointer;
}

.product-photo {
  object-fit: cover;
  border-radius: 12px;
}

.cart-item-media .product-photo {
  border-radius: 8px;
}

.product-emoji-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-light);
  line-height: 1;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  z-index: 2;
}
.badge.nuevo { background: var(--brand); }
.badge.oferta { background: var(--danger); }

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
}
.stock-badge.low { color: var(--danger); background: rgba(224, 51, 90, 0.1); }

.product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-brand { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.product-name { font-size: 0.92rem; font-weight: 600; line-height: 1.3; min-height: 2.4em; }
.product-color { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0; }

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.price-current { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.price-old { font-size: 0.82rem; color: var(--text-muted); text-decoration: line-through; }
.price-bs { font-size: 0.72rem; color: var(--text-muted); }

.product-footer {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.qty-stepper button {
  width: 28px;
  height: 32px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text);
}
.qty-stepper button:hover { background: var(--bg); }
.qty-stepper span { width: 22px; text-align: center; font-size: 0.85rem; font-weight: 600; }

.add-to-cart-btn {
  flex: 1;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.add-to-cart-btn:hover { background: var(--brand-dark); }
.add-to-cart-btn.added { background: var(--success); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 2.4rem; margin-bottom: 10px; }

/* ---------------- How it works ---------------- */
.how-it-works {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}
.how-it-works h2 { text-align: center; margin: 0 0 8px; font-size: 1.5rem; }
.how-it-works > .container > p { text-align: center; color: var(--text-muted); margin: 0 0 34px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  text-align: center;
  padding: 20px 14px;
}
.step .num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.step h4 { margin: 0 0 6px; font-size: 0.95rem; }
.step p { margin: 0; color: var(--text-muted); font-size: 0.82rem; }

/* ---------------- Footer ---------------- */
footer.site-footer {
  background: #12141a;
  color: #c9cdd6;
  padding: 48px 0 24px;
  font-size: 0.86rem;
}
@media (prefers-color-scheme: light) {
  footer.site-footer { background: #14161c; color: #c9cdd6; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-grid h4 { color: #fff; font-size: 0.85rem; margin: 0 0 14px; }
.footer-grid p, .footer-grid li { color: #9aa0ad; margin: 0 0 8px; line-height: 1.6; }
.footer-grid a:hover { color: #fff; }
.payment-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.payment-pills span {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
}
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #6c7280;
  font-size: 0.78rem;
}

/* ---------------- Cart drawer ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.5);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--surface);
  z-index: 61;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h3 { margin: 0; font-size: 1.1rem; }
.cart-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.cart-close:hover { background: var(--bg); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-media {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.86rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-color { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-size: 0.85rem; font-weight: 600; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 0;
}
.cart-item-remove:hover { color: var(--danger); }

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
}
.cart-empty .icon { font-size: 2.2rem; margin-bottom: 10px; }

.cart-footer {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border);
}
.shipping-select-row {
  margin-bottom: 14px;
}
.shipping-select-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.shipping-select-row select,
.shipping-select-row input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-family: inherit;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.cart-summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 16px;
}
.cart-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

/* ---------------- Account modal ---------------- */
.account-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(400px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 61;
  padding: 28px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.account-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.account-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.account-modal h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.modal-sub {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#auth-form input {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}
#auth-form input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }

.auth-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(224, 51, 90, 0.1);
  color: var(--danger);
  font-size: 0.8rem;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.account-name { font-weight: 600; font-size: 0.95rem; }
.account-email { font-size: 0.78rem; color: var(--text-muted); }

#auth-logged-in h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.order-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.order-item:last-child { border-bottom: none; }
.order-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.order-date { color: var(--text-muted); font-weight: 500; }
.order-items-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------------- Quick view (galería de fotos) ---------------- */
.media-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  z-index: 2;
  pointer-events: none;
}

.quickview-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(480px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 61;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.quickview-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.quickview-gallery {
  position: relative;
  aspect-ratio: 1.15;
  background: linear-gradient(135deg, var(--bg), var(--surface));
  border-radius: 14px;
  overflow: hidden;
}

.gallery-image-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.quickview-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text);
  z-index: 2;
}
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 4px;
  min-height: 8px;
}
.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
}
.gallery-dot.active { background: var(--brand); }

.quickview-info { padding-top: 12px; }
.quickview-info h3 { margin: 4px 0 8px; font-size: 1.15rem; line-height: 1.3; }
.quickview-info .product-color { margin-bottom: 8px; }
.quickview-info .product-footer { margin-top: 14px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-showcase { max-width: 380px; margin: 0 auto; }
  .benefits-inner { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .category-tabs { display: flex; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  html { font-size: 14px; }
  nav.main-nav { display: none; }
  .benefits-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .hero { padding: 40px 0; }
  :root { --header-h: 76px; }
  .logo .logo-mark { width: 60px; height: 60px; margin-bottom: -16px; }
  .logo-text small { display: none; }

  .hero-eyebrow { font-size: 0.72rem; padding: 5px 12px; }
  .hero h1 { font-size: 1.65rem; }
  .hero p { font-size: 0.9rem; }

  /* Botones más compactos y tipo "pill" en móvil (el tamaño de PC no cambia) */
  .btn { padding: 7px 14px; font-size: 0.74rem; gap: 5px; }
  .hero-cta { gap: 8px; }
}
