/* Mirage Tienda UI — rediseño del flujo de compra (25-sep-2026)
   Todo va bajo body.m-ui. Muchas reglas llevan !important porque el tema
   (Blocksy) y mirage-styles.css también lo usan; aquí gana por especificidad. */

:root {
  --m-ink: #0f172a;
  --m-text: #334155;
  --m-muted: #64748b;
  --m-line: #e5e7eb;
  --m-soft: #f5f7fa;
  --m-brand: #1d4ed8;
  --m-brand-h: #1e40af;
  --m-cta: #16a34a;
  --m-cta-h: #15803d;
  --m-sale: #dc2626;
  --m-r: 14px;
  --m-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 28px rgba(15, 23, 42, .07);
}

/* ── Encabezados de página: fuera la franja azul gigante ─────────────────── */
body.m-ui .hero-section,
body.m-ui .hero-section[data-type="type-1"],
body.m-ui .hero-section[data-type="type-2"],
body.m-ui .hero-section[style],
body.m-ui:not(.home) .entry-header,
body.m-ui.woocommerce-cart .entry-header {
  background: none !important;
  min-height: 0 !important;
  --min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.m-ui .hero-section .entry-header {
  position: static !important;
  text-align: left !important;
  width: var(--theme-container-width, calc(100% - 48px)) !important;
  max-width: var(--theme-normal-container-max-width, 1290px) !important;
  margin: 0 auto !important;
  padding: 22px 0 6px !important;
}
/* mirage-styles escondía el h1 del checkout y lo repintaba con ::after */
body.m-ui.woocommerce-checkout .entry-header h1 { visibility: visible !important; height: auto !important; }
body.m-ui.single-product .hero-section { display: none !important; }
/* Precios: mirage-styles los pinta todos de azul; aquí heredan del contenedor */
body.m-ui .woocommerce-Price-amount { color: inherit !important; }
body.m-ui .hero-section .page-title,
body.m-ui .hero-section h1,
body.m-ui:not(.home) .entry-header h1,
body.m-ui.woocommerce-cart .page-title {
  color: var(--m-ink) !important;
  font-size: clamp(24px, 5vw, 34px) !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
  text-align: left !important;
  text-shadow: none !important;
}
body.m-ui.woocommerce-cart .entry-header h1::after,
body.m-ui.woocommerce-checkout .entry-header h1::after { content: none !important; }
body.m-ui.tax-product_cat .hero-section .page-title { text-transform: lowercase !important; }
body.m-ui.tax-product_cat .hero-section .page-title::first-letter { text-transform: uppercase; }
body.m-ui .hero-section .term-description,
body.m-ui .hero-section .taxonomy-description,
body.m-ui .hero-section .page-description {
  color: var(--m-muted) !important;
  text-align: left !important;
  max-width: 760px !important;
  margin: 6px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.m-ui .hero-section .ct-breadcrumbs,
body.m-ui .hero-section .ct-breadcrumbs a {
  color: var(--m-muted) !important;
  text-align: left !important;
  font-size: 13px !important;
}
body.m-ui.single-product .hero-section .entry-header { padding: 14px 0 0 !important; }

/* ── Sin barra lateral de "Productos rebajados" (boilers en la página de minisplits) ── */
body.m-ui.tax-product_cat .ct-container[data-sidebar],
body.m-ui.single-product .ct-container[data-sidebar],
body.m-ui.post-type-archive-product .ct-container[data-sidebar] {
  grid-template-columns: minmax(0, 1fr) !important;
  --sidebar-width: 0px;
}
body.m-ui.tax-product_cat .ct-container[data-sidebar] > aside,
body.m-ui.single-product .ct-container[data-sidebar] > aside,
body.m-ui.post-type-archive-product .ct-container[data-sidebar] > aside { display: none !important; }

/* ── Chips de categoría ─────────────────────────────────────────────────── */
body.m-ui .m-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  margin: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-basis: 100%;
}
body.m-ui .m-chips::-webkit-scrollbar { display: none; }
body.m-ui .m-chips a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--m-line);
  border-radius: 999px;
  background: #fff;
  color: var(--m-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
body.m-ui .m-chips a:hover { border-color: var(--m-ink); }
body.m-ui .m-chips a.is-on { background: var(--m-ink); border-color: var(--m-ink); color: #fff; }

/* ── Guía de tonelaje plegable ──────────────────────────────────────────── */
body.m-ui .m-guia {
  flex-basis: 100%;
  margin: 0 0 18px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r);
  background: #fff;
}
body.m-ui .m-guia summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--m-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
body.m-ui .m-guia summary::-webkit-details-marker { display: none; }
body.m-ui .m-guia summary span { color: var(--m-brand); font-weight: 600; font-size: 13px; white-space: nowrap; }
body.m-ui .m-guia summary span::after { content: " ▾"; }
body.m-ui .m-guia[open] summary span::after { content: " ▴"; }
body.m-ui .m-guia__body { padding: 0 16px 14px; }
body.m-ui .m-guia table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0 0 10px; }
body.m-ui .m-guia th { text-align: left; color: var(--m-muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--m-line); background: none; }
body.m-ui .m-guia td { padding: 8px 6px; border-bottom: 1px solid var(--m-line); color: var(--m-text); }
body.m-ui .m-guia p { font-size: 13px; color: var(--m-muted); margin: 0; }
body.m-ui .m-guia a { color: var(--m-brand); font-weight: 600; }
body.m-ui .woocommerce-result-count { color: var(--m-muted); font-size: 13px; }

