/* ============================================================
   bc-global-fixes-v6.css — Bebé Crece
   FIX 1: Productos recomendados sin scrollbar, layout limpio
   FIX 2: Imagen de tarjeta con fondo blanco en todas las categorías
   FIX 3: Interfaz modal igual en todas las categorías
   ============================================================ */

/* ══════════════════════════════════════════
   FIX 1: PRODUCTOS RECOMENDADOS — sin scrollbar
   ══════════════════════════════════════════ */
.recommend-grid,
#modalRecommendedProducts {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.recommend-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  text-align: left !important;
  border: 1px solid #dbe6f8 !important;
  background: #fff !important;
  border-radius: 16px !important;
  padding: 10px !important;
  cursor: pointer !important;
  transition: .18s ease !important;
  box-shadow: 0 6px 16px rgba(16,42,99,.06) !important;
  min-height: auto !important;
  overflow: hidden !important;
}
.recommend-card:hover {
  transform: translateY(-2px) !important;
  border-color: #b8cff5 !important;
  box-shadow: 0 10px 22px rgba(16,42,99,.12) !important;
}
.recommend-card img {
  width: 100% !important;
  height: 80px !important;
  object-fit: contain !important;
  background: #f4f8ff !important;
  border-radius: 10px !important;
  padding: 6px !important;
  flex: none !important;
  border: 1px solid #edf3ff !important;
}
.recommend-card span,
.recommend-card .rc-name,
.recommend-card .name {
  display: block !important;
  color: #102A63 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  white-space: normal !important;
}
.recommend-card .rc-meta,
.recommend-card .meta {
  display: block !important;
  color: #647396 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
.recommend-card .rc-price,
.recommend-card .price {
  display: block !important;
  color: #2048A0 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  margin-top: 2px !important;
}

/* ══════════════════════════════════════════
   FIX 2: IMAGEN DE TARJETA — fondo blanco consistente
   ══════════════════════════════════════════ */
.product-card .product-img,
.product-card-compact .product-img,
article.product-card > .product-img {
  background: #ffffff !important;
  border-bottom: 1px solid #eef3fb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px !important;
  height: 220px !important;
  overflow: hidden !important;
  border-radius: 18px 18px 0 0 !important;
}

.product-card .product-img img,
.product-card-compact .product-img img,
article.product-card > .product-img img {
  max-width: 100% !important;
  max-height: 192px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border-radius: 10px !important;
  display: block !important;
}

/* ══════════════════════════════════════════
   FIX 3: MODAL — interfaz igual en todas las categorías
   ══════════════════════════════════════════ */

/* Imagen principal — grande en todas las categorías */
#modalProductImage {
  width: 100% !important;
  height: 420px !important;
  object-fit: contain !important;
  background: #fff !important;
  border-radius: 16px !important;
  padding: 12px !important;
  display: block !important;
}
@media (max-width: 760px) {
  #modalProductImage { height: 280px !important; }
}

/* Columna izquierda */
.detail-image {
  background: linear-gradient(135deg,#f8fbff,#eef4ff) !important;
  border: 1px solid #d8e6fb !important;
  border-radius: 24px !important;
  padding: 18px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative !important;
  overflow: visible !important;
}

/* Galería de miniaturas */
.detail-gallery-wrap {
  position: relative !important;
  width: 100% !important;
  padding: 0 40px !important;
  margin-top: 10px !important;
  box-sizing: border-box !important;
}
.detail-gallery {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  padding: 4px 0 6px !important;
  scrollbar-width: none !important;
}
.detail-gallery::-webkit-scrollbar { display: none !important; }

.detail-gallery button,
.detail-gallery > button {
  flex: 0 0 68px !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 14px !important;
  border: 2px solid #d6e2f6 !important;
  background: #fff !important;
  padding: 5px !important;
  cursor: pointer !important;
  transition: .18s ease !important;
  overflow: hidden !important;
}
.detail-gallery button.active {
  border-color: #2048A0 !important;
  box-shadow: 0 0 0 3px rgba(32,72,160,.15) !important;
  transform: translateY(-1px) !important;
}
.detail-gallery button img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 8px !important;
}

