/* ====== Variables y contenedor base ====== */
:root{
  --mk-container: min(1280px, 92vw);
  --mk-wrap: 1200px;
  --mk-pad: clamp(12px, 2.5vw, 24px);
  --gap-1: clamp(8px, 1.6vw, 16px);
  --gap-2: clamp(12px, 2.2vw, 24px);
  --gap-3: clamp(16px, 3vw, 32px);
  --mk-gap: clamp(10px, 2vw, 20px);
  --radius: 12px;
  --brand: #e8002a;
  --mk-brand: #e8002a;
  --dark: #111;
  --mk-dark: #222;
  --mk-text: #333;
  --bg-card: #fff;
  --muted: #6b7280;
  --footer-edge-gap: clamp(14px, 3vw, 28px);
  --cart-sticky-offset: 94px;
  --card-shadow: 0 12px 26px -18px rgba(0,0,0,.22);
  --soft-border: #eef1f4;
}

.mk-container{ width: var(--mk-container); margin-inline: auto; padding-inline: clamp(12px,3vw,24px); }
.mk-shadow{box-shadow:0 5px 14px -7px rgba(0,0,0,.18)}
img,svg{max-width:100%;height:auto}

/* ====== Header sticky ====== */
#header.ct-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: #000;
  box-shadow: 0 2px 12px -8px rgba(0,0,0,0.10);
}

/* ====== Toolbar ====== */
.mk-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mk-gap);
  justify-content: center;
  margin-block: var(--gap-2);
}
.mk-toolbar .mk-search{
  flex: 1 1 420px;
  min-width: 260px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  box-shadow: 0 2px 12px -6px rgba(0,0,0,.12);
}
.mk-toolbar .mk-search input[type="search"]{ 
  border: 0; outline: none; padding: 8px 6px; font-size: 15px; width: 100%; 
}
.mk-toolbar .mk-search button{ 
  background: #fff; border: 0; border-left: 1px solid #eee; padding-left: 12px; cursor: pointer; 
}

