/* 
  COOPIMAPS BY COOPIDROGAS - Sistema de Diseño Oficial Excelente
  Diseño Premium con Scrollbar Personalizado y Tarjetas sin Apeñuzcar.
*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta de Colores Oficial Coopidrogas */
  --navbar-bg: #001F5C;           /* Azul Profundo Institucional */
  --navbar-text: #FFFFFF;         /* Blanco Nieve */
  --coop-blue-dark: #0A192F;      /* Fondo General Oscuro */
  --coop-blue-card: #002855;      /* Tarjetas de Droguería */
  --coop-blue-border: #1E3A66;    /* Bordes sutiles */
  --coop-orange: #0077C8;         /* Azul Brillante de Acción */
  --coop-orange-light: #38BDF8;   /* Azul Celeste Acento */
  --coop-yellow: #FFB700;         /* Amarillo Sol Coopidrogas */
  --search-input-bg: #00173D;     /* Fondo Caja de Búsqueda */
  
  /* Indicadores de Estado */
  --primary-green: #10B981;       /* Verde Stock "¡Aquí hay!" */
  --primary-green-light: #34D399;
  --danger: #E30613;              /* Rojo Institucional "Agotado" */
  
  /* Colores de Texto */
  --text-main: #FFFFFF;           /* Texto Principal */
  --text-muted: #94A3B8;          /* Texto Secundario */
  --font-family: 'Montserrat', 'Plus Jakarta Sans', sans-serif;
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-glow-blue: 0 0 20px rgba(0, 119, 200, 0.4);
  --shadow-glow-yellow: 0 0 20px rgba(255, 183, 0, 0.4);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--coop-blue-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* NAVBAR HEADER SUPERIOR OFICIAL COOPIDROGAS */
.navbar {
  height: 76px;
  background-color: var(--navbar-bg) !important;
  border-bottom: 3px solid var(--coop-yellow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-shrink: 0;
  color: var(--navbar-text) !important;
  box-shadow: 0 4px 20px rgba(0, 31, 92, 0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.coopidrogas-main-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  background: #FFFFFF;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
  display: block;
}

.brand-title-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF !important;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-title span {
  color: var(--coop-yellow) !important;
  font-weight: 500;
}

.brand-subtitle {
  font-size: 10.5px;
  color: #94A3B8;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.brand-tag {
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 183, 0, 0.15);
  color: var(--coop-yellow);
  border: 1px solid var(--coop-yellow);
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--coop-blue-border);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--coop-yellow);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--coop-orange), #004D99);
  border: 1px solid rgba(255,255,255,0.2);
  color: #FFF;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-glow-blue);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* LAYOUT MAIN APP */
.app-container {
  display: flex;
  flex: 1;
  width: 100%;
  height: calc(100vh - 76px);
  position: relative;
  overflow: hidden;
}

/* SIDEBAR SEARCH & LIST CON SCROLLBAR ELEGANTE Y CARDS SIN APENUZCAR */
.sidebar {
  width: 440px;
  background-color: var(--coop-blue-dark) !important;
  border-right: 1px solid var(--coop-blue-border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
}

.search-box-container {
  padding: 18px;
  background-color: var(--navbar-bg) !important;
  border-bottom: 1px solid var(--coop-blue-border);
  flex-shrink: 0;
}

.search-input-group {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--coop-yellow);
  font-size: 18px;
}

.search-input {
  width: 100%;
  background-color: var(--search-input-bg) !important;
  border: 2px solid var(--coop-blue-border);
  border-radius: var(--radius-md);
  padding: 13px 40px 13px 44px;
  color: var(--text-main) !important;
  font-size: 14.5px;
  font-family: var(--font-family);
  font-weight: 500;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--coop-yellow);
  box-shadow: var(--shadow-glow-yellow);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: none;
}

.stores-list-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: var(--text-muted) !important;
  font-weight: 600;
  flex-shrink: 0;
  background-color: var(--coop-blue-dark);
}

/* LISTADO DE TIENDAS CON SCROLL Y SIN DEFORMACIÓN DE TARJETAS */
.stores-list {
  flex: 1;
  overflow-y: auto !important;
  padding: 16px;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ESTILO DE SCROLLBAR ELEGANTE Y FLUIDO */
.stores-list::-webkit-scrollbar {
  width: 7px;
}

.stores-list::-webkit-scrollbar-track {
  background: rgba(0, 23, 61, 0.6);
  border-radius: 10px;
}

.stores-list::-webkit-scrollbar-thumb {
  background: var(--coop-orange);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
}

.stores-list::-webkit-scrollbar-thumb:hover {
  background: var(--coop-yellow);
}

/* TARJETAS DE DROGUERÍA (TAMAÑO PERFECTO Y FLEX-SHRINK DESACTIVADO) */
.store-card {
  background-color: var(--coop-blue-card) !important;
  border: 1px solid var(--coop-blue-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0 !important;
  width: 100%;
}

.store-card:hover {
  border-color: var(--coop-yellow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.store-card.active {
  border-color: var(--coop-yellow);
  background: linear-gradient(180deg, rgba(255, 183, 0, 0.12) 0%, var(--coop-blue-card) 100%) !important;
  box-shadow: var(--shadow-glow-yellow);
}

.store-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.store-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: contain !important;
  border: 2px solid var(--coop-yellow);
  background: #FFFFFF !important;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.store-info {
  flex: 1;
}

.store-name {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main) !important;
  margin-bottom: 4px;
  line-height: 1.3;
}

.store-address {
  font-size: 12.5px;
  color: var(--text-muted) !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.store-distance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--coop-yellow) !important;
  background: rgba(255, 183, 0, 0.14);
  padding: 3px 9px;
  border-radius: 6px;
  margin-top: 6px;
}

/* STOCK BADGES */
.stock-badge-container {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
}

.stock-badge-container.has-stock {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--primary-green-light) !important;
}

.stock-badge-container.no-stock {
  background: rgba(227, 6, 19, 0.15);
  border: 1px solid rgba(227, 6, 19, 0.4);
  color: #FCA5A5 !important;
}

.stock-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.has-stock .status-dot {
  background: var(--primary-green) !important;
  box-shadow: 0 0 10px var(--primary-green);
  animation: pulse 2s infinite;
}

.no-stock .status-dot {
  background: var(--danger);
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.product-matched-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.product-matched-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main) !important;
}

.product-matched-qty {
  font-size: 11px;
  color: var(--text-muted) !important;
}

