/* =====================================================================
   LA GUAJIRA MARKETPLACE — DESIGN SYSTEM
   Capa propia sobre Bootstrap 5. No reemplaza Bootstrap — lo reviste con la
   identidad del logo oficial (azul marino, naranja, rojo cálido, turquesa y
   dorado del tejido wayuu) para que ninguna pantalla "se sienta" de una
   aplicación distinta a otra.
   ===================================================================== */

/* Sin dependencia de CDN de fuentes (Google Fonts): en un comercio donde el
   dueño trabaja desde el celular, muchas veces con datos móviles limitados,
   no vale la pena descargar una tipografía externa solo por estética.
   Se logra identidad propia con peso/tracking sobre la pila del sistema,
   que además carga instantáneo y sin parpadeo (FOUT). */

:root {
  /* =====================================================================
     PALETA — sale del logo oficial "La Guajira Marketplace".
       Azul marino  #082C4C  confianza: encabezados, navegación, texto
       Naranja      #F47721  acción: CTA y botones principales
       Rojo cálido  #E94B35  alertas y acentos puntuales
       Turquesa     #13B7C9  frescura: detalles, estados informativos
       Dorado       #FFB52E  promociones y destacados
       Gris claro   #F4F6F8  fondos y divisores
     Regla de contraste (calculada, no a ojo):
       - Sobre azul marino → texto BLANCO (14:1)
       - Sobre naranja / turquesa / dorado → texto AZUL MARINO (4.9–9:1)
       - Blanco sobre naranja solo da 2.9:1: nunca se usa.
     Verde: el logo no tiene verde; se conserva solo para estados de éxito
     (convención universal), no como color de marca.
     ===================================================================== */
  --mm-primary: #082C4C;        /* Azul marino — marca, navegación, títulos */
  --mm-primary-dark: #051E36;   /* extremo oscuro del degradado */
  --mm-primary-soft: #E7EEF5;
  --mm-ink: #082C4C;            /* texto y encabezados */
  --mm-ink-soft: #4A6176;
  --mm-accent: #F47721;         /* Naranja — CTA, acciones comerciales */
  --mm-accent-dark: #D9620F;    /* hover/active — mismo matiz, un paso más oscuro */
  --mm-accent-ink: var(--mm-ink); /* texto sobre naranja/turquesa/dorado: azul marino, nunca blanco */
  --mm-teal: #13B7C9;           /* Turquesa — detalles, información */
  --mm-teal-text: #0A7482;      /* turquesa para texto sobre fondo claro */
  --mm-gold: #FFB52E;           /* Dorado — promociones y destacados */
  --mm-red: #E94B35;            /* Rojo cálido */
  --mm-success: #00A651;        /* solo estados de éxito */
  --mm-success-dark: #008C45;
  --mm-success-text: #0C6B34;
  --mm-warning: #FFB52E;        /* = dorado de marca */
  --mm-warning-text: #7A4E00;
  --mm-danger: #E94B35;         /* = rojo cálido de marca */
  --mm-danger-text: #B3321F;
  --mm-surface: #FFFFFF;
  --mm-bg: #F4F6F8;
  --mm-border: #DDE3E9;

  /* --- Escala de espaciado consistente (evita márgenes arbitrarios) --- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* --- Radios y sombra: profundidad moderna, nunca tarjetas "flotando" --- */
  --mm-radius-sm: 10px;
  --mm-radius-md: 14px;
  --mm-radius-lg: 22px;
  --mm-radius-pill: 999px;
  --mm-shadow-sm: 0 1px 2px rgba(8,44,76,0.06), 0 1px 3px rgba(8,44,76,0.07);
  --mm-shadow-md: 0 8px 24px rgba(8,44,76,0.10);

  /* --- Mapear a variables de Bootstrap para que sus componentes hereden el sistema --- */
  --bs-primary: var(--mm-primary);
  --bs-primary-rgb: 8,44,76;
  --bs-success: var(--mm-success);
  --bs-warning: var(--mm-warning);
  --bs-danger: var(--mm-danger);
  --bs-body-color: var(--mm-ink);
  --bs-body-bg: var(--mm-bg);
  --bs-border-color: var(--mm-border);
  --bs-border-radius: var(--mm-radius-sm);
  --bs-border-radius-lg: var(--mm-radius-md);
}

body {
  background-color: var(--mm-bg);
  color: var(--mm-ink);
  -webkit-tap-highlight-color: transparent;
}

/* --- Tipografía: Plus Jakarta Sans para títulos/CTA (identidad), sistema para texto de lectura (velocidad) --- */
h1, h2, h3, h4, h5, h6, .display-title, .btn {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.015em;
}
h1 { font-size: 1.8rem; }
h2, .h2 { font-size: 1.4rem; }

/* Tipografía base más grande — legibilidad para todas las edades, no solo pantallas jóvenes */
body { font-size: 17px; line-height: 1.6; }
.form-label { font-size: .92rem !important; }
.form-text { font-size: .82rem !important; }
small, .small { font-size: .85rem !important; }

/* =====================================================================
   BOTONES — jerarquía clara: PRIMARY (naranja, es el color que más resalta
   del logo real) / SECONDARY / SUCCESS / WARNING / DANGER / GHOST.
   Táctiles: alto mínimo 50px — más grande de lo mínimo estándar (44px)
   pensando en usuarios de mayor edad.
   ===================================================================== */
.btn {
  border-radius: var(--mm-radius-sm);
  min-height: 50px;
  padding-top: .6rem;
  padding-bottom: .6rem;
  font-size: 1rem;
  font-weight: 700;
}
.btn-sm { min-height: 40px; font-size: .9rem; }
.btn { transition: background-color .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background-color: var(--mm-accent);
  border-color: var(--mm-accent);
  color: var(--mm-accent-ink);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--mm-accent-dark) !important;
  border-color: var(--mm-accent-dark) !important;
  color: var(--mm-accent-ink) !important;
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--mm-border);
  color: var(--mm-ink);
}
.btn-ghost:hover { background: var(--mm-bg); }

/* CTA principal grande (ficha de producto, carrito, nueva venta, login) — naranja de marca puro,
   texto azul profundo (no blanco: el blanco sobre este naranja no pasa contraste — ver :root). */
.btn-cta {
  display: block;
  width: 100%;
  background-color: var(--mm-accent);
  color: var(--mm-accent-ink);
  border: none;
  border-radius: var(--mm-radius-md);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 1.1rem;
  box-shadow: var(--mm-shadow-md);
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn-cta:hover, .btn-cta:focus { background-color: var(--mm-accent-dark); color: var(--mm-accent-ink); box-shadow: 0 10px 28px rgba(244,119,33,0.30); }
.btn-cta:active { transform: translateY(1px); }
.btn-cta:disabled { opacity: .6; box-shadow: none; }

/* Inputs más grandes y cómodos de leer/tocar */
.form-control, .form-select {
  min-height: 50px;
  font-size: 1rem;
  padding-top: .6rem;
  padding-bottom: .6rem;
}

/* Estados de input: error / success — pendientes del Design System V1, ahora implementados */
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--mm-danger);
  background-image: none; /* quita el ícono nativo de Bootstrap, usamos el nuestro */
  padding-right: 2.6rem;
}
.form-control.is-valid, .form-select.is-valid {
  border-color: var(--mm-success);
  background-image: none;
  padding-right: 2.6rem;
}
.form-control.is-invalid:focus { border-color: var(--mm-danger); box-shadow: 0 0 0 .2rem rgba(233,35,46,.15); }
.form-control.is-valid:focus { border-color: var(--mm-success); box-shadow: 0 0 0 .2rem rgba(0,166,81,.15); }
.mm-field { position: relative; }
.mm-field .mm-field-status-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}
.mm-field .mm-field-status-icon.is-invalid { color: var(--mm-danger); }
.mm-field .mm-field-status-icon.is-valid { color: var(--mm-success); }
.invalid-feedback { display: none; color: var(--mm-danger-text); font-size: .85rem; margin-top: .3rem; font-weight: 600; }
.form-control.is-invalid ~ .invalid-feedback, .was-validated .form-control:invalid ~ .invalid-feedback { display: block; }
.valid-feedback { display: none; color: var(--mm-success-text); font-size: .85rem; margin-top: .3rem; font-weight: 600; }
.form-control.is-valid ~ .valid-feedback { display: block; }

/* =====================================================================
   TARJETAS
   ===================================================================== */
.card {
  border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius-md);
  box-shadow: var(--mm-shadow-sm);
}
.card + .card { margin-top: 1rem; }

.product-card { text-decoration: none; color: var(--mm-ink); display: block; }
.product-card .thumb {
  aspect-ratio: 1/1;
  background: var(--mm-primary-soft);
  border-radius: var(--mm-radius-md) var(--mm-radius-md) 0 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .fav-heart {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(255,255,255,0.9); border-radius: 50%; border: none;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--mm-ink-soft); box-shadow: var(--mm-shadow-sm);
  transition: transform .15s ease, color .15s ease;
}
.product-card .fav-heart:hover { transform: scale(1.08); }
.product-card .fav-heart:active { transform: scale(.95); }
.product-card .fav-heart .mm-icon { width: 1.05em; height: 1.05em; }
.product-card .fav-heart .mm-fav-active { color: var(--mm-danger); }
.product-card .body { padding: .6rem .7rem; }
.product-card .name { font-size: .85rem; font-weight: 600; line-height: 1.25; height: 2.2em; overflow: hidden; }
.product-card .price { font-weight: 800; color: var(--mm-ink); font-size: 1rem; }
.product-card .price-old { text-decoration: line-through; color: var(--mm-ink-soft); font-size: .78rem; font-weight: 500; }
.product-card .store { color: var(--mm-ink-soft); font-size: .74rem; }

/* =====================================================================
   BADGES / ESTADOS — puntos de color, no solo texto (reconocible de un vistazo)
   ===================================================================== */