/* Dropdown Categorías */
.mk-dd{ position: relative; flex: 0 0 auto; }
.mk-dd summary{
  list-style: none; cursor: pointer; user-select: none;
  background: var(--mk-brand); color: #fff; border: 0; border-radius: 6px; 
  padding: 10px 18px; font-weight: 700; font-size: 16px;
}
.mk-dd summary::-webkit-details-marker{display:none}
.mk-dd[open] summary{ border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mk-dd .mk-dd-list{
  position: absolute; left: 0; top: calc(100% + 6px);
  background: #fff; min-width: 220px; border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,.1); z-index: 20; display: none;
}
.mk-dd[open] .mk-dd-list{display:block}
.mk-dd .mk-dd-list a{ 
  display: block; padding: 10px 16px; color: var(--mk-dark); text-decoration: none; 
}
.mk-dd .mk-dd-list a:hover{ background: #f1f1f1; }

/* Botón "Todos los productos" */
.mk-all{
  padding: 10px 18px; border-radius: 6px; text-decoration: none; font-weight: 700;
  background: var(--mk-dark); color: #fff; display: inline-block;
}
.mk-all:hover{ background: var(--mk-brand); }

@media (max-width: 768px){ .mk-toolbar{ justify-content: center; } }

/* ====== Promo ====== */
.mk-promo{
  background: #fff; border-radius: var(--radius); padding: clamp(12px,3vw,20px);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.18); margin-block: var(--gap-3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-2);
}
@media (max-width: 992px){ .mk-promo{ flex-direction: column; text-align: center; } }
.mk-promo .mk-col{ 
  flex: 1 1 0; text-align: center; display: flex; align-items: center; 
  justify-content: center; flex-direction: column; gap: 8px; 
}
.mk-promo img{ max-height: 58px; height: 48px; width: auto; object-fit: contain; }
.mk-promo .mk-title{ 
  font-weight: 900; font-size: clamp(1.1rem, 2.6vw, 1.35rem); letter-spacing: .4px;
}
.mk-promo .mk-sub{ 
  color: var(--muted); font-size: clamp(.9rem, 1.8vw, 1rem); 
}
.mk-promo .mk-col:last-child .mk-title{ font-size: clamp(1rem, 2vw, 1.05rem); }
.mk-promo .mk-col:last-child .mk-sub{ font-size: clamp(.85rem, 1.6vw, .95rem); color: #444; }

/* ====== Título de sección ====== */
.mk-title-wrap{ text-align: center; margin-top: 38px; }
.mk-title-wrap h2{ 
  font-size: clamp(1.2rem, 3.4vw, 1.6rem); font-weight: 900; 
  margin: 0; color: var(--brand);
}
.mk-hr{ 
  width: 120px; height: 3px; background: var(--brand); border: 0; 
  margin: 10px auto 0; border-radius: 999px; 
}

/* ====== Banner "Lo más vendido" ====== */
.mk-best-banner{
  margin: clamp(20px, 4vw, 32px) auto clamp(12px, 2.5vw, 20px);
  padding: clamp(16px, 3vw, 24px) clamp(20px, 4vw, 40px);
  text-align: center; font-weight: 900; color: #fff; 
  border-radius: 16px; letter-spacing: 1.2px;
  font-size: clamp(18px, 4vw, 28px);
  background: linear-gradient(135deg, #ff1744 0%, #d50000 35%, #b71c1c 70%, #8e0000 100%);
  box-shadow: 0 16px 40px -12px rgba(213,0,0,.75), 0 4px 20px -8px rgba(255,23,68,.45);
  animation: mk-fadeDown 1s ease both;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
  position: relative; overflow: hidden;
}
.mk-best-banner::before{
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  animation: mk-shine 3s infinite;
}
@keyframes mk-shine{
  0%{ left: -100%; }
  50%{ left: 100%; }
  100%{ left: -100%; }
}
@keyframes mk-fadeDown{from{opacity:0; transform:translateY(-14px)} to{opacity:1; transform:none}}

/* ====== Rejilla "Lo más vendido" ====== */
.best-sellers-grid{ 
  max-width: var(--mk-container); margin: 0 auto; 
  padding-inline: clamp(16px, 4vw, 40px); 
}
.best-sellers-grid ul.products{
  display: grid !important; gap: clamp(16px, 3vw, 36px);
  padding: 0 !important; margin: 0 !important; grid-template-columns: 1fr !important;
}
@media (min-width: 600px){ .best-sellers-grid ul.products{ grid-template-columns: repeat(2, 1fr) !important; } }
@media (min-width: 900px){ .best-sellers-grid ul.products{ grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1200px){ 
  .best-sellers-grid ul.products{ 
    grid-template-columns: repeat(4, 1fr) !important; 
    column-gap: 44px !important; row-gap: 36px !important; 
  } 
}

.best-sellers-grid ul.products li.product{
  float: none !important; width: auto !important; background: #fff; border-radius: 12px;
  box-shadow: 0 2px 10px -4px rgba(232,0,42,0.18); transition: transform .3s, box-shadow .3s;
  overflow: hidden; position: relative; padding: 14px;
  display: flex; flex-direction: column; margin: 0 !important;
}
.best-sellers-grid ul.products li.product:hover{
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px -12px rgba(232,0,42,0.38);
}

/* Imagen 1:1 contenida */
.best-sellers-grid ul.products li.product a img{
  aspect-ratio: 1/1; width: 100%; height: auto; object-fit: contain;
  background: #fff; border-radius: 10px;
}

/* Título 2 líneas */
.best-sellers-grid .woocommerce-loop-product__title{
  font-size: clamp(.95rem, 1.6vw, 1.05rem); min-height: 3.2em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Precio y botón */
.best-sellers-grid .price{ margin-top: 6px; }
.best-sellers-grid .button{ margin-top: auto; }

/* ===== Botones en tarjeta ===== */
.best-sellers-grid ul.products li.product .yith-wcqv-button,
.best-sellers-grid ul.products li.product .ct-quick-view-button{
  display: inline-flex; align-items: center; height: 38px; line-height: 36px;
  background: var(--brand); color: #fff; border: 0; border-radius: 8px;
  padding: 0 18px; font-size: 15px; box-shadow: none; transition: background .18s ease;
  margin-top: 6px !important;
}
.best-sellers-grid ul.products li.product .yith-wcqv-button:hover,
.best-sellers-grid ul.products li.product .ct-quick-view-button:hover{ background: #bf0023; }

.best-sellers-grid ul.products li.product .mik-cta-cart{
  display: inline-flex; align-items: center; height: 38px; line-height: 36px;
  background: #fff; color: var(--brand); border: 1px solid var(--brand);
  border-radius: 8px; padding: 0 10px; min-width: 38px; width: 38px; justify-content: center;
  text-indent: -9999px; position: relative; box-shadow: none;
  transition: background .18s, color .18s, border-color .18s;
  margin-top: 6px !important;
}
.best-sellers-grid ul.products li.product .mik-cta-cart .mik-cta-cart__icon{
  position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
}
.best-sellers-grid ul.products li.product .mik-cta-cart:hover{ 
  background: var(--brand); color: #fff; border-color: var(--brand); 
}

/* Estados para productos sin existencia */
.best-sellers-grid ul.products li.product.outofstock .mik-cta-cart{
  background: #f5f5f5; color: #999; border-color: #ddd; cursor: not-allowed;
  pointer-events: none;
}
.best-sellers-grid ul.products li.product.outofstock .mik-cta-cart::after{
  content: 'Sin existencia'; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; background: #f5f5f5;
  font-size: 11px; font-weight: 600; text-indent: 0; white-space: nowrap;
  border-radius: 8px; color: #999;
}
.best-sellers-grid ul.products li.product.outofstock .mik-cta-cart .mik-cta-cart__icon{
  display: none;
}

.best-sellers-grid ul.products li.product .yith-wcqv-button + .mik-cta-cart,
.best-sellers-grid ul.products li.product .ct-quick-view-button + .mik-cta-cart{ margin-left: 8px !important; }

/* Forzar visibilidad del botón nativo en esa sección */
.best-sellers-grid ul.products li.product .ct-add-to-cart,
.best-sellers-grid ul.products li.product a.add_to_cart_button,
.best-sellers-grid ul.products li.product a.product_type_simple{
  display: inline-flex !important; visibility: visible !important; 
  opacity: 1 !important; transform: none !important;
}

/* Fila horizontal para acciones dentro de la tarjeta */
.best-sellers-grid ul.products li.product .mik-actions-row{
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: nowrap;
}
.best-sellers-grid ul.products li.product .mik-actions-row .mik-cta-cart{ display: inline-flex; }
.best-sellers-grid ul.products li.product .mik-actions-row a.added_to_cart.wc-forward{
  display: inline-flex !important; width: auto !important; height: 38px; line-height: 36px;
  padding: 0 12px; border: 1px solid var(--brand); border-radius: 8px; background: #fff; color: var(--brand);
  font-weight: 700; text-decoration: none; box-shadow: none; white-space: nowrap;
}
.best-sellers-grid ul.products li.product .mik-actions-row a.added_to_cart.wc-forward:hover{ 
  background: var(--brand); color: #fff; border-color: var(--brand); 
}

/* Cuando Woo imprime "Ver carrito" como hermano del ícono */
.best-sellers-grid ul.products li.product .mik-cta-cart ~ a.added_to_cart.wc-forward{
  display: inline-flex !important; width: auto !important; margin-left: 8px !important; margin-top: 6px !important;
}

/* ====== Contador del carrito en header ====== */
.cart-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  z-index: 10;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Ocultar cuando está vacío */
.cart-count-badge.hidden {
  display: none !important;
}

/* Asegurar posición relativa en el elemento del carrito */
.header-menu-item,
.menu-item,
#header [data-id="cart"] {
  position: relative;
}

/* Específico para Blocksy theme */
.ct-header [data-id="cart"],
.ct-header .ct-cart-item,
.ct-header .cart-item {
  position: relative;
}

/* Eliminar cuadros grises feos del tema */
.best-sellers-grid ul.products li.product .ct-cart-actions,
.best-sellers-grid ul.products li.product .added_to_cart.wc-forward.mik-inline {
  background: transparent !important;
  border: 1px solid var(--brand) !important;
  color: var(--brand) !important;
  box-shadow: none !important;
}

/* ===== Layout global ===== */
.home .site-main,
.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main{
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}
.home .site-main > *,
.post-type-archive-product .site-main > *,
.tax-product_cat .site-main > *,
.tax-product_tag .site-main > *{
  max-width: var(--mk-container); margin-left: auto; margin-right: auto;
}
.home .site-main > .mikels-allow-full{ max-width: none; padding: 0; margin-left: 0; margin-right: 0; }

/* ===== Smart Slider 3 - Responsivo DEFINITIVO ===== */
.home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider){
  display: block; 
  width: 100vw; 
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important; 
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important; 
  position: relative; 
  overflow: hidden;
}

.home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-align{
  max-width: none !important; 
  width: 100% !important; 
  margin: 0 !important;
}

.home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider{
  width: 100% !important;
  height: auto !important; 
  max-height: clamp(280px, 50vh, 530px) !important;
  border-radius: 0 !important; /* Sin bordes redondeados para que se vea completo */
  overflow: hidden;
  box-shadow: none !important; /* Sin sombra para no crear espacios */
}

/* El contenido interno del slider debe ajustarse correctamente */
.home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider .n2-ss-slide {
  width: 100% !important;
}

.home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Breakpoints específicos para diferentes pantallas */
@media (max-width: 1400px){
  .home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider{
    max-height: clamp(260px, 45vh, 420px) !important;
  }
}

@media (max-width: 1200px){
  .home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider{
    max-height: clamp(240px, 40vh, 380px) !important;
  }
}

@media (max-width: 992px){
  .home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider{
    max-height: clamp(220px, 35vh, 340px) !important;
  }
}

@media (max-width: 100px){
  .home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider{
    max-height: clamp(200px, 30vh, 300px) !important;
  }
}

@media (max-width: 100px){
  .home .site-main :is(.mikels-allow-full, .wp-block-shortcode, .wp-block-html, .wp-block-group, .wp-block-cover, .wp-block-columns):has(.n2-ss-slider) .n2-ss-slider{
    max-height: clamp(180px, 25vh, 260px) !important;
  }
}
.home .site-main .mk-footer{
  display: block;
  width: calc(100vw - (var(--footer-edge-gap) * 2));
  max-width: calc(100vw - (var(--footer-edge-gap) * 2)) !important;
  margin-left: calc(50% - 50vw + var(--footer-edge-gap)) !important;
  margin-right: calc(50% - 50vw + var(--footer-edge-gap)) !important;
  margin-top: clamp(12px, 2.4vw, 24px);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 28px -18px rgba(0,0,0,.28);
}
.mk-footer .mk-foot{ max-width: var(--mk-container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
@media (max-width: 480px){ .home .site-main .mk-footer{ border-radius: 12px; } }

/* Carrito/Checkout (bloques y clásico) — base */
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main{ padding-inline: clamp(16px, 4vw, 40px); }
body.woocommerce-cart .site-main > *,
body.woocommerce-checkout .site-main > *{ max-width: var(--mk-container); margin-inline: auto; }

/* ===== Cotizador - FIX selects ===== */
#cotizadorForm select {
  padding: 12px 18px !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  height: 46px !important;
  min-height: 46px !important;
  box-sizing: border-box !important;
  text-indent: 0 !important;
  letter-spacing: normal !important;
  transform: none !important;
  overflow: visible !important;
  color: #222 !important;
  -webkit-text-fill-color: #222 !important;
  text-shadow: none !important;
  background-color: #fff !important;
  -webkit-mask: none !important;
  mask: none !important;
}
#cotizadorForm select option {
  line-height: 1.3 !important;
  padding: 4px 6px !important;
  font-size: 16px !important;
}
#cotizadorForm .input-group {
  min-width: 230px;
}
@media (max-width: 600px) {
  #cotizadorForm select {
    height: 44px !important;
  }
}

/* ===== Botón eliminar carrito ===== */
table.shop_table .product-remove a.remove {
  font-size: 22px;
  color: #E30613;
  font-weight: bold;
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #E30613;
  border-radius: 6px;
  text-decoration: none;
}
table.shop_table .product-remove a.remove:hover {
  background: #E30613;
  color: #fff;
}

/* ===== Sección ubicación ===== */
.mk-loc{
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 32px; background: linear-gradient(90deg,#fff 60%, #e8002a10 100%);
  border-radius: 16px; margin: 48px auto 32px; padding: 32px 18px;
}
.mk-loc .mk-lc{flex: 1 1 340px; min-width: 260px;}
.mk-loc h2{color: var(--mk-brand); font-weight: 800; margin: 0 0 10px; font-size: clamp(20px,3vw,32px);}
.mk-loc p{font-size: clamp(15px,2.2vw,18px); color: #222; margin: 0 0 14px;}
.mk-loc .mk-btn{
  display: inline-block; background: var(--mk-brand); color: #fff; font-weight: 800;
  padding: 10px 22px; border-radius: 8px; text-decoration: none;
  box-shadow: 0 3px 10px -5px #e8002a80; transition: .2s;
}
.mk-loc .mk-btn:hover{background: #a6001c; transform: scale(1.05);}
.mk-loc .mk-map{flex: 1 1 320px; min-width: 260px;}
.mk-loc .mk-map iframe{
  width: 100%; border: 0; border-radius: 16px; 
  box-shadow: 0 4px 18px -7px rgba(232,0,42,.13);
  aspect-ratio: 16/9;
}

/* ===== Footer brand ===== */
.mk-footer{
  background: var(--mk-brand); color: #fff; margin: 0; padding: 36px 0 16px;
  font-family: 'Montserrat',system-ui,-apple-system,Segoe UI,Arial,sans-serif;
}
.mk-footer .mk-foot{
  display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; justify-content: space-between;
}
.mk-footer .mk-brand{flex: 1 1 320px; min-width: 220px; text-align: center;}
.mk-footer .mk-logo{width: 150px; height: 30px; margin-bottom: 10px; object-fit: contain;}
.mk-footer .mk-brand-title{font-weight: 800; letter-spacing: 1px; margin-bottom: 2px; font-size: 1.2rem;}
.mk-footer .mk-brand-sub{color: #fffde9; margin-bottom: 16px;}
.mk-footer .mk-social{
  display: flex; gap: 14px; justify-content: center; align-items: center; margin-bottom: 8px;
}
.mk-footer .mk-social a svg{filter: drop-shadow(0 2px 6px #fff2); opacity: .88; transition: .23s;}
.mk-footer .mk-social a:hover svg{opacity: 1; transform: scale(1.08);}
.mk-footer .mk-social-label{font-weight: 800; letter-spacing: 2px; font-size: 1.1rem;}
.mk-footer .mk-links{flex: 2 1 480px; min-width: 220px; display: flex; gap: 38px; justify-content: center;}
.mk-footer .mk-col{min-width: 150px;}
.mk-footer .mk-col-title{font-weight: 800; margin-bottom: 10px;}
.mk-footer .mk-col ul{list-style: none; margin: 0 0 12px 0; padding: 0;}
.mk-footer .mk-col li{margin-bottom: 6px;}
.mk-footer .mk-col a{color: #fff; text-decoration: none;}
.mk-footer .mk-col a:hover{color: #ffd6e0; text-decoration: underline;}
.mk-footer .mk-copy{font-size: .92rem; margin-top: 10px; color: #fffde9;}

@media (max-width: 900px){
  .mk-footer .mk-foot{flex-direction: column; align-items: center;}
  .mk-footer .mk-links{justify-content: flex-start; gap: 22px;}
}
@media (max-width: 600px){
  .mk-footer .mk-links{flex-direction: column; gap: 10px;}
  .mk-footer .mk-logo{width: 80px;}
}

/* ===== YITH Quick View — Rediseño + cantidad visible ===== */
#yith-quick-view-content div.images img {
    max-width: 100%;
    object-fit: contain; /* Cambiado de cover a contain para no cortar la imagen */
    height: clamp(300px, 40vh, 450px); /* Altura responsiva */
    object-position: center;
    padding: clamp(50px, 8vw, 100px) 0px clamp(5px, 1vw, 10px) 0px; /* Padding responsivo */
    border-radius: 12px;
    background: #fff;
}

/* Ajuste para pantallas más pequeñas */
@media (max-width: 768px) {
    #yith-quick-view-content div.images img {
        height: clamp(250px, 35vh, 350px);
        padding: clamp(30px, 6vw, 60px) 0px clamp(5px, 1vw, 8px) 0px;
    }
}

/* Ajuste para pantallas muy pequeñas */
@media (max-width: 480px) {
    #yith-quick-view-content div.images img {
        height: clamp(200px, 30vh, 280px);
        padding: clamp(20px, 4vw, 40px) 0px clamp(3px, 0.5vw, 5px) 0px;
    }
}
#yith-quick-view-modal .yith-wcqv-wrapper,
#yith-quick-view-modal .yith-wcqv-main{ border-radius: 16px !important; background: #fff !important; }
#yith-quick-view-modal .yith-wcqv-main{ box-shadow: 0 24px 60px -24px rgba(0,0,0,.35) !important; overflow: hidden; }
#yith-quick-view-modal .yith-wcqv-content{
  max-width: min(1080px, 92vw) !important; padding: clamp(14px, 3vw, 24px) !important;
  margin: 0 auto; display: grid !important; grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(16px, 3vw, 28px); align-items: start;
}
@media (max-width: 860px){ #yith-quick-view-modal .yith-wcqv-content{ grid-template-columns: 1fr !important; } }

#yith-quick-view-modal .yith-wcqv-content .images,
#yith-quick-view-modal .yith-wcqv-content .yith-quick-view-image,
#yith-quick-view-modal .yith-wcqv-content .woocommerce-product-gallery{ 
  width: 100% !important; 
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#yith-quick-view-modal .yith-wcqv-content .images img,
#yith-quick-view-modal .yith-wcqv-content .woocommerce-product-gallery img{
  max-width: 300px !important; 
  max-height: 300px !important; 
  width: auto !important; 
  height: auto !important; 
  object-fit: contain !important;
  background: #fff; 
  border: 1px solid #eef1f4; 
  border-radius: 12px; 
  box-shadow: 0 8px 24px -16px rgba(0,0,0,.15);
  margin: 0 auto !important;
  display: block !important;
}

#yith-quick-view-modal .entry-summary, #yith-quick-view-modal .summary{ width: 100%; }
#yith-quick-view-modal .product_title{ font-weight: 900 !important; letter-spacing: .2px; margin: 0 0 8px !important; }
#yith-quick-view-modal .price{ font-size: clamp(1.05rem, 2.4vw, 1.25rem) !important; font-weight: 800 !important; color: var(--dark); margin: 0 0 10px !important; }
#yith-quick-view-modal .woocommerce-product-details__short-description{ color: #4b5563; line-height: 1.55; margin-bottom: 12px; max-width: 66ch; }

#yith-quick-view-modal .stock{
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: .85rem;
  border: 1px solid #e8ecf1; background: #f8fafc; color: #374151; margin: 4px 0 10px;
}
#yith-quick-view-modal .stock.out-of-stock{ background: #fff1f4; border-color: #ffd6dd; color: var(--brand); }

#yith-quick-view-modal form.cart{
  display: inline-flex !important; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px !important;
}

/* Cantidad estable en modal - SIN BORDE EXTERNO */
#yith-quick-view-modal .quantity{
  display: inline-flex; align-items: center; gap: 8px;
  border: 0 !important; background: transparent !important; padding: 0 !important; 
  height: auto !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible;
}
/* Si llega la clase del tema "hidden", aseguremos que se muestre */
#yith-quick-view-modal .quantity.hidden{ display: inline-flex !important; visibility: visible !important; opacity: 1 !important; }

/* Ocultar controles decorativos del tema que se superponen */
#yith-quick-view-modal .quantity .ct-increase,
#yith-quick-view-modal .quantity .ct-decrease{ display: none !important; }

/* Por si el tema dibuja el borde con pseudoelementos */
#yith-quick-view-modal .quantity::before,
#yith-quick-view-modal .quantity::after{
  content: none !important; display: none !important;
}

/* Input visible SIEMPRE (normal, readonly, disabled) */
#yith-quick-view-modal .quantity input.input-text.qty,
#yith-quick-view-modal .quantity input[name="quantity"]{
  width: 64px; height: 34px;
  border: 1px solid #e8ecf1 !important; border-radius: 8px !important;
  text-align: center !important; font-weight: 700 !important; font-size: 16px !important;
  color: #111 !important; -webkit-text-fill-color: #111 !important;
  background: #fff !important; outline: none; padding: 0 6px;
  opacity: 1 !important; visibility: visible !important; text-indent: 0 !important;
  box-shadow: none !important;
}
/* Estados "apagados" del tema (mantener visibles) */
#yith-quick-view-modal .quantity input.input-text.qty[readonly],
#yith-quick-view-modal .quantity input[name="quantity"][readonly],
#yith-quick-view-modal .quantity input.input-text.qty:disabled,
#yith-quick-view-modal .quantity input[name="quantity"]:disabled,
#yith-quick-view-modal .quantity input[aria-disabled="true"]{
  color: #111 !important; -webkit-text-fill-color: #111 !important;
  background: #fff !important; opacity: 1 !important; cursor: default !important;
}
/* Spinners nativos visibles (Chrome/Edge/Safari) */
#yith-quick-view-modal .quantity input[type="number"]{
  appearance: auto !important; -webkit-appearance: auto !important;
}
#yith-quick-view-modal .quantity input[type="number"]::-webkit-outer-spin-button,
#yith-quick-view-modal .quantity input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: auto !important; margin: 0;
}

