/* =========================================================
   MIGA • UI INDUSTRIAL RESPONSIVE
   Header + buscador + carrito + home + filtros + WooCommerce
   PC / Tablet / Móvil
   ========================================================= */

:root{
  --miga-yellow:#ffcd11;
  --miga-yellow-2:#f7b900;
  --miga-black:#111111;
  --miga-black-2:#181818;
  --miga-ink:#202124;
  --miga-bg:#f4f5f6;
  --miga-white:#ffffff;
  --miga-muted:#667085;
  --miga-border:#d8dde3;
  --miga-dark-border:#30343a;

  --miga-header-h:76px;
  --miga-logo-h:42px;
  --miga-search-h:46px;

  --miga-container:1280px;
  --miga-radius:3px;
  --miga-shadow:0 14px 34px rgba(0,0,0,.12);
}

/* =========================================================
   RESET / BASE
   ========================================================= */

html{
  box-sizing:border-box;
  -webkit-text-size-adjust:100%;
}

*,*::before,*::after{
  box-sizing:inherit;
}

body{
  overflow-x:hidden;
}

img,
video,
iframe{
  max-width:100%;
}

.miga-home{
  position:relative;
  width:100%;
  overflow:hidden;
  background:var(--miga-bg);
  color:var(--miga-ink);
}

.miga-home .container{
  width:min(100% - 40px,var(--miga-container));
  max-width:var(--miga-container);
  margin-inline:auto;
  padding:0;
}

.miga-watermark{
  display:none !important;
}

/* =========================================================
   HEADER INDUSTRIAL
   ========================================================= */

header#masthead,
.site-header,
.main-header{
  position:relative;
  z-index:1000;
  width:100%;
  min-height:var(--miga-header-h);
  height:auto !important;

  display:flex;
  align-items:center;
  gap:22px;

  padding:12px max(24px,calc((100vw - var(--miga-container))/2));

  background:#111;
  color:#fff;
  border:0;
  border-bottom:5px solid var(--miga-yellow);
  box-shadow:0 8px 24px rgba(0,0,0,.22);

  font-family:Arial,Helvetica,sans-serif;
}

.site-branding{
  flex:0 1 auto;
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

.site-branding img,
.custom-logo{
  display:block;
  width:auto !important;
  max-width:230px !important;
  height:auto !important;
  max-height:var(--miga-logo-h) !important;
  object-fit:contain;
}

.site-title,
h1.site-title,
.site-title a,
.ast-site-title a,
.site-branding .site-title a{
  margin:0 !important;
  color:#fff !important;
  font-size:clamp(13px,1vw,17px) !important;
  font-weight:900 !important;
  line-height:1.05 !important;
  letter-spacing:.035em;
  text-transform:uppercase;
  white-space:normal;
  text-decoration:none;
}

/* =========================================================
   BUSCADOR HEADER
   ========================================================= */

.header-search,
.site-search{
  flex:1 1 440px;
  width:auto;
  max-width:650px;
  min-width:260px;
}

form[role="search"],
.search-form,
.woocommerce-product-search{
  width:100%;
  display:flex;
  align-items:stretch;
  gap:0;
}

form[role="search"] input[type="search"],
.search-form input[type="search"],
.woocommerce-product-search input.search-field{
  min-width:0;
  flex:1 1 auto;
  width:100%;
  height:var(--miga-search-h);
  padding:0 16px;

  border:2px solid #fff;
  border-right:0;
  border-radius:0;

  background:#fff;
  color:#111;
  font-size:14px;
  font-weight:600;
  line-height:var(--miga-search-h);

  box-shadow:none;
  outline:none;
}

form[role="search"] input[type="search"]::placeholder,
.search-form input[type="search"]::placeholder,
.woocommerce-product-search input.search-field::placeholder{
  color:#7b818a;
  opacity:1;
}

form[role="search"] input[type="search"]:focus,
.search-form input[type="search"]:focus,
.woocommerce-product-search input.search-field:focus{
  border-color:var(--miga-yellow);
  box-shadow:inset 0 0 0 1px var(--miga-yellow);
}

form[role="search"] button,
.search-form button,
.woocommerce-product-search button{
  flex:0 0 auto;
  min-width:112px;
  height:var(--miga-search-h);
  padding:0 18px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border:2px solid var(--miga-yellow);
  border-radius:0;

  background:var(--miga-yellow);
  color:#111;

  font-size:12px;
  font-weight:950;
  letter-spacing:.055em;
  text-transform:uppercase;
  cursor:pointer;

  transition:background .16s ease,transform .16s ease;
}

form[role="search"] button:hover,
.search-form button:hover,
.woocommerce-product-search button:hover{
  background:#ffd633;
  transform:none;
  filter:none;
}

/* =========================================================
   CARRITO
   ========================================================= */

.elementor-menu-cart__toggle .elementor-button,
.site-header-cart .cart-contents,
.woocommerce a.cart-contents{
  min-width:46px;
  min-height:46px;
  padding:0 12px;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;

  border:1px solid #4b4f55;
  border-radius:0;

  background:#1c1c1c;
  color:#fff !important;
  text-decoration:none;
}

.elementor-menu-cart__toggle .elementor-button-icon svg,
.site-header-cart .cart-contents svg,
.woocommerce a.cart-contents svg{
  width:19px !important;
  height:19px !important;
}

.site-header-cart .cart-contents .count,
.woocommerce a.cart-contents .count{
  min-width:20px;
  height:20px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  border-radius:999px;
  background:var(--miga-yellow);
  color:#111;
  font-size:10px;
  font-weight:950;
}

/* =========================================================
   CAJA DE CONTACTO HEADER
   ========================================================= */

.miga-box{
  flex:0 0 auto;
  width:auto;
  max-width:330px;
  margin:0;
  padding:10px 12px;

  border:1px solid #414141;
  border-left:4px solid var(--miga-yellow);
  border-radius:0;

  background:#1a1a1a;
  box-shadow:none;
  color:#fff;
}

.miga-box h3{
  margin:0 0 5px;
  color:#fff;
  font-size:12px !important;
  line-height:1.15;
  font-weight:900;
  white-space:normal;
}

.miga-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:4px;
}

