/* ================================================================
   Infy Theme — Overrides de WoodMart
   Restaura colores, tipografía y botones de marca.
   ================================================================ */

body.infy-custom-layout {
  --color-primary:       #2ff7d0;
  --color-primary-hover: #082944;
  --color-primary-hover-fg: #2ff7d0;
  --color-dark:          #082944;
  --color-dark-hover:    #2ff7d0;
  --color-dark-hover-fg: #082944;
  --color-white:         #ffffff;
  --color-gray:          #eeeeee;
  --color-gray-mid:      #cccccc;
  --color-text:          #082944;
  --color-text-muted:    #5a7a99;
  --font-family:         var(--wd-text-font, sans-serif);
  --font-family-title:   var(--wd-title-font, var(--wd-text-font, sans-serif));

  font-family: var(--wd-text-font, sans-serif);
}

body.infy-custom-layout :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--wd-title-font, var(--wd-text-font, sans-serif));
}

/* WoodMart redefine .btn globalmente; restauramos variantes Infy */
body.infy-custom-layout :is(a, button).btn {
  text-transform: none;
  font-family: var(--wd-text-font, var(--font-family, inherit));
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  min-height: auto;
  border: none;
  box-shadow: none;
  border-radius: var(--radius-full);
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
}

body.infy-custom-layout :is(a, button).btn--primary {
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
  border-color: transparent !important;
  padding: 0.65rem var(--sp-8) !important;
}

body.infy-custom-layout :is(a, button).btn--primary:hover {
  background-color: var(--color-text-muted) !important;
  color: var(--color-primary-hover-fg) !important;
  transform: none !important;
}

body.infy-custom-layout :is(a, button).btn--dark {
  background-color: var(--color-dark) !important;
  color: var(--color-primary) !important;
  border-color: transparent !important;
  padding: 0.65rem var(--sp-8) !important;
  font-weight: var(--fw-normal) !important;
}

body.infy-custom-layout :is(a, button).btn--dark:hover {
  background-color: var(--color-text-muted) !important;
  color: var(--color-gray) !important;
  transform: none !important;
}

body.infy-custom-layout :is(a, button).btn--outline {
  background: transparent !important;
  color: var(--color-dark) !important;
  border: 2px solid var(--color-dark) !important;
}

body.infy-custom-layout :is(a, button).btn--outline:hover {
  background: var(--color-dark) !important;
  color: var(--color-primary) !important;
  transform: none !important;
}

body.infy-custom-layout :is(a, button).btn--cart {
  background: var(--color-primary) !important;
  color: var(--color-dark) !important;
}

body.infy-custom-layout :is(a, button).btn--cart:hover {
  background: var(--color-primary-hover) !important;
  color: var(--color-primary-hover-fg) !important;
  transform: none !important;
}

/* Botones WooCommerce con estilo Infy */
body.infy-custom-layout .woocommerce :is(a.button, button.button, input.button) {
  text-transform: none;
  font-family: var(--wd-text-font, var(--font-family, inherit));
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
  border: none !important;
  box-shadow: none !important;
  padding: var(--sp-2) !important;
}

body.infy-custom-layout .woocommerce :is(a.button, button.button, input.button):hover {
  background-color: var(--color-primary-hover) !important;
  color: var(--color-primary-hover-fg) !important;
  transform: none !important;
}

body.infy-custom-layout .woocommerce a.button.alt,
body.infy-custom-layout .woocommerce button.button.alt,
body.infy-custom-layout .woocommerce input.button.alt {
  background-color: var(--color-dark) !important;
  color: var(--color-white) !important;
}

body.infy-custom-layout .woocommerce a.button.alt:hover,
body.infy-custom-layout .woocommerce button.button.alt:hover,
body.infy-custom-layout .woocommerce input.button.alt:hover {
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
  transform: none !important;
}

/* ── Header Builder: evitar solapamiento con secciones Infy ─── */
body.infy-custom-layout .whb-header.whb-overcontent {
  min-height: 0;
  margin-bottom: 0;
  padding-top: 0 !important;
}

body.infy-custom-layout .whb-header.whb-overcontent .whb-main-header {
  position: relative;
}

body.infy-custom-layout .whb-overcontent:not(.whb-sticked) .whb-row:not(.whb-with-bg) {
  background-color: var(--color-white);
}

body.infy-custom-layout .wd-content-layout:first-child {
  padding-top: 0;
}

body.infy-custom-layout .hero {
  isolation: isolate;
}

/* Restaurar márgenes del reset global sin tocar .container (centrado WoodMart) */
body.infy-custom-layout .whb-header :is(*:not(.container):not(.container-fluid), *:not(.container):not(.container-fluid)::before, *:not(.container):not(.container-fluid)::after) {
  margin: revert;
  padding: revert;
}