.store-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-qr-link {
  flex: 1;
  background: linear-gradient(135deg, rgba(0, 119, 200, 0.3), rgba(255, 183, 0, 0.2));
  border: 1px solid var(--coop-orange);
  color: var(--coop-yellow) !important;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-qr-link:hover {
  background: var(--coop-orange) !important;
  color: #FFF !important;
}

/* MAP WRAPPER & BARRA FLOTANTE DE CATEGORÍAS */
.map-wrapper {
  flex: 1;
  height: 100%;
  width: 100%;
  position: relative;
  background: #070D18;
}

#map {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.map-category-bar {
  position: absolute !important;
  top: 16px !important;
  left: 20px !important;
  right: 80px !important;
  z-index: 2000 !important;
  background-color: rgba(0, 31, 92, 0.92) !important;
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--coop-blue-border);
  border-radius: 30px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.chip-arrow-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  background-color: var(--coop-yellow) !important;
  color: #001F5C !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.2s ease !important;
  z-index: 10;
  font-size: 13px !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

.chip-arrow-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: scroll !important;
  scroll-behavior: smooth;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  flex: 1;
  padding: 2px 0;
}

.filter-chips::-webkit-scrollbar {
  display: none !important;
}

.chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--coop-blue-border);
  color: var(--text-main) !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chip.active {
  background: var(--coop-yellow) !important;
  border-color: var(--coop-yellow) !important;
  color: #001F5C !important;
  box-shadow: var(--shadow-glow-yellow);
}

/* MAP OVERLAY FLOATING CONTROLS */
.map-floating-controls {
  position: absolute;
  top: 70px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  width: 44px;
  height: 44px;
  background-color: var(--coop-blue-card) !important;
  border: 1px solid var(--coop-blue-border);
  border-radius: var(--radius-md);
  color: #FFF;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.map-control-btn:hover {
  background-color: var(--coop-blue-border) !important;
  color: var(--coop-yellow) !important;
}

/* MARKER CLUSTER ESTILO COOPIDROGAS (HLOD / CLUSTERING 60 FPS) */
.marker-cluster-small {
  background-color: rgba(0, 119, 200, 0.6) !important;
}
.marker-cluster-small div {
  background-color: var(--coop-orange) !important;
  color: #FFF !important;
  font-weight: 800 !important;
  font-family: var(--font-family) !important;
}

.marker-cluster-medium {
  background-color: rgba(255, 183, 0, 0.6) !important;
}
.marker-cluster-medium div {
  background-color: var(--coop-yellow) !important;
  color: #001F5C !important;
  font-weight: 900 !important;
  font-family: var(--font-family) !important;
}

.marker-cluster-large {
  background-color: rgba(0, 31, 92, 0.85) !important;
}
.marker-cluster-large div {
  background-color: #001F5C !important;
  color: #FFB700 !important;
  font-weight: 900 !important;
  font-family: var(--font-family) !important;
  border: 2px solid #FFB700 !important;
}

/* LEAFLET CUSTOM POPUP & MARKER STYLES */
.leaflet-popup-content-wrapper {
  background-color: var(--navbar-bg) !important;
  color: #FFF !important;
  border: 1px solid var(--coop-blue-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 4px !important;
  box-shadow: var(--shadow-card) !important;
}

.leaflet-popup-tip {
  background-color: var(--navbar-bg) !important;
  border: 1px solid var(--coop-blue-border) !important;
}

.popup-card {
  padding: 12px;
  max-width: 280px;
}

.popup-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 4px;
}

.popup-addr {
  font-size: 12px;
  color: var(--text-muted) !important;
  margin-bottom: 10px;
}

/* ADMIN PANEL STYLES */
.admin-container {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 24px;
  flex: 1;
}

.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--coop-blue-border);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1050px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background-color: var(--coop-blue-card) !important;
  border: 1px solid var(--coop-blue-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.panel-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--coop-yellow) !important;
}

.admin-store-card {
  background-color: var(--navbar-bg) !important;
  border: 1px solid var(--coop-blue-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.admin-store-card:hover {
  border-color: var(--coop-yellow);
  box-shadow: var(--shadow-card);
}

.admin-store-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.admin-store-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: contain !important;
  border: 2px solid var(--coop-yellow);
  background: #FFF;
  padding: 3px;
  flex-shrink: 0;
}

.admin-store-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main) !important;
  margin-bottom: 6px;
  line-height: 1.3;
}

.admin-store-detail-item {
  font-size: 13.5px;
  color: var(--text-muted) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  word-break: break-all;
}

.admin-catalog-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted) !important;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background-color: var(--coop-blue-dark) !important;
  border: 1px solid var(--coop-blue-border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text-main) !important;
  font-size: 14.5px;
  font-family: var(--font-family);
  font-weight: 500;
}

.form-control:focus {
  outline: none;
  border-color: var(--coop-yellow);
  box-shadow: var(--shadow-glow-yellow);
}

#picker-map {
  height: 240px;
  border-radius: var(--radius-md);
  border: 1px solid var(--coop-blue-border);
  margin-top: 10px;
}

/* LOGIN MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 31, 92, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.modal-box {
  background-color: var(--coop-blue-card) !important;
  border: 1.5px solid var(--coop-blue-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

/* RESPONSIVE MOBILE TABS */
.mobile-tabs {
  display: none;
  background-color: var(--navbar-bg) !important;
  border-top: 3px solid var(--coop-yellow);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 2500;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 880px) {
  .navbar {
    padding: 0 14px;
    height: 68px;
  }
  
  .brand-title {
    font-size: 15px;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-tag {
    display: none;
  }

  .coopidrogas-main-logo {
    max-height: 38px;
    padding: 3px 8px;
  }

  .app-container {
    height: calc(100vh - 128px);
    position: relative;
    overflow: hidden;
  }

  .map-category-bar {
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    padding: 4px 8px !important;
    z-index: 2000 !important;
  }
  
  .sidebar {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    display: flex !important;
  }

  .map-wrapper {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: block !important;
  }

  .app-container.show-map .sidebar {
    display: none !important;
  }

  .app-container.show-map .map-wrapper {
    z-index: 100 !important;
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
  }

  .mobile-tabs {
    display: flex;
  }

  .mobile-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted) !important;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
  }

  .mobile-tab-btn.active {
    color: var(--coop-yellow) !important;
    border-top: 3px solid var(--coop-yellow);
    background: rgba(255, 183, 0, 0.12);
  }
}