#yith-quick-view-modal .single_add_to_cart_button{
  background: var(--brand) !important; color: #fff !important; border: 0 !important; border-radius: 12px !important; font-weight: 800 !important;
  height: 40px !important; padding: 0 18px !important; box-shadow: none !important; transition: transform .06s ease, filter .18s ease;
}
#yith-quick-view-modal .single_add_to_cart_button:hover{ filter: brightness(.95); }
#yith-quick-view-modal .single_add_to_cart_button:active{ transform: translateY(1px); }

#yith-quick-view-modal .product_meta{ color: #6b7280; display: grid; gap: 6px; margin-top: 8px; font-size: .95rem; }
#yith-quick-view-modal .product_meta a{ color: var(--brand); text-decoration: none; }
#yith-quick-view-modal .product_meta a:hover{ text-decoration: underline; }

#yith-quick-view-modal #yith-quick-view-close,
#yith-quick-view-modal .yith-wcqv-close{
  width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 18px !important; border-radius: 999px; background: #fff;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.25);
}

/* Evita tamaños inline minúsculos en imágenes del modal */
#yith-quick-view-modal .yith-wcqv-content img[width][height]{ height: auto !important; width: 100% !important; }

@media (min-width: 1200px){
  #yith-quick-view-modal .entry-summary, #yith-quick-view-modal .summary{ max-width: 620px; }
}