body.infy-custom-layout .whb-header .container,
body.infy-custom-layout .whb-header .container-fluid {
  width: 100%;
  max-width: var(--wd-container-w, 1222px);
  padding-inline: 15px;
  margin-inline: auto;
}

body.infy-custom-layout .whb-full-width .whb-row > .container,
body.infy-custom-layout .whb-full-width + .whb-clone .whb-row > .container {
  max-width: 100%;
  width: clamp(var(--wd-container-w, 1222px), 95%, 100%);
}

body.infy-custom-layout .whb-header button {
  border: revert;
  background: revert;
  font-family: inherit;
  cursor: pointer;
}

body.infy-custom-layout .whb-header ul,
body.infy-custom-layout .whb-header ol {
  list-style: none;
}

/* Ocultar page title de WoodMart en páginas con layout Infy propio */
body.infy-custom-layout .wd-page-title.page-title {
  display: none;
}

/* ── Product card Infy — ver productos.css para overrides del catálogo ── */
/* Reglas generales mínimas para cards fuera del grid del catálogo */
body.infy-custom-layout .product-card {
  overflow: hidden !important;
  background: var(--color-white) !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  position: relative !important;
}

body.infy-custom-layout .product-card__image-wrap {
  position: relative !important;
  background: #eeeeee !important;
  padding: 2rem 1.5rem !important;
  min-height: 240px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  flex: 1 !important;
}

body.infy-custom-layout .product-card__image-wrap a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.infy-custom-layout .product-card__image {
  max-height: 210px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

body.infy-custom-layout .product-card__badge {
  position: absolute !important;
  top: 1rem !important;
  left: 1rem !important;
  z-index: 1 !important;
  display: inline-block !important;
  padding: 0.4rem 0.95rem !important;
  background: var(--color-dark) !important;
  color: var(--color-primary) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  border-radius: 9999px !important;
}

body.infy-custom-layout .product-card__body {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  padding: 1rem 1.25rem !important;
  background: var(--color-dark) !important;
  color: var(--color-white) !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  flex-shrink: 0 !important;
}

body.infy-custom-layout .product-card__info {
  flex: 1 !important;
  min-width: 0 !important;
}

body.infy-custom-layout .product-card__name,
body.infy-custom-layout .product-card__name a {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: var(--color-white) !important;
  line-height: 1.3 !important;
  margin: 0 0 0.25rem !important;
  text-decoration: none !important;
}

body.infy-custom-layout .product-card__prices {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: wrap !important;
}

body.infy-custom-layout .product-card__price {
  font-size: 1.2rem !important;
  font-weight: 400 !important;
  color: var(--color-white) !important;
}

body.infy-custom-layout .product-card__price .amount {
  font-weight: 400 !important;
  color: var(--color-white) !important;
}

body.infy-custom-layout .product-card__price--original {
  font-size: 0.9rem !important;
  color: var(--color-primary) !important;
  text-decoration: line-through !important;
}

span.product-card__price.product-card__price--original span.woocommerce-Price-amount.amount {
  /* color: var(--color-primary) !important; */
}

body.infy-custom-layout .product-card__price .woocommerce-Price-currencySymbol,
body.infy-custom-layout .product-card__price bdi {
  color: inherit !important;
}

body.infy-custom-layout .product-card .btn--cart {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border-radius: 9999px !important;
  background: var(--color-primary) !important;
  color: var(--color-dark) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border: none !important;
}

body.infy-custom-layout .product-card .btn--cart svg {
  width: 18px !important;
  height: 18px !important;
}

/* ── Header sticky (sigue al hacer scroll) ──────────────────────── */
body.infy-custom-layout .whb-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* El carrito lateral y su overlay deben quedar SOBRE el header sticky */
body.infy-custom-layout .wd-cart-drawer,
body.infy-custom-layout .cart-widget-side,
body.infy-custom-layout .wd-cart-drawer-side,
body.infy-custom-layout .widget_shopping_cart.wd-cart-drawer {
  z-index: 1000 !important;
}

body.infy-custom-layout .wd-opened-side .wd-cart-drawer,
body.infy-custom-layout .cart-opened .wd-cart-drawer {
  z-index: 1001 !important;
}

/* Overlay oscuro detrás del carrito lateral (por encima del header) */
body.infy-custom-layout .wd-close-side,
body.infy-custom-layout .wd-overlay,
body.infy-custom-layout .cart-overlay {
  z-index: 999 !important;
}

/* Cerrado: sin overlay ni clics bloqueados */
body.infy-custom-layout .wd-close-side:not(.wd-close-side-opened) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Abierto (carrito lateral, menú móvil, etc.): fondo semitransparente */
body.infy-custom-layout .wd-close-side.wd-close-side-opened {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background-color: rgba(8, 41, 68, 0.42) !important;
  transition: opacity 0.35s ease !important;
}

/* Carrito lateral abierto: drawer por encima del overlay */
body.infy-custom-layout:has(.cart-widget-side.wd-opened) .cart-widget-side,
body.infy-custom-layout:has(.wd-cart-drawer.wd-opened) .wd-cart-drawer {
  z-index: 1001 !important;
  border-radius: 15px 0 0 15px;
}

/* ── Avisos de WooCommerce con colores de marca (no verde genérico) ─ */
body.infy-custom-layout .woocommerce-message,
body.infy-custom-layout .woocommerce-info,
body.infy-custom-layout .wc-block-components-notice-banner {
  background-color: var(--color-dark) !important;
  color: var(--color-white) !important;
  border-top: 3px solid var(--color-primary) !important;
  border-radius: var(--radius-md) !important;
}

body.infy-custom-layout .woocommerce-form-coupon-toggle .woocommerce-info{
  padding: 1rem !important;
}

:root :is(.woocommerce-form-coupon-toggle,.woocommerce-form-login-toggle)>div :is(.showlogin,.showcoupon){
  color: var(--color-primary) !important;
}

.cart-subtotal .woocommerce-Price-amount.amount, .order-total .woocommerce-Price-amount.amount{
  color: var(--color-dark) !important;
}

body.infy-custom-layout .woocommerce-message::before,
body.infy-custom-layout .woocommerce-info::before {
  color: var(--color-primary) !important;
}

body.infy-custom-layout .woocommerce-message a,
body.infy-custom-layout .woocommerce-info a {
  color: var(--color-dark) !important;
}

/* Botón "Ver carrito" dentro del aviso → turquesa de marca */
body.infy-custom-layout .woocommerce-message .button,
body.infy-custom-layout .woocommerce-message a.button.wc-forward {
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
  border-radius: var(--radius-full) !important;
}

/* ── Carrito lateral (side cart de WoodMart) ────────────────────── */
/* Cerrar: solo la X, sin la palabra "Close/Cerrar" */
body.infy-custom-layout .wd-cart-drawer .close-side-widget,
body.infy-custom-layout .cart-widget-side .close-side-widget {
  font-size: 0 !important;
}

body.infy-custom-layout .wd-cart-drawer .close-side-widget::before,
body.infy-custom-layout .wd-cart-drawer .close-side-widget i,
body.infy-custom-layout .cart-widget-side .close-side-widget::before,
body.infy-custom-layout .cart-widget-side .close-side-widget i {
  font-size: 20px !important;
}

/* Botones "Ver carrito" y "Finalizar compra" del mismo tamaño */
body.infy-custom-layout .widget_shopping_cart .buttons,
body.infy-custom-layout .wd-cart-drawer .widget_shopping_cart_content .buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
}