/* ============================================================================
   EXTENSIÓN TIEMPO REAL QRCOLOMBIA × COOPIMAPS (Canasta, Handoff, IA & Switch)
   ============================================================================ */

[hidden] {
  display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.copimaps-search-form {
  position: relative;
}

.search-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.search-input-row .search-input-group {
  flex: 1;
  min-width: 0;
}

/* Ocultar el botón X nativo de <input type="search"> cuando usamos nuestro botón accesible */
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.btn-add-basket {
  background: rgba(255, 183, 0, 0.16);
  border: 1.5px solid var(--coop-yellow);
  color: var(--coop-yellow);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-add-basket:hover {
  background: var(--coop-yellow);
  color: #001F5C;
}

/* AUTOCOMPLETADO EN VIVO */
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #04132C;
  border: 1.5px solid var(--coop-yellow);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.65);
  z-index: 2500;
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
}

.suggestion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.suggestion-row:last-child {
  border-bottom: none;
}

.suggestion-row:hover {
  background: rgba(0, 119, 200, 0.22);
}

.suggestion-main-btn {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-family);
  padding: 0;
}

.suggestion-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  display: block;
}

.suggestion-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.suggestion-price-tag {
  color: var(--primary-green-light);
  font-weight: 800;
}

.suggestion-add-btn {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: var(--primary-green-light);
  border-radius: 8px;
  padding: 6px 9px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.suggestion-add-btn:hover {
  background: var(--primary-green);
  color: #022C22;
}

/* MI CANASTA COMPARADORA */
.basket-panel {
  margin-top: 12px;
  background: rgba(0, 23, 61, 0.85);
  border: 1px solid rgba(255, 183, 0, 0.45);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.basket-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.basket-panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--coop-yellow);
}

.basket-count-pill {
  background: var(--coop-yellow);
  color: #001F5C;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 900;
}

.basket-clear-btn {
  background: none;
  border: none;
  color: #FCA5A5;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.basket-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.basket-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.basket-item-label {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #FFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basket-item-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.basket-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--coop-blue-border);
  background: var(--coop-blue-card);
  color: #FFF;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.basket-qty-val {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  color: var(--coop-yellow);
}

.basket-rm-btn {
  background: none;
  border: none;
  color: #FCA5A5;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
}

/* BARRA DE ORDENAMIENTO */
.compare-sort-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.sort-pills-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.sort-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--coop-blue-border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-pill.active {
  background: var(--coop-yellow);
  border-color: var(--coop-yellow);
  color: #001F5C;
  font-weight: 800;
}

.api-latency-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--primary-green-light);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
}

/* CINTILLO SEDE POS EN VIVO Y DETALLE DE CANASTA EN TARJETAS */
.store-card.is-live-store {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}

.live-pos-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.live-pos-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #022C22;
  background: linear-gradient(135deg, #34D399, #10B981);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}

.invima-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #93C5FD;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

.matched-meds-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.matched-med-item {
  background: rgba(4, 19, 44, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 11px;
}

.matched-med-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.matched-med-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
}

.matched-med-price {
  font-size: 13px;
  font-weight: 900;
  color: var(--coop-yellow);
  white-space: nowrap;
}

.matched-med-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.med-reg-badge {
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 5px;
  color: #CBD5E1;
  font-weight: 600;
}

.med-pres-selector {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.med-pres-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--coop-blue-border);
  color: #CBD5E1;
  border-radius: 6px;
  padding: 3px 7px;
  font-family: var(--font-family);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.med-pres-btn.active {
  background: rgba(255, 183, 0, 0.2);
  border-color: var(--coop-yellow);
  color: var(--coop-yellow);
}

.missing-meds-note {
  font-size: 11.5px;
  color: #FCA5A5;
  background: rgba(227, 6, 19, 0.13);
  border: 1px solid rgba(227, 6, 19, 0.35);
  border-radius: 8px;
  padding: 7px 10px;
  margin: 8px 0;
}

.basket-totals-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 9px 12px;
  margin: 10px 0;
  font-size: 12px;
}

.basket-totals-row {
  display: flex;
  justify-content: space-between;
  color: #CBD5E1;
  margin-bottom: 3px;
}

.basket-totals-grand {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 900;
  color: #FFFFFF;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 5px;
  margin-top: 4px;
}

.btn-handoff-buy {
  flex: 1;
  background: linear-gradient(135deg, #10B981, #059669);
  border: 1px solid #34D399;
  color: #FFFFFF !important;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
  transition: all 0.2s ease;
}

.btn-handoff-buy:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-handoff-buy:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* PIN EN VIVO CON HALO PULSANTE EN EL MAPA */
.live-pos-map-pin {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #047857);
  border: 3px solid #FFB700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.32), 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* ============================================================================
   BOTÓN FLOTANTE Y POPOVER DECLARATIVO DEL ASISTENTE FARMACÉUTICO IA NACIONAL
   ============================================================================ */

.copi-ai-launcher {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 2600;
  background: linear-gradient(135deg, #002855 0%, #0077C8 100%);
  border: 2px solid var(--coop-yellow);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-family);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 183, 0, 0.35);
  transition: transform 0.2s ease;
}

.copi-ai-launcher:hover {
  transform: translateY(-2px);
}

.copi-ai-launcher-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 183, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.copi-ai-launcher-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.copi-ai-launcher-copy strong {
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
}

.copi-ai-launcher-copy small {
  font-size: 10.5px;
  color: var(--coop-yellow);
  font-weight: 700;
}

.copi-ai-popover {
  position: fixed;
  inset: auto 22px 88px auto;
  margin: 0;
  width: min(410px, calc(100vw - 24px));
  height: min(590px, calc(100vh - 120px));
  background: #F8FAFC;
  color: #0F172A;
  border: 2px solid var(--coop-yellow);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 2700;
}

.copi-ai-popover[popover]:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
}