/* Responsive para imágenes más pequeñas en móvil */
@media (max-width: 860px) {
  #yith-quick-view-modal .yith-wcqv-content .images img,
  #yith-quick-view-modal .yith-wcqv-content .woocommerce-product-gallery img{
    max-width: 250px !important; 
    max-height: 250px !important; 
  }
}

@media (max-width: 480px) {
  #yith-quick-view-modal .yith-wcqv-content .images img,
  #yith-quick-view-modal .yith-wcqv-content .woocommerce-product-gallery img{
    max-width: 200px !important; 
    max-height: 200px !important; 
  }
}
/* ====== MEJORAS PARA PÁGINA DE CARRITO ====== */

/* Contenedor principal del carrito */
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px);
  min-height: calc(100vh - 200px);
}

body.woocommerce-cart .site-main > *,
body.woocommerce-checkout .site-main > * {
  max-width: var(--mk-container);
  margin-inline: auto;
}

/* Título de la página */
body.woocommerce-cart .entry-header,
body.woocommerce-cart .page-title {
  text-align: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}

body.woocommerce-cart .entry-title,
body.woocommerce-cart .page-title h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--mk-brand);
  margin: 0;
}

/* Contenedor principal del carrito */
.woocommerce-cart-form {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px -16px rgba(0,0,0,0.15);
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: clamp(20px, 4vw, 32px);
}