.miga-btn{
  min-height:28px;
  height:auto;
  padding:5px 9px;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;

  border:1px solid #555;
  border-radius:0;

  background:#222;
  color:#fff;
  font-size:10px;
  line-height:1.15;
  font-weight:850;
  text-decoration:none;
}

.miga-btn--primary{
  border-color:var(--miga-yellow);
  background:var(--miga-yellow);
  color:#111;
}

.miga-btn--whatsapp{
  border-color:#25d366;
  background:#25d366;
  color:#062b15;
}

.miga-btn:hover{
  transform:none;
  filter:brightness(1.04);
}

.miga-icon{
  width:12px;
  height:12px;
}

.miga-note{
  margin-top:4px;
  color:#babfc6;
  font-size:9px;
}

/* =========================================================
   BOTONES GENERALES
   ========================================================= */

.mm-cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:16px 0;
}

.mm-btn{
  min-height:48px;
  padding:0 20px;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  border:2px solid transparent;
  border-radius:0;

  font-size:12px;
  font-weight:950;
  letter-spacing:.035em;
  text-transform:uppercase;
  text-decoration:none;

  transition:background .15s ease,color .15s ease,border-color .15s ease;
}

.mm-btn--primary{
  background:var(--miga-yellow);
  border-color:var(--miga-yellow);
  color:#111;
  box-shadow:none;
}

.mm-btn--primary:hover{
  background:#ffd638;
  transform:none;
  filter:none;
}

.mm-btn--ghost{
  background:#111;
  border-color:#111;
  color:#fff;
}

.mm-btn--ghost:hover{
  background:#292929;
  color:#fff;
}

/* =========================================================
   FILTRO NUEVO DE PRECIO (compatible con front-page V3)
   ========================================================= */

.miga-price-filter{
  width:100%;
  margin:34px 0 42px;
  padding:34px;

  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(520px,1.15fr);
  align-items:center;
  gap:34px;

  border-left:7px solid var(--miga-yellow);
  background:#fff;
  box-shadow:0 14px 34px rgba(17,24,39,.10);
}

.miga-price-filter__eyebrow{
  margin-bottom:8px;
  color:#676d75;
  font-size:10px;
  font-weight:950;
  letter-spacing:.17em;
  text-transform:uppercase;
}