/* Flechas de galería — ocultas en todas las categorías */
.detail-gallery-nav,
#modalGalleryPrev,
#modalGalleryNext,
#galleryPrev,
#galleryNext {
  display: none !important;
}

/* Galería contenida — miniaturas dentro de la columna izquierda */
.detail-gallery-wrap {
  padding: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  margin-top: 10px !important;
  box-sizing: border-box !important;
}
.detail-gallery {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  overflow: hidden !important;
  width: 100% !important;
  padding: 0 !important;
  justify-content: flex-start !important;
  max-height: 130px !important;
}
.detail-gallery button,
.detail-gallery > button {
  flex: 0 0 56px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 12px !important;
  border: 2px solid #d6e2f6 !important;
  background: #fff !important;
  padding: 4px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.detail-gallery button.active {
  border-color: #2048A0 !important;
  box-shadow: 0 0 0 2px rgba(32,72,160,.18) !important;
}
.detail-gallery button img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 7px !important;
}

/* Botón Zoom */
.detail-image-zoom-btn,
.modal-zoom-btn,
#modalZoomBtn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 3 !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid #d6e2f6 !important;
  border-radius: 999px !important;
  padding: 7px 13px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #2048A0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 4px 14px rgba(14,47,120,.10) !important;
}

/* Contador del carrito — siempre visible */
#cartCountTop,
#cartCountFloat,
[data-cart-count] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 20px !important;
  height: 20px !important;
  background: var(--yellow, #FBC530) !important;
  color: #102A63 !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  padding: 0 4px !important;
}

/* Mobile */
@media (max-width: 760px) {
  .detail-gallery-wrap { padding: 0 36px !important; }
  .detail-gallery button { flex-basis: 58px !important; width: 58px !important; height: 58px !important; }
  #modalProductImage { height: 230px !important; }
  .recommend-grid, #modalRecommendedProducts { grid-template-columns: 1fr 1fr !important; }
  .modal-side-extra { display: block !important; }
}


/* ============================================================
   BC FIX: precios con Antes + Descuento en productos con oldPrice
   ============================================================ */