/* Tabla del carrito mejorada */
.shop_table.cart {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border: 0;
  margin: 0;
}

.shop_table.cart thead {
  background: var(--mk-brand);
  color: #fff;
}

.shop_table.cart thead th {
  padding: 16px 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  border: 0;
}

.shop_table.cart thead th:first-child {
  border-top-left-radius: 12px;
}

.shop_table.cart thead th:last-child {
  border-top-right-radius: 12px;
}

.shop_table.cart tbody td {
  padding: 20px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.shop_table.cart tbody tr:last-child td {
  border-bottom: 0;
}

/* Imagen del producto */
.cart_item .product-thumbnail {
  width: 80px;
  height: 80px;
}

.cart_item .product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Nombre del producto */
.cart_item .product-name a {
  color: var(--mk-text);
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
}

.cart_item .product-name a:hover {
  color: var(--mk-brand);
}

/* Variaciones del producto */
.cart_item .variation {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.cart_item .variation dt,
.cart_item .variation dd {
  display: inline;
  margin: 0;
}

.cart_item .variation dt {
  font-weight: 600;
}

/* Precio */
.cart_item .product-price .amount,
.cart_item .product-subtotal .amount {
  font-weight: 700;
  font-size: 16px;
  color: var(--mk-text);
}

/* Campo de cantidad mejorado */
.cart_item .product-quantity .quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.cart_item .product-quantity .quantity input[type="number"] {
  width: 60px;
  height: 40px;
  border: 0;
  text-align: center;
  font-weight: 600;
  background: #fff;
}

/* Botón eliminar mejorado */
.cart_item .product-remove a.remove {
  background: #fff;
  color: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 6px;
  padding: 8px 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.cart_item .product-remove a.remove:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.05);
}

/* Botones de acción del carrito */
.actions {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  margin-top: 20px;
}

.actions .button {
  background: var(--mk-brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 8px;
}

.actions .button:hover {
  background: #c70025;
  transform: translateY(-2px);
}

/* Totales del carrito */
.cart-collaterals {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 4vw, 32px);
  margin-top: clamp(20px, 4vw, 32px);
}

@media (min-width: 768px) {
  .cart-collaterals {
    grid-template-columns: 1fr 400px;
  }
}

.cart_totals {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px -16px rgba(0,0,0,0.15);
  padding: clamp(20px, 4vw, 32px);
  height: fit-content;
}

.cart_totals h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--mk-brand);
  margin: 0 0 20px 0;
  text-align: center;
}

