/* ==========================================================================
   VARIABLES Y BASE
   ========================================================================== */
.binku-catalog {
  --catalog-primary: #1e3a8a;
  --catalog-primary-hover: #1d4ed8;
  --catalog-danger: #e11d48;
  --catalog-success: #25d366;
  --catalog-text: #1f2937;
  --catalog-muted: #6b7280;
  --catalog-border: #e5e7eb;
  --catalog-surface: #ffffff;
  --catalog-soft: #f8fafc;

  width: 100%;
  color: var(--catalog-text);
}

/* Mantiene el catálogo visualmente equilibrado en pantallas grandes */
.binku-catalog > :not(.catalog-toast-container) {
  margin-inline: auto;
}

.binku-catalog *,
.binku-catalog *::before,
.binku-catalog *::after {
  box-sizing: border-box;
}

body.binku-cart-open {
  overflow: hidden;
}

/* ==========================================================================
   BUSCADOR
   ========================================================================== */
.catalog-search-wrapper {
  position: relative;
  width: min(100%, 520px);
  margin: 12px auto 20px;
  padding: 0 14px;
}

.catalog-search-icon {
  position: absolute;
  top: 50%;
  left: 30px;
  z-index: 2;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.catalog-search-input {
  width: 100%;
  min-height: 45px;
  padding: 10px 44px 10px 42px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #fff;
  color: var(--catalog-text);
  font-size: 14px;
  outline: none;
  transition:
    border-color .2s ease,
    box-shadow .2s ease;
}

.catalog-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

.catalog-search-clear {
  position: absolute;
  top: 50%;
  right: 25px;
  width: 30px;
  height: 30px;
  display: none;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
}

.catalog-search-clear.visible {
  display: flex;
}

.catalog-empty-search {
  margin: 18px 14px;
  padding: 30px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #fafafa;
  color: var(--catalog-muted);
  text-align: center;
}

.catalog-empty-search i {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
  color: #94a3b8;
}

/* ==========================================================================
   TÍTULOS Y CATEGORÍAS
   ========================================================================== */
.catalog-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.catalog-section-title::before,
.catalog-section-title::after {
  content: "";
  width: 38px;
  height: 1px;
  background: #d1d5db;
}

.category-tabs-container {
  width: 100%;
  overflow-x: auto;
  padding: 2px 10px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-tabs-container::-webkit-scrollbar {
  display: none;
}

#menuTab {
  width: max-content;
  min-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  scroll-behavior: smooth;
}

/* Si existen muchas categorías, se alinean desde la izquierda para permitir scroll */
#menuTab.is-scrollable {
  justify-content: flex-start;
}

#menuTab .nav-item {
  flex: 0 0 auto;
}

#menuTab .nav-link {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f1f3f5;
  color: #343a40;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: .2s ease;
}

#menuTab .nav-link:hover {
  border-color: #d7dce2;
  background: #e9ecef;
}

#menuTab .nav-link.active {
  border-color: #212529;
  background: #212529;
  color: #fff !important;
  box-shadow: 0 5px 13px rgba(33, 37, 41, .15);
}

/* ==========================================================================
   GRID Y TARJETAS
   ========================================================================== */
.catalog-products-row {
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4px 16px;
}

.catalog-product-column {
  padding: 4px;
}

.market-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--catalog-border);
  border-radius: 14px;
  background: var(--catalog-surface);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.market-card:hover {
  border-color: #d7dce2;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .09);
  transform: translateY(-2px);
}

.market-card.is-sold-out {
  opacity: .78;
}

/* ==========================================================================
   IMÁGENES
   ========================================================================== */
.market-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f4f6;
}

.market-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  cursor: pointer;
  transition:
    opacity .3s ease,
    transform .3s ease;
}

.market-img.loaded {
  opacity: 1;
}

.market-card:hover .market-img.loaded {
  transform: scale(1.025);
}

.market-image-button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.market-skeleton {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      #f1f3f5 25%,
      #e5e7eb 50%,
      #f1f3f5 75%
    );
  background-size: 200% 100%;
  animation: catalogShimmer 1.4s infinite;
}

@keyframes catalogShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.catalog-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.catalog-badge-sale {
  top: 7px;
  right: 7px;
  background: var(--catalog-danger);
}