.copi-ai-header {
  background: linear-gradient(135deg, #001F5C 0%, #004B87 100%);
  color: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.copi-ai-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copi-ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.copi-ai-title {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.copi-ai-subtitle {
  font-size: 11px;
  color: #CBD5E1;
  margin: 2px 0 0;
}

.copi-ai-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.copi-ai-compliance-strip {
  background: #EFF6FF;
  border-bottom: 1px solid #BFDBFE;
  color: #1E40AF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 7px 14px;
  line-height: 1.35;
  flex-shrink: 0;
}

.copi-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F1F5F9;
}

.copi-ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
}

.copi-ai-msg.user {
  align-self: flex-end;
}

.copi-ai-msg.bot {
  align-self: flex-start;
}

.copi-ai-bubble {
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.copi-ai-msg.user .copi-ai-bubble {
  background: #005EB8;
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.copi-ai-msg.bot .copi-ai-bubble {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  border-bottom-left-radius: 4px;
}

.copi-ai-sister-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.copi-ai-sister-card {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 12px;
}

.copi-ai-sister-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #10B981;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
}

.copi-ai-quick-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.copi-ai-quick-chip {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #0369A1;
  border-radius: 999px;
  padding: 5px 10px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.copi-ai-attach-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #ECFDF5;
  border-top: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.copi-ai-attach-bar.recording {
  background: #FEF2F2;
  border-top-color: #FECACA;
  color: #B91C1C;
}

.copi-ai-attach-clear {
  background: none;
  border: none;
  color: inherit;
  font-weight: 900;
  cursor: pointer;
}

.copi-ai-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.copi-ai-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  font-size: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

.copi-ai-tool-btn.recording {
  background: #FEE2E2;
  border-color: #EF4444;
}

.copi-ai-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #94A3B8;
  border-radius: 12px;
  padding: 8px 11px;
  font-family: var(--font-family);
  font-size: 13px;
  color: #0F172A;
  resize: none;
  max-height: 76px;
}

.copi-ai-input:focus {
  outline: none;
  border-color: #0077C8;
}

.copi-ai-send-btn {
  background: #0077C8;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 9px 14px;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

/* CONTROL SWITCH ACCESIBLE EN PANEL ADMIN */
input[type="checkbox"][switch] {
  accent-color: var(--primary-green, #10B981);
  margin: 0;
  cursor: pointer;
  width: 42px;
  height: 22px;
}

input[type="checkbox"][switch]:focus-visible {
  outline: 3px solid var(--coop-yellow, #FFB700);
  outline-offset: 4px;
}

@media (max-width: 880px) {
  .copi-ai-launcher {
    bottom: 72px;
    right: 14px;
    padding: 9px 14px;
  }

  .copi-ai-launcher-copy small {
    display: none;
  }

  .copi-ai-popover {
    inset: auto 12px 132px 12px;
    width: auto;
    height: min(520px, calc(100vh - 150px));
  }
}

/* ============================================================================
   BANNER CONTEXTUAL DE GEOLOCALIZACIÓN AUTOMÁTICA Y DETECCIÓN DE BARRIO/CIUDAD
   ============================================================================ */

.geo-consent-banner:not([hidden]) {
  margin: 0 14px 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 119, 200, 0.24) 0%, rgba(0, 31, 92, 0.92) 100%);
  border: 1.5px solid rgba(255, 183, 0, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-consent-banner.is-denied {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(15, 23, 42, 0.85);
}

.geo-consent-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.geo-consent-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--coop-yellow);
  margin-bottom: 3px;
}

.geo-consent-copy p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #E2E8F0;
}

.geo-consent-dismiss {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #CBD5E1;
  border-radius: 8px;
  min-inline-size: 28px;
  min-block-size: 28px;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.geo-consent-dismiss:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.geo-consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.geo-consent-allow-btn {
  background: var(--coop-yellow);
  color: #001F5C;
  border: none;
  border-radius: 999px;
  min-block-size: 32px;
  padding: 6px 14px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.geo-consent-allow-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 183, 0, 0.4);
}

.geo-city-quick-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.geo-city-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  min-block-size: 28px;
  min-inline-size: 44px;
  padding: 4px 10px;
  font-family: var(--font-family);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.geo-city-pill:hover {
  background: rgba(0, 119, 200, 0.35);
  border-color: var(--coop-yellow);
}

:where(.geo-consent-allow-btn, .geo-city-pill, .geo-consent-dismiss, #locate-me-btn):focus-visible {
  outline: 3px solid var(--coop-yellow);
  outline-offset: 3px;
}

@media (pointer: coarse) {
  .geo-consent-allow-btn {
    min-block-size: 40px;
    padding: 8px 16px;
  }
  .geo-city-pill,
  .geo-consent-dismiss {
    min-block-size: 36px;
    min-inline-size: 36px;
  }
}

.user-loc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-inline-size: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 183, 0, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  min-block-size: 28px;
}

.user-loc-status-pill:hover {
  border-color: var(--coop-yellow);
  background: rgba(255, 183, 0, 0.14);
}

.user-loc-status-pill.is-gps-verified {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #D1FAE5;
}

#locate-me-btn.is-gps-verified {
  border-color: var(--primary-green);
  background: rgba(16, 185, 129, 0.16);
}

/* PIN VISIBLE "ESTÁS AQUÍ" EN EL MAPA + ETIQUETA PERMANENTE */
.user-standing-pin {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0077C8 0%, #001F5C 100%);
  border: 3px solid #FFB700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(255, 183, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 15px;
  cursor: grab;
}

.user-standing-pin:active {
  cursor: grabbing;
}

.user-standing-pin.is-confirmed {
  border-color: #10B981;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), 0 0 0 5px rgba(16, 185, 129, 0.3);
}

.user-standing-pin::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 183, 0, 0.8);
  animation: coopGpsPulse 2.2s ease-out infinite;
  pointer-events: none;
}

.user-standing-pin.is-confirmed::after {
  border-color: rgba(16, 185, 129, 0.85);
}

.leaflet-tooltip.user-here-leaflet-tooltip {
  background: #001F5C;
  color: #FFFFFF;
  border: 2px solid #FFB700;
  border-radius: 12px;
  padding: 6px 11px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
  white-space: nowrap;
  line-height: 1.25;
  text-align: center;
}

.leaflet-tooltip.user-here-leaflet-tooltip.is-confirmed {
  border-color: #10B981;
}

.leaflet-tooltip.user-here-leaflet-tooltip::before {
  border-top-color: #FFB700;
}

.leaflet-tooltip.user-here-leaflet-tooltip.is-confirmed::before {
  border-top-color: #10B981;
}

.user-here-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #CBD5E1;
  margin-top: 2px;
}

/* TARJETA FLOTANTE INFERIOR EN EL MAPA: "¿DÓNDE ESTÁS PARADO?" */
.map-you-are-here-bar {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 1200;
  background: rgba(0, 31, 92, 0.95);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 183, 0, 0.75);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  max-inline-size: min(620px, calc(100% - 92px));
}

