:root {
  --brand-primary: #0B2545;
  --brand-secondary: #C9A227;
  --brand-bg: #F4F6F9;
  --brand-text: #0B1F33;
  --brand-btn: #0B2545;
  --brand-accent: #C9A227;
  --ink: #1c1c22;
  --muted: #6b6b78;
  --bg: #ffffff;
  --surface: #f7f6f9;
  --border: #e6e3ec;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--brand-text);
  background: var(--brand-bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.store-header {
  border-bottom: 1px solid var(--border);
  background: var(--brand-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.store-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}
.store-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
}
.store-lema { color: var(--muted); font-size: .85rem; }

.store-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.store-nav a { color: var(--muted); font-size: .95rem; }
.store-nav a:hover { color: var(--brand-primary); }

.hero {
  background: linear-gradient(135deg, var(--brand-btn), var(--brand-accent));
  color: #fff;
  padding: 56px 20px;
}
.hero-inner { max-width: 1100px; margin: 0 auto; }
.hero h1 { margin: 0 0 8px; font-size: 2rem; }
.hero p { margin: 0; opacity: .92; }

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

.section-title {
  font-size: 1.15rem;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.09); }
.card-img { aspect-ratio: 1/1; background: var(--surface); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 600; font-size: 1rem; }
.card-desc { color: var(--muted); font-size: .85rem; flex: 1; }
.card-price { font-weight: 700; color: var(--brand-accent); font-size: 1.05rem; }
.badge-destacado {
  align-self: flex-start;
  background: var(--brand-secondary);
  color: #3a2340;
  font-size: .7rem;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Ficha de producto */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.product-title { font-size: 1.8rem; margin: 0 0 6px; }
.product-desc { color: var(--muted); margin: 14px 0; }
.product-price { font-size: 1.6rem; font-weight: 800; color: var(--brand-accent); margin: 12px 0; }

.variant-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 18px; }
.variant-pill {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  background: #fff;
  font: inherit;
}
.variant-pill.active { border-color: var(--brand-primary); background: var(--surface); font-weight: 600; }
.variant-pill small { display: block; color: var(--muted); font-weight: 400; }

.btn-primary {
  background: var(--brand-btn);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.stock-info { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* Hub */
.hub-hero {
  background: #101018;
  color: #fff;
  padding: 64px 20px;
  text-align: center;
}
.hub-hero h1 { font-size: 2.4rem; margin: 0 0 10px; }
.hub-hero p { opacity: .8; margin: 0; }

/* Hub home: hero con imagen de fondo (máx. 400 px de alto) */
.hub-hero-home {
  position: relative;
  height: 400px;
  max-height: 400px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow: hidden;
  background-color: #101018;
  background-image:
    linear-gradient(180deg, rgba(16,16,24,.62) 0%, rgba(16,16,24,.78) 45%, rgba(16,16,24,.70) 100%),
    url('/assets/img/com3-Hero.webp?v=20261016');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
}
.hub-hero-inner { width: 100%; max-width: 1000px; display: flex; flex-direction: column; align-items: center; }
.hub-hero-home h1 { font-size: 2rem; margin: 0 0 4px; line-height: 1.15; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.hub-hero-home p { font-size: .98rem; opacity: .92; margin: 0 0 14px; text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.hub-hero-login {
  position: absolute; top: 16px; right: 20px;
  color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  padding: 6px 15px; font-size: .85rem; text-decoration: none;
  background: rgba(16,16,24,.3);
}
.hub-hero-login:hover { background: rgba(255,255,255,.16); }
.hub-hero-home .busc { width: 100%; margin: 0 auto; }
.hub-hero-home .busc-row { justify-content: center; }
.hub-hero-home .busc-btn { align-self: flex-end; }
.hub-hero-cta { margin-top: 14px; }
.hub-hero-cta a {
  display: inline-block; background: #fff; color: #101018; border-radius: 999px;
  padding: 9px 22px; font-weight: 700; font-size: .9rem; text-decoration: none;
}
.hub-hero-cta a:hover { opacity: .9; }

.store-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.store-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
}
.store-card h3 { margin: 0 0 4px; }
.store-card .dominio { color: var(--muted); font-size: .85rem; }
.store-card .swatch { width: 40px; height: 8px; border-radius: 999px; margin-bottom: 14px; }

.store-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 20px;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* --- Buscador del marketplace (hub) --- */
.hub-hero-sm { padding: 34px 20px 40px; text-align: left; }
.busc { display: flex; flex-direction: column; gap: 12px; max-width: 1100px; margin: 22px auto 0; }
.hub-hero-sm .busc { margin-top: 0; }
.busc-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.busc-field { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.busc-field > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.busc-field-grow { flex: 1 1 240px; }
.busc input, .busc select { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; border-radius: 10px; padding: 10px 12px; font-size: .95rem; min-width: 170px; width: 100%; }
.busc input::placeholder { color: rgba(255,255,255,.65); }
.busc select option { color: #101018; }
.busc-btn { border: 0; border-radius: 10px; padding: 11px 22px; font-weight: 700; background: #fff; color: #101018; cursor: pointer; }
.busc-btn-all { background: rgba(255,255,255,.82); }
.busc-row-all { border-top: 1px dashed rgba(255,255,255,.3); padding-top: 12px; }
.busc-claro input, .busc-claro select { border-color: var(--border); background: #fff; color: #101018; }
.busc-claro input::placeholder { color: var(--muted); }
.busc-claro .busc-field > span { color: var(--muted); }
.busc-claro .busc-btn { background: var(--brand-btn); color: #fff; }
.busc-claro .busc-row-all { border-top-color: var(--border); }
.busc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.busc-resumen { color: var(--muted); font-size: .92rem; }
.res-tienda { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.res-tienda-meta { color: var(--muted); font-size: .82rem; line-height: 1.55; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 28px; }
.busc-aviso { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface); color: var(--muted); }

/* Buscador dentro de la tienda (header) */
.store-search { display: flex; gap: 6px; align-items: center; }
.store-search input { border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font-size: .88rem; width: 150px; }
.store-search button { border: 0; background: var(--brand-btn); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; }

@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: 1.5rem; }
  .hub-hero h1 { font-size: 1.7rem; }
  .busc-row { align-items: stretch; }
  .busc input, .busc select, .busc-btn { width: 100%; }
  /* Hero del hub: sin etiquetas para mantenerse por debajo de los 400 px */
  .hub-hero-home .busc-field > span { display: none; }
  .hub-hero-home .hub-hero-cta { margin-top: 10px; }
}

@media (max-width: 900px) {
  /* En pantallas chicas el hero crece según su contenido (nunca se recorta) */
  .hub-hero-home { height: auto; max-height: none; min-height: 0; padding: 26px 18px 30px; }
  .hub-hero-home h1 { font-size: 1.7rem; }
  .hub-hero-login { top: 12px; right: 12px; }
}

/* Tablet: dentro del hero el buscador sigue en línea (los botones full-width
   del layout móvil estirarían el hero por encima de los 400 px) */
@media (min-width: 641px) and (max-width: 900px) {
  .hub-hero-home .busc input,
  .hub-hero-home .busc select,
  .hub-hero-home .busc-btn { width: auto; }
}

/* Móvil: buscador compacto a todo el ancho para entrar en ~400 px */
@media (max-width: 640px) {
  .hub-hero-home { padding: 16px 14px 18px; }
  .hub-hero-home .busc-field > span { display: none; }
  .hub-hero-home h1 { font-size: 1.35rem; margin-bottom: 2px; }
  .hub-hero-home p { font-size: .88rem; margin-bottom: 10px; }
  .hub-hero-home .busc { gap: 6px; }
  .hub-hero-home .busc-row { gap: 6px; }
  .hub-hero-home .busc-row-all { padding-top: 7px; }
  .hub-hero-home .busc input,
  .hub-hero-home .busc select,
  .hub-hero-home .busc-btn { width: 100%; padding-top: 7px; padding-bottom: 7px; font-size: .9rem; }
  .hub-hero-home .hub-hero-cta { margin-top: 9px; }
}

@media (max-width: 420px) {
  /* Mantiene la bajada en una sola línea */
  .hub-hero-home p { font-size: .78rem; }
}

/* === Refinamiento topbar y tipografía (impeccable) === */
.store-brand { display: flex; flex-direction: column; gap: 2px; }
.store-verified { font-size: .72rem; color: #1b6b3a; font-weight: 700; }
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--brand-bg);
  color: var(--brand-text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}
.store-nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.store-nav a { color: var(--muted); font-size: .95rem; transition: color .15s ease; }
.store-nav a:hover { color: var(--brand-primary); }
.cart-link { font-weight: 600; }
.login-link { font-weight: 600; color: var(--brand-primary); }
.cat-dropdown { position: relative; }
.cat-dropdown summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .95rem;
  list-style: none;
  padding: 4px 0;
}
.cat-dropdown summary::-webkit-details-marker { display: none; }
.cat-dropdown summary::after { content: ' ▾'; font-size: .7rem; }
.cat-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--brand-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 30;
}
.cat-menu a { color: var(--brand-text); padding: 6px 10px; border-radius: 6px; }
.cat-menu a:hover { background: var(--surface); color: var(--brand-primary); }
.cat-dropdown:not([open]) .cat-menu { display: none; }

/* Tipografía */
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; }
.section-title { font-size: 1.15rem; font-weight: 700; }
.card-title { font-weight: 600; font-size: 1rem; }
.card-desc { color: var(--muted); font-size: .85rem; }

/* Bandas y cuadros */
.band {
  padding: 48px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--brand-bg);
  padding: 20px;
}
.box-accent {
  border: 1px solid var(--brand-accent);
}

/* Responsive topbar */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .store-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 12px;
  }
  .store-nav.open { display: flex; }
  .store-search { width: 100%; }
  .store-search input { width: 100%; }
  .cat-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
}
