/* El Tiendazo · capa propia sobre MarketPro.
   Usa solo las variables de color de MarketPro (--main-*) para que cada tienda
   herede su color de marca desde {% variables_color %}. */

/* Bootstrap da a .h1….h6 color «inherit» con más especificidad que la regla h1…h6 de MarketPro:
   sin esto los títulos con clase .hN salen del gris del texto. */
:root { --bs-heading-color: hsl(var(--heading-color)); }
html { scroll-behavior: smooth; }
/* MarketPro fija padding en .common-input y la flecha del select se monta sobre el texto. */
.common-input.form-select { padding-right: 44px !important; background-position: right 16px center; text-overflow: ellipsis; }
body { overflow-x: hidden; }
img { max-width: 100%; }
.min-w-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }
.w-48 { width: 48px; } .h-48 { height: 48px; }
.w-64 { width: 64px; } .h-64 { height: 64px; }

/* ---------------------------------------------------------------- barra superior y cabecera */
.tz-topbar { font-size: 14px; }
.tz-topbar__zona { min-width: 0; }
.tz-topbar__zona span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575px) {
  .tz-topbar__zona span { white-space: normal; line-height: 1.3; }
}
.tz-header { position: sticky; top: 0; z-index: 50; }
.tz-header input[type=search]::-webkit-search-cancel-button { display: none; }

.tz-logo { display: inline-flex; align-items: center; text-decoration: none; }
.tz-logo__marca { display: inline-flex; align-items: center; gap: 10px; }
.tz-logo__icono {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--main-600); color: #fff; font-size: 24px; flex-shrink: 0;
}
.tz-logo__texto { font-family: var(--heading-font); font-weight: 700; font-size: 22px; color: hsl(var(--heading-color, 235 49% 14%)); line-height: 1; white-space: nowrap; }
.tz-logo__img { max-height: 48px; width: auto; }
@media (max-width: 400px) {
  .tz-logo__icono { width: 36px; height: 36px; font-size: 20px; }
  .tz-logo__texto { font-size: 18px; }
}

.tz-contador {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--main-600); color: #fff; font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}

.tz-nav .nav-menu__link { padding: 14px 0; display: inline-block; }
.tz-nav .nav-menu__item.activePage .nav-menu__link { color: var(--main-600) !important; }
.tz-boton-categorias { border-radius: 0; min-width: 220px; justify-content: space-between; }
.tz-menu-categorias { min-width: 260px; max-height: 70vh; overflow-y: auto; border-radius: 0 0 12px 12px; }
.tz-menu-categorias .dropdown-item:hover { background: var(--main-50); color: var(--main-600); }