.miga-price-filter__title{
  margin:0 0 11px;
  color:#111;
  font-size:clamp(30px,3vw,44px);
  line-height:1.02;
  letter-spacing:-.035em;
  font-weight:950;
}

.miga-price-filter__text{
  max-width:600px;
  margin:0;
  color:#667085;
  font-size:14px;
  line-height:1.7;
}

.miga-price-filter__panel{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto auto;
  gap:10px;
  align-items:end;

  padding:18px;
  border:1px solid var(--miga-border);
  background:#f7f8f9;
}

.miga-price-field{
  min-width:0;
}

.miga-price-field label{
  display:block;
  margin:0 0 7px;
  color:#343a40;
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.miga-price-input{
  min-height:54px;
  display:flex;
  align-items:center;

  border:2px solid #c9ced5;
  background:#fff;
}

.miga-price-input:focus-within{
  border-color:#111;
  box-shadow:0 0 0 3px rgba(255,205,17,.25);
}

.miga-price-input span{
  padding-left:15px;
  color:#111;
  font-size:16px;
  font-weight:950;
}

.miga-price-input input{
  width:100%;
  min-width:0;
  height:50px;
  padding:0 14px 0 7px;

  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;

  background:transparent !important;
  color:#111 !important;
  font-size:17px;
  font-weight:850;
}

.miga-price-filter__btn,
.miga-price-filter__reset{
  min-height:54px;
  padding:0 20px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border-radius:0;
  font-size:11px;
  font-weight:950;
  letter-spacing:.04em;
  text-transform:uppercase;
  text-decoration:none;
  white-space:nowrap;
}

.miga-price-filter__btn{
  border:2px solid var(--miga-yellow);
  background:var(--miga-yellow);
  color:#111;
  cursor:pointer;
}

.miga-price-filter__reset{
  border:2px solid #111;
  background:#111;
  color:#fff;
}

.miga-price-filter__hint{
  grid-column:1/-1;
  margin:2px 0 0;
  color:#727985;
  font-size:11px;
  line-height:1.4;
}

/* Oculta el filtro doble viejo si todavía quedó en otra plantilla */
.mm-price{
  margin:24px 0 32px;
  border:1px solid var(--miga-border);
  border-radius:0;
  background:#fff;
  box-shadow:var(--miga-shadow);
}

/* =========================================================
   PRODUCTOS WOOCOMMERCE
   ========================================================= */

.miga-products-wrap,
.woocommerce{
  min-width:0;
}

.miga-products-wrap ul.products,
.woocommerce ul.products{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px !important;
  margin:0 !important;
}

.miga-products-wrap ul.products::before,
.miga-products-wrap ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after{
  display:none !important;
}

.miga-products-wrap ul.products li.product,
.woocommerce ul.products li.product{
  float:none !important;
  width:auto !important;
  min-width:0;
  margin:0 !important;
  padding:0 0 18px;

  overflow:hidden;

  border:1px solid #d7dadd;
  border-radius:0;
  background:#fff;

  box-shadow:0 7px 22px rgba(17,24,39,.07);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}

.miga-products-wrap ul.products li.product:hover,
.woocommerce ul.products li.product:hover{
  transform:translateY(-3px);
  border-color:#b8bdc4;
  box-shadow:0 16px 34px rgba(17,24,39,.14);
}

.miga-products-wrap ul.products li.product a img,
.woocommerce ul.products li.product a img{
  display:block;
  width:100% !important;
  height:250px !important;
  margin:0 0 16px !important;
  object-fit:contain;
  background:#fff;
}

.miga-products-wrap ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  padding:0 16px !important;
  margin:0 0 9px !important;
  color:#111 !important;
  font-size:16px !important;
  line-height:1.3 !important;
  font-weight:900 !important;
}

.miga-products-wrap ul.products li.product .price,
.woocommerce ul.products li.product .price{
  display:block;
  padding:0 16px;
  margin-bottom:14px;
  color:#111 !important;
  font-size:17px !important;
  font-weight:950 !important;
}