.map-you-are-here-bar.is-confirmed {
  border-color: rgba(16, 185, 129, 0.75);
}

.map-you-are-here-bar.is-picking {
  border-color: #FFB700;
  box-shadow: 0 0 0 3px rgba(255, 183, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.55);
}

.map-here-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

.map-here-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #FFB700;
}

.map-here-badge.is-confirmed {
  color: #34D399;
}

.map-here-place {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
}

.map-here-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
}

.map-here-btn {
  border-radius: 999px;
  min-block-size: 32px;
  padding: 6px 12px;
  font-family: var(--font-family);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

.map-here-btn.primary {
  background: var(--coop-yellow);
  color: #001F5C;
}

.map-here-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
  border-color: rgba(255, 255, 255, 0.25);
}

.map-here-btn.secondary.active {
  background: #10B981;
  color: #022C22;
  border-color: #10B981;
}

.map-wrapper.pin-pick-cursor #map {
  cursor: crosshair !important;
}

/* CONTENCIÓN NATIVA DE SCROLL PARA <dialog> MODAL */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(3, 14, 38, 0.76);
  backdrop-filter: blur(5px);
}

/* MODAL <dialog> DE AUTORIZACIÓN Y VERIFICACIÓN DE UBICACIÓN */
.geo-welcome-dialog {
  margin: auto;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  background: linear-gradient(165deg, #002855 0%, #00183D 100%);
  color: #FFFFFF;
  border: 2px solid var(--coop-yellow);
  border-radius: 20px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.geo-welcome-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.geo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.geo-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 183, 0, 0.16);
  border: 1px solid rgba(255, 183, 0, 0.55);
  color: var(--coop-yellow);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.geo-modal-close-form {
  margin: 0;
}

.geo-modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  border-radius: 10px;
  min-inline-size: 34px;
  min-block-size: 34px;
  padding: 6px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.geo-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.geo-modal-title {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
}

.geo-modal-subtitle {
  margin: -4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #CBD5E1;
}

.geo-blocked-hint:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.4;
  color: #FEF3C7;
}

.geo-blocked-hint strong {
  color: #FDE68A;
}

.geo-blocked-hint p {
  margin: 3px 0 0;
}

.geo-blocked-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.geo-modal-gps-row {
  display: flex;
}