.product-card .price.price-offer,
.price.price-offer,
.detail-price.price-offer{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:4px !important;
  line-height:1.15 !important;
  white-space:normal !important;
}
.product-card .price.price-offer{margin-top:auto !important;margin-bottom:14px !important;}
.price-before,
.price-current{
  display:flex !important;
  align-items:baseline !important;
  gap:7px !important;
  flex-wrap:wrap !important;
}
.price-label{
  font-size:11px !important;
  line-height:1 !important;
  font-weight:900 !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
  color:#8b98b7 !important;
}
.old-price{
  color:#7b849b !important;
  font-size:14px !important;
  font-weight:800 !important;
  text-decoration:line-through !important;
  opacity:.9 !important;
}
.price-now-value{
  color:var(--bc-blue, var(--blue, #2048A0)) !important;
  font-size:22px !important;
  font-weight:950 !important;
}
.detail-price.price-offer .old-price{font-size:17px !important;}
.detail-price.price-offer .price-now-value{font-size:40px !important;letter-spacing:-.03em !important;}
.recommend-card .old-price{font-size:11px !important;}
@media (max-width: 640px){
  .price-now-value{font-size:20px !important;}
  .detail-price.price-offer .price-now-value{font-size:32px !important;}
}



/* === FIX FINAL: mostrar nombres completos de productos en tarjetas === */
.product-card h3,
.product-card .product-body h3,
.product-card .product-title,
.product-card .product-name,
.product-card-title,
.product-card .name,
.product-name-card {
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
}

.product-card,
.product-card .product-body,
.product-card .card-body {
  height: auto !important;
  min-height: 0 !important;
}

.recommend-card .name,
.recommend-card .rc-name,
.rc-name,
.similar-card .name,
.related-card .name {
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  height: auto !important;
  max-height: none !important;
}

.recommend-card,
.similar-card,
.related-card {
  height: auto !important;
  align-items: flex-start !important;
}




/* === FIX FINAL: precios de oferta en tarjetas === */
.product-card .price.price-offer,
.product-card strong.price.price-offer,
.price.price-offer {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  align-items: start !important;
  justify-content: start !important;
  color: inherit !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  letter-spacing: normal !important;
  white-space: normal !important;
  margin-top: auto !important;
  margin-bottom: 16px !important;
}

.product-card .price.price-offer .price-before,
.product-card .price.price-offer .price-current,
.price.price-offer .price-before,
.price.price-offer .price-current {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  line-height: 1.05 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.product-card .price.price-offer .price-label,
.price.price-offer .price-label {
  display: inline-block !important;
  min-width: 72px !important;
  max-width: 72px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
  color: #8b98b7 !important;
  white-space: nowrap !important;
}

.product-card .price.price-offer .old-price,
.price.price-offer .old-price {
  display: inline-block !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #8b98b7 !important;
  text-decoration: line-through !important;
  opacity: .9 !important;
  margin: 0 !important;
}

.product-card .price.price-offer .price-now-value,
.price.price-offer .price-now-value {
  display: inline-block !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  color: var(--bc-blue, var(--blue, #2048a0)) !important;
  letter-spacing: -.03em !important;
  margin: 0 !important;
}

.product-card .price.price-offer br,
.price.price-offer br {
  display: none !important;
}

/* Precio de oferta dentro del modal/detalle */
.detail-price.price-offer {
  display: grid !important;
  gap: 6px !important;
  align-items: start !important;
  color: inherit !important;
  line-height: 1.1 !important;
}
.detail-price.price-offer .price-before,
.detail-price.price-offer .price-current {
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
.detail-price.price-offer .price-label {
  min-width: 86px !important;
  max-width: 86px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
  color: #8b98b7 !important;
}
.detail-price.price-offer .old-price {
  font-size: 20px !important;
  line-height: 1 !important;
  color: #8b98b7 !important;
  text-decoration: line-through !important;
  font-weight: 900 !important;
}
.detail-price.price-offer .price-now-value {
  font-size: 36px !important;
  line-height: 1 !important;
  color: var(--bc-blue, var(--blue, #2048a0)) !important;
  font-weight: 950 !important;
}


/* FIX ULTRA FINAL: etiquetas Antes/Descuento pequeñas en todo el sitio */
.price-offer .price-label{font-size:11px !important;line-height:1 !important;font-weight:900 !important;letter-spacing:.05em !important;text-transform:uppercase !important;color:#8b98b7 !important;white-space:nowrap !important;display:inline-block !important;min-width:72px !important;max-width:72px !important;}
.price-offer .old-price{font-size:13px !important;line-height:1 !important;font-weight:900 !important;color:#8b98b7 !important;text-decoration:line-through !important;margin:0 !important;}
.price-offer .price-now-value{font-size:22px !important;line-height:1 !important;font-weight:950 !important;color:var(--bc-blue, var(--blue, #2048a0)) !important;margin:0 !important;}
.price-offer .price-before,.price-offer .price-current{display:flex !important;align-items:baseline !important;gap:8px !important;flex-wrap:nowrap !important;line-height:1.05 !important;}



/* FIX ULTRA FINAL: títulos completos de productos sin corte */
body .product-card h3,
body .product-grid .product-card h3,
body #productsGrid .product-card h3,
body .products-grid .product-card h3,
body .product-card .product-body h3,
body .product-card .product-title,
body .product-card .product-name,
body .product-name-card,
body .recommend-card .name,
body .similar-card .name,
body .related-card .name {
  display: block !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  hyphens: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-bottom: 10px !important;
}

body .product-card .product-body,
body .product-card,
body .recommend-card,
body .similar-card,
body .related-card {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

@media (max-width: 768px){
  body .product-card h3,
  body .product-grid .product-card h3,
  body #productsGrid .product-card h3,
  body .products-grid .product-card h3,
  body .product-card .product-body h3,
  body .product-card .product-title,
  body .product-card .product-name,
  body .product-name-card,
  body .recommend-card .name,
  body .similar-card .name,
  body .related-card .name {
    font-size: 14px !important;
    line-height: 1.15 !important;
  }
}

