/* Align product image and cart columns to the top */
.woocommerce-cart table.cart td.product-thumbnail,
.woocommerce-cart table.cart td.product-name,
.woocommerce-cart table.cart td.product-price,
.woocommerce-cart table.cart td.product-quantity,
.woocommerce-cart table.cart td.product-subtotal {
  vertical-align: top;
}

/* Style for dynamic texts of promotions */
.woocommerce-cart .promotion-text {
  font-size: 0.9em; /* Smaller size */
  color: #7d7d7d; /* Gray color */
  margin-top: 5px;
}

/* Promotion item styling in cart */
.woocommerce-cart tr.promotion-item {
  background-color: rgba(217, 83, 79, 0.1); /* Light red background */
  transition: background-color 0.3s ease;
  animation: fadeIn 0.5s ease-in-out;
}

.woocommerce-cart tr.promotion-item:hover {
  background-color: rgba(217, 83, 79, 0.2); /* Slightly darker on hover */
}

/* Different styling for different promotion types */
.woocommerce-cart tr.promotion-XY {
  border-left: 4px solid #d9534f; /* Red border for XY promotions */
}

.woocommerce-cart tr.promotion-XmasY {
  border-left: 4px solid #5bc0de; /* Blue border for XmasY promotions */
}

/* Promotion price styling */
.woocommerce-cart .promotion-subtotal {
  display: inline-block;
  background-color: #d9534f;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.woocommerce-cart .promotion-subtotal:hover {
  transform: scale(1.05);
}

.woocommerce-cart .promotion-name {
  display: block;
  font-size: 0.8em;
  margin-top: 5px;
  color: #555;
  font-style: italic;
}

/* Animation for promotion items */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced 3D badge styles */
/*
.woocommerce-badge,
span.woocommerce-badge,
.woocommerce span.onsale.woocommerce-badge,
.woocommerce-page span.onsale.woocommerce-badge,
.woocommerce ul.products li.product .onsale.woocommerce-badge {
  position: absolute !important;
  z-index: 9999 !important;
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-weight: 700 !important;
  text-align: center !important;
  border: none !important;
  overflow: visible !important;
  font-size: 1.5rem !important;
  line-height: 1.2 !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  bottom: auto !important;
  text-transform: uppercase !important;
  padding: 0 !important;
  margin: 0 !important;

  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
  transform-style: preserve-3d !important;
  perspective: 800px !important;
  transform: translateZ(0) rotateY(0) !important;
  backface-visibility: hidden !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;

  animation: badge3DPulse 3s infinite ease-in-out !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, filter 0.3s ease !important;
}*/

/* Hover effect with 3D transform */
.woocommerce-badge:hover,
span.woocommerce-badge:hover {
  transform: translateZ(5px) scale(1.08) rotateY(5deg) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 4px 4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.4) inset !important;
  filter: brightness(1.1) !important;
}

/* Enhanced 3D Animation */
@keyframes badge3DPulse {
  0% {
    transform: translateZ(0) rotateY(0) scale(1);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  }
  50% {
    transform: translateZ(3px) rotateY(3deg) scale(1.05);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.25), 0 3px 3px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  }
  100% {
    transform: translateZ(0) rotateY(0) scale(1);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  }
}

/* Apply the enhanced 3D animation to badges */
.woocommerce-badge,
span.woocommerce-badge {
  animation: badge3DPulse 3s infinite ease-in-out !important;
  top: 0 !important;
  left: 0 !important;
}