.miga-products-wrap ul.products li.product .button,
.woocommerce ul.products li.product .button{
  min-height:44px;
  margin:0 16px !important;
  padding:0 15px !important;

  display:inline-flex !important;
  align-items:center;
  justify-content:center;

  border-radius:0 !important;
  background:var(--miga-yellow) !important;
  color:#111 !important;

  font-size:11px !important;
  line-height:1 !important;
  font-weight:950 !important;
  letter-spacing:.035em;
  text-transform:uppercase;
}

/* =========================================================
   BOTÓN REGRESAR
   ========================================================= */

.miga-back{
  position:fixed;
  left:18px;
  bottom:20px;
  z-index:9999;

  min-height:48px;
  padding:0 16px;

  display:inline-flex;
  align-items:center;
  gap:9px;

  border:1px solid #3c3c3c;
  border-left:5px solid var(--miga-yellow);
  border-radius:0;

  background:#111;
  color:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.22);

  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.miga-back::before,
.miga-back::after{
  display:none !important;
}

.miga-back__icon{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
}

.miga-back:hover{
  transform:translateY(-1px);
  border-color:#555;
  border-left-color:var(--miga-yellow);
  filter:none;
}

/* =========================================================
   TABLET LANDSCAPE / SMALL DESKTOP
   ========================================================= */

@media (max-width:1100px){

  :root{
    --miga-header-h:68px;
    --miga-logo-h:36px;
    --miga-search-h:43px;
  }

  header#masthead,
  .site-header,
  .main-header{
    gap:13px;
    padding:10px 18px;
  }

  .site-branding img,
  .custom-logo{
    max-width:185px !important;
  }

  .site-title,
  h1.site-title,
  .site-title a,
  .ast-site-title a{
    font-size:12px !important;
  }

  .miga-box{
    display:none !important;
  }

  .header-search,
  .site-search{
    max-width:none;
  }

  .miga-price-filter{
    grid-template-columns:1fr;
    gap:22px;
    padding:28px;
  }

  .miga-price-filter__panel{
    grid-template-columns:minmax(180px,1fr) auto auto;
  }

  .miga-products-wrap ul.products,
  .woocommerce ul.products{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px !important;
  }
}

/* =========================================================
   TABLET PORTRAIT
   ========================================================= */

@media (max-width:820px){

  .miga-home .container{
    width:min(100% - 28px,var(--miga-container));
  }

  header#masthead,
  .site-header,
  .main-header{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px 12px;
    padding:10px 14px;
  }

  .site-branding{
    min-width:0;
  }

  .header-search,
  .site-search{
    grid-column:1/-1;
    grid-row:2;
    width:100%;
    max-width:none;
    min-width:0;
  }

  form[role="search"] button,
  .search-form button,
  .woocommerce-product-search button{
    min-width:100px;
  }

  .miga-price-filter{
    margin:26px 0 34px;
    padding:26px 22px;
  }

  .miga-price-filter__panel{
    grid-template-columns:1fr 1fr;
  }

  .miga-price-field{
    grid-column:1/-1;
  }

  .miga-price-filter__btn,
  .miga-price-filter__reset{
    width:100%;
  }
}