.geo-modal-gps-btn {
  width: 100%;
  min-block-size: 46px;
  padding: 11px 18px;
  border-radius: 13px;
  border: none;
  background: linear-gradient(135deg, #FFB700 0%, #F59E0B 100%);
  color: #001F5C;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 8px 22px rgba(255, 183, 0, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.geo-modal-gps-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 183, 0, 0.45);
}

.geo-modal-verify-box {
  background: rgba(4, 19, 44, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-current-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.geo-current-tag {
  color: #94A3B8;
  font-weight: 600;
}

#geo-modal-current-place {
  color: #34D399;
  font-weight: 800;
}

.geo-manual-search-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.geo-manual-label {
  font-size: 12px;
  font-weight: 700;
  color: #E2E8F0;
}

.geo-manual-input-row {
  display: flex;
  gap: 8px;
}

.geo-manual-input {
  flex: 1;
  min-inline-size: 0;
  min-block-size: 40px;
  background: #00132E;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 8px 12px;
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 13px;
}

.geo-manual-input:focus {
  outline: none;
  border-color: var(--coop-yellow);
}

.geo-manual-submit-btn {
  background: #0077C8;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  min-block-size: 40px;
  padding: 8px 14px;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.geo-manual-submit-btn:hover {
  background: #0284C7;
}

.geo-manual-results:not([hidden]) {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  background: #020D21;
  border: 1px solid rgba(255, 183, 0, 0.5);
  border-radius: 10px;
  max-height: 165px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.geo-manual-result-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  color: #F8FAFC;
  font-family: var(--font-family);
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.geo-manual-result-btn:hover {
  background: rgba(0, 119, 200, 0.28);
}

.geo-manual-result-btn small {
  color: #94A3B8;
  font-size: 11px;
}

.geo-modal-cities-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.geo-cities-caption {
  font-size: 11.5px;
  color: #94A3B8;
  font-weight: 600;
}

.geo-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.geo-footer-btn {
  flex: 1 1 200px;
  min-block-size: 40px;
  padding: 9px 14px;
  border-radius: 11px;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
}

.geo-footer-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #F8FAFC;
}

.geo-footer-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.geo-footer-btn.confirm {
  background: #10B981;
  color: #022C22;
}

.geo-footer-btn.confirm:hover {
  background: #34D399;
}

:where(
  .geo-modal-gps-btn,
  .geo-modal-close-btn,
  .geo-manual-submit-btn,
  .geo-manual-result-btn,
  .geo-footer-btn,
  .map-here-btn,
  .user-loc-status-pill
):focus-visible {
  outline: 3px solid var(--coop-yellow);
  outline-offset: 3px;
}

@media (pointer: coarse) {
  .map-here-btn,
  .geo-footer-btn,
  .geo-modal-close-btn {
    min-block-size: 40px;
  }
}

@media (max-width: 880px) {
  .map-you-are-here-bar {
    left: 10px;
    right: 62px;
    bottom: 72px;
    max-inline-size: none;
    padding: 9px 11px;
  }
}

@keyframes coopGpsPulse {
  0% {
    transform: scale(0.65);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-standing-pin::after {
    animation: none;
  }
}

/* ============================================================================
   SUB-PASO 7.4: COMPARADOR INTELIGENTE DE CUENTA TOTAL + PRESENTACIONES Y DISTANCIAS
   ============================================================================ */

.search-suggestions:not([hidden]) {
  max-height: 400px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.suggestion-row.suggestion-card-v2 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(10, 29, 62, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-row.suggestion-card-v2:hover {
  background: rgba(14, 41, 84, 0.96);
  border-color: rgba(255, 183, 0, 0.55);
}

.suggestion-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.suggestion-stores-count {
  color: #93C5FD;
  font-weight: 700;
}

.suggestion-pres-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.suggestion-pres-hint {
  font-size: 10.5px;
  font-weight: 800;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.suggestion-pres-btn {
  background: rgba(16, 185, 129, 0.16);
  border: 1.5px solid rgba(52, 211, 153, 0.65);
  color: #ECFDF5;
  border-radius: 8px;
  padding: 5px 9px;
  min-block-size: 28px;
  font-family: var(--font-family);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.suggestion-pres-btn strong {
  color: #6EE7B7;
  font-weight: 900;
}

.suggestion-pres-btn:hover {
  background: #10B981;
  border-color: #34D399;
  color: #022C22;
}

.suggestion-pres-btn:hover strong {
  color: #022C22;
}

.suggestion-stores-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  background: rgba(2, 10, 26, 0.55);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggestion-store-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 10.5px;
  line-height: 1.3;
}

.sug-store-name {
  font-weight: 700;
  color: #E2E8F0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sug-dist-pill {
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 10px;
  white-space: nowrap;
}

.sug-dist-pill.is-near {
  background: rgba(16, 185, 129, 0.18);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sug-dist-pill.is-medium {
  background: rgba(255, 183, 0, 0.16);
  color: #FDE047;
  border: 1px solid rgba(255, 183, 0, 0.4);
}

.sug-dist-pill.is-far {
  background: rgba(249, 115, 22, 0.2);
  color: #FDBA74;
  border: 1px solid rgba(249, 115, 22, 0.5);
}

.sug-store-prices {
  color: #F8FAFC;
  font-weight: 800;
  margin-inline-start: auto;
  white-space: nowrap;
}

.suggestion-store-more {
  font-size: 10px;
  font-weight: 700;
  color: #93C5FD;
  padding-top: 2px;
}

/* LISTA COMPARADORA CON PÍLDORAS DE PRESENTACIÓN */
.basket-items-list {
  max-height: 205px;
}

.basket-item-row.basket-item-v2 {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 9px;
}

.basket-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.basket-item-pres-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.basket-pres-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #CBD5E1;
  border-radius: 6px;
  padding: 3px 7px;
  min-block-size: 24px;
  font-family: var(--font-family);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.basket-pres-pill.active {
  background: rgba(255, 183, 0, 0.22);
  border-color: var(--coop-yellow);
  color: var(--coop-yellow);
  font-weight: 800;
}

/* RESUMEN GANADOR ARRIBA DE LAS TARJETAS */
.comparison-winner-summary:not([hidden]) {
  margin: 10px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.winner-summary-row {
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
  cursor: pointer;
  border-radius: 11px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.winner-summary-row.is-cheapest {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(4, 47, 46, 0.85) 100%);
  border: 1.5px solid #34D399;
  color: #FFFFFF;
}

.winner-summary-row.is-closest {
  background: rgba(0, 40, 85, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #FFFFFF;
}

.winner-summary-row:hover {
  transform: translateY(-1px);
  border-color: var(--coop-yellow);
}

.winner-summary-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.winner-summary-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #6EE7B7;
  text-transform: uppercase;
}

.winner-summary-kicker.is-fast {
  color: #7DD3FC;
}

.winner-summary-store {
  font-size: 12.5px;
  font-weight: 900;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-summary-sub {
  font-size: 10.5px;
  color: #CBD5E1;
  font-weight: 600;
}

.winner-summary-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.winner-summary-total {
  font-size: 15px;
  font-weight: 900;
  color: var(--coop-yellow);
}

.winner-summary-total.is-secondary {
  font-size: 13.5px;
  color: #F8FAFC;
}

.winner-savings-pill {
  background: #10B981;
  color: #022C22;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.winner-total-caption {
  font-size: 10px;
  color: #94A3B8;
  font-weight: 700;
}

/* INSIGNIAS Y TRANSPARENCIA EN TARJETAS DE DROGUERÍA */
.store-card.is-cheapest-winner {
  border: 2px solid #34D399 !important;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.25);
}

.comparison-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.comp-rank-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.comp-rank-pill.is-gold {
  background: linear-gradient(135deg, #FFB700, #F59E0B);
  color: #001F5C;
  border-color: #FDE047;
  font-weight: 900;
}

.comp-savings-pill {
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  color: #6EE7B7;
  border: 1px solid rgba(52, 211, 153, 0.55);
}

.comp-closest-pill {
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.comp-far-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.2);
  color: #FDBA74;
  border: 1px solid rgba(249, 115, 22, 0.5);
}

.store-distance.is-near {
  background: rgba(16, 185, 129, 0.16);
  color: #6EE7B7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.store-distance.is-medium {
  background: rgba(255, 183, 0, 0.15);
  color: #FDE047 !important;
  border: 1px solid rgba(255, 183, 0, 0.35);
}

.store-distance.is-far {
  background: rgba(249, 115, 22, 0.18);
  color: #FDBA74 !important;
  border: 1px solid rgba(249, 115, 22, 0.45);
}

.stock-badge-container.is-total-account-box {
  align-items: flex-start;
  gap: 10px;
}

.account-total-kicker {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6EE7B7;
}

.is-total-account-box .product-matched-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--coop-yellow) !important;
}

.account-diff-note {
  font-size: 10px;
  font-weight: 700;
  color: #FDBA74;
}

.matched-med-qty-tag {
  color: var(--coop-yellow);
  font-weight: 900;
}

.med-reg-badge.is-pres-highlight {
  background: rgba(255, 183, 0, 0.18);
  border: 1px solid rgba(255, 183, 0, 0.45);
  color: #FEF08A;
  font-weight: 800;
}

.med-variant-notices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.med-variant-alt-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #FDE68A;
}

.med-pres-fallback-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #BAE6FD;
}

.med-card-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.med-card-controls-row .med-pres-selector {
  margin-top: 0;
}

.med-inline-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.med-step-btn {
  min-inline-size: 24px;
  min-block-size: 24px;
  border-radius: 6px;
  border: 1px solid var(--coop-blue-border);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.med-step-btn:hover {
  border-color: var(--coop-yellow);
  color: var(--coop-yellow);
}

.med-step-val {
  min-inline-size: 18px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--coop-yellow);
}

.basket-freeship-hint {
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #93C5FD;
}

.btn-locate-store {
  padding: 8px 12px !important;
  font-size: 12px !important;
}

.popup-buy-btn {
  width: 100%;
}

.empty-results-box {
  text-align: center;
  padding: 12px 6px;
}

.empty-results-icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.empty-results-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
}

.empty-results-desc {
  font-size: 12px;
  color: var(--text-muted);
}

:where(
  .suggestion-pres-btn,
  .suggestion-main-btn,
  .basket-pres-pill,
  .basket-qty-btn,
  .basket-rm-btn,
  .sort-pill,
  .winner-summary-row,
  .med-pres-btn,
  .med-step-btn,
  .btn-handoff-buy
):focus-visible {
  outline: 3px solid var(--coop-yellow);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .suggestion-pres-btn,
  .basket-pres-pill,
  .med-pres-btn,
  .med-step-btn {
    min-block-size: 32px;
  }
}

/* ============================================================================
   SUB-PASO 7.5: FLUJO EN 2 PASOS · MINIATURAS .WEBP + 3 CARRITOS INTELIGENTES
   ============================================================================ */

.med-thumb-frame {
  background: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.med-thumb-frame.is-sug {
  width: 44px;
  height: 44px;
}

.med-thumb-frame.is-basket {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.med-thumb-frame.is-cart {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.med-thumb-frame.is-fallback {
  background: linear-gradient(135deg, rgba(0, 119, 200, 0.32), rgba(16, 185, 129, 0.24));
  border-color: rgba(147, 197, 253, 0.38);
}

.med-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  display: block;
}

.med-thumb-fallback-icon {
  font-size: 18px;
  line-height: 1;
}

.med-thumb-frame.is-basket .med-thumb-fallback-icon {
  font-size: 16px;
}

.med-thumb-frame.is-cart .med-thumb-fallback-icon {
  font-size: 14px;
}

/* SUGERENCIAS DE PRODUCTO LIMPIAS (SIN AMARRAR DROGUERÍA INDIVIDUAL) */
.suggestion-row.suggestion-card-v3 {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  background: rgba(10, 29, 62, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.suggestion-row.suggestion-card-v3:hover {
  background: rgba(15, 44, 90, 0.98);
  border-color: rgba(255, 183, 0, 0.6);
}

.suggestion-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-lab-sub {
  display: block;
  font-size: 10.5px;
  color: #94A3B8;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

/* LISTA DE MEDICAMENTOS CON MINIATURA */
.basket-panel-hint {
  margin: 0 0 8px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #BAE6FD;
  font-weight: 600;
}

.basket-item-main-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.basket-item-main-left .basket-item-label {
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* RESUMEN EJECUTIVO DE LOS 3 CARRITOS RECOMENDADOS */
.smart-carts-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #E2E8F0;
  padding: 0 2px;
}

.smart-carts-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
  gap: 6px;
}

.smart-overview-pill {
  background: rgba(0, 32, 74, 0.88);
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  padding: 7px 8px;
  text-align: left;
  font-family: var(--font-family);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.smart-overview-pill:hover {
  transform: translateY(-1px);
  border-color: var(--coop-yellow);
}

.smart-overview-pill.theme-gold {
  background: linear-gradient(135deg, rgba(255, 183, 0, 0.22), rgba(6, 78, 59, 0.72));
  border-color: #FFB700;
}

.smart-overview-pill.theme-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(4, 47, 46, 0.82));
  border-color: #34D399;
}

.smart-overview-pill.theme-sky {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(12, 74, 110, 0.78));
  border-color: #38BDF8;
}

.smart-overview-pill.theme-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(120, 53, 15, 0.72));
  border-color: #FBBF24;
}

.smart-overview-kicker {
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  color: #FEF08A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-overview-pill.theme-emerald .smart-overview-kicker {
  color: #6EE7B7;
}

.smart-overview-pill.theme-sky .smart-overview-kicker {
  color: #7DD3FC;
}

.smart-overview-pill.theme-amber .smart-overview-kicker {
  color: #FDE68A;
}

.smart-overview-store {
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-overview-metric {
  font-size: 12px;
  font-weight: 900;
  color: var(--coop-yellow);
}

.smart-overview-sub {
  font-size: 9.5px;
  font-weight: 700;
  color: #CBD5E1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TARJETAS DE LOS 3 CARRITOS INTELIGENTES */
.store-card.is-smart-cart.smart-theme-gold {
  border: 2px solid #FFB700 !important;
  box-shadow: 0 10px 28px rgba(255, 183, 0, 0.22);
}

.store-card.is-smart-cart.smart-theme-emerald {
  border: 2px solid #34D399 !important;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.22);
}

.store-card.is-smart-cart.smart-theme-sky {
  border: 1.8px solid #38BDF8 !important;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.18);
}

.store-card.is-smart-cart.smart-theme-amber {
  border: 1.8px solid #FBBF24 !important;
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.18);
}

.smart-cart-pillar-banner {
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.smart-cart-pillar-banner.theme-gold {
  background: linear-gradient(135deg, rgba(255, 183, 0, 0.26), rgba(16, 185, 129, 0.22));
  border: 1px solid rgba(255, 183, 0, 0.65);
}

.smart-cart-pillar-banner.theme-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.26), rgba(6, 78, 59, 0.65));
  border: 1px solid rgba(52, 211, 153, 0.6);
}

.smart-cart-pillar-banner.theme-sky {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(12, 74, 110, 0.65));
  border: 1px solid rgba(56, 189, 248, 0.55);
}

.smart-cart-pillar-banner.theme-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(120, 53, 15, 0.62));
  border: 1px solid rgba(251, 191, 36, 0.55);
}

.smart-pillar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.smart-pillar-title {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.25px;
  color: #FFFFFF;
}

.smart-pillar-reason {
  font-size: 10.5px;
  font-weight: 600;
  color: #E2E8F0;
  line-height: 1.3;
}

/* FILA DE MEDICAMENTO CON MINIATURA EN EL CARRITO */
.matched-med-head-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.matched-med-head-content {
  flex: 1;
  min-width: 0;
}

/* TARJETA DE CARRITO COMBINADO INTELIGENTE (2 DROGUERÍAS) */
.store-card.split-cart-card {
  border: 2px dashed #A78BFA !important;
  background: linear-gradient(165deg, rgba(30, 27, 75, 0.92), rgba(0, 32, 74, 0.95));
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.22);
}