.mobile-menu .nav-menu--mobile { flex-direction: column; align-items: stretch; }
.mobile-menu .nav-menu--mobile .nav-menu__link { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.mobile-menu .close-button { z-index: 2; }
body.tz-bloqueado { overflow: hidden; }

.tz-mensajes .alert { border: 0; }
.tz-mensajes .alert-error { background: #fdecec; color: #b42318; }

/* ---------------------------------------------------------------- portada */
.tz-hero { background: linear-gradient(120deg, var(--main-50), #fff 60%); padding: 24px 0 8px; }
.tz-hero__caja {
  border-radius: 24px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.14), transparent 45%), linear-gradient(120deg, var(--main-800), var(--main-600));
}
.tz-hero__titulo { font-size: clamp(28px, 4.2vw, 52px); line-height: 1.12; }
.tz-hero__texto { font-size: clamp(15px, 1.4vw, 18px); max-width: 560px; }
.tz-hero__icono {
  width: clamp(140px, 22vw, 280px); height: clamp(140px, 22vw, 280px); border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: clamp(64px, 10vw, 130px); margin-inline: auto;
}
.tz-categoria {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 8px; border-radius: 16px;
  border: 1px solid #ececec; text-align: center; transition: .2s; height: 100%; color: inherit;
}
.tz-categoria:hover { border-color: var(--main-600); background: var(--main-50); }
.tz-categoria i { font-size: 36px; color: var(--main-600); }
.tz-banda { border-radius: 20px; background: var(--main-600); color: #fff; }
.tz-banda a.btn { background: #fff; color: var(--main-600); }
.tz-banda h2, .tz-banda .tz-banda__enlace { color: #fff !important; }
.tz-banda .product-card { background: #fff; border-color: transparent !important; }

/* ---------------------------------------------------------------- tarjetas de producto */
.product-card { height: 100%; display: flex; flex-direction: column; }
.product-card .product-card__content { flex-grow: 1; display: flex; flex-direction: column; }
.tz-card-img { height: 180px; display: flex; align-items: center; justify-content: center; background: #f7f8fa; border-radius: 12px; overflow: hidden; }
.tz-card-img img { max-height: 160px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.tz-sin-imagen { font-size: 64px; }
@media (max-width: 575px) { .tz-card-img { height: 140px; } .tz-card-img img { max-height: 124px; } }
.product-card .title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }

.tz-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.tz-badge--success { background: #e7f6ec; color: #087443; }
.tz-badge--warning { background: #fff4e5; color: #b54708; }
.tz-badge--danger { background: #fdecec; color: #b42318; }
.tz-badge--info { background: #e8f1fd; color: #175cd3; }
.tz-badge--primary { background: var(--main-50); color: var(--main-700); }
.tz-badge--tertiary { background: #f1ecfd; color: #6941c6; }
.tz-badge--gray { background: #f2f4f7; color: #475467; }

/* ---------------------------------------------------------------- catálogo / detalle */
.shop-sidebar { border-radius: 16px; }
@media (max-width: 991px) {
  .shop-sidebar { position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; z-index: 1000; width: min(340px, 88vw); background: #fff; overflow-y: auto;
    transform: translateX(-100%); transition: transform .25s; padding: 24px; border-radius: 0; visibility: hidden; }
  .shop-sidebar.active { transform: none; visibility: visible; }
}
.tz-galeria-principal { height: clamp(260px, 40vw, 460px); }
.tz-galeria-principal img { width: 100%; height: 100%; object-fit: contain; }
.tz-galeria-principal .tz-sin-imagen { font-size: 120px; }
.tz-miniatura { width: 72px; height: 72px; background: #fff; display: flex; align-items: center; justify-content: center; }
.tz-miniatura img { max-height: 100%; object-fit: contain; }
.tz-miniatura.activa, .tz-miniatura:hover { border-color: var(--main-600) !important; }
.tz-cantidad input { -moz-appearance: textfield; min-width: 0; }
.tz-cantidad input::-webkit-outer-spin-button, .tz-cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tz-descripcion { line-height: 1.7; }
.tz-descripcion p { margin: 0 0 12px; }
.tz-descripcion p:last-child { margin-bottom: 0; }
.tz-aviso-zona { border-radius: 12px; background: #fff8eb; border: 1px dashed #f5b74f; }

/* ---------------------------------------------------------------- carrito / checkout */
.tz-linea { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; }
.tz-linea:last-child { border-bottom: 0; }
.tz-linea__img { width: 72px; height: 72px; border-radius: 10px; background: #f7f8fa; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.tz-linea__img img { max-height: 64px; object-fit: contain; }
.tz-linea__total { min-width: 90px; }
@media (max-width: 575px) {
  .tz-linea { gap: 12px; }
  .tz-linea__img { width: 56px; height: 56px; }
  .tz-linea__total { min-width: 0; margin-left: auto; }
}
@media (min-width: 992px) { .tz-sticky { position: sticky; top: 110px; } }
.tz-paso {
  width: 30px; height: 30px; border-radius: 50%; background: var(--main-600); color: #fff; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tz-metodo { transition: .15s; }
.tz-metodo:has(input:checked) { border-color: var(--main-600) !important; background: var(--main-50); }
.form-check-input:checked { background-color: var(--main-600); border-color: var(--main-600); }
.form-check-input:focus, .common-input:focus { box-shadow: 0 0 0 3px var(--main-100); border-color: var(--main-600); }

/* ---------------------------------------------------------------- confirmación y rastreo */
.tz-icono-grande { width: 88px; height: 88px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 48px; }
.tz-codigo { color: var(--heading-color, #101828); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.tz-pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; position: relative; }
.tz-paso-rastreo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; position: relative; color: #98a2b3; }
.tz-paso-rastreo::before { content: ''; position: absolute; top: 22px; left: calc(-50% + 26px); right: calc(50% + 26px); height: 3px; background: #e4e7ec; border-radius: 2px; }
.tz-paso-rastreo:first-child::before { display: none; }
.tz-paso-rastreo__icono { width: 46px; height: 46px; border-radius: 50%; background: #f2f4f7; display: flex; align-items: center; justify-content: center; font-size: 22px; position: relative; z-index: 1; }
.tz-paso-rastreo__texto { font-weight: 600; font-size: 14px; }
.tz-paso-rastreo__fecha { font-size: 12px; }
.tz-paso-rastreo--hecho { color: hsl(var(--heading-color, 235 49% 14%)); }
.tz-paso-rastreo--hecho::before { background: var(--main-600); }
.tz-paso-rastreo--hecho .tz-paso-rastreo__icono { background: var(--main-600); color: #fff; }
.tz-paso-rastreo--actual .tz-paso-rastreo__icono { box-shadow: 0 0 0 6px var(--main-100); }
@media (max-width: 575px) {
  .tz-pasos { grid-template-columns: 1fr; gap: 0; }
  .tz-paso-rastreo { flex-direction: row; text-align: left; gap: 12px; padding: 8px 0; }
  .tz-paso-rastreo::before { top: -12px; left: 21px; right: auto; width: 3px; height: 24px; }
  .tz-paso-rastreo__fecha { margin-left: auto; }
}
.tz-historial { list-style: none; padding: 0; margin: 0; border-left: 2px solid #eaecf0; }
.tz-historial li { position: relative; padding: 0 0 18px 20px; }
.tz-historial li::before { content: ''; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--main-600); border: 2px solid #fff; }
.tz-datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.tz-datos dt { color: #667085; font-weight: 500; }
.tz-datos dd { margin: 0; word-break: break-word; color: #1d2939; }

/* ---------------------------------------------------------------- cuenta, vacíos y errores */
.tz-menu-cuenta a, .tz-menu-cuenta button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #475467; background: none; border: 0; font-weight: 500;
}
.tz-menu-cuenta a i, .tz-menu-cuenta button i { font-size: 20px; }
.tz-menu-cuenta a:hover, .tz-menu-cuenta button:hover, .tz-menu-cuenta a.activo { background: var(--main-50); color: var(--main-600); }
.tz-pedido { color: inherit; }
.tz-vacio__icono { font-size: 72px; display: block; }
.tz-404 { font-family: var(--heading-font); font-weight: 700; font-size: clamp(72px, 14vw, 140px); line-height: 1; }

/* ---------------------------------------------------------------- utilidades de pie */
.footer .common-input { min-width: 0; }
.bottom-footer__text { font-size: 14px; }

/* Select que comparte fila con un botón: crece, pero puede encogerse por debajo del texto más largo. */
.tz-select-flexible { width: auto; min-width: 0; flex-basis: 200px; max-width: 100%; }
@media (max-width: 575px) { .tz-select-flexible { flex-basis: 100%; } }  /* en móvil el select ocupa la fila y el botón baja */

/* Historial del rastreo: en móvil la fecha baja bajo el estado en vez de partir palabras («En preparació-n»). */
.tz-historial .fw-semibold { overflow-wrap: normal; word-break: normal; hyphens: none; }
@media (max-width: 575px) {
  .tz-historial li.flex-align { flex-wrap: wrap; }
  .tz-historial li.flex-align > .flex-grow-1 { min-width: 0; flex-basis: calc(100% - 56px); }
  .tz-historial li.flex-align > span.text-sm { flex-basis: 100%; padding-left: 56px; margin-top: -6px; }
}

/* Interruptores y casillas con ps-0: sin el margen negativo de Bootstrap no se salen del contenedor. */
.form-check.ps-0 > .form-check-input { margin-left: 0; float: none; flex-shrink: 0; }

/* Campos de solo lectura o desactivados: con borde y fondo gris para que se lean como campo. */
.common-input:disabled, .common-input[readonly], select.common-input:disabled, .form-select:disabled {
  background-color: #f2f4f7 !important; color: #475467; border: 1px solid #d0d5dd !important; opacity: 1; cursor: not-allowed; }

/* Barra superior: el texto de la zona se recorta con «…» y «Cambiar» siempre se ve; nada se parte en dos líneas. */
.tz-topbar__zona { min-width: 0; flex: 1 1 auto; }
.tz-topbar__texto { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tarjetas de producto: el pie (precio y botón) ocupa todo el ancho y todos los botones son iguales. */
.product-card__content > .mt-auto, .product-card form { width: 100%; }
.product-card .product-card__cart { width: 100%; white-space: nowrap; }
/* El tema pone align-items:start en .product-card y el contenido se encogía al ancho del texto. */
.product-card > .product-card__content, .product-card > .product-card__thumb { align-self: stretch; width: 100%; }
/* Rastreo: el campo admite minúsculas al escribir, pero el texto de ejemplo no se transforma; en móvil el botón ocupa todo el ancho. */
.tz-rastreo-codigo::placeholder { text-transform: none; }
.tz-rastreo-codigo { flex-basis: 220px; }
@media (max-width: 575.98px) { .tz-rastreo-boton { width: 100%; } }
/* Sellos de formas de pago del pie (en español; sustituyen la imagen del tema con «Secure Payment»). */
.tz-sello-pago { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid #e4e7ec;
  border-radius: 6px; background: #fff; font-size: 12px; font-weight: 600; color: #344054; white-space: nowrap; }
.tz-sello-pago i { font-size: 15px; color: var(--main-600); }

/* ---- tercera revisión a ojo ---- */
.tz-con-error .common-input, .tz-con-error select, .tz-con-error textarea { border-color: #f04438 !important; background-color: #fffbfa; }
textarea.common-input { line-height: 1.5 !important; }

/* Historial con icono por evento (rastreo): sin la línea ni el punto del historial simple, que quedaban sueltos. */
.tz-historial:has(> li.flex-align) { border-left: 0; }
.tz-historial > li.flex-align { padding: 12px 0; }
.tz-historial > li.flex-align::before { content: none; }

/* Menú móvil: opciones legibles (el tema las pinta gris claro y a 13 px) y la X dentro del panel, alineada con el logo. */
.mobile-menu .nav-menu--mobile .nav-menu__link { color: #344054; font-size: 15px; }
.mobile-menu .nav-menu--mobile .nav-menu__link:hover { color: var(--main-600); }
.mobile-menu .close-button { width: 36px; height: 36px; inset-inline-end: 16px; inset-block-start: 22px; font-size: 18px; }
.mobile-menu .mobile-menu__logo { padding-inline-end: 48px; }

/* Casillas y radios sin marcar: borde visible (el gris por defecto casi no se ve sobre blanco). */
.form-check-input:not(:checked) { border-color: #98a2b3; }

/* Desplegables de formulario: altura de línea suficiente para que no se corten las letras con descendente (g, p, y). */
select.common-input, .common-input.form-select { line-height: 1.5; padding-top: 12px; padding-bottom: 12px; height: auto; }

/* ================================================================ selector propio (web/selector.js)
   Sustituye el desplegable nativo del navegador en todos los <select>. El <select> real queda debajo,
   invisible, para el formulario y la validación; el botón copia sus clases (common-input, form-select…). */
.tzs { position: relative; display: block; min-width: 0; }
.tzs--auto { display: inline-block; vertical-align: middle; max-width: 100%; }
.tzs > select.tzs__nativo { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  opacity: 0 !important; pointer-events: none !important; margin: 0 !important; z-index: -1; }
.tzs__boton { display: flex; align-items: center; width: 100%; text-align: left; font-family: inherit; font-weight: 400;
  color: #101828; cursor: pointer; white-space: nowrap; user-select: none; transition: border-color .15s, box-shadow .15s; }
.tzs__boton .tzs__texto { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tzs__boton.es-vacio .tzs__texto { color: #667085; }
.tzs__boton:hover:not(:disabled) { border-color: var(--main-600); }
.tzs__boton:focus-visible, .tzs.esta-abierto .tzs__boton { outline: none; border-color: var(--main-600) !important;
  box-shadow: 0 0 0 3px hsla(var(--main-h), var(--main-s), var(--main-l), .16); }
.tzs.esta-abierto .tzs__boton { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 11 6-6 6 6'/%3e%3c/svg%3e"); }
.tzs__boton:disabled { cursor: not-allowed; }
.tzs__boton.es-invalido { border-color: #f04438 !important; background-color: #fffbfa; }
select.common-input + .tzs__boton, .tzs__boton.common-input { line-height: 1.5; padding-top: 12px; padding-bottom: 12px; height: auto; }
.tz-con-error .tzs__boton { border-color: #f04438 !important; background-color: #fffbfa; }

.tzs__panel { position: fixed; z-index: 1090; display: flex; flex-direction: column; background: #fff; border: 1px solid #eaecf0;
  border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px rgba(16, 24, 40, .16), 0 4px 10px rgba(16, 24, 40, .06);
  font-size: 15px; animation: tzs-entrar .12s ease-out; overflow: hidden; }
.tzs__panel.hacia-arriba { animation-name: tzs-entrar-arriba; }
@keyframes tzs-entrar { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes tzs-entrar-arriba { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tzs__buscar { position: relative; margin: 2px 2px 6px; flex: 0 0 auto; }
.tzs__buscar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 16px; pointer-events: none; }
.tzs__buscar input { width: 100%; height: 40px; border: 1px solid #eaecf0; border-radius: 10px; padding: 0 12px 0 36px; font-size: 14px;
  background: #f9fafb; color: #101828; outline: none; }
.tzs__buscar input:focus { border-color: var(--main-600); background: #fff; box-shadow: 0 0 0 3px hsla(var(--main-h), var(--main-s), var(--main-l), .14); }
.tzs__lista { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tzs__opcion { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: #101828;
  line-height: 1.35; }
.tzs__opcion-texto { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tzs__opcion.en-grupo { padding-left: 20px; }
.tzs__opcion.activa { background: var(--main-50); }
.tzs__opcion.es-elegida { color: var(--main-600); font-weight: 600; }
.tzs__opcion.es-placeholder { color: #667085; }
.tzs__opcion.es-deshabilitada { color: #98a2b3; cursor: not-allowed; background: none; }
.tzs__marca { flex: 0 0 auto; font-size: 16px; color: var(--main-600); }
.tzs__grupo { padding: 10px 12px 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #98a2b3; }
.tzs__vacio { padding: 14px 12px; text-align: center; color: #667085; font-size: 14px; }
.tzs__panel--sm { font-size: 14px; }
.tzs__panel--sm .tzs__opcion { padding: 7px 10px; }
@media (max-width: 575.98px) { .tzs__opcion { padding: 11px 12px; } }
