/* ============================================================
   dwe-carousel-feed-style.css
   Replica el estilo visual de feed-productos.css sobre el
   módulo DWE Woo Products Carousel (dwe_woo_products_carousel).

   Clases DWE → equivalente feed:
     .dwe_single_woo_product              → .feed-product-card
     .dwe_single_woo_product_thumbnail_wrapper → .feed-card-image-wrap
     .dwe_single_woo_product_thumbnail img → .feed-card-img
     .dwe_single_woo_product_sale_badge   → .feed-discount-badge
     .dwe_single_woo_product_title        → .feed-card-name
     .dwe_single_woo_product_price        → .feed-card-price
     .dwe_single_woo_product_add_to_cart  → .feed-card-actions
     .dwe_out_of_stock_product            → .feed-out-of-stock
     .dwe_out_of_stock_label              → .feed-unavailable
   ============================================================ */

/* ── Variables (independientes del archivo feed-productos.css) ── */
.dwe_woo_products_carousel {
  --dfc-primary:        #00B3A6;
  --dfc-primary-hover:  #009688;
  --dfc-sale:           #dc2626;
  --dfc-bg:             #f9fafb;
  --dfc-white:          #ffffff;
  --dfc-border:         #e5e7eb;
  --dfc-border-light:   #f3f4f6;
  --dfc-text:           #111827;
  --dfc-text-secondary: #6b7280;
  --dfc-text-muted:     #9ca3af;
  --dfc-radius:         0.5rem;
  --dfc-transition:     150ms ease;
  --dfc-shadow-md:      0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   CARD CONTENEDOR
   ============================================================ */

.dwe_woo_products_carousel .dwe_single_woo_product {
  background: var(--dfc-white);
  border: 1px solid var(--dfc-border-light);
  border-radius: var(--dfc-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color var(--dfc-transition), box-shadow var(--dfc-transition);
  height: 100%;
}

.dwe_woo_products_carousel .dwe_single_woo_product:hover {
  border-color: var(--dfc-border);
  box-shadow: var(--dfc-shadow-md);
}

/* ============================================================
   IMAGEN
   ============================================================ */

.dwe_woo_products_carousel .dwe_single_woo_product_thumbnail_wrapper {
  position: relative;
  aspect-ratio: 1;
  background: var(--dfc-bg);
  overflow: hidden;
  flex-shrink: 0;
}

.dwe_woo_products_carousel .dwe_single_woo_product_thumbnail {
  height: 100%;
  line-height: 0;
}

.dwe_woo_products_carousel .dwe_single_woo_product_thumbnail a {
  display: block;
  height: 100%;
}

.dwe_woo_products_carousel .dwe_single_woo_product_thumbnail img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  transition: transform 300ms ease;
  transform: scale(1);
}

.dwe_woo_products_carousel .dwe_single_woo_product:hover .dwe_single_woo_product_thumbnail img {
  transform: scale(1.04);
}

/* Sin stock: no hacer zoom */
.dwe_woo_products_carousel .dwe_out_of_stock_product:hover .dwe_single_woo_product_thumbnail img {
  transform: none !important;
}

/* ============================================================
   BADGE DE DESCUENTO (Sale!)
   ============================================================ */

.dwe_woo_products_carousel .dwe_single_woo_product_sale_badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  background: var(--dfc-sale);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  border-radius: 0.375rem;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* ============================================================
   OVERLAY AGOTADO
   ============================================================ */

.dwe_woo_products_carousel .dwe_out_of_stock_product .dwe_single_woo_product_thumbnail_wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  z-index: 1;
}