/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width:600px){

  :root{
    --miga-logo-h:30px;
    --miga-search-h:46px;
  }

  body{
    min-width:0 !important;
  }

  .miga-home .container{
    width:100%;
    padding:0 12px;
  }

  header#masthead,
  .site-header,
  .main-header{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:9px;
    padding:9px 10px 11px;
    border-bottom-width:4px;
  }

  .site-branding{
    width:100%;
    min-width:0;
  }

  .site-branding img,
  .custom-logo{
    max-width:155px !important;
    max-height:30px !important;
  }

  .site-title,
  h1.site-title,
  .site-title a,
  .ast-site-title a,
  .site-branding .site-title a{
    max-width:100%;
    font-size:11px !important;
    line-height:1.12 !important;
  }

  .elementor-menu-cart__toggle .elementor-button,
  .site-header-cart .cart-contents,
  .woocommerce a.cart-contents{
    min-width:42px;
    min-height:42px;
    padding:0 9px;
  }

  .header-search,
  .site-search{
    width:100%;
    min-width:0;
  }

  form[role="search"],
  .search-form,
  .woocommerce-product-search{
    display:grid;
    grid-template-columns:minmax(0,1fr) 50px;
    width:100%;
  }

  form[role="search"] input[type="search"],
  .search-form input[type="search"],
  .woocommerce-product-search input.search-field{
    width:100%;
    min-width:0;
    height:46px;
    padding:0 12px;
    border:0;
    font-size:13px;
  }

  form[role="search"] button,
  .search-form button,
  .woocommerce-product-search button{
    min-width:0;
    width:50px;
    height:46px;
    padding:0;
    overflow:hidden;
    font-size:0;
  }

  form[role="search"] button::after,
  .search-form button::after,
  .woocommerce-product-search button::after{
    content:"⌕";
    font-size:24px;
    line-height:1;
    font-weight:900;
  }

  .miga-box{
    display:none !important;
  }

  .mm-cta-row{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .mm-btn{
    width:100%;
    min-height:50px;
    padding:0 15px;
  }

  .miga-price-filter{
    display:block;
    margin:22px 0 28px;
    padding:22px 16px;
    border-left-width:5px;
  }

  .miga-price-filter__title{
    font-size:clamp(27px,9vw,34px);
  }

  .miga-price-filter__text{
    font-size:13px;
    line-height:1.6;
  }

  .miga-price-filter__panel{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    margin-top:18px;
    padding:12px;
  }

  .miga-price-field,
  .miga-price-filter__btn,
  .miga-price-filter__reset{
    grid-column:1;
    width:100%;
  }

  .miga-price-input,
  .miga-price-filter__btn,
  .miga-price-filter__reset{
    min-height:52px;
  }

  .miga-products-wrap ul.products,
  .woocommerce ul.products{
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  .miga-products-wrap ul.products li.product,
  .woocommerce ul.products li.product{
    display:grid;
    grid-template-columns:118px minmax(0,1fr);
    grid-template-rows:auto auto 1fr;
    min-height:142px;
    padding:0;
  }

  .miga-products-wrap ul.products li.product a.woocommerce-LoopProduct-link,
  .woocommerce ul.products li.product a.woocommerce-LoopProduct-link{
    display:contents;
  }

  .miga-products-wrap ul.products li.product a img,
  .woocommerce ul.products li.product a img{
    grid-column:1;
    grid-row:1/4;

    width:118px !important;
    height:142px !important;
    margin:0 !important;
    padding:8px;

    border-right:1px solid #e5e7eb;
    object-fit:contain;
  }

  .miga-products-wrap ul.products li.product .woocommerce-loop-product__title,
  .woocommerce ul.products li.product .woocommerce-loop-product__title{
    grid-column:2;
    grid-row:1;
    padding:13px 12px 0 !important;
    margin:0 !important;
    font-size:14px !important;
    line-height:1.25 !important;
  }

  .miga-products-wrap ul.products li.product .price,
  .woocommerce ul.products li.product .price{
    grid-column:2;
    grid-row:2;
    padding:8px 12px 0;
    margin:0;
    font-size:14px !important;
  }

  .miga-products-wrap ul.products li.product .button,
  .woocommerce ul.products li.product .button{
    grid-column:2;
    grid-row:3;
    align-self:end;

    min-height:38px;
    margin:9px 12px 12px !important;
    padding:0 10px !important;
    font-size:10px !important;
  }

  .miga-back{
    left:10px;
    bottom:12px;
    min-height:42px;
    padding:0 11px;
    font-size:11px;
  }

  .miga-back__txt{
    font-size:11px;
  }
}

/* =========================================================
   TELÉFONOS MUY PEQUEÑOS
   ========================================================= */

@media (max-width:380px){

  .miga-home .container{
    padding:0 8px;
  }

  header#masthead,
  .site-header,
  .main-header{
    padding-inline:8px;
  }

  .site-branding img,
  .custom-logo{
    max-width:132px !important;
  }

  .miga-products-wrap ul.products li.product,
  .woocommerce ul.products li.product{
    grid-template-columns:104px minmax(0,1fr);
  }

  .miga-products-wrap ul.products li.product a img,
  .woocommerce ul.products li.product a img{
    width:104px !important;
    height:132px !important;
  }

  .miga-price-filter{
    padding:19px 13px;
  }
}