.split-cart-banner {
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.55);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 10px;
}

.split-cart-title {
  font-size: 12px;
  font-weight: 900;
  color: #EDE9FE;
  margin-bottom: 3px;
}

.split-cart-desc {
  font-size: 11px;
  color: #DDD6FE;
  line-height: 1.35;
}

.split-legs-container {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 10px;
}

.split-leg-box {
  background: rgba(2, 12, 32, 0.58);
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.split-leg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.split-leg-store {
  font-size: 12px;
  font-weight: 900;
  color: #FFFFFF;
}

.split-leg-meta {
  font-size: 10.5px;
  font-weight: 700;
  color: #93C5FD;
}

.split-leg-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.split-leg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #E2E8F0;
}

.split-leg-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.split-leg-item-price {
  font-weight: 900;
  color: var(--coop-yellow);
  flex-shrink: 0;
}

.split-leg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #CBD5E1;
}

.btn-split-leg-buy {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  border: 1px solid #C4B5FD;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 6px 11px;
  min-block-size: 30px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-split-leg-buy:hover:not(:disabled) {
  filter: brightness(1.1);
}

/* ACORDEÓN NATIVO <details> PARA OTRAS DROGUERÍAS EVALUADAS */
.other-stores-wrapper {
  list-style: none;
  margin-top: 4px;
}

.other-stores-disclosure {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 14, 36, 0.65);
  overflow: hidden;
}