.badge { font-weight: 600; border-radius: var(--mm-radius-pill); padding: .4em .75em; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.status-dot.ok { background: var(--mm-success); }
.status-dot.low { background: var(--mm-warning); }
.status-dot.out { background: var(--mm-danger); }

.badge-solicitado { background: var(--mm-primary-soft); color: var(--mm-primary-dark); }
.badge-confirmado_comerciante, .badge-entregado { background: #E5F4EA; color: var(--mm-success-text); }
.badge-en_preparacion, .badge-listo_para_recoger { background: #FDF1E0; color: var(--mm-warning-text); }
.badge-rechazado, .badge-expirado_sin_respuesta, .badge-cancelado { background: #FBEAE7; color: var(--mm-danger-text); }
.badge-devuelto { background: #ECECEC; color: var(--mm-ink-soft); }

/* =====================================================================
   CATEGORÍAS — chips táctiles en vez de botones de texto plano
   ===================================================================== */
.category-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none; color: var(--mm-ink); font-size: .72rem; font-weight: 600;
  min-width: 64px;
}
.category-chip .icon {
  width: 52px; height: 52px; border-radius: var(--mm-radius-lg);
  background: var(--mm-primary-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

/* =====================================================================
   BUSCADOR HERO — el centro de la home, no un input escondido
   ===================================================================== */
.hero-search {
  background: linear-gradient(135deg, var(--mm-primary) 0%, var(--mm-primary-dark) 100%);
  border-radius: var(--mm-radius-lg);
  padding: 1.5rem 1.25rem 1.75rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.hero-search h1 { color: #fff; font-size: 1.35rem; margin-bottom: .25rem; }
.hero-search p { color: rgba(255,255,255,0.85); font-size: .85rem; margin-bottom: 1rem; }
.hero-search .search-box {
  background: #fff; border-radius: var(--mm-radius-pill);
  display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem;
  box-shadow: var(--mm-shadow-md);
}
.hero-search .search-box input {
  border: none; outline: none; flex: 1; font-size: .95rem; color: var(--mm-ink); background: transparent;
}
.hero-search .location {
  margin-top: .75rem; font-size: .78rem; color: rgba(255,255,255,0.85);
  display: flex; align-items: center; gap: .3rem;
}

/* =====================================================================
   NAVEGACIÓN INFERIOR — cliente y comerciante (mobile-first real)
   ===================================================================== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
  background: #fff; border-top: 1px solid var(--mm-border);
  display: flex; justify-content: space-around; padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--mm-ink-soft); font-size: .65rem; font-weight: 600;
  padding: 4px 10px; min-width: 56px; position: relative;
}
.bottom-nav a.active { color: var(--mm-primary); }
.bottom-nav a .icon { font-size: 1.25rem; line-height: 1; }
.bottom-nav .dot {
  position: absolute; top: 0; right: 10px; width: 8px; height: 8px;
  background: var(--mm-danger); border-radius: 50%; border: 1.5px solid #fff;
}
@media (max-width: 991.98px) {
  body.has-bottom-nav { padding-bottom: 78px; }
}

/* =====================================================================
   ESTADOS VACÍOS — nunca dejar una pantalla sin explicación
   ===================================================================== */
.empty-state {
  text-align: center; padding: 3rem 1.5rem; color: var(--mm-ink-soft);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .6; }
.empty-state h3 { font-size: 1rem; color: var(--mm-ink); margin-bottom: .4rem; }
.empty-state p { font-size: .85rem; margin-bottom: 1rem; }

/* =====================================================================
   SKELETON — placeholder de carga en vez de pantalla en blanco
   ===================================================================== */
.skeleton {
  background: linear-gradient(90deg, #ECEEED 25%, #F5F6F5 37%, #ECEEED 63%);
  background-size: 400% 100%;
  animation: mm-shimmer 1.4s ease infinite;
  border-radius: var(--mm-radius-sm);
}
@keyframes mm-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* =====================================================================
   DASHBOARD (comerciante/admin) — tarjetas de métrica consistentes
   ===================================================================== */
.stat-card { padding: 1rem; }
.stat-card .label { font-size: .72rem; color: var(--mm-ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.stat-card .value { font-size: 1.5rem; font-weight: 800; margin-top: .1rem; }

.quick-action {
  display: flex; align-items: center; gap: .6rem;
  background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-md);
  padding: .85rem 1rem; text-decoration: none; color: var(--mm-ink); font-weight: 700; font-size: .9rem;
  min-height: 44px;
}
.quick-action .icon { font-size: 1.3rem; }
.quick-action:hover { border-color: var(--mm-primary); background: var(--mm-primary-soft); color: var(--mm-primary-dark); }

/* =====================================================================
   VARIANTES Y CANTIDAD — píldoras táctiles en vez de <select>
   ===================================================================== */
.variant-pill {
  border: 1.5px solid var(--mm-border); border-radius: var(--mm-radius-pill);
  padding: .45rem 1.1rem; font-weight: 700; font-size: .85rem; background: #fff; color: var(--mm-ink);
  cursor: pointer; min-height: 40px;
}
.variant-pill.active { border-color: var(--mm-primary); background: var(--mm-primary-soft); color: var(--mm-primary-dark); }
.variant-pill:disabled, .variant-pill.disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--mm-border); border-radius: var(--mm-radius-pill); overflow: hidden; }
.qty-stepper button { border: none; background: #fff; width: 40px; height: 40px; font-size: 1.1rem; font-weight: 700; color: var(--mm-primary); }
.qty-stepper input { border: none; width: 44px; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* =====================================================================
   MOBILE: espaciado táctil general
   ===================================================================== */
@media (max-width: 767.98px) {
  .container, .container-fluid { padding-left: 14px; padding-right: 14px; }
  h1 { font-size: 1.4rem; }
}

.ratio-1x1 img { object-fit: cover; }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* =====================================================================
   SISTEMA DE ICONOGRAFÍA — SVG propio, una sola familia (Bootstrap Icons
   como fuente, autoalojado, solo los 48 que usamos). Reemplaza los emojis:
   consistente en Windows/Android/iOS/cualquier navegador, color controlado
   por token (currentColor), tamaño controlado por clase.
   ===================================================================== */
.mm-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  vertical-align: -0.2em;
  flex-shrink: 0;
}
.mm-icon-sm { width: .9em; height: .9em; }
.mm-icon-lg { width: 1.6em; height: 1.6em; }
.mm-icon-xl { width: 2.2em; height: 2.2em; }

/* Breadcrumbs — solo desde tablet (768px). En móvil un simple "Volver" basta, no hace falta la ruta completa. */
.mm-breadcrumb { display: none; }
@media (min-width: 768px) {
  .mm-breadcrumb {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
    font-size: .85rem; color: var(--mm-ink-soft); margin-bottom: 1rem;
  }
  .mm-breadcrumb a { color: var(--mm-ink-soft); text-decoration: none; }
  .mm-breadcrumb a:hover { color: var(--mm-primary); text-decoration: underline; }
  .mm-breadcrumb .sep { opacity: .5; }
  .mm-breadcrumb .current { color: var(--mm-ink); font-weight: 600; }
}
.mm-back-link-mobile { display: inline-block; }
@media (min-width: 768px) { .mm-back-link-mobile { display: none; } }

/* =====================================================================
   DASHBOARD ADMIN — composición real: KPIs + actividad + pendientes,
   en vez de una grilla plana de 8 tarjetas iguales con espacio vacío.
   ===================================================================== */
.kpi-card {
  background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-md);
  padding: 1.1rem; box-shadow: var(--mm-shadow-sm);
}
.kpi-card-alert { border-color: #FBD7A5; }
.kpi-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  margin-bottom: .6rem;
}
.kpi-icon .mm-icon { width: 1.1em; height: 1.1em; }
.kpi-value { font-size: 1.9rem; font-weight: 800; color: var(--mm-ink); line-height: 1.1; }
.kpi-label { font-size: .8rem; color: var(--mm-ink-soft); margin-top: .15rem; }

.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }

.stat-chip {
  background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm);
  padding: .75rem 1rem; display: flex; flex-direction: column;
}
.stat-chip-value { font-size: 1.25rem; font-weight: 800; color: var(--mm-ink); }
.stat-chip-label { font-size: .74rem; color: var(--mm-ink-soft); }

/* =====================================================================
   SIDEBAR ADMIN — navegación de producto: grupo, estado activo elegante,
   usuario/sesión en zona inferior fija (no un link "Salir" suelto).
   ===================================================================== */
/* Especificidad (.app-sidebar.app-sidebar-dark nav a) mayor que la regla base .app-sidebar nav a,
   que se declara más abajo en el archivo y antes pisaba el color de los links (texto oscuro sobre fondo oscuro). */
.app-sidebar.app-sidebar-dark {
  display: flex;
  background: linear-gradient(180deg, #0E3B63 0%, #082C4C 45%, #051E36 100%);
  border-right: none;
}
.app-sidebar.app-sidebar-dark .brand {
  color: #fff; font-size: 1.05rem; letter-spacing: .01em;
  border-bottom: 1px solid rgba(255,255,255,.14); padding: 1.15rem 1.25rem;
}
.app-sidebar.app-sidebar-dark .sidebar-group-label {
  padding: 1.25rem 1.5rem .5rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}
.app-sidebar.app-sidebar-dark nav { padding: .25rem .85rem 1rem; gap: 4px; }
.app-sidebar.app-sidebar-dark nav a {
  position: relative; color: rgba(255,255,255,.88); font-weight: 600; font-size: .92rem;
  padding: .7rem .9rem; border-radius: 12px; gap: .75rem;
  transition: background-color .15s ease, color .15s ease;
}
.app-sidebar.app-sidebar-dark nav a .mm-icon { width: 1.2em; height: 1.2em; color: rgba(255,255,255,.75); transition: color .15s ease; }
.app-sidebar.app-sidebar-dark nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.app-sidebar.app-sidebar-dark nav a:hover .mm-icon { color: #fff; }
.app-sidebar.app-sidebar-dark nav a.active { background: #fff; color: var(--mm-primary-dark); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.app-sidebar.app-sidebar-dark nav a.active .mm-icon { color: var(--mm-accent); }
.app-sidebar.app-sidebar-dark nav a.active::before {
  content: ""; position: absolute; left: -.85rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--mm-accent);
}
.app-sidebar.app-sidebar-dark nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* =====================================================================
   VENTAS (POS) — línea de carrito real en vez de selects apilados,
   resumen con CTA integrado, patrón Square/Shopify POS.
   ===================================================================== */
.segmented-control-inline { max-width: 320px; }

/* Selector de período de estadísticas: segmentos de ancho según contenido (no flex:1 estirado), con espacio real entre ellos. Clase propia para no afectar el selector de Canal del POS, que sí usa segmented-control-inline. */
.segmented-control-period {
  display: inline-flex; width: auto; max-width: 100%; flex-wrap: wrap; gap: 4px;
  background: var(--mm-bg); border: 1px solid var(--mm-border); border-radius: var(--mm-radius-pill); padding: 3px;
}
.segmented-control-period .segment { flex: 0 0 auto; padding-left: .9rem; padding-right: .9rem; white-space: nowrap; }
.pos-summary { position: sticky; top: 1rem; }
.pos-cart-line {
  display: flex; align-items: center; gap: .5rem; padding: .6rem 0;
  border-bottom: 1px solid var(--mm-border);
}
.pos-cart-line:last-child { border-bottom: none; }
.pos-cart-remove {
  background: none; border: none; color: var(--mm-ink-soft); padding: .3rem; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pos-cart-remove:hover { color: var(--mm-danger); background: #FBEAE7; }

/* =====================================================================
   NAVEGACIÓN GLOBAL — top bar + menú de usuario (desktop) + drawer con
   hamburguesa (móvil). El sidebar queda solo para navegación; la cuenta
   y "Salir" viven en un único lugar (topbar/drawer), sin duplicar.
   ===================================================================== */
.app-topbar {
  align-items: center; justify-content: flex-end; gap: 1.25rem;
  padding: .6rem 1.5rem; border-bottom: 1px solid var(--mm-border); background: #fff;
}
.mm-hamburger {
  background: none; border: none; color: #fff; padding: .3rem; display: flex; align-items: center;
}
.mm-hamburger .mm-icon { width: 1.3em; height: 1.3em; }

.mm-user-menu-btn {
  display: flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius-pill); padding: .3rem .8rem .3rem .3rem; font-weight: 600; font-size: .88rem;
  color: var(--mm-ink); transition: background-color .15s ease, border-color .15s ease;
}
.mm-user-menu-btn:hover { background: var(--mm-bg); }
.mm-user-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--mm-primary-soft); color: var(--mm-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mm-user-avatar .mm-icon { width: .9em; height: .9em; }
.mm-caret { opacity: .5; transition: transform .15s ease; }
.dropdown.show .mm-caret { transform: rotate(180deg); }

.mm-user-menu { min-width: 220px; border-radius: var(--mm-radius-md); border-color: var(--mm-border); box-shadow: var(--mm-shadow-md); padding: .4rem; }
.mm-user-menu-header { padding: .5rem .75rem .6rem; border-bottom: 1px solid var(--mm-border); margin-bottom: .3rem; }
.mm-user-menu .dropdown-item { border-radius: var(--mm-radius-sm); padding: .5rem .75rem; font-size: .88rem; display: flex; align-items: center; }
.mm-user-menu .dropdown-item:active { background: var(--mm-primary-soft); color: var(--mm-primary-dark); }
.mm-user-menu form { margin: 0; }
.mm-user-menu form .dropdown-item { width: 100%; text-align: left; border: none; background: none; }

/* Drawer móvil (offcanvas de Bootstrap, solo reestilizado) */
.mm-nav-drawer { width: 280px; }
.mm-drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.mm-drawer-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .5rem; border-radius: var(--mm-radius-sm);
  color: var(--mm-ink); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.mm-drawer-nav a.active { background: var(--mm-primary-soft); color: var(--mm-primary-dark); }
.mm-drawer-logout {
  display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: none;
  color: var(--mm-danger); font-weight: 600; padding: .6rem .5rem; border-radius: var(--mm-radius-sm);
}
.mm-drawer-logout:hover { background: #FBEAE7; }

/* =====================================================================
   ESTADÍSTICAS COMERCIANTE — desglose diario con barras CSS puras
   (sin agregar ninguna librería de gráficos nueva al proyecto).
   ===================================================================== */
.stats-bar-row { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; }
.stats-bar-label { width: 48px; flex-shrink: 0; font-size: .74rem; color: var(--mm-ink-soft); }
.stats-bar-track { flex: 1; height: 10px; background: var(--mm-bg); border-radius: 999px; overflow: hidden; }
.stats-bar-fill { display: block; height: 100%; background: var(--mm-primary); border-radius: 999px; transition: width .3s ease; }
.stats-bar-value { width: 80px; flex-shrink: 0; text-align: right; font-size: .78rem; font-weight: 700; color: var(--mm-ink); }

/* =====================================================================
   LOGIN — pantalla dedicada (app/Views/layouts/login.php).
   Mobile-first real: en <992px es una columna compacta; en >=992px es
   panel dividido aprovechando el ancho, no un formulario móvil estirado.
   ===================================================================== */
.login-body { margin: 0; background: var(--mm-bg); min-height: 100vh; }
.login-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.login-seam-glow { display: none; }

/* --- Panel de identidad (izquierdo en desktop, encabezado compacto en móvil) --- */
.login-brand {
  position: relative; overflow: hidden;
  background: var(--mm-primary);
  color: #fff; padding: 1.75rem 1.5rem 1.5rem;
}

.login-brand-content { position: relative; z-index: 1; text-align: center; }
.login-logo-card { width: 240px; max-width: 100%; margin-bottom: 1rem; }
.login-quote { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.3; margin-bottom: .5rem; }
.login-quote em { font-style: italic; color: var(--mm-warning); }
.login-desc { font-size: .95rem; color: rgba(255,255,255,.9); max-width: 380px; margin: 0 auto 1rem; }

.login-benefits { display: none; } /* se muestran solo en desktop (ver media query) para no saturar el móvil */

.login-flag-strip {
  height: 8px; 
}

/* --- Panel del formulario --- */
.login-form-panel { flex: 1; display: flex; justify-content: center; padding: 1.75rem 1.25rem 2.5rem; background: var(--mm-bg); }
.login-form-inner { width: 100%; max-width: 420px; }

.login-locale-badge { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.login-locale-mark { width: 34px; height: auto; flex-shrink: 0; }
.login-locale-badge strong { display: block; font-size: .82rem; line-height: 1.2; }
.login-locale-badge span { display: block; font-size: .72rem; color: var(--mm-ink-soft); }

.login-title { font-size: 1.9rem; margin-bottom: .15rem; }
.login-subtitle { color: var(--mm-ink-soft); margin-bottom: .9rem; font-size: 1rem; }

.segmented-control {
  display: flex; background: var(--mm-bg); border: 1px solid var(--mm-border); border-radius: var(--mm-radius-pill);
  padding: 3px; margin-bottom: 1.1rem; gap: 2px;
}
.segment {
  flex: 1; border: none; background: transparent; border-radius: var(--mm-radius-pill);
  padding: .5rem .25rem; font-size: .72rem; font-weight: 700; color: var(--mm-ink-soft);
  display: flex; align-items: center; justify-content: center; gap: .25rem; min-height: 40px;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap; min-width: 0;
}
@media (min-width: 400px) {
  .segment { font-size: .78rem; padding: .5rem .4rem; gap: .35rem; }
}
.segment .mm-icon { flex-shrink: 0; }
.segment span.segment-label { overflow: hidden; text-overflow: ellipsis; }
.segment:hover { color: var(--mm-ink); }
.segment.active {
  background: #fff; color: var(--mm-primary); box-shadow: 0 1px 4px rgba(8,44,76,0.12);
}

.login-input-group { position: relative; }
.login-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; opacity: .65; pointer-events: none;
}
.login-input { padding-left: 2.6rem; font-size: 1.05rem; }
.login-toggle-pass {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; font-size: 1.25rem; padding: 8px 10px; line-height: 1;
}
.login-form-inner .form-check-input { width: 1.15em; height: 1.15em; }
.login-form-inner label.d-flex.small { font-size: .95rem !important; }

.login-institutional-card {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--mm-primary-soft); border-radius: var(--mm-radius-md);
  padding: .7rem 1rem; margin-top: 1rem; font-size: .8rem;
}
.login-institutional-card strong { display: block; color: var(--mm-primary-dark); font-size: .95rem; }
.login-institutional-card span { color: var(--mm-ink-soft); font-size: .88rem; }

/* --- Desktop real: panel dividido aprovechando el ancho, no una columna angosta --- */
@media (min-width: 992px) {
  .login-shell { flex-direction: row; }
  .login-brand {
    flex: 0 0 40%; max-width: 560px; display: flex; flex-direction: column; justify-content: center;
    padding: 3rem 4.5rem 3rem 3.5rem;
     /* borde diagonal: evita el corte recto "dos rectángulos" */
  }
  .login-form-panel { margin-left: -4.5rem; padding-left: 6rem; position: relative; z-index: 1; }
  
  .login-logo-card { width: 220px; margin-bottom: 1.25rem; }
  .login-quote { font-size: 1.75rem; }
  .login-desc { font-size: 1.05rem; margin-bottom: 1.75rem; }
  .login-benefits { display: flex; flex-direction: column; gap: .9rem; text-align: left; margin-top: .5rem; }
  .login-benefits .benefit { display: flex; align-items: flex-start; gap: .75rem; }
  .login-benefits .benefit .icon {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  }
  .login-benefits .benefit strong { display: block; font-size: 1rem; }
  .login-benefits .benefit span { display: block; font-size: .88rem; color: rgba(255,255,255,.85); }
  .login-flag-strip { display: none; } /* en desktop la franja de bandera se integra a las formas decorativas, no hace falta la barra */

  .login-form-panel { flex: 1; align-items: center; padding: 1.1rem 3rem; }
  .login-form-inner { max-width: 460px; }
  .login-title { font-size: 2rem; margin-bottom: 0; }
}

@media (min-width: 1400px) {
  .login-form-inner { max-width: 480px; }
}

/* =====================================================================
   DESKTOP REAL — no es "el móvil agrandado". Contenedor que aprovecha
   pantallas grandes, y sidebar fijo para paneles internos (comerciante/admin).
   ===================================================================== */
@media (min-width: 1400px) {
  .container { max-width: 1440px; }
}

.app-shell { min-height: 100vh; }
@media (min-width: 992px) {
  .app-shell { display: flex; }
  .app-sidebar {
    width: 240px; flex-shrink: 0; min-height: 100vh;
    background: #fff; border-right: 1px solid var(--mm-border);
    position: sticky; top: 0; align-self: flex-start;
  }
  .app-main { flex: 1 1 0; min-width: 0; }
}
.app-main .app-content { padding: 1rem; }
@media (min-width: 992px) {
  .app-main .app-content { padding: 1.75rem 2.25rem; max-width: 1500px; }
}
.app-sidebar .brand { padding: 1.1rem 1.25rem; font-weight: 800; border-bottom: 1px solid var(--mm-border); }
.app-sidebar nav { padding: .75rem; display: flex; flex-direction: column; gap: 2px; }
.app-sidebar nav a {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem;
  border-radius: var(--mm-radius-sm); color: var(--mm-ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.app-sidebar nav a:hover { background: var(--mm-bg); }
.app-sidebar nav a.active { background: var(--mm-primary-soft); color: var(--mm-primary-dark); }
.app-sidebar .icon { font-size: 1.1rem; width: 22px; text-align: center; }


/* Tablas de escritorio vs. tarjetas de móvil (se activan con utilidades d-none/d-lg-*) */
@media (max-width: 991.98px) {
  .desktop-table { display: none; }
}
@media (min-width: 992px) {
  .mobile-cards { display: none; }
}

/* =====================================================================
   HOME DEL MARKETPLACE — hero de conversión, pasos, más vendidos, tiendas
   ===================================================================== */
.home-hero {
  position: relative; overflow: hidden; color: #fff; margin-bottom: 1rem;
  background: var(--mm-primary);
  border-radius: var(--mm-radius-lg); padding: 1.75rem 1.25rem 1.5rem;
}
.home-hero-text { position: relative; z-index: 1; max-width: 640px; }
.home-hero-eyebrow { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.14); padding: .25rem .7rem; border-radius: var(--mm-radius-pill); margin-bottom: .75rem; }
.home-hero h1 { color: #fff; font-size: 1.7rem; font-weight: 800; line-height: 1.15; margin-bottom: .5rem; }
.home-hero p { color: rgba(255,255,255,.9); font-size: .95rem; margin-bottom: 1.1rem; }
.home-hero .search-box {
  background: #fff; border-radius: var(--mm-radius-pill); display: flex; align-items: center; gap: .5rem;
  padding: .35rem .35rem .35rem 1rem; box-shadow: var(--mm-shadow-md); color: var(--mm-ink-soft);
}
.home-hero .search-box input { border: none; outline: none; flex: 1; min-width: 0; font-size: 1rem; color: var(--mm-ink); background: transparent; }
.home-hero .btn-search { width: auto; display: inline-block; font-size: .95rem; padding: .65rem 1.25rem; border-radius: var(--mm-radius-pill); box-shadow: none; }
.home-hero-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.home-hero-pills a { color: #fff; text-decoration: none; font-size: .8rem; font-weight: 600; padding: .3rem .8rem; border: 1px solid rgba(255,255,255,.4); border-radius: var(--mm-radius-pill); }
.home-hero-pills a:hover { background: rgba(255,255,255,.16); }
.home-hero-stats { list-style: none; display: flex; gap: 1.25rem; padding: 0; margin: 1rem 0 0; font-size: .82rem; color: rgba(255,255,255,.85); }
.home-hero-stats strong { color: #fff; font-size: 1.15rem; }

.home-steps { display: grid; grid-template-columns: 1fr; gap: .5rem; margin-bottom: 1.5rem; }
.home-step { display: flex; gap: .75rem; align-items: center; background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-md); padding: .7rem .9rem; }
.home-step .n { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--mm-accent); color: var(--mm-accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.home-step strong { display: block; font-size: .92rem; }
.home-step span:not(.n) { font-size: .78rem; color: var(--mm-ink-soft); }

.home-section { margin-bottom: 1.75rem; }
.home-h2 { font-size: 1.15rem; font-weight: 800; color: var(--mm-ink); margin-bottom: .75rem; }
.home-h2-row { display: flex; justify-content: space-between; align-items: baseline; }
.home-more { font-size: .85rem; font-weight: 700; text-decoration: none; }
.home-cats { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.home-cats::-webkit-scrollbar { display: none; }
.home-cats .category-chip { flex: 0 0 auto; }
.home-tabs { max-width: 440px; }
.home-panel[hidden] { display: none; }
.home-panel-note { font-size: .82rem; color: var(--mm-ink-soft); margin-bottom: .75rem; }

.product-card .rank-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: .25rem;
  font-size: .68rem; font-weight: 800; padding: .2rem .5rem; border-radius: var(--mm-radius-pill);
  background: #fff; color: var(--mm-primary-dark); box-shadow: 0 1px 4px rgba(8,44,76,.18);
}
.product-card .rank-badge.rank-top { background: var(--mm-accent); color: var(--mm-accent-ink); }
.product-card .sold-line { font-size: .72rem; font-weight: 700; color: var(--mm-success-text); margin-top: 2px; }

.store-tile { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-md); padding: .8rem; text-decoration: none; color: var(--mm-ink); transition: box-shadow .18s ease, transform .12s ease; }
.store-tile:hover { box-shadow: var(--mm-shadow-md); transform: translateY(-1px); color: var(--mm-ink); }
.store-avatar { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; flex: 0 0 48px; }
.store-avatar-initial { background: var(--mm-primary-soft); color: var(--mm-primary); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.store-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.store-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-go { color: var(--mm-primary); }

.home-merchant-cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; background: var(--mm-primary-soft); border-radius: var(--mm-radius-lg); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.home-merchant-cta strong { display: block; color: var(--mm-primary-dark); }
.home-merchant-cta span { font-size: .85rem; color: var(--mm-ink-soft); }
.btn-cta-inline { width: auto; display: inline-block; font-size: .95rem; padding: .7rem 1.4rem; text-decoration: none; text-align: center; }

@media (min-width: 768px) {
  .home-hero { padding: 3rem 2.5rem; }
  .home-hero h1 { font-size: 2.4rem; }
  .home-hero p { font-size: 1.05rem; }
  .home-steps { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) { .home-hero h1 { font-size: 2.8rem; } .home-hero { padding: 3.5rem 3rem; } }
.home-hero { border-bottom: 4px solid var(--mm-accent); }
@media (max-width: 400px) { .home-hero .btn-search { padding: .6rem 1rem; } }

/* Barra de filtros de búsqueda: columna en móvil, fila desde 768px */
.search-filters-bar { display: flex; flex-direction: column; gap: .5rem; }
.search-filters-bar .btn { min-height: 38px; }
@media (min-width: 768px) {
  .search-filters-bar { flex-direction: row; align-items: stretch; flex-wrap: wrap; }
  .search-filters-bar > input[type=search] { flex: 1 1 200px; }
  .search-filters-bar > select { flex: 0 1 190px; }
  .search-filters-bar > input[type=number] { flex: 0 1 130px; }
}
.stats-bar-label { white-space: nowrap; }

/* Opiniones */
.star { width: 1em; height: 1em; }
.star-on { color: #F5A400; }
.star-off { color: var(--mm-border); }
.review-item { padding: .75rem 0; border-bottom: 1px solid var(--mm-border); }
.review-item:last-child { border-bottom: none; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; font-size: 1.6rem; color: var(--mm-border); line-height: 1; padding: 2px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #F5A400; }
.star-input input:focus-visible + label { outline: 2px solid var(--mm-primary); border-radius: 4px; }

/* Gestión de imágenes del producto */
.product-image-tile { position: relative; aspect-ratio: 1/1; border-radius: var(--mm-radius-md); overflow: hidden; background: var(--mm-primary-soft); border: 2px solid transparent; }
.product-image-tile.is-primary { border-color: var(--mm-accent); }
.product-image-tile img { width: 100%; height: 100%; object-fit: cover; }
.product-image-tile .primary-flag { position: absolute; left: 6px; top: 6px; background: var(--mm-accent); color: var(--mm-accent-ink); font-size: .68rem; font-weight: 800; padding: .15rem .5rem; border-radius: var(--mm-radius-pill); }

/* Galería de la ficha de producto */
.product-gallery-main { aspect-ratio: 1/1; border-radius: var(--mm-radius-md); overflow: hidden; background: var(--mm-primary-soft); }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumbs { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.gallery-thumb { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--mm-radius-sm); overflow: hidden; background: var(--mm-primary-soft); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--mm-accent); }


/* =====================================================================
   MARCA — logo oficial y detalle wayuu (usar con moderación)
   ===================================================================== */
.brand-link { display:inline-flex; align-items:center; gap:.55rem; text-decoration:none; color:var(--mm-ink); min-height:44px; }
.brand-link img { display:block; width:auto; height:40px; }
.brand-name { font-weight:800; letter-spacing:-.01em; font-size:1.05rem; line-height:1.1; color:var(--mm-ink); }
.brand-name b { color:var(--mm-accent-dark); font-weight:800; }
@media (max-width: 400px) { .brand-name { font-size:.95rem; } .brand-link img { height:36px; } }
/* En sidebars oscuros el símbolo (marino) va sobre una ficha blanca para no perderse */
.brand-chip { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; background:#fff; border-radius:10px; flex:none; }
.brand-chip img { width:28px; height:auto; display:block; }
.logo-card { background:#fff; border-radius:var(--mm-radius-md); padding:.9rem 1.1rem; display:inline-block; box-shadow:var(--mm-shadow-sm); }
.logo-card img { display:block; width:100%; height:auto; }

/* Separador de rombos inspirado en el tejido wayuu: 8px de alto, solo en puntos clave
   (pie de página, cierre del login). Un SVG minúsculo repetido: sin imágenes extra. */
.site-footer { background:#fff; border-top:1px solid var(--mm-border); margin-top:3rem; }
.site-footer .footer-logo { width:150px; height:auto; display:block; }
.site-footer .footer-tag { color:var(--mm-ink-soft); font-size:.9rem; }

/* Selector de municipio del visitante (home) */
.muni-picker { display:inline-flex; align-items:center; gap:.5rem; flex-wrap:wrap; background:rgba(255,255,255,.14); border-radius:var(--mm-radius-pill); padding:.2rem .35rem .2rem .8rem; margin-bottom:.75rem; }
.muni-picker label { font-size:.78rem; font-weight:700; color:#fff; margin:0; display:inline-flex; align-items:center; gap:.35rem; }
.muni-picker select { border:0; border-radius:var(--mm-radius-pill); background:#fff; color:var(--mm-ink); font-weight:700; font-size:.85rem; padding:.35rem 1.9rem .35rem .8rem; min-height:36px; max-width:100%; }

/* Paneles de trabajo (admin, comerciante, acceso): fondo liso para no distraer */
body.admin-body, body.merchant-body, body.auth-body { background-image: none; }

.product-gallery-empty { aspect-ratio: 1/1; max-height: 340px; width: 100%; border-radius: var(--mm-radius-md); background: var(--mm-primary-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; }
.product-gallery-empty-icon .mm-icon { width: 3rem; height: 3rem; opacity: .35; }


/* =====================================================================
   REDISEÑO COMERCIAL (Etapa 4): fondo limpio, paneles blancos, zonas de marca con patrón Wayuu
   ===================================================================== */

.home-hero { box-shadow: var(--mm-shadow-md); }

/* Títulos de sección con barra de acento */
.home-h2 { position: relative; padding-left: .75rem; font-weight: 800; }
.home-h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 4px; background: var(--mm-accent); }

/* Tarjetas de producto: más peso, foto protagonista, elevación al pasar */
.product-card .card { border: 1px solid var(--mm-border); border-radius: var(--mm-radius-md); background: #fff; box-shadow: 0 1px 2px rgba(8,44,76,.06); transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; }
.product-card:hover .card { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(8,44,76,.14); }
.product-card .body { padding: .8rem .85rem .9rem; }
.product-card .name { font-size: .95rem; font-weight: 700; height: 2.5em; line-height: 1.25; }
.product-card .price { font-size: 1.2rem; letter-spacing: -.01em; }
.product-card .store { font-size: .78rem; margin-top: .25rem; }
.product-card .thumb { background: linear-gradient(160deg, #EAF1F8 0%, #DCE7F2 100%); }
.product-card .thumb-placeholder { width: 46%; height: auto; object-fit: contain; opacity: .55; }
.offer-badge { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--mm-danger); color: #fff; font-weight: 800; font-size: .78rem; padding: .2rem .55rem; border-radius: var(--mm-radius-pill); box-shadow: var(--mm-shadow-sm); }
.offer-badge-inline { position: static; font-size: .85rem; align-self: center; }
.product-card .rank-badge { left: auto; right: 8px; }

/* Botón WhatsApp reconocible */
.btn-wa { background: #128C7E; color: #fff !important; border: 0; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-wa:hover { background: #0E7367; }
/* P17-I.2 (V-06): en la One Page el verde pasa a #0F7A6E (blanco = 5,2:1; antes #128C7E = 4,1:1). El marketplace tradicional no cambia. */
.sp .btn-wa { background: #0F7A6E; }
.sp .btn-wa:hover { background: #0B6E63; }
.btn-ghost { font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }

/* Paneles blancos reutilizables */
.info-panel { background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); padding: 1.1rem 1.25rem; box-shadow: 0 1px 2px rgba(8,44,76,.06); }
.info-panel-title { font-size: 1.05rem; font-weight: 800; margin-bottom: .6rem; }

/* Ficha de producto */
.product-layout .product-gallery-main, .product-layout .product-gallery-empty { box-shadow: 0 1px 2px rgba(8,44,76,.06); border: 1px solid var(--mm-border); background: #fff; }
.product-gallery-empty { max-height: none; background: linear-gradient(160deg, #EAF1F8 0%, #DCE7F2 100%) !important; }
.product-gallery-empty img { width: 38%; height: auto; opacity: .6; }
.product-panel { background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); padding: 1.4rem; box-shadow: 0 1px 2px rgba(8,44,76,.06); }
.product-panel h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.product-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin: .5rem 0 .75rem; }
.product-price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; color: var(--mm-ink); }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .75rem; }
.product-actions .btn { min-height: 48px; }
.product-actions .btn-wa:only-child, .product-actions .btn-ghost:only-child { grid-column: 1 / -1; }
.trust-list { list-style: none; margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--mm-border); display: grid; gap: .7rem; }
.trust-list li { display: flex; gap: .65rem; align-items: flex-start; font-size: .88rem; color: var(--mm-ink-soft); }
.trust-list .mm-icon { width: 1.25rem; height: 1.25rem; color: var(--mm-teal-dark, #0E8C9A); flex: none; margin-top: .1rem; }
.trust-list strong { color: var(--mm-ink); }
@media (max-width: 575.98px) { .product-panel { padding: 1.1rem; } .product-price { font-size: 1.8rem; } }

/* Cabecera de tienda */
.store-hero { position: relative; overflow: hidden; border-radius: var(--mm-radius-lg); color: var(--store-on, #fff); margin-bottom: 1rem; box-shadow: var(--mm-shadow-md); background: var(--store-a); border-bottom: 4px solid var(--mm-accent); }
.store-hero-cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.store-hero-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,44,76,.25), rgba(8,44,76,.8)); }
.store-hero-inner { position: relative; display: flex; align-items: center; gap: 1.1rem; padding: 2rem 1.5rem; min-height: 190px; }
.store-hero-logo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #fff; border: 4px solid #fff; box-shadow: var(--mm-shadow-md); flex: none; }
.store-hero-logo-initial { display: inline-flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; color: var(--mm-primary); }
.store-hero h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 .5rem; color: #fff; line-height: 1.1; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.store-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.store-chip { display: inline-flex; align-items: center; gap: .3rem; background: rgba(255,255,255,.18); color: #fff; font-size: .82rem; font-weight: 600; padding: .25rem .7rem; border-radius: var(--mm-radius-pill); backdrop-filter: blur(2px); }
.store-meta { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--mm-ink-soft); font-size: .92rem; }
.store-meta .mm-icon { color: var(--mm-accent); }
.store-info .btn { min-height: 44px; }
@media (max-width: 575.98px) { .store-hero-inner { flex-direction: column; text-align: center; padding: 1.5rem 1rem; } .store-hero h1 { font-size: 1.5rem; } .store-chips { justify-content: center; } .store-hero-logo { width: 84px; height: 84px; } }

/* ---- Franja de navegación (estilo marketplace) ---- */
.subnav { background: var(--mm-primary); color: #fff; }
.subnav-inner { display: flex; align-items: center; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; min-height: 44px; position: relative; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a, .subnav summary { color: #fff; text-decoration: none; font-size: .88rem; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; list-style: none; }
.subnav summary::-webkit-details-marker { display: none; }
.subnav a:hover, .subnav summary:hover { color: var(--mm-gold); }
.subnav-loc { padding-right: 1.1rem; border-right: 1px solid rgba(255,255,255,.25); }
.subnav-loc span { display: flex; flex-direction: column; line-height: 1.05; }
.subnav-loc small { font-size: .66rem; font-weight: 500; opacity: .8; }
.subnav-cats { position: static; }
.subnav-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--mm-border); border-radius: 0 0 var(--mm-radius-md) var(--mm-radius-md); box-shadow: var(--mm-shadow-md); padding: .75rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .25rem; }
.subnav-menu a { color: var(--mm-ink); padding: .5rem .6rem; border-radius: var(--mm-radius-sm, 8px); }
.subnav-menu a:hover { background: var(--mm-primary-soft); color: var(--mm-primary); }
.subnav { position: relative; z-index: 20; }
.subnav-inner { overflow: visible; flex-wrap: nowrap; }
@media (max-width: 767.98px) { .subnav-inner { overflow-x: auto; } .subnav-menu { position: fixed; left: 8px; right: 8px; top: auto; } }

/* ---- Carruseles horizontales de productos ---- */
.h-scroll-wrap { position: relative; }
.h-scroll { display: flex; gap: .85rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: .25rem .1rem .6rem; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-item { flex: 0 0 182px; scroll-snap-align: start; }
@media (min-width: 768px) { .h-item { flex-basis: 205px; } }
.h-arrow { position: absolute; top: 38%; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--mm-primary); box-shadow: var(--mm-shadow-md); display: none; align-items: center; justify-content: center; }
.h-arrow:hover { background: var(--mm-primary); color: #fff; }
.h-prev { left: -14px; } .h-next { right: -14px; }
@media (hover: hover) and (min-width: 768px) { .h-arrow { display: flex; } }

/* Foto de producto estilo catálogo: fondo blanco, producto completo sin recortar */
.product-card .thumb { background: #fff; border-bottom: 1px solid var(--mm-border); }
.product-card .thumb img:not(.thumb-placeholder) { object-fit: contain; padding: .35rem; }
.product-card .thumb:has(.thumb-placeholder) { background: linear-gradient(160deg, #EAF1F8 0%, #DCE7F2 100%); }
.home-tabs { overflow-x: auto; scrollbar-width: none; max-width: 100%; flex-wrap: nowrap; }
.home-tabs::-webkit-scrollbar { display: none; }
.home-tabs .segment { white-space: nowrap; flex: 0 0 auto; padding-inline: .85rem; }

/* =====================================================================
   FICHA DE PRODUCTO en 3 columnas: galería · información · compra
   ===================================================================== */
.product-grid3 { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 768px) { .product-grid3 { grid-template-columns: 1fr 1fr; } .pg-gallery { grid-column: 1 / -1; } }
@media (min-width: 992px) { .product-grid3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 320px; gap: 1.25rem; } .pg-gallery { grid-column: auto; } }
.pg-gallery, .pg-info, .pg-buy { min-width: 0; }
.gallery-side { display: flex; gap: .75rem; align-items: flex-start; }
.gallery-side .product-gallery-thumbs { display: flex; flex-direction: column; gap: .5rem; flex: none; width: 64px; }
.gallery-side .gallery-thumb { width: 64px; height: 64px; border-radius: var(--mm-radius-sm); border: 2px solid var(--mm-border); background: #fff; padding: 2px; overflow: hidden; }
.gallery-side .gallery-thumb.active { border-color: var(--mm-primary); }
.gallery-side .gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-side .product-gallery-main { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); aspect-ratio: 1/1; }
.gallery-side .product-gallery-main img { object-fit: contain; padding: .5rem; }
@media (max-width: 575.98px) { .gallery-side { flex-direction: column-reverse; } .gallery-side .product-gallery-thumbs { flex-direction: row; width: 100%; overflow-x: auto; } .gallery-side .product-gallery-main { width: 100%; flex: none; } }

.pg-info { background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); padding: 1.25rem; }
.pg-badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.pg-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .2rem .55rem; border-radius: var(--mm-radius-pill); background: var(--mm-primary-soft); color: var(--mm-primary); }
.pg-tag-offer { background: var(--mm-gold); color: #3a2800; }
.pg-title { font-size: 1.45rem; font-weight: 800; line-height: 1.2; margin: 0 0 .35rem; }
.pg-saving { color: var(--mm-success-text, #15803D); font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }
.pg-lead { color: var(--mm-ink-soft); font-size: .95rem; margin: .5rem 0 0; }
.pg-info .trust-list { margin-top: 1rem; }

.pg-buy { display: grid; gap: .85rem; }
.seller-card, .buy-box { background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); padding: 1.1rem; box-shadow: 0 1px 2px rgba(8,44,76,.06); }
.seller-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.seller-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--mm-primary-soft); flex: none; border: 1px solid var(--mm-border); }
.seller-logo-initial { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--mm-primary); }
.seller-name { font-weight: 800; color: var(--mm-ink); text-decoration: none; display: block; line-height: 1.2; }
.seller-name:hover { color: var(--mm-primary); text-decoration: underline; }
.seller-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; text-align: center; padding: .6rem 0; margin-bottom: .75rem; border-top: 1px solid var(--mm-border); border-bottom: 1px solid var(--mm-border); }
.seller-stats strong { display: block; font-size: 1.15rem; }
.seller-stats span { font-size: .75rem; color: var(--mm-ink-soft); }
.buy-stock { font-weight: 700; font-size: .95rem; }
.buy-stock.ok { color: var(--mm-success-text, #15803D); } .buy-stock.out { color: var(--mm-danger); }
.buy-box .product-actions { grid-template-columns: 1fr; }
@media (min-width: 576px) and (max-width: 991.98px) { .buy-box .product-actions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .pg-buy { position: sticky; top: 76px; } }


/* =====================================================================
   REDISEÑO PREMIUM — fondos lisos, sin patrones ni formas decorativas
   ===================================================================== */
:root { --mm-bg: #F5F7FA; }
a { color: var(--mm-primary); text-decoration: none; }
a:hover { color: var(--mm-primary-dark, #061f36); }
:focus-visible { outline: 3px solid rgba(19,183,201,.55); outline-offset: 2px; }

/* Encabezado: logo · buscador amplio con municipio · acciones */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 0 var(--mm-border); }
.hdr { display: flex; align-items: center; gap: 1rem; min-height: 68px; padding-block: .5rem; }
.hdr .brand-link { flex: none; }
.hdr-search { flex: 1; display: flex; align-items: stretch; min-width: 0; border: 1.5px solid var(--mm-border); border-radius: var(--mm-radius-pill); background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.hdr-search:focus-within { border-color: var(--mm-primary); box-shadow: 0 0 0 3px rgba(8,44,76,.10); }
.hdr-muni { border: 0; border-right: 1px solid var(--mm-border); background: var(--mm-bg); font-weight: 700; font-size: .85rem; color: var(--mm-ink); padding: 0 .8rem 0 1rem; max-width: 170px; min-height: 44px; }
.hdr-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 1rem; font-size: .98rem; background: transparent; min-height: 44px; }
.hdr-search button { border: 0; background: var(--mm-accent); color: var(--mm-accent-ink); width: 52px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.hdr-search button:hover { background: var(--mm-accent-dark); }
.hdr-actions { display: flex; align-items: center; gap: .35rem; flex: none; }
.hdr-icon, .hdr-link { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--mm-radius-pill); color: var(--mm-ink); font-weight: 700; font-size: .9rem; padding: 0 .55rem; }
.hdr-icon .mm-icon { width: 1.3rem; height: 1.3rem; }
.hdr-icon:hover, .hdr-link:hover { background: var(--mm-bg); color: var(--mm-primary); }
.hdr-badge { position: absolute; top: 4px; right: 2px; background: var(--mm-danger); color: #fff; font-size: .62rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
@media (max-width: 991.98px) {
  .hdr { flex-wrap: wrap; gap: .5rem; padding-block: .5rem; }
  .hdr .brand-name { display: none; }
  .hdr-actions { margin-left: auto; }
  .hdr-search { order: 3; flex: 1 0 100%; }
  .hdr-muni { max-width: 104px; font-size: .78rem; padding-left: .7rem; }
}

/* Franja de categorías */
.subnav { background: var(--mm-primary); }
.subnav-inner { gap: .25rem; min-height: 46px; }
.subnav a, .subnav summary { padding: .5rem .8rem; border-radius: var(--mm-radius-sm); transition: background .15s; }
.subnav a:hover, .subnav summary:hover { background: rgba(255,255,255,.12); color: #fff; }
.subnav-end { margin-left: auto; }
@media (max-width: 767.98px) { .subnav-end { margin-left: 0; } }

/* Banner principal: liso (foto opcional en brand/hero.jpg) */
.home-hero { border-radius: var(--mm-radius-lg); padding: 3rem 1.5rem; box-shadow: none; border-bottom: 0; }
.home-hero.has-photo { background: linear-gradient(90deg, rgba(8,44,76,.92) 0%, rgba(8,44,76,.75) 55%, rgba(8,44,76,.35) 100%), var(--hero-photo) center/cover no-repeat; }
.home-hero-text { max-width: 620px; }
.home-hero-kicker { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; color: var(--mm-gold); margin-bottom: .6rem; letter-spacing: .02em; text-transform: uppercase; }
.home-hero h1 { font-size: 2.1rem; }
.home-hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.4rem; }
.home-hero-cta .btn-cta { width: auto; min-width: 190px; text-align: center; margin: 0; }
.btn-hero-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 190px; padding: 0 1.4rem; border: 2px solid rgba(255,255,255,.7); border-radius: var(--mm-radius-pill); color: #fff; font-weight: 700; }
.btn-hero-ghost:hover { background: #fff; color: var(--mm-primary); }
@media (min-width: 992px) { .home-hero { padding: 4.5rem 3rem; } .home-hero h1 { font-size: 3rem; } }
@media (max-width: 575.98px) { .home-hero-cta .btn-cta, .btn-hero-ghost { flex: 1 1 100%; } }

/* Portada de tienda lisa */
.store-hero { box-shadow: none; border-bottom: 0; }

/* Login: panel lateral liso */
.login-brand { background: var(--mm-primary); }

/* Tarjeta de producto: acción visible y alineación estable */
.product-card .card { display: flex; flex-direction: column; }
.product-card .body { display: flex; flex-direction: column; flex: 1; }
.product-card .card-cta { margin-top: auto; padding-top: .6rem; font-size: .82rem; font-weight: 700; color: var(--mm-primary); }
.product-card:hover .card-cta { color: var(--mm-accent-dark); }
.product-card .card-cta::after { content: " →"; }
.product-card .sold-line { order: 3; }

/* Sin foto: icono neutro (nunca el logo como foto de producto) */
.product-card .thumb-placeholder { width: auto; height: auto; opacity: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; color: #8FA3B8; }
.product-card .thumb-placeholder .mm-icon { width: 2.6rem; height: 2.6rem; }
.product-card .thumb-placeholder small { font-size: .72rem; font-weight: 600; }
.product-card .thumb:has(.thumb-placeholder), .product-gallery-empty { background: #EEF2F6 !important; }
.gallery-empty-icon .mm-icon { width: 3.4rem; height: 3.4rem; color: #8FA3B8; }

/* Hero con "cómo funciona" a la derecha en escritorio */
.hero-steps { display: none; }
@media (min-width: 992px) {
  .home-hero { display: flex; align-items: center; justify-content: space-between; gap: 2.5rem; padding: 3.25rem 3rem; }
  .home-hero-text { flex: 1 1 auto; }
  .hero-steps { display: grid; gap: .75rem; list-style: none; margin: 0; padding: 0; width: 340px; flex: none; }
  .hero-steps li { display: flex; gap: .85rem; align-items: center; background: #fff; color: var(--mm-ink); border-radius: var(--mm-radius-md); padding: .9rem 1rem; }
  .hero-steps .n { width: 34px; height: 34px; border-radius: 50%; background: var(--mm-accent); color: var(--mm-accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
  .hero-steps strong { display: block; line-height: 1.2; }
  .hero-steps span:not(.n) { font-size: .85rem; color: var(--mm-ink-soft); }
}

/* =====================================================================
   PANEL DEL COMERCIANTE — Mi tienda (SaaS). Fondos planos, sin patrones.
   ===================================================================== */
body.merchant-body { background: #F5F7FA; }
.merchant-body .app-main .app-content { max-width: none; }
#store-form { max-width: 1240px; margin: 0 auto; }
.ms-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ms-head-text h1 { font-size: 1.6rem; font-weight: 800; color: #082C4C; margin: 0 0 .25rem; }
.ms-head-text p { margin: 0; color: #5b6b7d; max-width: 560px; font-size: .95rem; }
.ms-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ms-plan { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 700; text-decoration: none; background: #fff; border: 1px solid #dfe5ec; color: #082C4C; }
.ms-plan small { font-weight: 500; color: #6b7a8c; }
.ms-plan-dot { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.ms-plan-ok .ms-plan-dot { background: #12a150; }
.ms-plan-warn { border-color: #f6c9a8; background: #fff8f2; }
.ms-plan-warn .ms-plan-dot { background: #F47721; }
.merchant-body .btn-ghost { background: #fff; border: 1px solid #d5dce5; color: #082C4C; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.merchant-body .btn-ghost:hover { background: #eef2f7; }
.ms-save, .ms-save-2 { background: #F47721; border-color: #F47721; color: #fff; font-weight: 700; min-width: 160px; position: relative; padding: .55rem 1.25rem; }
.ms-save:hover, .ms-save-2:hover { background: #d9650f; border-color: #d9650f; color: #fff; }
.ms-save-spin { display: none; }
.ms-save.is-loading .ms-save-label, .ms-save-2.is-loading .ms-save-label { visibility: hidden; }
.ms-save.is-loading .ms-save-spin, .ms-save-2.is-loading .ms-save-spin { display: inline-block; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -8px; }

.ms-layout { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .ms-layout { grid-template-columns: minmax(0, 1fr) 380px; } .ms-side { position: sticky; top: 1rem; } }
.ms-main { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.ms-card, .ms-preview-card { background: #fff; border: 1px solid #e3e8ef; border-radius: 14px; box-shadow: 0 1px 3px rgba(8,44,76,.06); padding: 1.25rem; }
.ms-card-head { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.1rem; padding-bottom: .9rem; border-bottom: 1px solid #eef1f5; }
.ms-card-head h2 { font-size: 1.05rem; font-weight: 800; color: #082C4C; margin: 0; }
.ms-card-head p { margin: 0; font-size: .85rem; color: #6b7a8c; }
.ms-step { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #082C4C; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.ms-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .ms-grid { grid-template-columns: 1fr 1fr; } .ms-span-2 { grid-column: span 2; } }
.ms-field { min-width: 0; }
.ms-field > label { font-weight: 700; font-size: .85rem; color: #1f3347; margin-bottom: .35rem; display: block; }
.ms-field .form-control, .ms-field .form-select { font-size: 1rem; padding: .6rem .8rem; border-color: #d5dce5; border-radius: 10px; }
.ms-field .form-control:focus, .ms-field .form-select:focus { border-color: #082C4C; box-shadow: 0 0 0 3px rgba(8,44,76,.12); }
.ms-help { font-size: .78rem; color: #6b7a8c; margin-top: .3rem; }
.ms-error { display: none; font-size: .8rem; color: #E94B35; margin-top: .3rem; font-weight: 600; }
.ms-error.is-on { display: block; }
.ms-link-card { display: flex; flex-wrap: wrap; gap: .8rem 1.25rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
.ms-link-text { display: flex; flex-direction: column; font-size: .85rem; color: #6b7a8c; flex: 1 1 260px; }
.ms-link-text strong { color: #082C4C; font-size: .95rem; }
.ms-link-box { display: flex; gap: .5rem; flex: 1 1 320px; }
.ms-link-box .form-control { font-size: .85rem; background: #F5F7FA; }

/* Zonas de carga */
.ms-drop { position: relative; display: flex; align-items: center; justify-content: center; border: 2px dashed #c3ccd8; border-radius: 12px; background: #F5F7FA; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.ms-drop:hover, .ms-drop:focus-visible, .ms-drop.is-over { border-color: #F47721; background: #fff8f2; outline: none; }
.ms-drop-logo, .ms-drop-cover { height: 170px; }
.ms-drop-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-drop-logo .ms-drop-img { object-fit: contain; background: #fff; padding: .5rem; }
.ms-drop-img[hidden], .ms-drop-empty[hidden], .ms-del[hidden] { display: none !important; }
.ms-drop-empty { display: flex; flex-direction: column; align-items: center; gap: .2rem; text-align: center; padding: 1rem; color: #5b6b7d; font-size: .8rem; }
.ms-drop-empty strong { color: #082C4C; font-size: .85rem; }
.ms-drop-empty .mm-icon { width: 1.6rem; height: 1.6rem; color: #F47721; }
.ms-drop-actions { display: flex; gap: .5rem; margin-top: .55rem; }
.ms-del { color: #E94B35 !important; }

/* Color */
.ms-colors { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.brand-swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd3de; cursor: pointer; padding: 0; transition: transform .12s; }
.brand-swatch:hover { transform: scale(1.1); }
.brand-swatch.is-active { box-shadow: 0 0 0 3px #082C4C; }
.ms-picker { display: inline-flex; align-items: center; gap: .4rem; border: 1px dashed #aab5c3; border-radius: 999px; padding: .25rem .7rem .25rem .3rem; font-size: .8rem; font-weight: 600; color: #082C4C; cursor: pointer; margin: 0 !important; }
.ms-picker input { width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.ms-color-chip { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; background: #F5F7FA; border: 1px solid #e3e8ef; border-radius: 999px; padding: .3rem .75rem; }
.ms-color-chip i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.ms-color-chip code { color: #082C4C; font-size: .8rem; }
.ms-actions-bottom { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }

/* Vista previa */
.ms-preview-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .9rem; color: #082C4C; }
.ms-seg { display: inline-flex; background: #eef1f5; border-radius: 999px; padding: 3px; }
.ms-seg button { border: 0; background: transparent; padding: .25rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #5b6b7d; }
.ms-seg button.is-on { background: #fff; color: #082C4C; box-shadow: 0 1px 3px rgba(8,44,76,.15); }
.ms-preview-stage { background: #F5F7FA; border-radius: 12px; padding: .8rem; display: flex; justify-content: center; }
.ms-pv { background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; overflow: hidden; width: 100%; font-size: .8rem; transition: max-width .2s; }
.ms-pv.is-mobile { max-width: 230px; }
.pv-hero { position: relative; padding: 1.1rem .9rem; overflow: hidden; }
.pv-cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.pv-hero.has-cover::after { content: ""; position: absolute; inset: 0; background: rgba(8,44,76,.45); }
.pv-hero-in { position: relative; z-index: 1; display: flex; align-items: center; gap: .7rem; }
.ms-pv.is-mobile .pv-hero-in { flex-direction: column; text-align: center; }
.pv-logo { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; background: #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #082C4C; font-size: 1.3rem; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.pv-logo img { width: 100%; height: 100%; object-fit: contain; }
.pv-logo img[hidden] { display: none; }
.pv-name { font-weight: 800; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.pv-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.ms-pv.is-mobile .pv-chips { justify-content: center; }
.pv-chips span { background: rgba(255,255,255,.22); border-radius: 999px; padding: .05rem .5rem; font-size: .7rem; }
.pv-chips span:empty { display: none; }
.pv-body { padding: .8rem .9rem 1rem; }
.pv-desc { color: #4a5a6c; margin: 0 0 .7rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pv-btns { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.pv-btn { padding: .3rem .7rem; border-radius: 8px; font-weight: 700; font-size: .72rem; }
.pv-btn-ghost { background: #fff; border: 1px solid #d5dce5; color: #082C4C; }
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.ms-pv.is-mobile .pv-grid { grid-template-columns: repeat(2, 1fr); }
.pv-grid i { aspect-ratio: 1; background: #eef1f5; border-radius: 8px; display: block; }
.ms-preview-note { font-size: .75rem; color: #6b7a8c; margin: .8rem 0 0; }

/* Sidebar: proporciones y estados */
.merchant-body .app-sidebar { width: 252px; }
/* Scroll independiente del menú del comerciante (solo escritorio): el menú mide como máximo el alto de la ventana,
   la marca queda fija y la lista de opciones (nav) es la única que se desplaza. Con pocas opciones no aparece barra. */
@media (min-width: 992px) {
  .merchant-body .app-sidebar { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .merchant-body .app-sidebar > .brand, .merchant-body .app-sidebar > .sidebar-group-label { flex: 0 0 auto; }
  .merchant-body .app-sidebar > nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent;
  }
  .merchant-body .app-sidebar > nav::-webkit-scrollbar { width: 8px; }
  .merchant-body .app-sidebar > nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 8px; }
  .merchant-body .app-sidebar > nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.5); }
}
.merchant-body .app-sidebar.app-sidebar-dark nav a { font-size: .95rem; padding: .7rem .85rem; }
@media (max-width: 575.98px) {
  .ms-head-actions { width: 100%; }
  .ms-head-actions .btn, .ms-head-actions .ms-plan { flex: 1 1 100%; justify-content: center; }
  .ms-actions-bottom .btn { flex: 1 1 100%; }
  .ms-card { padding: 1rem; }
  .ms-color-chip { margin-left: 0; }
}

/* =====================================================================
   FASE 5 — Tienda pública, inicio con fotografía, respaldo de fotos.
   Fondos planos: sin patrones ni texturas.
   ===================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Respaldo de foto de producto */
.product-card .thumb-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; color: #8c9bb0; width: 100%; height: 100%; }
.product-card .thumb-placeholder .mm-icon { width: 2.4rem; height: 2.4rem; stroke: none; }
.product-card .thumb-placeholder small { font-size: .74rem; font-weight: 600; letter-spacing: .01em; }
.product-gallery-empty { gap: .35rem; text-align: center; padding: 1rem; color: #5b6b7d; }
.product-gallery-empty .gallery-empty-icon .mm-icon { width: 3rem; height: 3rem; color: #9aa9ba; }
.product-gallery-empty strong { color: #082C4C; }

/* Inicio: hero con fotografía */
.home-hero.home-hero-photo { display: block; padding: 0; background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); overflow: hidden; color: var(--mm-ink); box-shadow: none; }
.home-hero-photo picture, .home-hero-photo img { display: block; width: 100%; height: auto; }
.home-hero-photo .hero-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .9rem 1.25rem; background: #fff; border-top: 4px solid #F47721; }
.home-hero-photo .hero-bar-text { margin: 0; color: #082C4C; font-weight: 700; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.home-hero-photo .hero-bar-text .mm-icon { color: #F47721; }
.home-hero-photo .hero-bar-stats { font-weight: 500; color: #5b6b7d; font-size: .85rem; }
.home-hero-photo .hero-bar-stats strong { color: #082C4C; }
.home-hero-photo .home-hero-cta { margin: 0; }
.home-hero-photo .btn-hero-ghost { color: #082C4C; border: 1px solid #cfd8e3; background: #fff; }
.home-hero-photo .btn-hero-ghost:hover { background: #eef2f7; }
@media (max-width: 575.98px) { .home-hero-photo .hero-bar { padding: .8rem; } .home-hero-photo .home-hero-cta { width: 100%; } }

/* Categorías con imagen */
.home-cats-img { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; overflow: visible; }
@media (min-width: 576px) { .home-cats-img { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .home-cats-img { grid-template-columns: repeat(6, 1fr); gap: 1rem; } }
.cat-tile { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--mm-border); background: #fff; transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(8,44,76,.12); }
.cat-tile:focus-visible { outline: 3px solid #F47721; outline-offset: 2px; }
.cat-tile img { display: block; width: 100%; height: auto; aspect-ratio: 480 / 416; object-fit: cover; }
.home-cats-img .category-chip { justify-content: center; }

/* Banners de sección */
.home-banner { display: block; margin: 1.75rem 0; border-radius: var(--mm-radius-lg); overflow: hidden; border: 1px solid var(--mm-border); }
.home-banner:focus-visible { outline: 3px solid #F47721; outline-offset: 2px; }
.home-banner img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
@media (max-width: 575.98px) { .home-banner img { aspect-ratio: 3 / 1.1; object-position: left center; } }

/* ---------- Tienda pública ---------- */
.sp { --sp-a: var(--store-a, #082C4C); margin-bottom: 2rem; }
.sp-cover { position: relative; border-radius: 16px 16px 0 0; overflow: hidden; aspect-ratio: 24 / 7; background: #E9EEF4; }
.sp-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sp-cover-plain { aspect-ratio: auto; height: 120px; background: var(--store-a); }
@media (max-width: 575.98px) { .sp-cover-plain { height: 84px; } .sp-cover { border-radius: 14px 14px 0 0; } }
.sp-head { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.25rem; background: #fff; border: 1px solid var(--mm-border); border-top: 4px solid var(--store-a); border-radius: 0 0 16px 16px; padding: 0 1.5rem 1.25rem; }
.sp-logo { width: 112px; height: 112px; border-radius: 20px; object-fit: contain; background: #fff; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(8,44,76,.18); margin-top: -48px; flex: none; }
.sp-logo-initial { display: inline-flex; align-items: center; justify-content: center; font-size: 2.8rem; font-weight: 800; background: var(--store-a); color: var(--store-on); }
.sp-id { flex: 1 1 280px; min-width: 0; padding-top: .9rem; }
.sp-id h1 { font-size: 1.75rem; font-weight: 800; color: #082C4C; margin: 0 0 .5rem; line-height: 1.15; overflow-wrap: anywhere; }
.sp-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-chip { display: inline-flex; align-items: center; gap: .3rem; background: #F1F4F8; color: #34495e; font-size: .82rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; }
.sp-chip .mm-icon { color: #F47721; }
.sp-chip-brand { background: var(--store-a); color: var(--store-on); }
.sp-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .9rem; }
.sp-actions .btn { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.sp-btn-brand { background: var(--store-a); border-color: var(--store-a); color: var(--store-on); }
.sp-btn-brand:hover { background: var(--store-b); border-color: var(--store-b); color: var(--store-on); }
@media (max-width: 575.98px) {
  .sp-head { padding: 0 1rem 1rem; justify-content: center; text-align: center; }
  .sp-id { flex-basis: 100%; }
  .sp-chips { justify-content: center; }
  .sp-actions { width: 100%; }
  .sp-actions .btn { flex: 1 1 100%; justify-content: center; }
  .sp-id h1 { font-size: 1.45rem; }
}
.sp-info { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
@media (min-width: 900px) { .sp-info { grid-template-columns: 1.4fr 1fr; } }
.sp-about, .sp-contact { background: #fff; border: 1px solid var(--mm-border); border-radius: 14px; padding: 1.25rem; }
.sp-about h2, .sp-contact h2 { font-size: 1.05rem; font-weight: 800; color: #082C4C; margin: 0 0 .75rem; }
.sp-about p { color: #34495e; margin: 0 0 .75rem; overflow-wrap: anywhere; }
.sp-muted { color: var(--sp-muted, #5b6b7e) !important; }   /* P17-I.2: ≥4,5:1 (antes #8c9bb0 = 2,8:1); --sp-muted lo calcula OnePageTheme::muted */
.sp-note { font-size: .85rem; color: #5b6b7d !important; background: #F5F7FA; border-radius: 10px; padding: .6rem .8rem; margin: 0 !important; }
.sp-contact ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.sp-contact li { display: flex; gap: .7rem; align-items: flex-start; }
.sp-contact li > .mm-icon { color: #F47721; margin-top: .2rem; flex: none; }
.sp-contact li span { display: flex; flex-direction: column; font-size: .92rem; color: #34495e; min-width: 0; overflow-wrap: anywhere; }
.sp-contact li strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #7a8a9c; }
.sp-contact a { color: #082C4C; font-weight: 600; }
.sp-catalog { margin-top: 1.5rem; scroll-margin-top: 80px; }
.sp-catalog-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.sp-catalog-head h2 { font-size: 1.3rem; font-weight: 800; color: #082C4C; margin: 0; }
.sp-catalog-head h2 small { font-size: .85rem; font-weight: 600; color: var(--sp-muted, #5b6b7e); margin-left: .4rem; }
.sp-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-filters a { text-decoration: none; font-size: .85rem; font-weight: 600; padding: .35rem .85rem; border-radius: 999px; border: 1px solid #d5dce5; background: #fff; color: #082C4C; }
.sp-filters a:hover { background: #eef2f7; }
.sp-filters a.is-on { background: #082C4C; border-color: #082C4C; color: #fff; }
@media (max-width: 575.98px) { .sp-logo { width: 84px; height: 84px; margin-top: -34px; border-radius: 16px; } .sp-logo-initial { font-size: 2.1rem; } }

/* Tarjetas de negocio con portada y logo (inicio) */
.store-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--mm-border); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--mm-ink); transition: box-shadow .18s, transform .12s; }
.store-card:hover { box-shadow: 0 8px 20px rgba(8,44,76,.12); transform: translateY(-2px); color: var(--mm-ink); }
.store-card-cover { display: block; aspect-ratio: 24 / 7; background: #E9EEF4; overflow: hidden; }
.store-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.store-card-cover.is-plain { background: var(--c, #082C4C); }
.store-card-body { display: flex; align-items: flex-start; gap: .75rem; padding: 0 1rem 1rem; }
.store-card-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(8,44,76,.18); margin-top: -22px; flex: none; }
.store-card-initial { display: flex; align-items: center; justify-content: center; background: var(--mm-primary-soft); color: var(--mm-primary); font-weight: 800; font-size: 1.3rem; }
.store-card-info { display: flex; flex-direction: column; min-width: 0; padding-top: .55rem; }
.store-card-info strong { color: #082C4C; overflow-wrap: anywhere; }
.store-card-cover.is-plain { aspect-ratio: 24 / 4; }

/* =====================================================================
   INICIO — un solo eje (.container, máx. 1440px) y filas que nunca quedan vacías
   ===================================================================== */
.home-section { margin-block: 2rem 0; }
.home-hero-photo img { aspect-ratio: 1920 / 700; max-height: 470px; object-fit: cover; object-position: center 45%; }
@media (max-width: 640px) { .home-hero-photo img { aspect-ratio: 880 / 700; max-height: none; } }
.home-banner { margin: 0; }

/* Dos promociones alineadas con el contenedor */
.promo-row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
@media (min-width: 768px) { .promo-row { grid-template-columns: 1fr 1fr; } }
.promo-row .home-banner img { aspect-ratio: 3 / 1; width: 100%; height: auto; object-fit: cover; }

/* Panel comercial + tarjetas: el panel absorbe el ancho sobrante */
.showcase { display: grid; grid-template-columns: 1fr; gap: .85rem; }
.showcase .pcell { min-width: 0; }
.showcase .pcell > .product-card, .showcase .pcell .card { height: 100%; }
.showcase-grid-fallback { display: contents; }
@media (max-width: 767.98px) { .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } .promo-panel { grid-column: 1 / -1; } }
@media (min-width: 768px) { .showcase { grid-template-columns: minmax(300px, 1fr) repeat(var(--n), minmax(190px, 215px)); } }
@media (min-width: 768px) and (max-width: 1099.98px) { .showcase { grid-template-columns: repeat(3, minmax(0, 1fr)); } .promo-panel { grid-column: 1 / -1; } }
.promo-panel { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem; background: #082C4C; color: #fff; border-radius: 14px; text-decoration: none; min-height: 220px; overflow: hidden; }
.promo-panel:hover { color: #fff; box-shadow: 0 8px 20px rgba(8,44,76,.2); }
.promo-panel img { width: 42%; max-width: 220px; height: auto; aspect-ratio: 480 / 416; object-fit: cover; border-radius: 10px; flex: none; background: #fff; }
.promo-panel-text { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.promo-panel-text strong { font-size: 1.35rem; line-height: 1.15; }
.promo-panel-text > span:not(.promo-panel-cta) { font-size: .9rem; color: rgba(255,255,255,.85); }
.promo-panel-cta { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; margin-top: .25rem; background: #F47721; color: #fff; font-weight: 700; font-size: .9rem; padding: .5rem 1rem; border-radius: 999px; }
.promo-panel-cta .mm-icon { width: 1em; height: 1em; }

/* Tiendas: cuadrícula que reparte el ancho completo */
.store-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.store-card-desc { font-size: .82rem; color: #5b6b7d; margin: .15rem 0; }
.store-cta-card { display: flex; flex-direction: column; justify-content: center; gap: .5rem; padding: 1.5rem; border-radius: 14px; background: #082C4C; color: #fff; text-decoration: none; min-height: 190px; }
.store-cta-card:hover { color: #fff; box-shadow: 0 8px 20px rgba(8,44,76,.2); }
.store-cta-card strong { font-size: 1.2rem; }
.store-cta-card > span:not(.promo-panel-cta) { color: rgba(255,255,255,.85); font-size: .92rem; }
@media (min-width: 640px) and (max-width: 1099.98px) { .store-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.trim-rows > [hidden] { display: none !important; }
.home-merchant-cta { margin-top: 2rem; }

/* ---- Comprador: carrito rápido en tarjetas, estados y checkout ---- */
.product-card .quick-add { position: absolute; top: 50px; right: 8px; z-index: 2; margin: 0; }
.product-card .quick-add .quick-add-btn { position: static; cursor: pointer; background: var(--mm-primary, #082C4C); color: #fff; }
.product-card .quick-add .quick-add-btn:hover { background: var(--mm-accent, #F47721); }
.product-card .card-soldout { display: inline-block; margin-top: .25rem; font-size: .72rem; font-weight: 700; color: #b42318; }
a.fav-heart { text-decoration: none; }
.ck-notice { background: #f6f8fb; border: 1px solid #e3e8ef; border-radius: 12px; padding: .8rem 1rem; font-size: .85rem; color: #344054; }
.ck-store-info { font-size: .8rem; color: #667085; border-top: 1px solid #eef0f3; padding: .6rem 1rem; }
.ck-store-info div + div { margin-top: .15rem; }
.ck-problem { font-size: .8rem; color: #b42318; font-weight: 600; }

/* ---- Navegación principal única + menú de categorías ---- */
.subnav-toggle { background: none; border: 0; color: #fff; font: inherit; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .8rem; border-radius: var(--mm-radius-sm); cursor: pointer; }
.subnav-toggle:hover, .subnav-toggle[aria-expanded="true"] { background: rgba(255,255,255,.12); }
.subnav-cats { position: static; }
.subnav-inner { position: relative; }
.cat-menu { position: absolute; left: 12px; right: 12px; top: 100%; z-index: 40; background: #fff; border: 1px solid var(--mm-border); border-radius: 0 0 var(--mm-radius-md) var(--mm-radius-md); box-shadow: 0 14px 30px rgba(8,44,76,.16); padding: 1rem; max-height: min(70vh, 480px); overflow-y: auto; }
.cat-menu[hidden] { display: none; }
.cat-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem 1.25rem; }
.cat-col { display: flex; flex-direction: column; }
.subnav .cat-menu a { color: var(--mm-ink); font-weight: 500; padding: .4rem .5rem; border-radius: 8px; white-space: normal; }
.subnav .cat-menu a.cat-parent { font-weight: 700; color: var(--mm-primary); }
.subnav .cat-menu a.cat-child { font-size: .84rem; padding-left: 1rem; color: #475467; }
.subnav .cat-menu a:hover { background: var(--mm-primary-soft); color: var(--mm-primary); }
.cat-empty { margin: 0; color: #667085; font-size: .9rem; }
@media (max-width: 767.98px) { .cat-menu { left: 0; right: 0; border-radius: 0; max-height: 65vh; } .cat-menu-grid { grid-template-columns: 1fr 1fr; } .subnav-inner { overflow: visible; } }
@media (max-width: 575.98px) {
  .subnav-inner { gap: 0; justify-content: space-between; padding-left: 4px; padding-right: 4px; }
  .subnav .subnav-inner > a, .subnav-toggle { padding: .5rem .4rem; font-size: .8rem; gap: .25rem; }
  .subnav-end { margin-left: 0; }
}

/* Categorías sin fotografía: tarjeta sobria del mismo tamaño que las demás (sin imagen ilustrativa que simule un producto) */
.home-cats-img .category-chip { flex-direction: column; gap: .35rem; aspect-ratio: 480 / 416; padding: .75rem; text-align: center; background: #fff; border: 1px solid var(--mm-border); border-radius: 14px; }
.home-cats-img .category-chip .icon { width: 44px; height: 44px; }
.home-cats-img .category-chip .chip-name { font-weight: 700; color: var(--mm-primary); line-height: 1.15; }
.home-cats-img .category-chip .chip-note { color: #667085; font-size: .75rem; }

/* Última tarjeta: ocupa las columnas sobrantes. Su imagen es absoluta (no aporta altura propia), por eso la altura
   sale de una proporción calculada con el mismo número de columnas que ocupa: N × (480/416). */
.home-cats-img a.cat-tile.cat-last { position: relative; }
.home-cats-img a.cat-tile.cat-last img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: #fdeadb; }
.home-cats-img .cat-last { grid-column: span var(--s2, 1); aspect-ratio: calc(480 * var(--s2, 1) / 416); }
@media (min-width: 576px) { .home-cats-img { grid-template-columns: repeat(3, 1fr); } .home-cats-img .cat-last { grid-column: span var(--s3, 1); aspect-ratio: calc(480 * var(--s3, 1) / 416); } }
@media (min-width: 992px) { .home-cats-img { grid-template-columns: repeat(5, 1fr); } .home-cats-img .cat-last { grid-column: span var(--s5, 1); aspect-ratio: calc(480 * var(--s5, 1) / 416); } }

/* Estado de producto en tarjetas */
.product-card.is-soldout .thumb img, .product-card.is-soldout .thumb-placeholder { opacity: .55; filter: grayscale(.4); }
.product-card .demo-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(8,44,76,.85); color: #fff; font-size: .68rem; padding: 2px 7px; border-radius: 999px; }
.alert-info-neutral { background: #f4f6f8; border: 1px solid #d9dee4; color: #082C4C; }


/* Hero sin fotografía: texto + logo oficial intacto sobre panel blanco */
.home-hero:not(.home-hero-photo) { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.home-hero-logo { display: none; background: #fff; border-radius: 20px; padding: 1.5rem 2rem; flex: none; }
.home-hero-logo img { display: block; width: 220px; height: auto; }
@media (min-width: 992px) { .home-hero-logo { display: block; margin-right: 1.5rem; } }

/* ---- Paneles (vendedor y administrador): mismo sistema visual que el sitio público ---- */
.app-main h1.h5, .app-main h1.h4, .app-main .page-title { font-size: 1.4rem; font-weight: 800; color: var(--mm-primary); letter-spacing: -.01em; }
.app-main main, .app-main .app-content { max-width: 1280px; }
.app-main table { background: #fff; border-collapse: separate; border-spacing: 0; border: 1px solid var(--mm-border); border-radius: 14px; overflow: hidden; box-shadow: none; }
.app-main table thead th { background: #f6f8fb; color: #667085; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--mm-border); padding: .7rem .9rem; }
.app-main table tbody td { padding: .75rem .9rem; border-bottom: 1px solid #eef0f3; vertical-align: middle; background: #fff; color: #1d2939; }
.app-main table tbody tr:last-child td { border-bottom: 0; }
.app-main table tbody tr:hover td { background: #f9fafc; }
.app-main .card { border: 1px solid var(--mm-border); border-radius: 14px; box-shadow: none; }
.app-main .form-control, .app-main .form-select { border-radius: 10px; border-color: #d0d5dd; }
.app-main .form-control:focus, .app-main .form-select:focus { border-color: var(--mm-primary); box-shadow: 0 0 0 3px rgba(8,44,76,.12); }
.app-main .btn-primary { border-radius: 10px; font-weight: 700; }
.app-main .btn-ghost, .app-main .btn-outline-secondary { border-radius: 10px; }
.app-main .empty-state { background: #fff; border: 1px dashed var(--mm-border); border-radius: 14px; }
.app-main .table > tbody > tr:hover > * { --bs-table-bg-state: #f9fafc; --bs-table-hover-bg: #f9fafc; box-shadow: none; }
.app-main .table > :not(caption) > * > * { box-shadow: none; }

/* Ficha de producto */
.variant-msg { margin-top: .5rem; padding: .45rem .7rem; border-radius: 8px; background: #fff4ea; border: 1px solid #f9c79d; color: #7a3a00; font-size: .88rem; font-weight: 600; }
.variant-pill.needs-choice { border-color: #F47721; }
.variant-pill { min-height: 44px; min-width: 44px; }
.qty-stepper button { min-width: 44px; min-height: 44px; }
@media (max-width: 575.98px) {
  /* Primera pantalla: foto acotada, nombre y precio arriba, y la compra inmediatamente después */
  .gallery-side .product-gallery-main, .product-gallery-main { aspect-ratio: 4 / 3; max-height: 30svh; }
  .product-gallery-empty { padding: .75rem; min-height: 0; }
  .pg-info { padding: .85rem; }
  .pg-info .pg-lead, .pg-info .trust-list { display: none; }
  .pg-title { font-size: 1.2rem; }
  .product-grid3 { gap: .65rem; }
  .pg-buy { display: flex; flex-direction: column; }
  .pg-buy .seller-card { order: 2; }
  .mm-breadcrumb { display: none; }
}

.mobile-buy-bar { display: none; }
@media (max-width: 575.98px) {
  .mobile-buy-bar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; align-items: center; gap: .75rem; padding: .55rem .85rem max(.55rem, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--mm-border); box-shadow: 0 -4px 14px rgba(8,44,76,.1); }
  body.has-bottom-nav .mobile-buy-bar:not([hidden]) { bottom: 60px; }
  .mbb-price { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
  .mbb-price strong { color: var(--mm-primary); font-size: 1.1rem; }
  .mbb-price span { font-size: .72rem; color: #667085; }
  .mbb-btn { flex: 1; text-align: center; text-decoration: none; min-height: 44px; display: flex; align-items: center; justify-content: center; }
}

/* P17-I.2 (V-15) · áreas táctiles de la One Page ≥44 px también en escritorio. Todo va acotado a `.sp`:
   el marketplace tradicional conserva sus medidas (las reglas de ≤991px de más abajo siguen vigentes). */
.sp .product-card .fav-heart { width: 44px; height: 44px; top: 4px; right: 4px; }
.sp .product-card .quick-add { top: 52px; right: 4px; }
.sp .sp-filters a, .sp .sp-menu-tabs a { min-height: 44px; display: inline-flex; align-items: center; }
.sp .sp-socials a, .sp .sp-foot-links a, .sp .sp-foot-platform a, .sp .sp-result-line a, .sp .sp-contact li a { min-height: 44px; display: inline-flex; align-items: center; }
.sp .sp-foot-platform { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; }
/* Enlaces en línea (títulos y datos del local): la zona pulsable crece a 44 px con padding y margen negativo iguales, sin mover el diseño */
.sp .sp-svc-body h3 a, .sp .sp-menu-body h4 a, .sp .sp-infostrip a { display: inline-block; padding-block: .8rem; margin-block: -.8rem; }
.sp .sp-search .btn { min-width: 44px; }

/* Áreas táctiles ≈44 px (móvil y tableta) */
@media (max-width: 991.98px) {
  .product-card .fav-heart { width: 44px; height: 44px; top: 4px; right: 4px; }
  .product-card .quick-add { top: 52px; right: 4px; }
  .subnav .subnav-inner > a, .subnav-toggle { min-height: 44px; display: inline-flex; align-items: center; }
  .brand-link { min-width: 44px; min-height: 44px; }
  .home-more { display: inline-flex; align-items: center; min-height: 44px; }
  .sp-filters a { min-height: 44px; display: inline-flex; align-items: center; }
  .mm-back-link-mobile { display: inline-flex; align-items: center; min-height: 44px; }
  .qty-stepper input { min-height: 44px; }
  .login-toggle-pass { min-width: 44px; min-height: 44px; }
  .sp-contact a { display: inline-block; padding: .6rem 0; }
}

/* =====================================================================
   Editor de la One Page (vendedor) — ope-*  |  campo de imagen — imgf-*  |  recorte — imgc-*
   ===================================================================== */
.ope-status { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: .65rem .9rem; margin-bottom: 1rem; font-size: .9rem; color: #34495e; }
.ope-dot { width: 10px; height: 10px; border-radius: 50%; background: #00A651; flex: none; }
.ope-dot.is-pending { background: #F47721; }
.ope-dot.is-dirty { background: #E94B35; }
.ope-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 2px solid #e3e8ef; margin-bottom: 1.1rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ope-tab { flex: none; border: 0; background: transparent; padding: .7rem 1rem; min-height: 44px; font-weight: 700; font-size: .92rem; color: #5b6b7d; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.ope-tab:hover { color: #082C4C; }
.ope-tab.is-on { color: #082C4C; border-bottom-color: #F47721; }
.ope-tab:focus-visible, .imgf .btn:focus-visible { outline: 3px solid #F47721; outline-offset: 2px; }
.ope-pane[hidden] { display: none; }
.ope-pane > .ms-card + .ms-card { margin-top: 1rem; }
.ope-imgs { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 992px) { .ope-imgs { grid-template-columns: 1fr 1fr; } }
.ope-discard { color: #B3321F; }

/* Selector de destacados */
.ope-pick { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .ope-pick { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .ope-pick { grid-template-columns: repeat(3, 1fr); } }
.ope-pick-item { display: flex; align-items: center; gap: .6rem; border: 1px solid #dbe2ea; border-radius: 10px; padding: .45rem .6rem; min-height: 56px; background: #fff; cursor: pointer; }
.ope-pick-item.is-on { border-color: #F47721; background: #FFF6EE; }
.ope-pick-item input { flex: none; width: 20px; height: 20px; }
.ope-pick-item img, .ope-pick-ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #eef1f5; flex: none; }
.ope-pick-name { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; font-weight: 600; color: #082C4C; overflow-wrap: anywhere; }
.ope-pick-name small { font-weight: 500; color: #6b7a8c; }

/* Listas ordenables */
.ope-sortable { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ope-sortable li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid #dbe2ea; border-radius: 10px; padding: .4rem .6rem; background: #fff; min-height: 48px; }
.ope-s-name { font-weight: 600; color: #082C4C; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ope-s-btns, .ope-g-btns { display: flex; gap: .3rem; flex: none; }
.ope-s-btns .btn, .ope-g-btns .btn { min-width: 44px; min-height: 44px; }

/* Galería */
.ope-gallery { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ope-gallery { grid-template-columns: 1fr 1fr; } }
.ope-gitem { border: 1px solid #e3e8ef; border-radius: 12px; padding: .8rem; background: #fafbfc; display: grid; gap: .6rem; }
.ope-g-btns { flex-wrap: wrap; }

/* Promociones (tabla) */
.ope-promos td, .ope-promos th { vertical-align: middle; }
.promo-borrador, .promo-programada, .promo-vigente, .promo-vencida { font-weight: 700; padding: .35em .65em; border-radius: 999px; }
.promo-borrador { background: #eef1f5; color: #4A6176; }
.promo-programada { background: #E7EEF5; color: #082C4C; }
.promo-vigente { background: #E3F6EC; color: #0C6B34; }
.promo-vencida { background: #FDECE8; color: #B3321F; }
.pf-final.is-bad { color: #B3321F; font-weight: 700; }

/* Barra de acciones fija */
.ope-bar { position: sticky; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid #dbe2ea; box-shadow: 0 -4px 14px rgba(8,44,76,.08); margin: 1.25rem -12px -12px; padding: .65rem 12px; }
.ope-bar-in { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; max-width: 1140px; margin: 0 auto; }
.ope-bar-in .btn { min-height: 44px; }
.ope-bar-msg { margin-right: auto; font-size: .85rem; color: #4A6176; min-width: 0; }
.ope-bar-msg.is-ok { color: #0C6B34; } .ope-bar-msg.is-error { color: #B3321F; font-weight: 600; } .ope-bar-msg.is-warn { color: #7A4E00; }
.ope-bar-static { position: static; box-shadow: none; }
@media (max-width: 575.98px) { .ope-bar-in .btn { flex: 1 1 calc(33% - .5rem); padding-left: .4rem; padding-right: .4rem; font-size: .85rem; } .ope-bar-msg { flex-basis: 100%; } }

/* Modal de publicar + vista previa */
.ope-modal { position: fixed; inset: 0; z-index: 1080; background: rgba(8,44,76,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ope-modal[hidden], .ope-pv[hidden] { display: none; }
.ope-modal-box { background: #fff; border-radius: 14px; padding: 1.25rem; max-width: 460px; width: 100%; box-shadow: 0 20px 50px rgba(8,44,76,.3); }
.ope-pv { position: fixed; inset: 0; z-index: 1070; background: #E7EEF5; display: flex; flex-direction: column; }
.ope-pv-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: #fff; border-bottom: 1px solid #dbe2ea; padding: .55rem .8rem; }
.ope-pv-note { font-size: .8rem; color: #6b7a8c; }
.ope-pv-stage { flex: 1; overflow: auto; padding: 8px; }
.ope-pv-stage iframe { border: 1px solid #cbd3de; background: #fff; display: block; box-shadow: 0 6px 24px rgba(8,44,76,.18); }
.ms-seg button.is-on { background: #082C4C; color: #fff; }

/* Compartir */
.ope-share-btns { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.ope-share-btns .btn { min-height: 44px; }
.ope-share-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 992px) { .ope-share-grid { grid-template-columns: 340px 1fr 1fr; } }
.ope-qr { width: 100%; max-width: 260px; height: auto; border: 1px solid #e3e8ef; border-radius: 10px; background: #fff; }
.ope-card { width: 100%; max-width: 280px; height: auto; border: 1px solid #e3e8ef; border-radius: 10px; }
.ope-og { border: 1px solid #dbe2ea; border-radius: 10px; overflow: hidden; background: #fff; max-width: 420px; }
.ope-og-img { aspect-ratio: 1.91 / 1; background: #eef1f5; }
.ope-og-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ope-og-txt { padding: .6rem .8rem; display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.ope-og-txt small { color: #6b7a8c; text-transform: uppercase; letter-spacing: .04em; font-size: .7rem; }

/* Campo de imagen común */
.imgf { border: 1px solid #dbe2ea; border-radius: 12px; padding: .9rem; background: #fff; }
.imgf-title { margin-bottom: .4rem; color: #082C4C; }
.imgf-spec { list-style: none; margin: 0 0 .7rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.imgf-spec li { background: #E7EEF5; color: #082C4C; font-size: .74rem; padding: .2rem .55rem; border-radius: 999px; }
.imgf-soft { opacity: .7; }
.imgf-body { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .imgf-body { grid-template-columns: minmax(120px, 46%) 1fr; } }
.imgf-preview { width: 100%; background: #eef1f5; border: 1px dashed #b8c3d0; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; max-height: 260px; }
.imgf-logo .imgf-preview, .imgf-product .imgf-preview, .imgf-category .imgf-preview { max-width: 220px; }
.imgf-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgf-empty { display: flex; flex-direction: column; align-items: center; gap: .2rem; color: #7a8a9c; }
.imgf-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.imgf-actions .btn { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; }
.imgf-current, .imgf-chosen { font-size: .8rem; color: #4A6176; margin-top: .4rem; }
.imgf-status { font-size: .85rem; margin-top: .4rem; font-weight: 600; }
.imgf-status.is-ok { color: #0C6B34; } .imgf-status.is-warn { color: #7A4E00; } .imgf-status.is-error { color: #B3321F; } .imgf-status.is-info { color: #082C4C; }
.imgf-progress { height: 6px; background: #e3e8ef; border-radius: 99px; overflow: hidden; margin-top: .5rem; }
.imgf-progress[hidden] { display: none; }
.imgf-progress span { display: block; height: 100%; width: 0; background: #F47721; transition: width .15s; }

/* Recorte */
body.imgc-open { overflow: hidden; }
.imgc { position: fixed; inset: 0; z-index: 1090; background: rgba(8,44,76,.7); display: flex; align-items: center; justify-content: center; padding: .75rem; }
.imgc[hidden] { display: none; }
.imgc-box { background: #fff; border-radius: 14px; padding: 1rem; width: 100%; max-width: 720px; max-height: 96vh; overflow: auto; }
.imgc-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.imgc-x { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; color: #082C4C; }
.imgc-help { font-size: .85rem; color: #4A6176; margin: 0 0 .6rem; }
.imgc-stage { display: flex; justify-content: center; background: #0d1b2a; border-radius: 10px; padding: .6rem; }
.imgc-frame { position: relative; overflow: hidden; background: #000; outline: 3px solid #F47721; cursor: grab; touch-action: none; max-width: 100%; }
.imgc-frame:active { cursor: grabbing; }
.imgc-frame:focus-visible { outline-color: #fff; }
.imgc-frame img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.imgc-controls { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .7rem 0 .3rem; }
.imgc-controls label { display: flex; align-items: center; gap: .5rem; flex: 1 1 220px; font-weight: 600; font-size: .88rem; }
.imgc-controls input[type=range] { flex: 1; min-height: 44px; }
.imgc-info { font-size: .84rem; color: #34495e; min-height: 1.3em; }
.imgc-info.is-warn { color: #7A4E00; } .imgc-info.is-error { color: #B3321F; font-weight: 600; }
.imgc-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .7rem; }
.imgc-actions .btn { min-height: 44px; }

/* =====================================================================
   One Page pública — secciones nuevas
   ===================================================================== */
.sp-preview-banner { background: #FFF6EE; border: 1px solid #F47721; color: #082C4C; border-radius: 10px; padding: .55rem .9rem; margin: .5rem 0 1rem; font-size: .88rem; }
.sp-tagline { margin: .15rem 0 .4rem; color: #4A6176; font-size: 1rem; }
.sp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-share { position: relative; display: inline-block; }
.sp-share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; background: #fff; border: 1px solid #dbe2ea; border-radius: 12px; box-shadow: 0 10px 28px rgba(8,44,76,.18); padding: .3rem; display: flex; flex-direction: column; }
.sp-share-menu[hidden] { display: none; }
.sp-share-menu button, .sp-share-menu a { border: 0; background: transparent; text-align: left; padding: .65rem .8rem; min-height: 44px; border-radius: 8px; color: #082C4C; font-weight: 600; font-size: .92rem; text-decoration: none; }
.sp-share-menu button:hover, .sp-share-menu a:hover { background: #E7EEF5; }
.sp-share-menu [hidden] { display: none; }
.sp-share-msg { position: absolute; right: 0; top: calc(100% + 4px); background: #082C4C; color: #fff; font-size: .8rem; padding: .25rem .6rem; border-radius: 6px; white-space: nowrap; }
.sp-share-msg:empty { display: none; }
.sp-info-one { grid-template-columns: 1fr; }
.sp-extra-title { font-size: 1rem; font-weight: 800; margin: 1rem 0 .3rem; color: #082C4C; }
.sp-promos, .sp-featured, .sp-gallery { margin-top: 1.5rem; }
.sp-promos h2, .sp-featured h2, .sp-gallery h2 { font-size: 1.2rem; font-weight: 800; color: #082C4C; margin-bottom: .8rem; }
.sp-promo-list { display: grid; gap: 1rem; }
.sp-promo { background: #fff; border: 1px solid #e3e8ef; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr; }
.sp-promo.is-pending { border-style: dashed; opacity: .92; }
@media (min-width: 768px) { .sp-promo:has(.sp-promo-img) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.sp-promo-img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; display: block; }
@media (min-width: 768px) { .sp-promo-img { height: 100%; aspect-ratio: auto; min-height: 160px; } }
.sp-promo-body { padding: 1rem; min-width: 0; }
.sp-promo-body h3 { font-size: 1.1rem; font-weight: 800; color: #082C4C; margin: 0 0 .3rem; }
.sp-promo-state { display: inline-block; background: #FFF6EE; color: #7A4E00; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; margin-bottom: .3rem; }
.sp-promo-until { font-size: .8rem; color: var(--sp-muted, #5b6b7e); margin: .2rem 0 .6rem; }
.sp-promo-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.sp-promo-items a { display: flex; align-items: center; gap: .6rem; min-height: 56px; padding: .3rem .4rem; border-radius: 10px; text-decoration: none; color: #082C4C; }
.sp-promo-items a:hover { background: #f4f7fa; }
.sp-promo-items img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.sp-promo-items .n { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.sp-promo-items .p { display: flex; flex-wrap: wrap; gap: .1rem .4rem; align-items: baseline; justify-content: flex-end; font-size: .88rem; text-align: right; }
.sp-promo-items .p s { color: var(--sp-muted, #5b6b7e); font-size: .78rem; }
.sp-promo-items .p em { font-style: normal; background: #F47721; color: #082C4C; font-weight: 800; font-size: .72rem; padding: .05rem .4rem; border-radius: 6px; }
.sp-gallery-grid { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .sp-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sp-gallery-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; background: #eef1f5; }
.sp-cat-tiles { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.2rem; }
@media (min-width: 768px) { .sp-cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sp-cat-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sp-cat-tile { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; background: #eef1f5; text-decoration: none; }
.sp-cat-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-cat-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .6rem; background: linear-gradient(transparent, rgba(8,44,76,.85)); color: #fff; font-weight: 700; font-size: .88rem; }
@media (max-width: 575.98px) {
  .sp-promo-items a { flex-wrap: wrap; }
  .sp-promo-items .n { flex: 1 1 calc(100% - 70px); }
  .sp-promo-items .p { flex: 1 1 100%; justify-content: flex-start; text-align: left; padding-left: 64px; margin-top: -.3rem; }
  .sp-actions .btn, .sp-share { width: 100%; }
  .sp-share .btn { width: 100%; }
  .sp-share-menu { left: 0; right: 0; }
}
/* La barra del editor queda por encima del menú inferior en pantallas pequeñas */
@media (max-width: 991.98px) { .ope-bar { bottom: calc(58px + env(safe-area-inset-bottom)); } }

/* =====================================================================
   One Page pública v2 — encabezado, hero, tema (plantillas) — sp-*
   Variables (las define OnePageTheme::cssVars): --store-a/b/on, --sp-secondary(-on), --sp-bg, --sp-surface, --sp-text,
   --sp-link, --sp-font, --sp-heading, --sp-btn-r, --sp-card-r, --sp-card-border, --sp-card-shadow
   ===================================================================== */
.sp-body { background: var(--sp-bg, #fff); }
.sp { font-family: var(--sp-font); color: var(--sp-text); background: var(--sp-bg); --sp-gap: 2.5rem; }
.sp h1, .sp h2, .sp h3 { font-family: var(--sp-heading); color: var(--sp-text); }
.sp-wrap { max-width: 1140px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.sp .btn { border-radius: var(--sp-btn-r); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; }
.sp .sp-btn-brand { background: var(--store-a); color: var(--store-on); border: 0; }
.sp .sp-btn-brand:hover { background: var(--store-b); color: var(--store-on); }
.sp-main { padding-top: 1.5rem; padding-bottom: 1rem; }
.sp-main > section, .sp-main > .sp-info { margin-top: var(--sp-gap); margin-bottom: 0; }
.sp-main > section:first-child, .sp-main > .sp-info:first-child { margin-top: 1rem; }
/* P17-I.2 (V-04): en Servicios los bloques van dentro de .sp-col-main y no coincidían con `.sp-main >`: 5 de 7 quedaban pegados */
.sp-col-main > section, .sp-col-main > .sp-info { margin-top: var(--sp-gap); margin-bottom: 0; }
.sp-col-main > section:first-child, .sp-col-main > .sp-info:first-child { margin-top: 1rem; }
.sp-main h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 1rem; }
.sp-main h2 small { font-weight: 600; font-size: .8rem; color: var(--sp-muted, #5b6b7e); margin-left: .4rem; }
.sp-about a, .sp-contact a, .sp-story a, .sp-socials a { color: var(--sp-link); }

/* Encabezado */
.sp-nav { position: sticky; top: 0; z-index: 40; background: var(--sp-bg); border-bottom: 1px solid rgba(127,127,127,.25); }
.sp-nav-in { display: flex; align-items: center; gap: 1rem; min-height: 64px; position: relative; }
.sp-nav-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--sp-text); min-width: 0; flex: 0 1 auto; }
.sp-nav-brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; flex: none; }
.sp-nav-initial { width: 44px; height: 44px; border-radius: 10px; background: var(--store-a); color: var(--store-on); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; flex: none; }
.sp-nav-name { font-family: var(--sp-heading); font-weight: 800; font-size: 1.05rem; line-height: 1.15; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }   /* P17-I.3 (C): hasta 2 líneas (antes 1 línea con «…») dentro de la misma altura de 64 px: los desplazamientos sticky de filtros y pestañas siguen valiendo */
.sp-nav-links { display: none; margin-left: auto; gap: .2rem; }
.sp-nav-links a { color: var(--sp-text); text-decoration: none; padding: .6rem .8rem; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; font-size: .92rem; border-radius: var(--sp-btn-r); }
.sp-nav-links a:hover { background: rgba(127,127,127,.15); }
.sp-nav-actions { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.sp-icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--sp-text); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--sp-btn-r); text-decoration: none; }
.sp-icon-btn:hover { background: rgba(127,127,127,.15); }
.sp-nav-login { color: var(--sp-text); text-decoration: none; font-weight: 700; font-size: .9rem; padding: .6rem .7rem; min-height: 44px; display: none; align-items: center; }
.sp-nav-links.is-open { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--sp-bg); padding: .4rem 16px .8rem; border-bottom: 1px solid rgba(127,127,127,.25); box-shadow: 0 10px 20px rgba(0,0,0,.12); margin-left: 0; }
/* P17-I.3 (C): el menú en línea pasa de 768 a 992 px. A 768 px las 6 secciones + 3 acciones dejaban el nombre de la tienda en 0 px y desbordaban la página; entre 768 y 991 px se conserva el botón de menú. */
@media (min-width: 768px) { .sp-nav-login { display: inline-flex; } }
@media (min-width: 992px) {
  .sp-nav-links { display: flex; }
  .sp-nav-links.is-open { position: static; flex-direction: row; box-shadow: none; border: 0; padding: 0; }
  .sp-nav-actions { margin-left: .5rem; }
  .sp-nav-toggle { display: none; }
}
.sp-share { position: relative; }
.sp-share-menu { top: calc(100% + 6px); right: 0; }
.sp-is-preview .sp-nav { position: static; }
.sp-is-preview .sp-nav-actions a, .sp-is-preview .sp-hero-actions a[target] { pointer-events: none; }

/* Hero */
.sp-hero { position: relative; }
.sp-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-hero-superpuesto { min-height: clamp(300px, 40vw, 460px); display: flex; align-items: flex-end; overflow: hidden; background: var(--store-a); }
.sp-hero-superpuesto .sp-hero-media { position: absolute; inset: 0; }
.sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.12) 100%); }
.sp-hero-superpuesto.sp-hero-plain { background: linear-gradient(135deg, var(--store-a), var(--store-b)); }
/* P17-I.2 (V-03): sin portada → banda compacta y botón invertido (fondo = color de texto sobre marca) */
.sp .sp-hero-superpuesto.sp-hero-plain { min-height: clamp(200px, 24vw, 280px); align-items: center; }
.sp .sp-hero-superpuesto.sp-hero-plain .sp-hero-body { padding-top: 2rem; padding-bottom: 1.75rem; }
.sp .sp-hero-superpuesto.sp-hero-plain .sp-btn-brand { background: var(--store-on); color: var(--store-a); }
.sp .sp-hero-superpuesto.sp-hero-plain .sp-btn-brand:hover { background: var(--store-on); color: var(--store-a); text-decoration: underline; }
.sp .sp-hero-superpuesto.sp-hero-plain .btn-wa { border: 2px solid var(--store-on); }
.sp-hero-superpuesto .sp-hero-body { position: relative; width: 100%; padding-top: 3rem; padding-bottom: 2rem; }
.sp-hero-superpuesto .sp-hero-card { max-width: 680px; color: #fff; }
.sp-hero-superpuesto .sp-hero-card h1 { color: #fff; }
.sp-hero-superpuesto.sp-hero-plain .sp-hero-card, .sp-hero-superpuesto.sp-hero-plain .sp-hero-card h1 { color: var(--store-on); }
.sp-hero-dividido .sp-hero-media { width: 100%; height: clamp(180px, 50vw, 300px); overflow: hidden; background: var(--store-a); }   /* P17-I.2 (V-02): altura explícita (antes aspect-ratio 3/1 + max-height reducía el ANCHO a 1320 px). P17-I.3 (A): móvil ≈2:1 (antes 3:1 = cinta de 130 px) */
@media (min-width: 768px) { .sp-hero-dividido .sp-hero-media { height: clamp(260px, 40vw, 340px); } }
@media (min-width: 992px) { .sp-hero-dividido .sp-hero-media { height: min(33.333vw, 440px); } }
.sp-hero-dividido.sp-hero-plain .sp-hero-media { aspect-ratio: auto; height: clamp(64px, 12vw, 120px); background: linear-gradient(135deg, var(--store-a), var(--store-b)); }
.sp-hero-dividido .sp-hero-body { padding-top: 1.75rem; padding-bottom: .5rem; text-align: center; }
.sp-hero-dividido .sp-hero-card { margin: 0 auto; max-width: 720px; }
.sp-hero-dividido .sp-chips, .sp-hero-dividido .sp-hero-actions { justify-content: center; }
.sp-hero-card h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); font-weight: 800; line-height: 1.15; margin: .6rem 0 .5rem; overflow-wrap: anywhere; }
.sp-hero-text { font-size: 1.05rem; margin: 0 0 1.1rem; max-width: 56ch; }
.sp-hero-dividido .sp-hero-text { margin-left: auto; margin-right: auto; }
.sp-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.sp-hero .sp-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-hero .sp-chip { background: rgba(255,255,255,.92); color: #0B2545; border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; font-weight: 600; }
.sp-hero-dividido .sp-chip { background: rgba(127,127,127,.15); color: var(--sp-text); }
.sp-hero .sp-chip-brand { background: var(--sp-secondary); color: var(--sp-secondary-on); }
@media (max-width: 575.98px) { .sp-hero-actions .btn { width: 100%; } }
/* P17-I.3 (D): «Llamar» solo en móvil/tableta estrecha (en escritorio no se llama) y solo si hay teléfono válido; neutro para verse sobre foto, degradado o fondo claro. */
.sp .sp-hero-call { background: #fff; color: #082C4C; border: 2px solid #082C4C; display: none; }
.sp .sp-hero-call:hover { background: #eef2f7; color: #082C4C; }
@media (max-width: 767.98px) { .sp .sp-hero-call { display: inline-flex; } }
@media (max-width: 575.98px) {
  .sp-hero-actions .btn-wa, .sp-hero-actions .sp-hero-call { flex: 1 1 calc(50% - .3rem); width: auto; min-width: 0; line-height: 1.15; text-align: center; padding-left: .5rem; padding-right: .5rem; }
}
/* P17-I.3 (D): el encabezado fijo (64 px) y las barras fijas de filtros/pestañas no deben tapar el destino de los enlaces internos */
.sp section[id], .sp [id="inicio"], .sp-hero { scroll-margin-top: 76px; }
.sp section.sp-catalog, .sp section.sp-menu { scroll-margin-top: 80px; }
/* P17-I.3 (C): en móvil el nombre usa el ancho libre; acciones sin separación extra */
@media (max-width: 991.98px) { .sp-nav-in { gap: .4rem; } .sp-nav-brand { flex: 1 1 auto; gap: .5rem; } .sp-nav-actions { flex: none; gap: 0; margin-left: 0; } }
@media (max-width: 767.98px) { .sp-nav-name { font-size: .95rem; line-height: 1.12; -webkit-line-clamp: 3; line-clamp: 3; } }   /* 3 líneas = ~51 px: caben en los 64 px del encabezado; más allá de ~45 caracteres se acorta (el nombre completo sigue en el título del hero, en el atributo title y en aria-label) */

/* Bloques con tarjeta */
.sp-about, .sp-contact, .sp-story, .sp-promo { background: var(--sp-surface); border: var(--sp-card-border); border-radius: var(--sp-card-r); box-shadow: var(--sp-card-shadow); }
.sp-about, .sp-contact, .sp-story { padding: 1.25rem; }
.sp-about h2, .sp-contact h2, .sp-story h2 { font-size: 1.15rem; }
.sp-story p { margin: 0; line-height: 1.7; max-width: 70ch; }
.sp-contact strong, .sp-contact li span strong { color: var(--sp-muted, #5b6b7e); }
.sp-contact a { font-weight: 700; }
.sp-socials { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.sp-socials a { min-height: 32px; display: inline-flex; align-items: center; }
.sp .product-card .card { border-radius: var(--sp-card-r); border: var(--sp-card-border); box-shadow: var(--sp-card-shadow); }
.sp .offer-badge, .sp .sp-promo-items .p em { background: var(--sp-secondary); color: var(--sp-secondary-on); }
.sp-promo-body h3 { color: var(--sp-text); }
.sp-promo-items a { color: var(--sp-text); }
.sp-filters a { border-radius: var(--sp-btn-r); }
.sp-filters a.is-on { background: var(--store-a); color: var(--store-on); border-color: var(--store-a); }
.sp-cat-tile { border-radius: var(--sp-card-r); border: var(--sp-card-border); }
.sp-cat-tile.is-plain { background: var(--sp-surface); aspect-ratio: auto; min-height: 96px; display: flex; align-items: flex-end; color: var(--sp-text); }
.sp-cat-tile.is-plain span { position: static; background: none; color: var(--sp-text); padding: .9rem; display: flex; flex-direction: column; }
.sp-cat-tile span small { display: block; font-weight: 500; opacity: .85; font-size: .75rem; }
.sp-cat-tile.is-plain { border-left: 5px solid var(--sp-secondary); }
.sp-categories .sp-cat-tiles { margin-bottom: 0; }

/* Pie */
.sp-foot { margin-top: 3rem; background: var(--sp-surface); border-top: 1px solid rgba(127,127,127,.25); padding: 2rem 0 5.5rem; font-size: .9rem; }
.sp-foot-in { display: grid; gap: .8rem; }
.sp-foot-id { display: flex; flex-direction: column; gap: .15rem; }
.sp-foot-id strong { font-family: var(--sp-heading); font-size: 1.1rem; }
.sp-foot-links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.sp-foot-links a { color: var(--sp-link); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.sp-foot-note, .sp-foot-platform { margin: 0; opacity: .75; font-size: .8rem; }
.sp-foot-platform a { color: inherit; font-weight: 700; }
@media (min-width: 768px) { .sp-foot { padding-bottom: 2rem; } }

/* Plantillas (puntos de partida; todo es personalizable desde el editor) */
.sp-tpl-elegante { --sp-gap: 3.5rem; }
.sp-tpl-elegante h2 { text-align: center; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 1.05rem; }
.sp-tpl-elegante h2::after { content: ''; display: block; width: 44px; height: 2px; background: var(--sp-secondary); margin: .55rem auto 0; }
.sp-tpl-elegante .sp-nav-links a { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.sp-tpl-elegante .sp-about h2, .sp-tpl-elegante .sp-contact h2, .sp-tpl-elegante .sp-story h2 { text-align: left; }
.sp-tpl-elegante .sp-about h2::after, .sp-tpl-elegante .sp-contact h2::after, .sp-tpl-elegante .sp-story h2::after { margin-left: 0; }
.sp-tpl-moderna h2 { font-weight: 800; display: flex; align-items: center; gap: .6rem; }
.sp-tpl-moderna h2::before { content: ''; width: 6px; height: 1.2em; border-radius: 3px; background: var(--sp-secondary); flex: none; }
.sp-tpl-moderna .sp-hero-card h1 { font-weight: 900; letter-spacing: -.01em; }
.sp-tpl-artesanal { --sp-gap: 3rem; }
.sp-tpl-artesanal h2 { font-weight: 700; }
.sp-tpl-artesanal h2::after { content: ''; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--sp-secondary); margin-top: .45rem; }
.sp-tpl-artesanal .sp-about, .sp-tpl-artesanal .sp-contact, .sp-tpl-artesanal .sp-story, .sp-tpl-artesanal .sp-promo { border-top: 4px solid var(--sp-secondary); }
.sp-tpl-artesanal .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(40,22,10,.78) 0%, rgba(40,22,10,.38) 55%, rgba(40,22,10,.1) 100%); }

/* Editor: diseño y plantilla */
.ope-tpls { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ope-tpls { grid-template-columns: repeat(3, 1fr); } }
.ope-tpl { position: relative; display: flex; flex-direction: column; gap: .35rem; border: 2px solid #dbe2ea; border-radius: 12px; padding: .8rem; cursor: pointer; background: #fff; min-height: 44px; }
.ope-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.ope-tpl:focus-within { outline: 3px solid #F47721; outline-offset: 2px; }
.ope-tpl.is-on { border-color: #F47721; background: #FFF6EE; }
.ope-tpl strong { color: #082C4C; }
.ope-tpl small { color: #4A6176; font-size: .8rem; line-height: 1.35; }
.ope-tpl-mini { display: flex; align-items: center; gap: .5rem; border-radius: 8px; padding: .7rem; border: 1px solid rgba(0,0,0,.1); }
.ope-tpl-mini i { width: 28px; height: 14px; border-radius: 4px; display: inline-block; }
.ope-tpl-mini b { font-size: 1.4rem; line-height: 1; }
.ope-tpl-mini em { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-left: auto; }
.ope-colors { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .ope-colors { grid-template-columns: repeat(4, 1fr); } }
.ope-color { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 600; color: #082C4C; }
.ope-color-row { display: flex; align-items: center; gap: .5rem; }
.ope-color input[type=color] { width: 56px; height: 44px; padding: 2px; border: 1px solid #cbd3de; border-radius: 8px; background: #fff; }
.ope-contrast { margin-top: .9rem; display: grid; gap: .5rem; }
.ope-contrast:empty { display: none; }
.ope-contrast-item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; background: #FFF6E0; border: 1px solid #FFB52E; color: #5C3B00; border-radius: 10px; padding: .6rem .8rem; font-size: .85rem; }
.ope-theme-preview { margin-top: 1rem; border: 1px solid #cbd3de; border-radius: 12px; padding: 1rem 1.2rem; }
.ope-theme-preview h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.ope-theme-preview p { margin: 0 0 .7rem; }
.ope-theme-preview .btn { cursor: default; pointer-events: none; }
.tp-tag { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-left: .4rem; }
.sp-info { align-items: start; }
.sp-icon-btn { flex: none; min-width: 44px; }
.sp-foot-links a { min-height: 44px; padding: 0 .2rem; }
.sp-nav-name { min-width: 0; }
.sp-nav-brand { flex: 1 1 auto; }
@media (min-width: 768px) { .sp-nav-brand { flex: 0 1 auto; } }

/* ---------- Cuentas de servicios: tarjetas de servicio, especialidades, cotización ---------- */
.sp-services h2, .sp-specialties h2, .sp-quote h2 { font-size: 1.25rem; }
.sp-svc-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sp-svc { background: var(--sp-surface); border: var(--sp-card-border); border-radius: var(--sp-card-r); box-shadow: var(--sp-card-shadow); overflow: hidden; display: flex; flex-direction: column; }
.sp-svc-img { display: block; aspect-ratio: 4 / 3; background: rgba(127,127,127,.12); }
.sp-svc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-svc-body { padding: 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.sp-svc-body h3 { font-size: 1.05rem; margin: 0; font-family: var(--sp-heading); }
.sp-svc-body h3 a { color: var(--sp-text); text-decoration: none; }
.sp-svc-body p { margin: 0; line-height: 1.55; }
.sp-svc-body .btn { margin-top: auto; align-self: flex-start; }
.sp-svc-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; font-size: .9rem; }
.sp-svc-meta .mm-icon { width: 1em; height: 1em; }
.sp-chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.sp-hero-sub { font-weight: 600; margin: -.2rem 0 .4rem; opacity: .9; }
.sp-quote { background: var(--sp-surface); border: var(--sp-card-border); border-radius: var(--sp-card-r); box-shadow: var(--sp-card-shadow); padding: 1.25rem; }
.sp-quote-grid { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.sp-quote-grid label { display: grid; gap: .25rem; align-content: end; font-weight: 600; font-size: .9rem; }   /* P17-I.2 (V-11): alinea los campos de una fila aunque una etiqueta ocupe más líneas */
.sp-quote-grid .sp-lbl { display: block; line-height: 1.3; overflow-wrap: anywhere; }
.sp-quote-grid .sp-lbl small { font-weight: 500; color: var(--sp-muted, #5b6b7e); white-space: nowrap; }
.sp-quote-grid input, .sp-quote-grid select, .sp-quote-grid textarea { width: 100%; padding: .6rem .75rem; min-height: 44px; border: 1px solid rgba(127,127,127,.5); border-radius: 8px; font: inherit; background: #fff; color: #1a1a1a; }
.sp-quote-wide { grid-column: 1 / -1; }
.sp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 575.98px) { .sp-quote-grid { grid-template-columns: 1fr; } }
.svc-list .badge { font-weight: 600; }
.sp-svc-detail { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); margin-bottom: 1.5rem; }
@media (min-width: 900px) { .sp-svc-detail.has-img, .sp-svc-detail:has(.sp-svc-detail-img) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.sp-svc-detail-img { border-radius: var(--sp-card-r); overflow: hidden; background: rgba(127,127,127,.12); aspect-ratio: 4 / 3; }
.sp-svc-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-svc-detail-body { display: flex; flex-direction: column; gap: .8rem; }
.sp-svc-detail-body h1 { font-family: var(--sp-heading); font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0; }
.sp-svc-price small { display: block; opacity: .75; font-weight: 400; }
.sp-svc-desc { line-height: 1.7; margin: 0; }
.svc-public-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Barra secundaria en móvil: con el enlace "Servicios" las cinco opciones deben caber en 360 px sin desplazar la página. */
@media (max-width: 575.98px) {
  .subnav-inner { gap: 0; }
  .subnav a, .subnav .subnav-toggle { padding: .5rem .5rem; font-size: .8rem; gap: .25rem; }
}
@media (max-width: 575.98px) {
  .subnav a.subnav-end .mm-icon, .subnav .subnav-toggle > .mm-icon:first-child { display: none; }
}
@media (max-width: 359.98px) {
  .subnav a[href$="#tiendas"] { display: none; }
}

/* P17-H.1 · Paginación de resultados (identidad del marketplace; botones de al menos 44 px para el dedo en móvil) */
.mm-pagination { margin: 1.5rem 0 1rem; }
.mm-pagination .pagination {
  --bs-pagination-color: var(--mm-primary);
  --bs-pagination-hover-color: var(--mm-primary-dark);
  --bs-pagination-hover-bg: var(--mm-primary-soft);
  --bs-pagination-active-bg: var(--mm-primary);
  --bs-pagination-active-border-color: var(--mm-primary);
  --bs-pagination-focus-color: var(--mm-primary-dark);
  --bs-pagination-focus-bg: var(--mm-primary-soft);
  --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(19, 183, 201, .35);
  gap: .25rem;
}
.mm-pagination .page-link { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; }
.mm-pagination .page-item:not(:first-child) .page-link, .mm-pagination .page-item:first-child .page-link { border-radius: .5rem; }
.mm-pagination .page-item.disabled .page-link { color: #6c757d; }

/* ======================================================================
   P17-H.3 · One Page: DISEÑOS (estructura) — .sp-lay-comercio | .sp-lay-gastronomia | .sp-lay-servicios
   Los colores/tipografías vienen de las variables del estilo (--sp-*, --store-*); aquí solo cambia la ESTRUCTURA.
   ====================================================================== */
.sp-cart-btn { position: relative; }
.sp-cart-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #C93A26; color: #fff; font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center; border: 2px solid var(--sp-bg); box-sizing: content-box; }
.sp-search { display: flex; gap: .4rem; flex: 1 1 260px; min-width: 0; max-width: 460px; }   /* P17-I.2: min-width:0 evita que el buscador desborde 1–2 px a 360 px (detectado por onepage_browser_test) */
.sp-search input[type=search] { flex: 1; min-width: 0; min-height: 44px; border: var(--sp-card-border); border-radius: var(--sp-btn-r); padding: 0 .9rem; background: var(--sp-surface); color: var(--sp-text); font: inherit; }
.sp-search input[type=search]:focus { outline: 3px solid #F47721; outline-offset: 1px; }
.sp-catalog-head, .sp-menu-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1rem; margin-bottom: .8rem; }
.sp-order-note { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; background: rgba(19,183,201,.12); border-left: 4px solid #13B7C9; border-radius: 8px; padding: .55rem .8rem; margin: .4rem 0 1rem; color: var(--sp-text); }
.sp-order-note svg { flex: none; margin-top: .15rem; color: #0E8C9A; }
/* P17-I.2 (V-01): texto y <strong> eran hijos flex sueltos (columnas estrechas); ahora van en un único <span> que ocupa el ancho */
.sp-order-note > span { flex: 1 1 auto; min-width: 0; }
.sp-result-line { font-size: .9rem; margin: 0 0 .8rem; }
.sp-result-line a { color: var(--sp-link); }
.sp .mm-pagination .page-link { color: var(--sp-link); min-height: 44px; display: inline-flex; align-items: center; }
.sp .mm-pagination .active .page-link { background: var(--store-a); border-color: var(--store-a); color: var(--store-on); }

/* --- A · COMERCIO: banner, categorías en mosaico, buscador destacado, cuadrícula densa --- */
.sp-lay-comercio .sp-catalog-head { padding-bottom: .6rem; border-bottom: 3px solid var(--sp-secondary); }
.sp-lay-comercio .sp-cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .sp-lay-comercio .sp-cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sp-lay-comercio .sp-filters { position: sticky; top: 64px; z-index: 15; background: var(--sp-bg); padding: .5rem 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.sp-lay-comercio .sp-filters a { white-space: nowrap; }

/* --- B · GASTRONOMÍA: portada cálida centrada, franja de datos, carta por categorías --- */
.sp-lay-gastronomia .sp-hero-superpuesto { min-height: clamp(340px, 52vw, 560px); align-items: center; justify-content: center; text-align: center; }
.sp-lay-gastronomia .sp-hero-superpuesto .sp-hero-card { margin: 0 auto; max-width: 760px; }
.sp-lay-gastronomia .sp-hero-card h1 { font-family: var(--sp-heading); font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: .01em; }
.sp-lay-gastronomia .sp-chips, .sp-lay-gastronomia .sp-hero-actions { justify-content: center; }
.sp-lay-gastronomia .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(45,20,8,.78) 0%, rgba(45,20,8,.5) 60%, rgba(45,20,8,.35) 100%); }
.sp-infostrip { background: var(--sp-secondary); color: var(--sp-secondary-on); }
.sp-infostrip-in { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; padding-top: .7rem; padding-bottom: .7rem; font-size: .92rem; font-weight: 600; }
.sp-infostrip a { color: inherit; }
.sp-infostrip svg { vertical-align: -2px; }
.sp-menu h2 { text-align: center; }
.sp-menu-head { justify-content: center; flex-direction: column; text-align: center; }
.sp-menu-head h2 small { display: block; font-size: .85rem; font-weight: 500; color: var(--sp-muted, #5b6b7e); }
.sp-menu-head .sp-search { width: 100%; max-width: 520px; }
.sp-menu-tabs { position: sticky; top: 64px; z-index: 15; display: flex; gap: .4rem; overflow-x: auto; padding: .55rem 0; margin-bottom: .6rem; background: var(--sp-bg); border-bottom: 1px solid rgba(127,127,127,.25); scrollbar-width: thin; }
.sp-menu-tabs a { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 1rem; border-radius: 999px; border: var(--sp-card-border); background: var(--sp-surface); color: var(--sp-text); text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.sp-menu-tabs a.is-on { background: var(--store-a); color: var(--store-on); border-color: var(--store-a); }
.sp-menu-list { display: grid; grid-template-columns: 1fr; gap: .8rem 2rem; }
@media (min-width: 992px) { .sp-menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sp-menu-cat { grid-column: 1 / -1; } }
.sp-menu-cat { margin: 1.4rem 0 .2rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .08em; padding-bottom: .4rem; border-bottom: 2px solid var(--sp-secondary); }
.sp-menu-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .8rem 0; border-bottom: 1px dashed rgba(127,127,127,.35); }
@media (min-width: 576px) { .sp-menu-item { grid-template-columns: 112px minmax(0, 1fr) auto; } }
.sp-menu-img { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--sp-card-r); overflow: hidden; background: rgba(127,127,127,.12); }
.sp-menu-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-menu-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; opacity: .4; }
.sp-menu-body h4 { margin: 0 0 .2rem; font-size: 1.05rem; font-family: var(--sp-heading); }
.sp-menu-body h4 a { color: var(--sp-text); text-decoration: none; }
.sp-menu-body h4 a:hover { text-decoration: underline; }
.sp-menu-body p { margin: 0 0 .3rem; font-size: .9rem; color: var(--sp-muted, #5b6b7e); overflow-wrap: anywhere; }
.sp-menu-opts { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.sp-menu-opts li { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: rgba(127,127,127,.16); }
.sp-menu-side { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; text-align: right; }
.sp-menu-price strong { font-size: 1.1rem; }
.sp-menu-price s { font-size: .8rem; color: var(--sp-muted, #5b6b7e); }
.sp-menu-sold { font-size: .75rem; font-weight: 800; color: #fff; background: #BF3420; padding: .15rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }   /* P17-I.2: etiqueta propia (blanco sobre #BF3420 = 5,6:1) */
/* P17-I.2: el plato agotado ya no se atenúa con opacity (llevaba el texto a 3,3:1): solo se atenúa la foto; el texto conserva su contraste */
.sp-menu-item.is-soldout .sp-menu-img { opacity: .55; filter: grayscale(.5); }
.sp-menu-side .btn { white-space: nowrap; }

/* --- C · SERVICIOS: presentación en dos columnas, servicios en lista, contacto lateral fijo --- */
@media (min-width: 992px) {
  .sp-lay-servicios .sp-hero-superpuesto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; min-height: 420px; background: var(--sp-surface); }
  .sp-lay-servicios .sp-hero-superpuesto .sp-hero-media { position: relative; inset: auto; order: 2; min-height: 420px; }
  .sp-lay-servicios .sp-hero-superpuesto .sp-hero-media::after { display: none; }
  .sp-lay-servicios .sp-hero-superpuesto .sp-hero-body { order: 1; display: flex; align-items: center; max-width: none; margin: 0; padding: 3rem 2.5rem 3rem max(16px, calc((100vw - 1140px) / 2 + 16px)); }
  .sp-lay-servicios .sp-hero-superpuesto .sp-hero-card, .sp-lay-servicios .sp-hero-superpuesto .sp-hero-card h1 { color: var(--sp-text); }
  .sp-lay-servicios .sp-hero-superpuesto .sp-chip { background: rgba(127,127,127,.15); color: var(--sp-text); }
  .sp-lay-servicios .sp-hero-superpuesto.sp-hero-plain { background: linear-gradient(135deg, var(--store-a), var(--store-b)); grid-template-columns: minmax(0, 1fr); min-height: 260px; }
  .sp-lay-servicios .sp-hero-superpuesto.sp-hero-plain .sp-hero-media { display: none; }
  .sp-lay-servicios .sp-hero-superpuesto.sp-hero-plain .sp-hero-card, .sp-lay-servicios .sp-hero-superpuesto.sp-hero-plain .sp-hero-card h1 { color: var(--store-on); }
}
.sp-lay-servicios .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media { min-height: 220px; }
/* P17-I.2 (V-05): se eliminó el borde izquierdo propio de Servicios (`.sp-lay-servicios h2`): cada estilo conserva su única decoración de título */
.sp-lay-servicios .sp-svc-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .sp-lay-servicios .sp-svc { flex-direction: row; } .sp-lay-servicios .sp-svc-img { flex: 0 0 220px; aspect-ratio: auto; } .sp-lay-servicios .sp-svc-img img { height: 100%; object-fit: cover; } }
.sp-has-aside { display: block; }
@media (min-width: 992px) { .sp-has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; } .sp-col-aside { position: sticky; top: 84px; } }
.sp-col-main, .sp-col-aside { min-width: 0; }
.sp-col-aside { margin-top: 1.5rem; }
@media (min-width: 992px) { .sp-col-aside { margin-top: 0; } }

/* --- Mapa --- */
.sp-map { margin-top: 1rem; }
.sp-map-note { font-size: .78rem; opacity: .75; margin: .4rem 0 0; }
.sp-map-frame { width: 100%; height: 280px; border: 0; border-radius: var(--sp-card-r); display: block; }

/* --- Ficha de producto con la identidad de la tienda --- */
.sp-product-shell .sp-main { padding-top: 1.2rem; }
.sp-product-shell .btn-primary, .sp-product-shell .btn-cta { background: var(--store-a); border-color: var(--store-a); color: var(--store-on); border-radius: var(--sp-btn-r); }
.sp-product-shell .btn-primary:hover, .sp-product-shell .btn-cta:hover { background: var(--store-b); border-color: var(--store-b); color: var(--store-on); }
.sp-product-shell .buy-box, .sp-product-shell .seller-card { border-radius: var(--sp-card-r); }
.sp-product-shell a:not(.btn):not(.sp-nav-brand):not(.sp-nav-login):not(.sp-icon-btn) { color: var(--sp-link); }

/* --- Editor: miniaturas de diseño --- */
.ope-layouts .ope-tpl { gap: .45rem; }
.ope-lay-mini { display: grid; gap: 4px; height: 74px; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; padding: 6px; background: #F4F7FA; }
.ope-lay-mini i { display: block; border-radius: 3px; background: #c9d4e0; }
.ope-lay-comercio { grid-template-columns: repeat(4, 1fr); grid-template-rows: 22px 1fr 1fr; }
.ope-lay-comercio i:nth-child(1) { grid-column: 1 / -1; background: #082C4C; }
.ope-lay-comercio i:nth-child(2) { grid-column: 1 / 3; } .ope-lay-comercio i:nth-child(3) { grid-column: 3 / 5; }
.ope-lay-gastronomia { grid-template-columns: 1fr; grid-template-rows: 28px 1fr 1fr; }
.ope-lay-gastronomia i:nth-child(1) { background: #F47721; } .ope-lay-gastronomia i:nth-child(2), .ope-lay-gastronomia i:nth-child(3) { background: repeating-linear-gradient(90deg, #c9d4e0 0 60%, #FFB52E 60% 72%, #c9d4e0 72% 100%); }
.ope-lay-servicios { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; }
.ope-lay-servicios i:nth-child(1) { grid-row: 1 / 3; background: #c9d4e0; } .ope-lay-servicios i:nth-child(2) { background: #13B7C9; } .ope-lay-servicios i:nth-child(3) { background: #082C4C; }
.sp-menu-head .sp-search { flex: 0 0 auto; }
.sp-menu-side .btn { min-width: 96px; padding: .4rem 1rem; }
.sp-menu-side form { margin: 0; }

/* =====================================================================
   P17-I.4 · Catálogo, tarjetas y navegación de la One Page (todo bajo .sp: el marketplace no cambia)
   ===================================================================== */
/* Aviso «los N destacados están arriba» (V-07) */
.sp .sp-featured-note { font-size: .88rem; margin: 0 0 .8rem; color: var(--sp-muted, #5b6b7e); }
/* Al volver de una ficha (#p-<id>) la tarjeta queda bajo el encabezado y los filtros fijos, no tapada */
.sp [id^="p-"] { scroll-margin-top: 150px; }
.sp .sp-featured { scroll-margin-top: 80px; }

/* N-03 · en móvil la compra queda más cerca: promociones, destacados y categorías pasan a franjas horizontales (se conservan todas, se desliza con el dedo) */
@media (max-width: 767.98px) {
  .sp .sp-promo-list:has(> .sp-promo + .sp-promo) { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .sp .sp-promo-list:has(> .sp-promo + .sp-promo) > .sp-promo { flex: 0 0 88%; scroll-snap-align: start; }
  .sp .sp-promo-img { aspect-ratio: 4 / 1; }
  .sp .sp-promo-body { padding: .8rem; }
  .sp .sp-featured .row:has(> .col:nth-child(3)) { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .sp .sp-featured .row:has(> .col:nth-child(3)) > .col { flex: 0 0 46%; width: 46%; max-width: 46%; scroll-snap-align: start; }
  .sp .sp-cat-tiles:has(> .sp-cat-tile:nth-child(3)) { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .6rem; padding-bottom: .5rem; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .sp .sp-cat-tiles:has(> .sp-cat-tile:nth-child(3)) > .sp-cat-tile { flex: 0 0 38%; scroll-snap-align: start; }
}

/* V-14 · nombre y contador de categoría sobre la foto: banda semitransparente oscura (la foto no se altera); 8:1 sobre una foto blanca */
.sp .sp-cat-tile:not(.is-plain) span { background: rgba(8, 44, 76, .84); color: #fff; padding: .5rem .65rem; text-shadow: none; }
.sp .sp-cat-tile:not(.is-plain) span small { color: #fff; opacity: 1; font-size: .8rem; font-weight: 500; }

/* V-13 · carta: categorías con sus platos en columnas (se lee de arriba abajo, no en zigzag), lado derecho de ancho fijo y botones iguales */
.sp .sp-menu-list { display: block; }
.sp .sp-menu-group { margin: 0; }
.sp .sp-menu-group .sp-menu-cat { margin-top: 1.4rem; }
.sp .sp-menu-items { display: block; }
@media (min-width: 992px) {
  .sp .sp-menu-items { column-count: 2; column-gap: 2.5rem; }
  .sp .sp-menu-items > .sp-menu-item { break-inside: avoid; }
}
.sp .sp-menu-item { grid-template-columns: 84px minmax(0, 1fr) 8rem; margin: 0; }
.sp .sp-menu-body { min-width: 0; }
.sp .sp-menu-body h4, .sp .sp-menu-body p { overflow-wrap: anywhere; }
.sp .sp-menu-side { width: 8rem; align-items: stretch; text-align: right; }
.sp .sp-menu-price { text-align: right; overflow-wrap: anywhere; }
.sp .sp-menu-side .btn, .sp .sp-menu-side form .btn { width: 100%; min-width: 0; justify-content: center; }
.sp .sp-menu-sold { display: block; text-align: center; border-radius: 12px; padding: .25rem .5rem; line-height: 1.25; letter-spacing: .02em; }
@media (min-width: 576px) { .sp .sp-menu-item { grid-template-columns: 112px minmax(0, 1fr) 8rem; } }
@media (min-width: 992px) { .sp .sp-menu-item { grid-template-columns: 96px minmax(0, 1fr) 7.5rem; } .sp .sp-menu-side { width: 7.5rem; } }
@media (max-width: 575.98px) {
  .sp .sp-menu-item { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img body" "side side"; row-gap: .5rem; }
  .sp .sp-menu-item > .sp-menu-img { grid-area: img; }
  .sp .sp-menu-item > .sp-menu-body { grid-area: body; }
  .sp .sp-menu-item > .sp-menu-side { grid-area: side; width: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: .8rem; text-align: left; }
  .sp .sp-menu-side .btn, .sp .sp-menu-side form { flex: 0 0 8rem; width: 8rem; }
  .sp .sp-menu-sold { flex: 0 0 8rem; width: 8rem; }
  .sp .sp-menu-price { text-align: left; }
}

/* V-18 / N-02 · ficha dentro de la tienda: regreso claro y ruta propia (sin migas del marketplace) */
.sp-crumbs { display: flex; flex-direction: column; gap: .15rem; margin: 0 0 1rem; }
.sp-crumbs .sp-back { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; min-height: 44px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.sp-crumbs .sp-back:hover { text-decoration: underline; }
.sp-crumbs .sp-back small { font-weight: 500; color: var(--sp-muted, #5b6b7e); }
.sp-crumb-trail { font-size: .85rem; color: var(--sp-muted, #5b6b7e); overflow-wrap: anywhere; }
.sp-crumb-trail a { text-decoration: none; }
.sp-crumb-trail a:hover { text-decoration: underline; }
.sp-crumb-trail .current { color: var(--sp-text); font-weight: 600; }
/* Tarjetas de destacados: misma altura en la franja y precio anterior que baja de línea en vez de salirse de la tarjeta */
.sp .sp-featured .col > .product-card { height: 100%; }
.sp .sp-featured .col > .product-card > a.text-decoration-none { display: block; height: 100%; }
.sp .product-card .body .d-flex { flex-wrap: wrap; }
.sp .sp-promo { align-content: start; }
@media (max-width: 767.98px) { .sp .sp-cat-tile:not(.is-plain) span { padding: .4rem .55rem; } }
/* Ficha dentro de la tienda: un nombre largo sin espacios se parte en vez de empujar el botón de favorito fuera de la pantalla */
.sp-product-shell .pg-title { min-width: 0; overflow-wrap: anywhere; }
/* Un único regreso claro: el enlace del encabezado repetía el de la ruta de la ficha (queda en el HTML para lectores de pantalla y pruebas, solo se oculta a la vista) */
.sp-product-shell #back-to-catalog { display: none; }
/* Producto sin foto dentro de la One Page: «Foto no disponible» con contraste AA (antes #8c9bb0 sobre #EEF2F6 ≈ 2,6:1; ahora ≈ 4,9:1). El marketplace no cambia. */
.sp .product-card .thumb-placeholder { color: #5B6B7E; }

/* =====================================================================
   P17-I.5 · Resumen flotante del pedido/carrito en la One Page (el carrito real; no es una copia)
   ===================================================================== */
.sp-sum { position: fixed; left: 0; right: 0; bottom: calc(var(--sp-sum-lift, 0px) + 8px + env(safe-area-inset-bottom, 0px)); z-index: 1020; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 0 .6rem; pointer-events: none; }
.sp-sum > * { pointer-events: auto; }
.sp-sum-bar { display: flex; align-items: center; gap: .6rem; width: 100%; max-width: 560px; min-height: 52px; padding: .4rem .5rem .4rem .8rem; background: var(--sp-surface, #fff); color: var(--sp-text, #1f2937); border: 1px solid rgba(127,127,127,.35); border-radius: 14px; box-shadow: 0 6px 22px rgba(0,0,0,.22); }
.sp-sum-bar[hidden], .sp-sum-toast[hidden] { display: none; }
.sp-sum-ico { color: var(--store-a); font-size: 1.25rem; line-height: 1; display: inline-flex; }
.sp-sum-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: .8rem; }
.sp-sum-txt strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sum-txt #sp-sum-total { font-weight: 800; font-size: .95rem; }
.sp-sum-warn { color: #9A3412; font-weight: 600; font-size: .75rem; }
.sp-sum-warn[hidden] { display: none; }
.sp-sum-go { flex: 0 0 auto; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.sp-sum-x { flex: 0 0 auto; min-width: 40px; min-height: 40px; border: 0; background: transparent; color: inherit; border-radius: 10px; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.sp-sum-x:hover, .sp-sum-x:focus-visible { background: rgba(127,127,127,.18); }
.sp-sum-xt { display: none; font-size: .78rem; font-weight: 600; }
.sp-sum-toast { max-width: 560px; width: 100%; padding: .55rem .8rem; border-radius: 12px; background: #14532D; color: #fff; font-size: .85rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.sp-sum-toast.is-bad { background: #7F1D1D; }
.quick-add-btn.is-added, .sp-menu-body ~ .sp-menu-side .btn.is-added { outline: 3px solid #16A34A; outline-offset: 1px; }
@media (min-width: 768px) {
  .sp-sum { left: auto; right: 1.25rem; align-items: flex-end; padding: 0; }
  .sp-sum-bar { width: 380px; max-width: 380px; }
  .sp-sum-xt { display: inline; } .sp-sum-xi { display: none; } .sp-sum-x { padding: 0 .6rem; }
}
@media (max-width: 359.98px) { .sp-sum-go { padding-left: .55rem; padding-right: .55rem; font-size: .8rem; } }
@media (prefers-reduced-motion: no-preference) { .sp-sum-bar:not([hidden]), .sp-sum-toast:not([hidden]) { animation: sp-sum-in .2s ease-out; } }
@keyframes sp-sum-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* =====================================================================
   P17-I.5 · Catálogo amplio en la One Page: cuadrícula de 4 columnas en escritorio (antes 5-6, que dejaba filas incompletas y tarjetas muy estrechas)
   y categorías compactas cuando hay muchas (más de 8) para que no empujen el catálogo fuera de la pantalla.
   ===================================================================== */
@media (min-width: 1200px) {
  .sp .row.row-cols-xl-5 > *, .sp .row.row-cols-xxl-6 > * { flex: 0 0 auto; width: 25%; }
}
@media (min-width: 1100px) {
  .sp .sp-cat-tiles:has(> .sp-cat-tile:nth-child(9)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .sp .sp-cat-tiles:has(> .sp-cat-tile:nth-child(9)) .sp-cat-tile:not(.is-plain) span { font-size: .8rem; padding: .4rem .55rem; }
}
/* P17-I.5 · tarjetas de una misma fila con la misma altura (el precio anterior tachado que baja de línea ya no deja una tarjeta más corta) */
.sp .row.row-cols-2 > .col > .product-card, .sp .row.row-cols-2 > .col > .product-card > a.text-decoration-none { display: block; height: 100%; }

@media (min-width:768px){ .sp-sum-txt strong { white-space: normal; overflow: visible; } }

/* P17-I.5.1 · catálogo con pocos productos: la fila incompleta (1–3 tarjetas) se centra en lugar de quedar pegada a la izquierda con un hueco a la derecha.
   Las rejillas con 4 o más tarjetas no cambian (la última fila de un catálogo grande sigue alineada a la izquierda). */
@media (min-width: 768px) {
  .sp .row.row-cols-2:not(:has(> :nth-child(4))) { justify-content: center; }
}

/* =====================================================================
   P17-I.5.4 · One Page: distribución real según la cantidad de productos, bloque de información integrado, espacios y editor.
   Sustituye al bloque de P17-I.5.3 (se eliminó `.sp-info{align-items:stretch}`, que estiraba «Sobre el negocio» hasta la altura de «Contacto»).
   Todo cuelga de `.sp` (vitrina de tienda): el marketplace general no cambia.
   ===================================================================== */

/* ---- 1. Rejilla de 1–4 productos (CSS grid; las clases sp-fewgrid sp-nN las emite product-grid.php solo con $hideStore) ---- */
.sp .row.sp-fewgrid { display: grid; gap: .85rem; margin: 0; justify-content: center; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp .row.sp-fewgrid > * { width: auto; max-width: none; flex: none; padding: 0; margin: 0; }
.sp .sp-fewgrid .product-card, .sp .sp-fewgrid .product-card > a:not(.fav-heart), .sp .sp-fewgrid .product-card .card { height: 100%; }   /* no el corazón (a.fav-heart) */
.sp .sp-fewgrid.sp-n1 { grid-template-columns: minmax(0, 340px); }
@media (max-width: 767.98px) {
  /* 3 productos en 2 columnas: la tercera tarjeta centrada, del mismo ancho que las otras */
  .sp .sp-fewgrid.sp-n3 > :nth-child(3) { grid-column: 1 / -1; justify-self: center; width: calc(50% - .425rem); }
}
@media (min-width: 576px) { .sp .row.sp-fewgrid { gap: 1.25rem; } .sp .sp-fewgrid.sp-n1 { grid-template-columns: minmax(0, 380px); } .sp .sp-fewgrid.sp-n2 { max-width: 760px; margin-inline: auto; } }
@media (min-width: 768px) {
  .sp .sp-fewgrid.sp-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 1 producto: tarjeta «vitrina» horizontal (imagen grande + nombre, precio y botón) */
  .sp .sp-fewgrid.sp-n1 { grid-template-columns: minmax(0, 820px); }
}
@media (min-width: 992px) {
  .sp .sp-fewgrid.sp-n2 { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp .sp-fewgrid.sp-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* tarjeta horizontal: 1 producto (≥768) y 2 productos (≥992) */
@media (min-width: 768px) {
  .sp .sp-fewgrid.sp-n1 .product-card .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sp .sp-fewgrid.sp-n1 .product-card .thumb { aspect-ratio: auto; min-height: 360px; height: 100%; }
  .sp .sp-fewgrid.sp-n1 .product-card .body { display: flex; flex-direction: column; justify-content: center; padding: 1.75rem 3.25rem 1.75rem 1.75rem; gap: .35rem; }
  .sp .sp-fewgrid.sp-n1 .product-card .name { font-size: 1.4rem; line-height: 1.25; }
  .sp .sp-fewgrid.sp-n1 .product-card .price { font-size: 1.65rem; }
  .sp .sp-fewgrid.sp-n1 .product-card .card-cta { font-size: 1rem; margin-top: .75rem; }
}
@media (min-width: 992px) {
  .sp .sp-fewgrid.sp-n2 .product-card .card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .sp .sp-fewgrid.sp-n2 .product-card .thumb { aspect-ratio: auto; min-height: 300px; height: 100%; }
  .sp .sp-fewgrid.sp-n2 .product-card .body { display: flex; flex-direction: column; justify-content: center; padding: 1.25rem 3rem 1.25rem 1.4rem; gap: .3rem; }
  .sp .sp-fewgrid.sp-n2 .product-card .name { font-size: 1.15rem; line-height: 1.25; }
  .sp .sp-fewgrid.sp-n2 .product-card .price { font-size: 1.4rem; }
  .sp .sp-fewgrid.sp-n2 .product-card .card-cta { margin-top: .6rem; }
}
.sp .sp-fewgrid .product-card .body > * { margin-top: 0; margin-bottom: 0; }
.sp .sp-fewgrid .product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
/* precio y precio anterior: si no caben en una línea, el anterior pasa abajo sin romper la tarjeta */
.sp .product-card .price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .5rem; row-gap: 0; }

/* ---- 2. «Sobre el negocio» + «Contacto»: un solo panel integrado, cada columna con la altura de su contenido ---- */
.sp .sp-info:not(.sp-info-one) { gap: 0; align-items: start; background: var(--sp-surface); border: var(--sp-card-border); border-radius: var(--sp-card-r); box-shadow: var(--sp-card-shadow); overflow: hidden; }
.sp .sp-info:not(.sp-info-one) > .sp-about, .sp .sp-info:not(.sp-info-one) > .sp-contact { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 1.35rem 1.5rem; }
.sp .sp-info:not(.sp-info-one) > * + * { border-top: 1px solid rgba(127,127,127,.25); }
@media (min-width: 900px) {
  .sp .sp-info:not(.sp-info-one) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .sp .sp-info:not(.sp-info-one) > * + * { border-top: 0; border-left: 1px solid rgba(127,127,127,.25); }
}
.sp-tpl-artesanal .sp-info:not(.sp-info-one) { border-top: 4px solid var(--sp-secondary); }
.sp-tpl-artesanal .sp-info:not(.sp-info-one) > .sp-about, .sp-tpl-artesanal .sp-info:not(.sp-info-one) > .sp-contact { border-top: 0; }
/* contacto en rejilla: los datos se reparten en columnas en lugar de una lista larga */
.sp .sp-contact ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem 1.25rem; }
@media (max-width: 575.98px) { .sp .sp-info:not(.sp-info-one) > .sp-about, .sp .sp-info:not(.sp-info-one) > .sp-contact { padding: 1.1rem; } .sp .sp-contact li { gap: .5rem; } }
.sp .sp-contact li > span { min-width: 0; }
.sp .sp-about p:last-child { margin-bottom: 0; }

/* ---- 3. Espacios verticales más compactos ---- */
.sp { --sp-gap: 2.25rem; }
.sp.sp-tpl-elegante { --sp-gap: 2.75rem; }
.sp.sp-tpl-artesanal { --sp-gap: 2.5rem; }
.sp.sp-few { --sp-gap: 1.75rem; }
.sp .sp-main { padding-bottom: .5rem; }
.sp .sp-foot { margin-top: 2.25rem; }
.sp.sp-few .sp-foot { margin-top: 1.75rem; }
.sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) { min-height: clamp(260px, 30vw, 360px); }
.sp.sp-few .sp-main > section:first-child { margin-top: 1.5rem; }

/* ---- 4. Gastronomía con pocos platos: una columna centrada ---- */
@media (min-width: 992px) { .sp .sp-menu-list.sp-menu-few .sp-menu-items { column-count: 1; } }
.sp .sp-menu-list.sp-menu-few { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---- 5. Editor (vista previa): barra compacta en ventanas estrechas ---- */
@media (max-width: 760px) { .ope-pv-top .ope-pv-note { display: none; } .ope-pv-top { gap: .4rem; padding: .45rem .6rem; } }

/* =====================================================================
   P17-I.6.1 · Acabado: botones de la portada (Ver productos / WhatsApp / Llamar), portada móvil compacta, pie sin repeticiones, tarjetas de tableta.
   ===================================================================== */
/* ---- Botones de la portada ---- */
.sp .sp-hero-actions { gap: .6rem; }
.sp .sp-hero-actions .btn { min-height: 48px; padding: 0 1.2rem; white-space: nowrap; }
.sp .sp-hero-actions .btn .mm-icon { flex: none; }
.sp .sp-hero-call { display: inline-flex; }            /* ahora también en escritorio: tres acciones principales (solo con teléfono válido; en gastronomía lo ofrece la franja de datos) */
@media (max-width: 575.98px) {
  .sp .sp-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .sp .sp-hero-actions .btn { width: 100%; min-height: 44px; padding: 0 .5rem; font-size: .95rem; white-space: normal; line-height: 1.15; }
  .sp .sp-hero-actions .sp-btn-brand { grid-column: 1 / -1; }
  .sp .sp-hero-actions > .btn:nth-child(2):last-child { grid-column: 1 / -1; }   /* solo «Ver productos» + una acción: esa ocupa todo el ancho */
  .sp .sp-lbl-more { display: none; }                  /* «WhatsApp» (el nombre accesible sigue siendo «Escribir por WhatsApp a …») */
}
/* ---- Portada en móvil (tiendas pequeñas): franja con la foto COMPLETA (los zapatos no se recortan), el nombre sobre la foto y los botones debajo, sobre fondo claro ---- */
@media (max-width: 575.98px) {
  .sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) { display: block; min-height: 0; background: var(--sp-bg); overflow: hidden; }
  .sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media { position: relative; inset: auto; height: calc(100vw / 3.2); }
  .sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-body { padding-top: .75rem; padding-bottom: .9rem; position: relative; }
  .sp.sp-few .sp-hero .sp-chips, .sp.sp-few .sp-hero-text { display: none; }       /* municipio y categoría ya van en «Contacto» */
  .sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-card h1 { position: absolute; left: 16px; right: 16px; bottom: calc(100% + .55rem); margin: 0; font-size: 1.45rem; line-height: 1.12; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .65); }
  .sp-hero-media img[src*="portada_sin_texto"] { object-position: 82% 50%; }
}
/* ---- Tarjetas bajas en tableta (2 productos en 2 columnas) ---- */
@media (min-width: 576px) and (max-width: 991.98px) { .sp .sp-fewgrid.sp-n2 .product-card .thumb { aspect-ratio: 5 / 4; } }
/* ---- Pie: dos columnas en escritorio, sin repeticiones ---- */
.sp .sp-foot { padding-top: 1.4rem; }
.sp .sp-foot-in { gap: .5rem; }
@media (min-width: 768px) {
  .sp .sp-foot-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id links" "note platform"; column-gap: 2rem; align-items: center; }
  .sp .sp-foot-id { grid-area: id; } .sp .sp-foot-links { grid-area: links; justify-content: flex-end; }
  .sp .sp-foot-note { grid-area: note; } .sp .sp-foot-platform { grid-area: platform; justify-content: flex-end; }
}
.sp .sp-foot-links a .mm-icon { margin-right: .3rem; }

/* P17-I.6.2 · en la vista previa del propietario el encabezado NO es fijo (static): no hace falta reservar 80 px arriba del destino de «Ver productos» */
.sp-is-preview section[id], .sp-is-preview .sp-hero, .sp-is-preview section.sp-catalog, .sp-is-preview section.sp-menu, .sp-is-preview .sp-featured { scroll-margin-top: 12px; }

/* =====================================================================================================================================================
   P17-I.7 · Contraste y coherencia de la One Page. Cada regla corrige un defecto medido (ver INFORME_P17I7.md): textos con colores fijos que no seguían
   el tema (fondos oscuros/de color), atenuación por opacidad en el pie, marcadores de campo fijos, foco invisible en botones y portada móvil.
   ===================================================================================================================================================== */
.sp .sp-about h2, .sp .sp-contact h2, .sp .sp-catalog-head h2, .sp .sp-extra-title, .sp .sp-promos h2, .sp .sp-featured h2, .sp .sp-gallery h2, .sp .sp-promo-body h3 { color: var(--sp-text); }
.sp .sp-about p, .sp .sp-contact li span, .sp .sp-contact a, .sp .sp-promo-items a { color: var(--sp-text); }
.sp .sp-contact li strong, .sp .sp-tagline { color: var(--sp-muted); }
.sp .text-muted { color: var(--sp-muted) !important; }
.sp input::placeholder, .sp textarea::placeholder { color: var(--sp-muted); opacity: 1; }
.sp .sp-chip:not(.sp-chip-brand) { background: rgba(127,127,127,.16); color: var(--sp-text); }
.sp .sp-hero:not(.sp-hero-dividido):not(.sp-hero-plain) .sp-chip:not(.sp-chip-brand) { background: rgba(255,255,255,.92); color: #0B2545; }
.sp .sp-foot-note, .sp .sp-foot-platform { opacity: 1; color: var(--sp-muted); }   /* antes opacity:.75 (3,9:1 sobre fondos de color) */
/* Foco de teclado visible (WCAG 2.4.7/2.4.11): contorno del color del texto + separación del color de fondo; sobre la foto de la portada, blanco con halo oscuro */
.sp a:focus-visible, .sp button:focus-visible, .sp .btn:focus-visible, .sp input:focus-visible, .sp select:focus-visible, .sp textarea:focus-visible, .sp summary:focus-visible, .sp [tabindex]:focus-visible {
  outline: 3px solid var(--sp-text); outline-offset: 3px; box-shadow: 0 0 0 3px var(--sp-bg);
}
.sp .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-body :focus-visible { outline-color: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.7); }
/* Portada móvil de tiendas pequeñas: refuerzo del degradado bajo el nombre (peor píxel bajo el título: 2,7:1 → ≥3:1) */
@media (max-width: 575.98px) {
  .sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.12) 100%); }
}
/* Textos auxiliares que se atenuaban con opacity (no garantiza contraste): ahora color calculado (--sp-muted ≥4,6:1 sobre fondo y tarjetas) */
.sp .sp-hero-sub { opacity: 1; }
.sp .sp-svc-price small, .sp .sp-map-note, .sp .sp-cat-tile.is-plain span small { opacity: 1; color: var(--sp-muted); }
/* Texto sobre la foto de la portada: el degradado se refuerza en la zona del título (peor 5 % de píxeles bajo el nombre: 2,6–2,8:1 → ≥3:1) */
.sp .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.56) 55%, rgba(0,0,0,.18) 100%); }
.sp.sp-tpl-artesanal .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(40,22,10,.84) 0%, rgba(40,22,10,.58) 55%, rgba(40,22,10,.2) 100%); }
.sp.sp-lay-gastronomia .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(45,20,8,.84) 0%, rgba(45,20,8,.6) 60%, rgba(45,20,8,.4) 100%); }
@media (max-width: 575.98px) { .sp.sp-few .sp-hero-superpuesto:not(.sp-hero-plain) .sp-hero-media::after { background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.12) 100%); } }

/* ============================================================================================================
   P17-J.1 · Calificaciones públicas de la tienda. Colores siempre desde las variables del tema (contraste P17-I.7).
   ============================================================================================================ */
.sp .sp-reviews { padding: 1.75rem 0 1rem; }
.sp .sp-reviews h2 { font-size: 1.25rem; margin: 0 0 .6rem; color: var(--sp-text); }
.sp .sp-reviews p, .sp .sp-reviews .review-item, .sp .sp-reviews strong { color: var(--sp-text); }
.sp .sp-reviews .sp-reviews-empty, .sp .sp-reviews .review-item .small:not(strong) { color: var(--sp-muted); }
.sp .sp-reviews .review-item { border-top: 1px solid rgba(127,127,127,.28); padding: .65rem 0; }
.sp .sp-reviews .star-on { color: var(--sp-link); }
.sp .sp-reviews .star-off { color: rgba(127,127,127,.55); }
