/* ============================================================
   TODO ONCE — Stylesheet
   Colores principales:
   Primario:    #7c3aed (violeta/púrpura)
   Primario hover: #6d28d9
   Fondo body: #f5f5f8
   Sidebar/cards: #ffffff
   Texto principal: #111827
   Texto secundario: #6b7280
   Badge mayorista: #7c3aed
   Precio: #7c3aed
   Estrella: #f59e0b
   ============================================================ */

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

:root {
  --purple:        #7c3aed;
  --purple-dark:   #6d28d9;
  --purple-light:  #ede9fe;
  --purple-xlight: #f5f3ff;
  --white:         #ffffff;
  --bg:            #f5f5f8;
  --text-primary:  #111827;
  --text-secondary:#6b7280;
  --text-light:    #9ca3af;
  --border:        #e5e7eb;
  --gold:          #f59e0b;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
  --sidebar-w:     220px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* Logo */
.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.logo-placeholder img{
  width: 100%;
  height: auto;
  
}

/* Nav */
.sidebar-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--purple-xlight);
  color: var(--purple);
}

.nav-item.active {
  background: var(--purple-light);
  color: var(--purple);
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0 0 0 14px;
  overflow: hidden;
  max-width: 640px;
}

.search-icon-left {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 8px;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  outline: none;
  padding: 9px 0;
}

.search-bar input::placeholder {
  color: var(--text-light);
}

.btn-buscar {
  background: var(--purple);
  color: var(--white);
  border: none;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 0 50px 50px 0;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-buscar:hover { background: var(--purple-dark); }

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.top-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s;
}
.top-nav a:hover { color: var(--purple); }