/* ── Tarjetas de producto ───────────────────────────────────────────────── */
body.m-ui ul.products { gap: 18px !important; }
@media (max-width: 689.98px) {
  body.m-ui ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}
body.m-ui ul.products li.product {
  position: relative;
  display: flex !important;
  flex-direction: column;
  background: #fff !important;
  border: 1px solid var(--m-line) !important;
  border-radius: var(--m-r) !important;
  box-shadow: none !important;
  overflow: hidden;
  padding: 0 0 12px !important;
  text-align: left !important;
  transition: box-shadow .2s, transform .2s;
}
@media (hover: hover) {
  body.m-ui ul.products li.product:hover { box-shadow: var(--m-shadow) !important; transform: translateY(-2px); }
}
body.m-ui ul.products li.product figure { margin: 0 0 10px !important; background: var(--m-soft); border-radius: 0 !important; }
body.m-ui ul.products li.product figure .ct-media-container,
body.m-ui ul.products li.product figure img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
}
body.m-ui ul.products li.product .woocommerce-loop-product__title {
  padding: 0 12px !important;
  margin: 0 0 6px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  text-align: left !important;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.m-ui ul.products li.product .woocommerce-loop-product__title a { color: var(--m-ink) !important; }
body.m-ui ul.products li.product .price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start !important;
  gap: 0 8px;
  padding: 0 12px !important;
  margin: 0 0 4px !important;
  text-align: left !important;
}
body.m-ui ul.products li.product .price .sale-price {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: baseline !important;
  gap: 0 8px !important;
}
body.m-ui .price .sale-price::after { content: none !important; display: none !important; }
body.m-ui ul.products li.product .price ins,
body.m-ui ul.products li.product .price > .amount {
  order: 1 !important;
  display: inline !important;
  color: var(--m-ink) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}
body.m-ui ul.products li.product .price del {
  order: 2 !important;
  display: inline !important;
  color: var(--m-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}
body.m-ui ul.products li.product .woocommerce-price-suffix {
  display: block;
  flex-basis: 100%;
  font-size: 0 !important;
  margin: 2px 0 0 !important;
}
body.m-ui ul.products li.product .woocommerce-price-suffix::before {
  content: "IVA incluido";
  font-size: 11.5px;
  font-weight: 500;
  color: var(--m-muted);
}
body.m-ui ul.products li.product .ct-woo-card-rating { padding: 0 12px; margin: 2px 0 10px !important; }
body.m-ui ul.products li.product .star-rating { font-size: 11px !important; margin: 0 !important; }
body.m-ui ul.products li.product .entry-meta,
body.m-ui ul.products li.product .ct-woo-card-actions .add_to_cart_button { display: none !important; }
body.m-ui ul.products li.product .ct-woo-card-actions { margin-top: auto !important; padding: 0 !important; }
body.m-ui ul.products li.product .mirage-view-product {
  display: block !important;
  margin: auto 12px 0 !important;
  padding: 10px 12px !important;
  min-height: 0 !important;
  height: auto !important;
  width: auto !important;
  background: var(--m-brand) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: center !important;
}
body.m-ui ul.products li.product .mirage-view-product:hover { background: var(--m-brand-h) !important; }
body.m-ui .onsale,
body.m-ui .m-onsale {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  z-index: 3;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: var(--m-sale) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
body.m-ui ul.products li.product.outofstock figure img { opacity: .55; }
@media (max-width: 420px) {
  body.m-ui ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; padding: 0 10px !important; }
  body.m-ui ul.products li.product .price { padding: 0 10px !important; }
  body.m-ui ul.products li.product .price ins,
  body.m-ui ul.products li.product .price > .amount { font-size: 17px !important; }
  body.m-ui ul.products li.product .mirage-view-product { margin: auto 10px 0 !important; font-size: 13px !important; }
}

/* ── Ficha de producto ──────────────────────────────────────────────────── */
body.m-ui.single-product .woocommerce-product-gallery .ct-media-container,
body.m-ui.single-product .woocommerce-product-gallery img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: var(--m-r);
}
body.m-ui.single-product .flex-control-thumbs img,
body.m-ui.single-product .ct-product-gallery-thumbs img { border-radius: 8px; }
body.m-ui.single-product .product_title {
  font-size: clamp(21px, 4.6vw, 30px) !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  color: var(--m-ink) !important;
  letter-spacing: -.01em;
}
body.m-ui.single-product .summary .price,
body.m-ui.single-product .entry-summary .price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 8px 0 2px !important;
  text-align: left !important;
}
body.m-ui.single-product .summary .price .sale-price,
body.m-ui.single-product .entry-summary .price .sale-price {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 12px !important;
}
body.m-ui.single-product .summary .price ins,
body.m-ui.single-product .summary .price > .amount,
body.m-ui.single-product .entry-summary .price ins {
  order: 1 !important;
  display: inline !important;
  color: var(--m-ink) !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  letter-spacing: -.01em;
}
body.m-ui.single-product .summary .price del,
body.m-ui.single-product .entry-summary .price del {
  order: 2 !important;
  display: inline !important;
  color: var(--m-muted) !important;
  font-size: 17px !important;
  opacity: 1 !important;
}
body.m-ui.single-product .summary .price .woocommerce-price-suffix { display: none !important; }
body.m-ui .m-ahorro { margin: 4px 0 14px !important; font-size: 13px; color: var(--m-muted); }
body.m-ui .m-ahorro span {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}
body.m-ui .m-ahorro .amount { color: inherit !important; font-size: inherit !important; }