.catalog-badge-sold {
  top: 50%;
  left: 50%;
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .86);
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   CONTENIDO DE LA TARJETA
   ========================================================================== */
.market-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 9px 10px 10px;
}

.market-title {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;

  display: block;
  margin: 0;

  overflow: visible;
  white-space: normal;
  text-overflow: clip;

  color: #222;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.28;

  word-break: normal;
  overflow-wrap: break-word;

  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.market-description {
  min-height: 30px;
  margin: 4px 0 7px;
  overflow: hidden;
  color: var(--catalog-muted);
  font-size: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.market-price-box {
 
  margin-top: auto;
}

.market-price-old {
  color: #9ca3af;
  font-size: 10px;
  line-height: 1.1;
  text-decoration: line-through;
}

.market-price-current {
  color: var(--catalog-danger);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.market-price-consult {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.market-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 6px;
}

.product-whatsapp {
  margin-left: auto;
  color: var(--catalog-success);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  transition:
    transform .2s ease,
    opacity .2s ease;
}

.product-whatsapp:hover {
  color: #1fb958;
  transform: translateY(-1px);
}

.product-whatsapp[aria-disabled="true"] {
  opacity: .4;
  pointer-events: none;
}

/* ==========================================================================
   CONTROL DE CANTIDAD
   ========================================================================== */
.qty-container-card {
  min-height: 32px;
  display: flex;
  align-items: center;
}

.btn-add-card {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #bfcae2;
  border-radius: 50%;
  background: #fff;
  color: var(--catalog-primary);
  cursor: pointer;
  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

.btn-add-card:hover {
  background: var(--catalog-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-add-card:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.card-qty-control {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #f3f4f6;
  animation: catalogExpandQuantity .2s ease;
}

.card-qty-button {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1f2937;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.card-qty-button:hover {
  background: #fff;
}

.card-qty-number {
  min-width: 22px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@keyframes catalogExpandQuantity {
  from {
    width: 32px;
    opacity: 0;
  }

  to {
    width: 84px;
    opacity: 1;
  }
}

/* ==========================================================================
   DESTACADOS
   ========================================================================== */
.featured-slider {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
  padding: 4px 14px 14px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 14px;
}

/* Cuando los destacados superan el ancho disponible, comienzan desde la izquierda */
.featured-slider.is-scrollable {
  justify-content: flex-start;
}

.featured-slider::-webkit-scrollbar {
  display: none;
}

.featured-product {
  flex: 0 0 104px;
  width: 104px;
}

.featured-product .market-img-wrapper {
  aspect-ratio: 1 / .82;
}

.featured-product .market-body {
  padding: 6px 7px 7px;
}

.featured-product .market-title {
  min-height: 0;
  height: auto;
  max-height: none;

  display: block;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;

  font-size: 10px;
  line-height: 1.25;

  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}
.featured-product .market-description {
  display: none;
}

.featured-product .market-price-box {
  min-height: 25px;
}

.featured-product .market-price-current {
  font-size: 10px;
}

.featured-product .market-price-old {
  font-size: 8px;
}

.featured-product .market-price-consult {
  font-size: 9px;
}

.featured-product .btn-add-card {
  width: 25px;
  height: 25px;
  font-size: 9px;
}

.featured-product .product-whatsapp {
  font-size: 20px;
}

.featured-product .card-qty-button {
  width: 22px;
  height: 22px;
}

.featured-product .card-qty-number {
  min-width: 18px;
  font-size: 10px;
}

/* ==========================================================================
   TOAST
   ========================================================================== */
.catalog-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000000;
}

/* ==========================================================================
   CARRITO FLOTANTE
   ========================================================================== */
.floating-cart {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 9996;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--catalog-primary);
  color: #6e6b6b;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .23);
  transition:
    transform .2s ease,
    background .2s ease;
}

.floating-cart:hover {
  background: var(--catalog-primary-hover);
  transform: translateY(-2px);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 21px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

@keyframes catalogCartBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  65% { transform: scale(.94); }
  100% { transform: scale(1); }
}

.cart-animate {
  animation: catalogCartBounce .4s ease;
}

/* ==========================================================================
   BACKDROP Y PANEL
   ========================================================================== */
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9997;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition:
    opacity .25s ease,
    visibility .25s ease;
}

.cart-backdrop.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.fav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: clamp(360px, 32vw, 480px);
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: -12px 0 36px rgba(0, 0, 0, .18);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(103%);
  transition:
    transform .3s cubic-bezier(.4, 0, .2, 1),
    opacity .25s ease,
    visibility .3s ease;
}

.fav-panel.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.fav-panel-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.fav-panel-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fav-panel-title-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #e8eefc;
  color: var(--catalog-primary);
}

.fav-panel-title > div {
  min-width: 0;
}

.fav-panel-title h5 {
  margin: 0;
  color: #212529;
  font-size: 16px;
  font-weight: 800;
}

.fav-panel-title small {
  display: block;
  margin-top: 2px;
  color: #6c757d;
  font-size: 11px;
}

.fav-panel-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #e9ecef;
  color: #495057;
  cursor: pointer;
}

.fav-panel-close:hover {
  background: #dee2e6;
  color: #111;
}

.fav-panel-content {
  flex: 0 0 auto;
  max-height: 30vh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px;
}

.fav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f1f3;
}

.fav-item-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.fav-item-image {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  object-fit: cover;
}

.fav-item-info {
  min-width: 0;
}

.fav-item-title {
  margin: 0 0 3px;
  overflow: hidden;
  color: #212529;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-item-price {
  color: var(--catalog-primary);
  font-size: 11px;
  font-weight: 800;
}

.fav-item-quantity {
  display: flex;
  align-items: center;
  gap: 3px;
}

.fav-qty-button {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: #f1f3f5;
  color: #212529;
  font-weight: 800;
  cursor: pointer;
}

.fav-qty-number {
  min-width: 20px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.fav-item-remove {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #dc3545;
  cursor: pointer;
}

.fav-item-remove:hover {
  background: #fff1f2;
}

.cart-empty {
  padding: 55px 18px;
  color: #6c757d;
  text-align: center;
}

.cart-empty i {
  display: block;
  margin-bottom: 12px;
  color: #d1d5db;
  font-size: 40px;
}

.fav-panel-footer {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 13px 16px 18px;
  border-top: 1px solid #e9ecef;
  background: #fff;
}

/* ==============================================================
   ACCIONES FIJAS DEL CARRITO
   Total + botón principal + vaciar siempre visibles.
   ============================================================== */
.fav-panel-actions {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid #e9ecef;
  background: #fff;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
}

.fav-panel-actions .fav-summary {
  margin: 0 0 10px;
}

.fav-panel-actions .send-quote {
  width: 100%;
  min-height: 50px;
}

.fav-panel-actions .clear-cart {
  width: 100%;
  margin-top: 6px;
}

.fav-note-label {
  margin-bottom: 6px;
  color: #495057;
  font-size: 11px;
  font-weight: 700;
}

.fav-note {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
}

.fav-note:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.fav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 11px 0;
  padding: 12px;
  border-radius: 11px;
  background: #f8f9fa;
}

.fav-summary-label {
  color: #343a40;
  font-size: 12px;
  font-weight: 700;
}

.fav-total {
  color: var(--catalog-primary);
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

/* BOTÓN WHATSAPP DEL CARRITO */
.send-quote {
  width: 100%;
  min-height: 48px;

  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: none !important;
  border-radius: 11px;

  background: #25d366 !important;
  color: #ffffff !important;

  font-size: 13px;
  font-weight: 800;

  cursor: pointer;
  opacity: 1 !important;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.send-quote:hover:not(:disabled) {
  background: #20bd5a !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ESTADO SIN PRODUCTOS */
.send-quote:disabled {
  display: flex !important;

  background: #d8f3e2 !important;
  color: #639b77 !important;

  border: 1px solid #c7ead4 !important;

  opacity: 1 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

.send-quote:disabled i {
  color: #639b77 !important;
}

.clear-cart {
  width: 100%;
  margin-top: 7px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: #6c757d;
  font-size: 11px;
  cursor: pointer;
}

.clear-cart:hover {
  color: #dc3545;
}

/* ==========================================================================
   MODAL ÚNICO DE PRODUCTO
   ========================================================================== */
.catalog-modal-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f5f7;
}

.catalog-modal-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

.catalog-modal-description {
  color: #6c757d;
  font-size: 13px;
  line-height: 1.55;
}

.catalog-modal-price-old {
  color: #9ca3af;
  font-size: 12px;
  text-decoration: line-through;
}

.catalog-modal-price {
  color: var(--catalog-primary);
  font-size: 22px;
  font-weight: 900;
}

.catalog-modal-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.catalog-modal-add {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 575.98px) {
  .fav-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }

  .fav-panel-content {
    max-height: 22vh;
  }

  .fav-panel-footer {
    padding-bottom: 16px;
  }

  .fav-panel-actions {
    padding-right: 16px;
    padding-left: 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  #menuTab {
    justify-content: center;
  }

  #menuTab.is-scrollable {
    justify-content: flex-start;
  }

  .catalog-products-row {
    padding-right: 2px;
    padding-left: 2px;
  }

  .catalog-product-column {
    padding: 3px;
  }

  .market-card {
    border-radius: 11px;
  }

  .market-body {
    padding: 7px 7px 8px;
  }

.market-title {
  height: auto;
  min-height: 0;
  max-height: none;

  display: block;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;

  font-size: 10px;
  line-height: 1.25;

  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}
  .market-description {
    min-height: 0;
    font-size: 9px;
    -webkit-line-clamp: 2;
  }

  .market-price-current {
    font-size: 11px;
  }

  .market-price-old {
    font-size: 8px;
  }

  .product-whatsapp {
    font-size: 21px;
  }

  .featured-product {
    flex-basis: 96px;
    width: 96px;
  }

  .floating-cart {
    right: 14px;
    bottom: 82px;
    width: 52px;
    height: 52px;
  }

  .fav-panel {
    width: 100%;
    height: 100dvh;
  }

  .fav-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (min-width: 576px) {
  .featured-product {
    flex-basis: 116px;
    width: 116px;
  }
}
/* ==========================================================================
   MEJORA VISUAL PROFESIONAL DEL CATÁLOGO BINKU
   ========================================================================== */

/* Las columnas permiten que todas las tarjetas se estiren igual */
.catalog-product-column {
  display: flex;
}

/* Tarjeta uniforme */
.catalog-product-column .market-card,
.featured-product .market-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  border: 1px solid #e5e7eb;
  background: #ffffff;

  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

/* Hover moderno y discreto */
.catalog-product-column .market-card:hover,
.featured-product .market-card:hover {
  border-color: #d1d5db;

  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.11);

  transform: translateY(-3px);
}

/* Imágenes perfectamente alineadas */
.catalog-product-column .market-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.catalog-product-column .market-img,
.featured-product .market-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contenido interior */
.catalog-product-column .market-body,
.featured-product .market-body {
  flex: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;
}

/* =====================================================
   TÍTULOS: MÁXIMO 3 LÍNEAS
===================================================== */
.market-title {
  width: 100%;

  /* Altura exacta de tres líneas */
  min-height: calc(1.28em * 3);
  max-height: calc(1.28em * 3);

  display: -webkit-box;
  margin: 0;

  overflow: hidden;

  color: #222222;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.28;

  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;

  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Descripción uniforme */
.market-description {
  min-height: calc(1.35em * 2);
  max-height: calc(1.35em * 2);

  display: -webkit-box;
  margin: 5px 0 8px;

  overflow: hidden;

  font-size: 10px;
  line-height: 1.35;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Precio siempre alineado abajo */
.market-price-box {
  min-height: 34px;
  margin-top: auto;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Acciones alineadas */
.market-actions {
  min-height: 34px;
  margin-top: 6px;
}

/* =====================================================
   DESTACADOS MÁS ELEGANTES
===================================================== */
.featured-slider {
  gap: 11px;
  padding-top: 5px;
  padding-bottom: 17px;
}
.catalog-search-wrapper {
  margin: 12px auto 20px;
}
.featured-product {
  flex: 0 0 108px;
  width: 108px;

  display: flex;
}

.featured-product .market-card {
  border-radius: 13px;
}

.featured-product .market-img-wrapper {
  aspect-ratio: 1 / 0.88;
}

.featured-product .market-body {
  padding: 7px 8px 8px;
}

/* Tres líneas también en destacados */
.featured-product .market-title {
  min-height: calc(1.25em * 3);
  max-height: calc(1.25em * 3);

  font-size: 10px;
  line-height: 1.25;

  -webkit-line-clamp: 3;
}

.featured-product .market-price-box {
  min-height: 27px;
}

.featured-product .market-price-current {
  font-size: 11px;
  line-height: 1.2;
}

.featured-product .market-price-old {
  font-size: 8px;
}

.featured-product .market-price-consult {
  font-size: 9px;
  line-height: 1.2;
}

/* =====================================================
   CELULARES
===================================================== */
@media (max-width: 575.98px) {

  .catalog-products-row {
    padding-right: 3px;
    padding-left: 3px;
  }

  .catalog-product-column {
    padding: 3px;
  }

  .catalog-product-column .market-card {
    border-radius: 12px;
  }

  .catalog-product-column .market-body {
    padding: 8px 7px 9px;
  }

  /* Tres líneas uniformes en celular */
  .catalog-product-column .market-title {
    min-height: calc(1.25em * 3);
    max-height: calc(1.25em * 3);

    font-size: 10px;
    line-height: 1.25;

    -webkit-line-clamp: 3;
  }

  .catalog-product-column .market-description {
    min-height: calc(1.3em * 2);
    max-height: calc(1.3em * 2);

    margin: 4px 0 7px;

    font-size: 9px;
    line-height: 1.3;

    -webkit-line-clamp: 2;
  }

  .catalog-product-column .market-price-box {
    min-height: 29px;
  }

  .market-price-current {
    font-size: 11px;
  }

  .market-price-consult {
    font-size: 9px;
    line-height: 1.2;
  }

  .market-actions {
    min-height: 31px;
  }

  /* Destacados con mejor ancho */
  .featured-product {
    flex-basis: 101px;
    width: 101px;
  }

  .featured-product .market-title {
    min-height: calc(1.22em * 3);
    max-height: calc(1.22em * 3);

    font-size: 9.5px;
    line-height: 1.22;

    -webkit-line-clamp: 3;
  }
}

/* ==========================================================================
   CORRECCIÓN DEFINITIVA: TARJETAS SIN ESPACIOS VERTICALES
   ========================================================================== */

/* La fila comienza arriba y no estira sus elementos */
.catalog-products-row {
  align-items: flex-start !important;
}

/* La columna ocupa solamente lo necesario */
.catalog-product-column {
  display: block !important;
  align-self: flex-start !important;
  height: auto !important;
}

/* La tarjeta no toma la altura de otras tarjetas */
.catalog-product-column .market-card {
  display: block !important;
  width: 100% !important;
  height: fit-content !important;
  min-height: 0 !important;
}

/* El cuerpo deja de ser flex: elimina el espacio automático */
.catalog-product-column .market-body {
  display: block !important;
  flex: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

/* Título: máximo 3 líneas, sin reservar espacio */
.catalog-product-column .market-title {
  display: -webkit-box !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(1.25em * 3) !important;

  margin: 0 !important;
  overflow: hidden !important;

  font-size: 10px !important;
  line-height: 1.25 !important;

  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}

/* Descripción: máximo 2 líneas y sin altura reservada */
.catalog-product-column .market-description {
  display: -webkit-box !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(1.3em * 2) !important;

  margin: 5px 0 0 !important;
  overflow: hidden !important;

  font-size: 9px !important;
  line-height: 1.3 !important;

  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

/* Precio inmediatamente después del título o descripción */
.catalog-product-column .market-price-box {
  display: block !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;

  margin: 9px 0 0 !important;
}

/* Botones inmediatamente debajo del precio */
.catalog-product-column .market-actions {
  display: flex !important;
  align-items: center !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;

  margin: 8px 0 0 !important;
}

/* Mantiene el tamaño del botón, sin reservar altura adicional */
.catalog-product-column .qty-container-card {
  min-height: 0 !important;
}

/* ==========================================================================
   DESTACADOS SIN ESPACIOS
   ========================================================================== */

.featured-slider {
  align-items: flex-start !important;
}

.featured-product {
  align-self: flex-start !important;
  height: auto !important;
}

.featured-product .market-card {
  display: block !important;
  height: fit-content !important;
  min-height: 0 !important;
}

.featured-product .market-body {
  display: block !important;
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
}

.featured-product .market-title {
  display: -webkit-box !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: calc(1.22em * 3) !important;

  margin: 0 !important;

  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}

.featured-product .market-price-box {
  display: block !important;

  height: auto !important;
  min-height: 0 !important;

  margin: 9px 0 0 !important;
}

.featured-product .market-actions {
  height: auto !important;
  min-height: 0 !important;
  margin-top: 8px !important;
}