/* Enhanced colors with gradient effects for more depth */
.badge-oferta {
  background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
  box-shadow: 0 6px 10px rgba(76, 175, 80, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}

.badge-1mas1 {
  background: linear-gradient(135deg, #8bc34a, #689f38) !important;
  box-shadow: 0 6px 10px rgba(139, 195, 74, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}

.badge-2mas1 {
  background: linear-gradient(135deg, #e53935, #c62828) !important;
  box-shadow: 0 6px 10px rgba(229, 57, 53, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}

.badge-2por1,
.badge-oferta-xy {
  background: linear-gradient(135deg, #1976d2, #0d47a1) !important;
  box-shadow: 0 6px 10px rgba(25, 118, 210, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}

.badge-especial {
  background: linear-gradient(135deg, #ff9800, #ef6c00) !important;
  box-shadow: 0 6px 10px rgba(255, 152, 0, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}

.badge-descuento {
  background: linear-gradient(135deg, #ffa726, #ef6c00) !important;
  box-shadow: 0 6px 10px rgba(255, 167, 38, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}

/* Enhanced "promoción" label with 3D effect */
.badge-1mas1::before,
.badge-2mas1::before,
.badge-2por1::before,
.badge-oferta-xy::before {
  display: block !important;
  font-size: 10px !important;
  font-weight: normal !important;
  text-transform: lowercase !important;
  margin-bottom: 3px !important;
  line-height: 1 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
  opacity: 0.9 !important;
  transform: translateZ(1px) !important;
}

/* Make sure the percentage badge maintains the 3D circular style */
/*
.woocommerce-badge.badge-descuento,
span.woocommerce-badge.badge-descuento {
  display: flex !important;
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ffa726, #ef6c00) !important;
  color: white !important;
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  animation: badge3DPulse 3s infinite ease-in-out !important;
}*/

/* Override any previous conflicting styles */
/*
.product .woocommerce-badge.badge-descuento,
.products .woocommerce-badge.badge-descuento {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  box-shadow: 0 6px 10px rgba(255, 167, 38, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
}*/

/* Eliminate any conflicting styles from theme */
.woocommerce span.onsale {
  display: none !important;
}

/* Mobile responsive adjustments with 3D effect preserved */
@media (max-width: 768px) {
  .woocommerce-badge,
  span.woocommerce-badge,
  .woocommerce-badge.badge-descuento,
  span.woocommerce-badge.badge-descuento {
    width: 65px !important;
    height: 65px !important;
    font-size: 14px !important;
    top: 5px !important;
    left: 5px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
  }

  .badge-1mas1::before,
  .badge-2mas1::before,
  .badge-2por1::before,
  .badge-oferta-xy::before {
    font-size: 8px !important;
    margin-bottom: 2px !important;
  }
}

/* Ensure product containers allow absolute positioning of badges */
.products li,
.product,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce-product-gallery,
.woocommerce-loop-product__link,
.product-wrapper {
  position: relative !important;
  overflow: visible !important;
}

/* Product wrapper positioning relative to allow absolute positioning of badges */
.product,
.products .product-wrapper,
.woocommerce-loop-product__link {
  position: relative;
}

/* Special text styling for longer text in badges */
.woocommerce-badge.badge-descuento {
  font-size: 1.5rem;
}

/* Percentage discount styling */
.percentage-discount {
  display: inline-block;
  background-color: #d9534f;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 5px;
  font-weight: bold;
  font-size: 0.9em;
  animation: fadeIn 0.5s ease-in-out;
}

/* Promotion banner styling */
.promotion-banner {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #d9534f;
  transition: all 0.3s ease;
  animation: slideInRight 0.5s ease-in-out;
}

.promotion-banner:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transform: translateX(2px);
}

.promotion-title {
  font-weight: bold;
  font-size: 0.9em;
  color: #343a40;
  margin-bottom: 3px;
}

.promotion-description {
  font-size: 0.85em;
  color: #6c757d;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Ensure badge is shown over images */
.woocommerce-LoopProduct-link,
.woocommerce-product-gallery__wrapper {
  position: relative;
}

/* Special styling for percentage badge to match site exactly */
.woocommerce-badge.badge-descuento,
span.woocommerce-badge.badge-descuento {
  position: static !important;
  display: inline-block !important;
  padding: 3px 8px !important;
  font-size: 14px !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  min-width: unset !important;
  min-height: unset !important;
  background-color: #4caf50 !important;
  color: white !important;
  text-align: center !important;
  font-weight: 700 !important;
  text-transform: none !important;
  margin: 0 !important;
  line-height: normal !important;
  animation: none !important;
  box-shadow: none !important;
  border: none !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 5 !important;
}

/* Style for circular badges - 2X1, 2+1, etc. */
/*
.woocommerce-badge:not(.badge-descuento),
span.woocommerce-badge:not(.badge-descuento) {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  z-index: 99 !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
  line-height: 1 !important;
  color: white !important;
  text-align: center !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
  background-clip: padding-box !important;
  transition: transform 0.3s ease !important;
}*/

/* Add hover effect for circular badges */
.woocommerce-badge:not(.badge-descuento):hover,
span.woocommerce-badge:not(.badge-descuento):hover {
  transform: scale(1.1) !important;
}

/* Ensure percentage badges appear properly inside product grid */
/*
.product .woocommerce-badge.badge-descuento,
.products .woocommerce-badge.badge-descuento {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  z-index: 10 !important;
}*/

.woocommerce-product-gallery__image .wc-custom-badge {
  display: flex !important;
  flex-direction: row !important;
  position: absolute !important;
  z-index: 99999 !important;
  top: 0 !important;
  left: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: 100% !important;
}

/* Force badge to appear even with theme conflicts */
.woocommerce-badge {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  overflow: visible !important;
  transform: none !important;
  max-height: none !important;
  max-width: none !important;
}

/* Additional badge overrides for theme compatibility */
/*
.woocommerce-badge,
span.woocommerce-badge,
.onsale.woocommerce-badge,
.woocommerce span.onsale.woocommerce-badge,
.woocommerce-page span.onsale.woocommerce-badge,
.woocommerce ul.products li.product .onsale.woocommerce-badge {
  position: absolute !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  font-weight: 700 !important;
  color: white !important;
  text-align: center !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
  border: none !important;
  font-size: 1.5rem !important;
  line-height: 1.2 !important;
  top: 10px !important;
  left: 10px !important;
  text-transform: uppercase !important;
  padding: 0 !important;
  margin: 0 !important;
  animation: badgePulse 2s infinite ease-in-out !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  text-decoration: none !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
}*/

/* Fix for standard badges to match design */
.woocommerce span.onsale {
  display: none !important;
}

section.elementor-section.elementor-top-section.elementor-element.elementor-element-1e08f70d.elementor-section-boxed.elementor-section-height-default.elementor-section-height-default.elementor-sticky.elementor-sticky--active.elementor-section--handles-inside.elementor-sticky--effects {
  z-index: 99999 !important;
}

.elementor-menu-cart__product-name.product-name span.promo-parent-label.promo-parent-label-percentage:first-of-type,
tr.woocommerce-cart-form__cart-item .product-name span.promo-parent-label.promo-parent-label-percentage:first-of-type {
  display: none !important;
}

.elementor-menu-cart__product-name.product-name,
tr.woocommerce-cart-form__cart-item .product-name {
  display: flex !important;
  flex-direction: column !important;
}
/*
span.woocommerce-badge.badge-descuento {
  font-size: 1.2rem !important;
  width: 90px !important;
  height: 90px !important;
}

@media (max-width: 600px) {
  span.woocommerce-badge.badge-descuento {
    font-size: 1rem !important;
    width: 55px !important;
    height: 55px !important;
  }
}*/
.custom-sale-badge,
span.woocommerce-badge.badge-descuento {
  background: linear-gradient(135deg, #00a522d4, #007919) !important;
  color: white !important;
  padding: 10px 15px !important;
  font-size: 13px !important;
  font-weight: bold !important;
  border-radius: 5px !important;
  z-index: 10 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  font-family: 'poppins' !important;
}
.elementor-shortcode {
  transition: transform 0.3s ease-in-out;
  display: flex;
  justify-content: center;
}
.elementor-shortcode:hover {
  transform: scale(1.05);
  filter: brightness(1.1) !important;
  cursor: pointer;
}
.custom-text-cv,
.wc-custom-badge-text {
  text-transform: uppercase;
  font-family: 'poppins';
  font-size: 13px;
  font-weight: bold;
  color: #007919;
  margin-right: 5px;
  display: flex;
  align-items: center;
}