.cart_totals table {
  width: 100%;
  border-collapse: collapse;
}

.cart_totals th,
.cart_totals td {
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.cart_totals th {
  font-weight: 600;
  color: var(--mk-text);
}

.cart_totals td {
  text-align: right;
  font-weight: 700;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
  font-size: 1.2rem;
  color: var(--mk-brand);
  border-bottom: 2px solid var(--mk-brand);
  padding-top: 16px;
}

/* Botón proceder al pago */
.wc-proceed-to-checkout {
  margin-top: 20px;
}

.checkout-button {
  width: 100%;
  background: var(--mk-brand);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.checkout-button:hover {
  background: #c70025;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(231, 0, 42, 0.4);
}

/* Carrito vacío */
.woocommerce-cart .cart-empty {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px -16px rgba(0,0,0,0.15);
  margin: clamp(20px, 4vw, 40px) 0;
}

.woocommerce-cart .cart-empty::before {
  content: "🛒";
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* Productos relacionados/cross-sells mejorados */
.cross-sells {
  margin-top: clamp(40px, 6vw, 60px);
}

.cross-sells h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 900;
  color: var(--mk-brand);
  margin-bottom: clamp(20px, 4vw, 32px);
}

.cross-sells ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(16px, 3vw, 24px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.cross-sells .product {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px -8px rgba(0,0,0,0.15);
  padding: 16px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cross-sells .product:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px -8px rgba(231, 0, 42, 0.2);
}

.cross-sells .product img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
}

.cross-sells .product .woocommerce-loop-product__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.cross-sells .product .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--mk-brand);
  margin-bottom: 12px;
}

.cross-sells .product .button {
  background: var(--mk-brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cross-sells .product .button:hover {
  background: #c70025;
}

/* Responsive */
@media (max-width: 768px) {
  .shop_table.cart,
  .shop_table.cart thead,
  .shop_table.cart tbody,
  .shop_table.cart th,
  .shop_table.cart td,
  .shop_table.cart tr {
    display: block;
  }
  
  .shop_table.cart thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .shop_table.cart tr {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
  }
  
  .shop_table.cart td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    padding: 12px 0 12px 40%;
  }
  
  .shop_table.cart td:before {
    content: attr(data-title) ": ";
    position: absolute;
    left: 6px;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--mk-text);
  }
  
  .cart_item .product-thumbnail {
    width: 60px;
    height: 60px;
  }
}