/* Beneficios bajo el precio: se veían partidos en columnas */
html body.m-ui .mirage-pdp-trust {
  background: #fff !important;
  border: 1px solid var(--m-line) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  gap: 8px !important;
}
html body.m-ui .mirage-pdp-trust li {
  display: block !important;
  position: relative;
  padding-left: 28px !important;
  font-size: 14px;
  line-height: 1.4;
  color: var(--m-text);
}
html body.m-ui .mirage-pdp-trust li span { position: absolute; left: 0; top: 0; }
html body.m-ui .mirage-pdp-trust li strong { color: var(--m-ink) !important; }

html body.m-ui .mirage-msi-consult {
  background: var(--m-soft) !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font-size: 13.5px !important;
  color: var(--m-text) !important;
}
body.m-ui.single-product .ct-cart-actions,
body.m-ui.single-product form.cart:not(.variations_form),
body.m-ui.single-product .woocommerce-variation-add-to-cart {
  display: flex !important;
  gap: 10px;
  align-items: stretch;
}
body.m-ui.single-product .single_add_to_cart_button {
  flex: 1 1 auto;
  min-height: 52px !important;
  height: auto !important;
  border-radius: 12px !important;
  background: var(--m-cta) !important;
  color: #fff !important;
  font-size: 16.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: 0 6px 16px rgba(22, 163, 74, .25) !important;
}
body.m-ui.single-product .single_add_to_cart_button:hover { background: var(--m-cta-h) !important; }
body.m-ui .mirage-whatsapp-btn {
  width: 100%;
  justify-content: center;
  background: #fff !important;
  color: var(--m-cta-h) !important;
  border: 1.5px solid var(--m-cta) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}
body.m-ui .mirage-whatsapp-btn:hover { background: #f0fdf4 !important; }
html body.m-ui .mirage-pdp-urgency { border-radius: 10px !important; }
body.m-ui.single-product .woocommerce-tabs h1,
body.m-ui.single-product .woocommerce-tabs h2,
body.m-ui.single-product .woocommerce-tabs h3,
body.m-ui.single-product .woocommerce-tabs h4,
body.m-ui.single-product .woocommerce-Tabs-panel h2,
body.m-ui.single-product .woocommerce-Tabs-panel h3 {
  color: var(--m-ink) !important;
  font-size: clamp(19px, 4vw, 24px) !important;
  line-height: 1.25 !important;
  border: 0 !important;
}
body.m-ui.single-product .woocommerce-Tabs-panel table { border-radius: 10px; overflow: hidden; font-size: 14px; }
body.m-ui.single-product .woocommerce-Tabs-panel td,
body.m-ui.single-product .woocommerce-Tabs-panel th { padding: 9px 12px !important; }

/* Barra fija "Agregar al carrito" en celular */
body.m-ui .m-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--m-line);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
body.m-ui .m-sticky.is-on { transform: none; visibility: visible; transition: transform .25s ease; }
body.m-ui .m-sticky__precio { font-weight: 800; font-size: 19px; color: var(--m-ink); line-height: 1.1; }
body.m-ui .m-sticky__precio .amount { color: inherit !important; }
body.m-ui .m-sticky__precio small { display: block; font-size: 11px; font-weight: 500; color: var(--m-muted); margin-top: 2px; }
body.m-ui .m-sticky__btn {
  flex: 1;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--m-cta);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}
@media (min-width: 1000px) { body.m-ui .m-sticky { display: none; } }
body.m-ui.m-sticky-on #mcw-widget { bottom: 88px !important; }
body.m-ui.m-sticky-on .mira-trigger-btn { bottom: 88px !important; }
body.m-ui.m-sticky-on .mirage-trust-bar { display: none !important; }

/* ── Barra de confianza fija ────────────────────────────────────────────── */
body.m-ui .mirage-trust-bar { padding: 6px 12px !important; box-shadow: none !important; border-top: 1px solid var(--m-line) !important; }
body.m-ui .mirage-trust-item { font-size: 12.5px !important; color: var(--m-text) !important; }
@media (max-width: 689.98px) {
  body.m-ui.single-product .mirage-trust-bar,
  body.m-ui.woocommerce-checkout .mirage-trust-bar { display: none !important; }
}