body.infy-custom-layout .widget_shopping_cart .buttons .button,
body.infy-custom-layout .wd-cart-drawer .widget_shopping_cart_content .buttons .button {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0.85rem 1rem !important;
  border-radius: var(--radius-full) !important;
}

/* "Ver carrito" turquesa, "Finalizar compra" navy */
body.infy-custom-layout .widget_shopping_cart .buttons .button:not(.checkout) {
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
}

body.infy-custom-layout .widget_shopping_cart .buttons .button.checkout {
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
}

body.infy-custom-layout .widget_shopping_cart .buttons .button:not(.checkout):hover,
body.infy-custom-layout .widget_shopping_cart .buttons .button.checkout:hover {
  background-color: var(--color-primary-hover) !important;
  color: var(--color-primary-hover-fg) !important;
  transform: none !important;
}

/* Hover global Infy: inversión de color, sin movimiento en botones */
body.infy-custom-layout :is(a, button, input).btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ── Ocultar elemento sobrante de PhotoSwipe bajo el footer ─────── */
#photoswipe-fullscreen-dialog,
.pswp {
  display: none !important;
}

/* ── Fix: backdrop del menú móvil no debe bloquear clics cuando está cerrado ── */
body.infy-custom-layout.mobile-menu-opened .wd-close-side.wd-close-side-opened {
  z-index: 1050 !important;
}

body.infy-custom-layout .wd-dropdown-menu,
body.infy-custom-layout .wd-mobile-menu,
body.infy-custom-layout .mobile-nav {
  z-index: 1060 !important;
}

.woocommerce-info .woocommerce-Button.wc-forward.button{
  padding: 1rem var(--sp-8) !important;
}

.cart-info .woocommerce-Price-amount.amount{
  color: var(--color-dark) !important;
}

.woocommerce-mini-cart__total.total .woocommerce-Price-amount.amount{
  color: var(--color-dark) !important;
  font-weight: var(--fw-medium) !important;
}

.woocommerce-form-coupon-toggle .woocommerce-info{
  padding: 1rem var(--sp-8) !important;
}