.dwe_woo_products_carousel .dwe_out_of_stock_product .dwe_single_woo_product_thumbnail_wrapper::before {
  content: 'Agotado';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: #1f2937;
  color: #fff;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Opacidad nivel card para stock agotado */
.dwe_woo_products_carousel .dwe_out_of_stock_product {
  opacity: 0.7;
}

/* Anular el overlay nativo de DWE (thumbnail + content) que oscurece todo */
.dwe_woo_products_carousel .dwe_out_of_stock_product .dwe_single_woo_product_content,
.dwe_woo_products_carousel .dwe_out_of_stock_product .dwe_single_woo_product_thumbnail_wrapper {
  opacity: 1 !important;
}

/* ============================================================
   CONTENIDO DE LA CARD
   ============================================================ */

.dwe_woo_products_carousel .dwe_single_woo_product_content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Título ── */

.dwe_woo_products_carousel .dwe_single_woo_product_title,
.dwe_woo_products_carousel .dwe_single_woo_product_title a {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--dfc-text);
  line-height: 1.4;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5rem;
  margin: 0 0 0.5rem;
  padding: 0;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.dwe_woo_products_carousel .dwe_single_woo_product_title a {
  text-decoration: none;
  display: -webkit-box;
}

.dwe_woo_products_carousel .dwe_single_woo_product_title a:hover {
  color: var(--dfc-primary);
}

/* ── Star rating ── */

.dwe_woo_products_carousel .dwe_single_woo_product_star_rating {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 0.375rem;
}

/* ── Precio ── */

.dwe_woo_products_carousel .dwe_single_woo_product_price {
  min-height: 2rem;
  margin-bottom: 0.625rem;
  margin-top: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dfc-text);
  line-height: 1.25;
  text-align: left;
}

.dwe_woo_products_carousel .dwe_single_woo_product_price .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.dwe_woo_products_carousel .dwe_single_woo_product_price del {
  color: var(--dfc-text-muted);
  font-size: 0.85em;
  font-weight: 400;
  display: block;
}

.dwe_woo_products_carousel .dwe_single_woo_product_price ins {
  text-decoration: none;
  color: var(--dfc-sale);
}

/* ── Etiqueta sin stock ── */

.dwe_woo_products_carousel .dwe_out_of_stock_label {
  font-size: 0.875rem;
  color: var(--dfc-text-secondary);
  font-weight: 500;
}

/* ============================================================
   BOTÓN AGREGAR AL CARRITO
   ============================================================ */

.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart {
  margin-top: auto;
}

.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.add_to_cart_button,
.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.added_to_cart,
.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0 0.75rem !important;
  height: 2.25rem;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  border-radius: var(--dfc-radius) !important;
  cursor: pointer;
  transition: background var(--dfc-transition), border-color var(--dfc-transition);
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1;
  width: 100%;
  background-color: var(--dfc-primary) !important;
  color: #fff !important;
  border: 1px solid transparent !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.add_to_cart_button:hover,
.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.added_to_cart:hover,
.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.button:hover {
  background-color: var(--dfc-primary-hover) !important;
  color: #fff !important;
  border-color: transparent !important;
  padding: 0 0.75rem !important;
}

/* ── Botón "View cart" (added_to_cart) ── */

.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.added_to_cart {
  background-color: var(--dfc-primary-hover) !important;
}

/* ── Spinner de carga (clase .loading de WC) ── */

.dwe_woo_products_carousel .dwe_single_woo_product_add_to_cart a.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ============================================================
   QUICKVIEW — ocultar o neutralizar si se prefiere
   (comentar el bloque si se usa el quickview del plugin)
   ============================================================ */

/* .dwe_woo_products_carousel .dwe_single_woo_product_quickview_wrapper {
  display: none;
} */

/* ============================================================
   PAGINACIÓN / FLECHAS DEL CAROUSEL — sin cambios visuales,
   solo hereda colores del tema para coherencia
   ============================================================ */

.dwe_woo_products_carousel .swiper-button-next,
.dwe_woo_products_carousel .swiper-button-prev {
  color: var(--dfc-primary);
}

.dwe_woo_products_carousel .swiper-pagination-bullet-active {
  background: var(--dfc-primary);
}