.other-stores-summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.other-stores-summary::-webkit-details-marker {
  display: none;
}

.other-stores-summary::after {
  content: "▾";
  font-size: 14px;
  color: var(--coop-yellow);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.other-stores-disclosure[open] > .other-stores-summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #FFFFFF;
}

.other-stores-disclosure[open] > .other-stores-summary::after {
  transform: rotate(180deg);
}

.other-stores-sublist {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

:where(
  .smart-overview-pill,
  .btn-split-leg-buy,
  .other-stores-summary
):focus-visible {
  outline: 3px solid var(--coop-yellow);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .smart-overview-pill,
  .btn-split-leg-buy,
  .other-stores-summary {
    min-block-size: 38px;
  }
}


/* ==========================================================================
   SUB-PASO 7.6: ERGONOMÍA VERTICAL + CARRITOS 100% COMPLETOS + SUGERIDOS OTC
   ========================================================================== */

.basket-panel {
  padding: 8px 10px;
}

.basket-panel-header {
  margin-bottom: 4px;
}

.basket-items-disclosure {
  margin-top: 2px;
}

.basket-disclosure-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6ch;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 11.5px;
  font-weight: 700;
  color: #E2E8F0;
  user-select: none;
}

.basket-disclosure-summary::-webkit-details-marker {
  display: none;
}

.basket-disclosure-summary::before {
  content: "";
  inline-size: 0.9em;
  block-size: 0.9em;
  flex-shrink: 0;
  background-color: var(--coop-yellow);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}

.basket-items-disclosure[open] > .basket-disclosure-summary::before {
  rotate: 0deg;
}

@media (prefers-reduced-motion: no-preference) {
  .basket-disclosure-summary::before {
    transition: rotate 0.2s ease;
  }

  .basket-items-disclosure::details-content {
    interpolate-size: allow-keywords;
    overflow: clip;
    contain: layout;
    transition: block-size 0.24s ease-in-out, content-visibility 0.24s ease-in-out allow-discrete;
  }
}

.basket-items-disclosure:not([open])::details-content {
  block-size: 0;
  overflow: clip;
}

.basket-disclosure-body {
  padding-top: 7px;
}

#basket-summary-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Barra de ordenamiento en 1 sola fila compacta */
.compare-sort-bar {
  margin-top: 7px;
  padding: 0;
}

.sort-pills-group.is-single-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

.sort-pills-group.is-single-row .sort-pill {
  padding: 6px 6px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: center;
  min-block-size: 30px;
}

/* Tira horizontal scroll-snap de Medicamentos/Insumos Sugeridos OTC */
.suggested-complements-strip:not([hidden]) {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14) 0%, rgba(0, 40, 85, 0.85) 100%);
  border: 1px solid rgba(16, 185, 129, 0.42);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sug-comp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sug-comp-title-wrap {
  min-width: 0;
}

.sug-comp-headline {
  font-size: 11.8px;
  font-weight: 900;
  color: #6EE7B7;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sug-comp-subtitle {
  margin: 2px 0 0;
  font-size: 10.6px;
  line-height: 1.3;
  color: #CBD5E1;
}

.sug-comp-nav {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}

.sug-comp-nav-btn {
  inline-size: 24px;
  block-size: 24px;
  min-inline-size: 24px;
  min-block-size: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(2, 14, 36, 0.55);
  color: #E2E8F0;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.sug-comp-nav-btn:hover {
  background: rgba(255, 183, 0, 0.2);
  color: #FFFFFF;
}

.sug-comp-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  touch-action: pan-x pan-y;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

@media (prefers-reduced-motion: no-preference) {
  .sug-comp-track {
    scroll-behavior: smooth;
  }
}

.sug-comp-card {
  flex: 0 0 218px;
  scroll-snap-align: start;
  background: rgba(2, 16, 40, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.sug-comp-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sug-comp-card-info {
  min-width: 0;
  flex: 1;
}

.sug-comp-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  color: #FDE68A;
  line-height: 1.2;
}

.sug-comp-name {
  font-size: 11.2px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sug-comp-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sug-comp-price-box {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.sug-comp-price {
  font-size: 12px;
  font-weight: 900;
  color: #6EE7B7;
}

.sug-comp-meta {
  font-size: 9.5px;
  color: #94A3B8;
}

.sug-comp-add-btn {
  border: none;
  border-radius: 8px;
  padding: 5px 9px;
  min-block-size: 28px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 10.8px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}

.sug-comp-add-btn:hover {
  filter: brightness(1.08);
}

.sug-comp-legal {
  margin: 0;
  font-size: 9.5px;
  color: #94A3B8;
  line-height: 1.25;
}

/* Insignia explícita cuando una droguería en otra sección es parcial */
.stock-badge-container.is-partial-basket {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(120, 53, 15, 0.24);
}

.stock-badge-container.is-partial-basket .stock-status-pill {
  color: #FDE68A;
}

/* Minimizado de la tarjeta inferior del mapa */
.map-here-btn.icon-only {
  padding: 6px 8px;
  min-inline-size: 30px;
}

.map-you-are-here-bar.is-minimized {
  padding: 6px 10px;
  gap: 8px;
}

.map-you-are-here-bar.is-minimized .map-here-badge,
.map-you-are-here-bar.is-minimized #map-pin-pick-btn,
.map-you-are-here-bar.is-minimized #map-open-geo-modal-btn {
  display: none;
}

.map-you-are-here-bar.is-minimized #map-here-minimize-btn i {
  transform: rotate(180deg);
}

:where(
  .basket-disclosure-summary,
  .sug-comp-add-btn,
  .sug-comp-nav-btn,
  #map-here-minimize-btn
):focus-visible {
  outline: 3px solid var(--coop-yellow);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .sug-comp-add-btn,
  .sug-comp-nav-btn {
    min-block-size: 34px;
    min-inline-size: 34px;
  }
}