.btn-outline {
  border: 1.5px solid var(--purple);
  color: var(--purple);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-outline:hover {
  background: var(--purple-xlight);
}

.btn-solid {
  border: none;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-solid:hover { background: var(--purple-dark); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.content {
  padding: 0 24px 0;
  flex: 1;
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-banner {
  background: linear-gradient(135deg, #1a0530 0%, #2d1060 40%, #1a1040 100%);
  border-radius: var(--radius-lg);
  padding: 36px 40px 28px;
  margin-bottom: 28px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><circle cx="30" cy="30" r="1" fill="%23ffffff08"/></svg>');
  pointer-events: none;
}

.hero-text {
  margin-bottom: 24px;
}

.hero-text h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
}

.hero-categories {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-categories[hidden] { display: none; }

.hero-category-item {
  display: flex;
  min-width: 76px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.hero-category-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: hsla(var(--category-hue, 264), 76%, 76%, .18);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  transition: transform .18s, background .18s;
}

.hero-category-item:hover .hero-category-icon,
.hero-category-item[aria-expanded="true"] .hero-category-icon {
  transform: translateY(-2px);
  background: hsla(var(--category-hue, 264), 76%, 76%, .34);
}

.hero-category-name {
  max-width: 100px;
  overflow: hidden;
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-category-chevron { width: 13px; height: 13px; margin-top: -5px; fill: none; stroke: #ffffffb8; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform .18s; }
.hero-category-item[aria-expanded="true"] .hero-category-chevron { transform: rotate(180deg); }
.hero-category-loading { color: #ffffffb8; font-size: 12px; }
.hero-category-subcategories { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; border-top: 1px solid #ffffff2e; padding-top: 14px; }
.hero-category-subcategories[hidden] { display: none; }
.hero-category-subcategories > a { display: inline-flex; align-items: center; gap: 12px; border: 1px solid #ffffff30; border-radius: 999px; padding: 8px 12px; background: #ffffff12; color: #fff; font-size: 12px; text-decoration: none; transition: background .15s; }
.hero-category-subcategories > a:hover { background: #ffffff24; }
.hero-category-subcategories > a span { color: #ffffffa8; }
.hero-more-categories { display: flex; align-items: center; gap: 10px; margin-top: 18px; border-top: 1px solid #ffffff2e; padding-top: 15px; color: #fff; text-decoration: none; }
.hero-more-categories-icon { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #ffffff40; border-radius: 50%; background: #ffffff16; font-size: 21px; }
.hero-more-categories > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.hero-more-categories strong { font-size: 12px; }
.hero-more-categories small { color: #ffffffa8; font-size: 10px; }
.hero-more-categories > span:last-child { color: #ffffffb8; font-size: 18px; transition: transform .15s; }
.hero-more-categories:hover > span:last-child { transform: translateX(3px); }

.cat-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cat-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.15s;
}
.cat-icon-circle:hover {
  background: rgba(255,255,255,0.2);
}

.cat-icon-item span {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  text-align: center;
}

/* ============================================================
   TWO COLUMN LAYOUT
   ============================================================ */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* ============================================================
   SECTION BLOCKS
   ============================================================ */
.section-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.emoji {
  font-style: normal;
}

.ver-todos {
  font-size: 13px;
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.ver-todos:hover { color: var(--purple-dark); }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.products-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(124,58,237,0.1);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f9fafb;
}

.badge-mayorista {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--purple);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.btn-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 2;
  transition: box-shadow 0.15s;
}
.btn-heart:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.13); }

/* Product image placeholders (buyer fills with real images) */
.product-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Colores de fondo como placeholder visual diferenciado */
.product-img-1 { background-color: #f3f4f6; }
.product-img-2 { background-color: #f0fdf4; }
.product-img-3 { background-color: #eff6ff; }
.product-img-4 { background-color: #fafafa; }
.product-img-5 { background-color: #fffbeb; }

.product-info {
  padding: 10px;
}

.product-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 5px;
  min-height: 34px;
}

.product-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 8px;
}

.product-seller {
  display: flex;
  align-items: center;
  gap: 7px;
}

.seller-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.av1 { background: #7c3aed; }
.av2 { background: #dc2626; }
.av3 { background: #2563eb; }
.av4 { background: #059669; }
.av5 { background: #d97706; }

.seller-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.seller-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-loc {
  font-size: 10px;
  color: var(--text-secondary);
}

.seller-rating {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* ============================================================
   DYNAMIC MARKETPLACE CARDS
   ============================================================ */
.products-row > .market-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
}

.products-row > .market-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124,58,237,0.1);
}

.market-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f0fa;
}

.market-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--purple);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card-body {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 126px;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 11px;
}

.market-card-title {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.market-card-body > strong {
  color: var(--purple);
  font-size: 15px;
  font-weight: 800;
}

.market-card-shop {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card .market-muted {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-action {
  position: absolute;
  z-index: 2;
  top: -34px;
  right: 8px;
  min-width: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 50%;
  padding: 0 7px;
  background: var(--white);
  color: #777180;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  font-size: 16px;
}

.market-action.is-active { color: #dc2670; }

.categories-grid > .cat-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.categories-grid > .cat-card .cat-card-img {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #f4effb, #ebe5f5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.categories-grid > .cat-card:hover .cat-card-img {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(74,45,120,0.12);
}

.categories-grid > .cat-card > span {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comercios-list > .market-shop-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--white);
  transition: box-shadow 0.2s;
}

.comercios-list > .market-shop-card:hover {
  box-shadow: 0 4px 14px rgba(74,45,120,0.09);
}

.comercios-list .market-shop-logo {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--purple-xlight);
  color: var(--purple);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.comercios-list .market-shop-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comercios-list .market-shop-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.comercios-list .market-shop-info a {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comercios-list .market-shop-info span,
.comercios-list .market-shop-info small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comercios-list .market-follow {
  flex-shrink: 0;
  border: 1px solid var(--purple);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--white);
  color: var(--purple);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
}

.market-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--white);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.market-skeleton {
  position: relative;
  overflow: hidden;
  background: #eeeaf3;
}

.market-skeleton::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
  animation: market-skeleton-shimmer 1.35s infinite;
  content: "";
}

.market-skeleton-line {
  display: block;
  width: 86%;
  height: 10px;
  border-radius: 5px;
  background: #eeeaf3;
}

.market-skeleton-line-short { width: 64%; }
.market-skeleton-line-small { width: 42%; height: 8px; }
.market-skeleton-button { width: 48px; height: 26px; border-radius: 6px; }
.market-skeleton-category .market-skeleton-line { width: 75%; height: 9px; }

.comercios-list > .market-skeleton-shop {
  min-height: 70px;
}

@keyframes market-skeleton-shimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .market-skeleton::after { animation: none; }
}

/* ============================================================
   CATEGORÍAS GRID
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cat-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  background: #f3f4f6;
  /* Coloca aquí tu imagen con background-image */
}

/* Colores diferenciados como placeholder */
.cat-c1 { background-color: #1f2937; }
.cat-c2 { background-color: #374151; }
.cat-c3 { background-color: #4b5563; }
.cat-c4 { background-color: #f9fafb; border: 1px solid #e5e7eb; }
.cat-c5 { background-color: #e5e7eb; }
.cat-c6 { background-color: #fdf2f8; }
.cat-c7 { background-color: #fef3c7; }
.cat-c8 { background-color: #111827; }

.cat-card span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

/* ============================================================
   FEATURES STRIP
   ============================================================ */
.features-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.feature-item {
  background: var(--white);
  padding: 18px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--purple-xlight);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.feature-item p {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   RIGHT COLUMN — COMERCIOS
   ============================================================ */
.right-col .section-block {
  margin-bottom: 16px;
}

.comercios-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comercio-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comercio-img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.ci1 { background-color: #7c3aed; }
.ci2 { background-color: #dc2626; }
.ci3 { background-color: #1f2937; }
.ci4 { background-color: #374151; }
.ci5 { background-color: #4b5563; }

.comercio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.market-featured-shop-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--purple);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.market-featured-shop-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-featured-shop-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.market-featured-shop-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.market-featured-shop-link:hover .market-featured-shop-name strong {
  color: var(--purple);
}

.market-featured-shop-name strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-featured-shop-name .market-verified-badge {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.market-featured-shop .comercio-loc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comercio-info strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comercio-cat {
  font-size: 11px;
  color: var(--text-secondary);
}

.comercio-loc {
  font-size: 10.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.comercio-rating {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-seguir {
  border: 1.5px solid var(--purple);
  color: var(--purple);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.btn-seguir:hover {
  background: var(--purple-xlight);
}

/* ============================================================
   COMERCIANTE CARD
   ============================================================ */
.comerciante-card {
  background: var(--purple-xlight);
  border: 1px solid var(--purple-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.comerciante-text h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.comerciante-text p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.comerciante-illustration {
  width: 100%;
  height: 90px;
  background: var(--purple-light);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--purple);
  /* Coloca tu imagen aquí con background-image */
}

.comerciante-illustration img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.btn-registrar {
  width: 100%;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.btn-registrar:hover { background: var(--purple-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer a:hover { color: var(--purple); }

/* ============================================================
   FLOATING HELP BUTTON
   ============================================================ */
.btn-help {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--purple);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 14px rgba(124,58,237,0.4);
  z-index: 200;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-help svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.btn-help:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(124,58,237,0.42);
}
.btn-help:focus-visible {
  outline: 3px solid rgba(124,58,237,0.35);
  outline-offset: 3px;
}

.customer-auth-dialog {
  width: min(420px, calc(100% - 32px));
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--text-primary);
  background: var(--white);
  box-shadow: 0 24px 80px rgba(17,24,39,0.24);
}

.customer-auth-dialog::backdrop {
  background: rgba(17,24,39,0.58);
  backdrop-filter: blur(3px);
}

.customer-auth-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.customer-auth-close {
  align-self: flex-end;
  width: 32px;
  height: 32px;
  margin: -12px -12px 8px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.customer-auth-close:hover { background: var(--purple-xlight); color: var(--purple); }

.customer-auth-mark {
  display: grid;
  width: min(220px, 100%);
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.customer-auth-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.customer-auth-content h2 { margin: 16px 0 8px; font-size: 21px; }
.customer-auth-content p { max-width: 330px; margin: 0 0 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.customer-auth-google-button { display: flex; min-height: 44px; justify-content: center; }
.customer-auth-cancel { margin-top: 16px; border: 0; padding: 8px 14px; background: transparent; color: var(--text-secondary); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.customer-auth-cancel:hover { color: var(--purple); }

@media (max-width: 480px) {
  .btn-help {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 48px;
    min-height: 48px;
    gap: 0;
    border-radius: 50%;
    padding: 0;
    background: #20c56a;
    box-shadow: 0 4px 14px rgba(17, 135, 67, 0.35);
  }
  .btn-help:hover {
    background: #18a957;
    box-shadow: 0 7px 18px rgba(17, 135, 67, 0.4);
  }
  .btn-help svg {
    width: 24px;
    height: 24px;
  }
  .btn-help span {
    display: none;
  }
  .customer-auth-dialog { padding: 22px; }
}

/* ============================================================
   RESPONSIVE — básico
   ============================================================ */
@media (max-width: 1280px) {
  .products-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .features-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
  .right-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 100;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: calc(72px + env(safe-area-inset-bottom));
    overflow: hidden;
    border: 0;
    border-top: 1px solid var(--border);
    padding: 0 4px env(safe-area-inset-bottom);
    box-shadow: 0 -5px 20px rgba(34, 24, 50, .08);
  }
  .sidebar-logo { display: none; }
  .sidebar-nav {
    width: 100%;
    min-width: 0;
    flex: 1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 5px 0 0;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    min-width: 56px;
    min-height: 56px;
    flex: 1 0 56px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-radius: 9px;
    padding: 5px 3px;
    font-size: 9px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
  }
  .nav-icon { width: 20px; height: 20px; }
  .main-wrapper { margin-left: 0; }
  .main-wrapper { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .products-row { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-categories { gap: 10px; }
  .hero-category-item { min-width: 62px; }
  .hero-category-icon { width: 44px; height: 44px; }
  .topbar {
    position: relative;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
  }
  .search-bar { width: 100%; max-width: none; }
  .search-bar input { min-width: 0; font-size: 16px; }
  .btn-buscar { padding: 9px 12px; }
  .top-nav {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  .top-nav a { font-size: 12px; }
  .top-nav .btn-outline,
  .top-nav .btn-solid { min-height: 40px; padding: 8px 12px; }
  .content { padding-right: 14px; padding-left: 14px; }
  .hero-banner { margin-top: 14px; padding: 24px 18px 20px; }
  .hero-text h1 { font-size: clamp(24px, 7vw, 30px); }
  .hero-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }
  .hero-category-item { flex: 0 0 68px; }
  .right-col { grid-template-columns: 1fr; }
  .marketplace-footer { align-items: stretch; flex-direction: column; gap: 12px; }
  .marketplace-footer .features-strip {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 4px;
  }
  .marketplace-footer .feature-item {
    min-width: 0;
    padding: 12px;
  }
  .marketplace-footer .feature-icon { width: 38px; height: 38px; }
  .marketplace-footer .feature-icon svg { width: 22px; height: 22px; }
  .marketplace-footer .feature-item strong { font-size: 12px; }
  .marketplace-footer .feature-item p { font-size: 11px; }
}

@media (max-width: 480px) {
  .top-nav { justify-content: space-between; }
  .top-nav a:nth-child(2) { display: none; }
  .marketplace-footer { gap: 9px 14px; font-size: 11px; }
  .marketplace-footer .features-strip { border-radius: 12px; }
  .marketplace-footer .feature-item { gap: 10px; padding: 11px; }
  .section-block { padding: 14px; margin-bottom: 14px; }
  .products-row { gap: 9px; }
  .product-card { min-width: 0; }
  .categories-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .nav-item { scroll-behavior: auto; }
}