.mg-cat{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#13233f;max-width:1280px;margin:30px auto;padding:0 18px;box-sizing:border-box}
.mg-cat *{box-sizing:border-box}
.mg-cat-hero{min-height:250px;border-radius:24px;overflow:hidden;position:relative;background:linear-gradient(110deg,#eef7ff,#fff);display:flex;align-items:center;padding:36px 44px;margin-bottom:18px;border:1px solid #e5edf7}
.mg-cat-hero-copy{position:relative;z-index:2;max-width:620px}
.mg-cat-kicker{font-size:13px;font-weight:800;letter-spacing:.16em;color:#0878d1}
.mg-cat h1{font-size:clamp(34px,5vw,58px);line-height:.98;margin:10px 0 8px;font-weight:850;letter-spacing:-.045em}
.mg-cat-hero p{font-size:23px;font-weight:750;margin:0 0 5px}.mg-cat-hero small{font-size:15px;color:#5c6d83}
.mg-cat-hero-art{position:absolute;right:0;top:0;width:47%;height:100%;overflow:hidden}
.mg-orb{position:absolute;border-radius:50%;filter:blur(1px);opacity:.9}.mg-orb-1{width:260px;height:260px;right:90px;top:-65px;background:#d8efff}.mg-orb-2{width:210px;height:210px;right:-35px;bottom:-70px;background:#e9f5ff}
.mg-hero-label{position:absolute;right:40px;top:54px;font-size:28px;line-height:1.05;font-weight:800;font-style:italic;text-align:right;color:#10213e}
.mg-cat-search-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;margin:18px 0}
.mg-cat-search{display:flex;align-items:center;gap:10px;border:1px solid #d8e1ec;border-radius:14px;background:#fff;padding:0 15px;box-shadow:0 3px 15px rgba(18,39,68,.05)}
.mg-cat-search span{font-size:28px;color:#0878d1}.mg-cat-search input{border:0;outline:0;width:100%;height:52px;font-size:15px}
.mg-cat button,.mg-cat-wa{border:0;border-radius:13px;font-weight:750;cursor:pointer;text-decoration:none;display:flex;align-items:center;justify-content:center;padding:0 19px;min-height:52px}
#mg-cat-search-btn{background:#0878d1;color:#fff}.mg-cat-wa{background:#18c86b;color:#fff;white-space:nowrap}
.mg-cat-filters{display:flex;gap:8px;overflow-x:auto;padding:4px 1px 15px;scrollbar-width:thin}
.mg-cat-filter{background:#f4f7fb;color:#243650;min-height:42px!important;padding:0 16px!important;border:1px solid #edf1f6!important;white-space:nowrap}
.mg-cat-filter.is-active{background:#0878d1;color:#fff;border-color:#0878d1!important}
.mg-cat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.mg-card{background:#fff;border:1px solid #e5eaf0;border-radius:17px;overflow:hidden;box-shadow:0 5px 18px rgba(16,39,70,.06);transition:transform .18s ease,box-shadow .18s ease}
.mg-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(16,39,70,.11)}
.mg-card-img{aspect-ratio:1/1;background:#f7f9fb;display:block;overflow:hidden}.mg-card-img img{width:100%;height:100%;object-fit:contain;display:block;mix-blend-mode:multiply}
.mg-card-body{padding:13px 13px 14px}.mg-card-cat{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#73829a;font-weight:800}.mg-card h3{font-size:16px;line-height:1.2;margin:6px 0 7px;color:#172844}.mg-card-price{font-size:19px;font-weight:850;color:#0878d1;min-height:26px}.mg-card-link{margin-top:11px!important;width:100%;min-height:40px!important;background:#0878d1;color:#fff;font-size:13px}.mg-cat-loading{text-align:center;padding:28px;color:#68778c}.mg-cat-more{display:none;margin:20px auto;background:#13233f;color:#fff}.mg-cat-alert{padding:20px;background:#fff4e5;border-radius:12px}
@media(max-width:980px){.mg-cat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mg-cat-search-row{grid-template-columns:1fr auto}.mg-cat-wa{grid-column:1/-1}}
@media(max-width:680px){.mg-cat{padding:0 10px}.mg-cat-hero{padding:28px 22px;min-height:220px}.mg-cat-hero-art{opacity:.35;width:60%}.mg-cat-search-row{grid-template-columns:1fr}.mg-cat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mg-card-body{padding:10px}.mg-card h3{font-size:14px}.mg-card-price{font-size:17px}.mg-cat-wa,#mg-cat-search-btn{width:100%}}

/* v1.1 - refinamiento visual Tiendas MG */
.mg-cat{max-width:1280px;margin:12px auto 40px}
.mg-cat-hero{min-height:220px;padding:30px 40px;border-radius:22px}
.mg-cat-search-row{margin:14px 0}
.mg-cat-filters{padding-bottom:12px}
.mg-card-img{aspect-ratio:1/0.88}
.mg-card-body{min-height:145px;display:flex;flex-direction:column}
.mg-card-link{margin-top:auto!important}
@media(min-width:981px){.mg-cat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* v1.2 - catálogo ancho y tarjetas refinadas */
.mg-cat-v11{max-width:1440px;margin-top:8px}
.mg-cat-v11 .mg-cat-hero{min-height:205px;padding:28px 42px}
.mg-cat-v11 .mg-cat-hero h1{font-size:clamp(32px,4.2vw,52px)}
.mg-cat-v11 .mg-cat-search-row{margin:12px 0}
.mg-cat-v11 .mg-cat-grid{gap:14px}
.mg-cat-v11 .mg-card-img{aspect-ratio:1/0.78;padding:10px}
.mg-cat-v11 .mg-card-img img{mix-blend-mode:multiply}
.mg-cat-v11 .mg-card-body{min-height:142px;padding:12px 13px 13px}
.mg-cat-v11 .mg-card h3{font-size:15px;line-height:1.18;min-height:36px}
.mg-cat-v11 .mg-card-price{font-size:20px}
.mg-cat-v11 .mg-card-link{min-height:38px!important}
.mg-cat-empty{padding:35px 15px;text-align:center;color:#65758b;background:#f7f9fc;border-radius:15px;margin-top:8px}
@media(min-width:1200px){.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(min-width:981px) and (max-width:1199px){.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:680px){
  .mg-cat-v11{margin-top:4px}
  .mg-cat-v11 .mg-cat-hero{min-height:200px;padding:24px 20px}
  .mg-cat-v11 .mg-cat-hero h1{font-size:34px}
  .mg-cat-v11 .mg-card-img{aspect-ratio:1/0.9;padding:7px}
}

/* Hide the theme/page title only on the catalog page after JS adds this class. */
body.mg-catalog-page .entry-title,
body.mg-catalog-page .page-title,
body.mg-catalog-page .elementor-page-title,
body.mg-catalog-page .elementor-widget-theme-post-title{display:none!important}

/* v1.3 - navegación de categorías más clara */
.mg-cat-v11 .mg-cat-filters{scroll-behavior:smooth}
.mg-cat-v11 .mg-cat-filter{font-size:13px}
.mg-cat-v11 .mg-cat-search-row{position:relative;z-index:3}
@media(min-width:981px){
  .mg-cat-v11 .mg-cat-filter{min-width:max-content}
}

/* v1.4 - vista compacta de 6 columnas */
.mg-cat-v11{max-width:1480px}
.mg-cat-v11 .mg-cat-hero{min-height:190px;padding:25px 38px}
.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.mg-cat-v11 .mg-card{border-radius:14px}
.mg-cat-v11 .mg-card-img{aspect-ratio:1/0.70;padding:8px}
.mg-cat-v11 .mg-card-body{min-height:132px;padding:10px 11px 11px}
.mg-cat-v11 .mg-card-cat{font-size:9px}
.mg-cat-v11 .mg-card h3{font-size:13px;line-height:1.15;min-height:31px;margin:5px 0 5px}
.mg-cat-v11 .mg-card-price{font-size:17px;min-height:22px}
.mg-cat-v11 .mg-card-link{min-height:34px!important;font-size:12px;padding:0 10px!important;margin-top:7px!important}
@media(min-width:1200px){.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(min-width:981px) and (max-width:1199px){.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:980px){.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.mg-cat-v11 .mg-cat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mg-cat-v11 .mg-card-img{aspect-ratio:1/0.82}}

/* v1.5 - imágenes completas + categorías funcionales */
.mg-cat-v11 .mg-card-img{
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#f8fafc;
}
.mg-cat-v11 .mg-card-img img{
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center center;
  mix-blend-mode:normal;
}
.mg-cat-v11 .mg-cat-filter{
  flex:0 0 auto;
}
.mg-cat-v11 .mg-cat-filters::-webkit-scrollbar{height:6px}
.mg-cat-v11 .mg-cat-filters::-webkit-scrollbar-thumb{border-radius:10px}

/* v1.6 - título completo al pasar el mouse */
.mg-cat-v11 .mg-card-title{
  position:relative;
  cursor:default;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
@media (hover:hover) and (pointer:fine){
  .mg-cat-v11 .mg-card-title:hover{overflow:visible;z-index:20}
  .mg-cat-v11 .mg-card-title:hover::after{
    content:attr(title);
    position:absolute;
    left:-4px;
    top:calc(100% + 6px);
    width:max-content;
    max-width:280px;
    padding:8px 10px;
    background:#172b4d;
    color:#fff;
    border-radius:7px;
    font-size:12px;
    line-height:1.35;
    font-weight:400;
    box-shadow:0 7px 18px rgba(0,0,0,.16);
    white-space:normal;
  }
}

/* v1.6 - buscador instantáneo + categorías compactas */
.mg-cat-v11 .mg-cat-filters-wrap{position:relative}
.mg-cat-v11 .mg-cat-filters{overflow-x:auto;scrollbar-width:none;padding-right:4px}
.mg-cat-v11 .mg-cat-filters::-webkit-scrollbar{display:none}
.mg-cat-v11 .mg-cat-filter-extra{display:none}
.mg-cat-v11 .mg-cat-filters.is-expanded .mg-cat-filter-extra{display:flex}
.mg-cat-more-cats{flex:0 0 auto!important;min-height:42px!important;background:#13233f!important;color:#fff!important;padding:0 16px!important;white-space:nowrap}
.mg-cat-more-cats span{font-size:16px;margin-left:4px}
.mg-cat-search-clear{display:none;align-items:center;justify-content:center;width:30px;height:30px;border:0;background:transparent;color:#65758b;font-size:21px;cursor:pointer}
.mg-cat-search.has-value .mg-cat-search-clear{display:flex}
.mg-cat-v11 .mg-cat-search input{min-width:0}
@media(max-width:680px){
  .mg-cat-more-cats{font-size:12px!important;padding:0 12px!important}
}

/* v1.7 - búsqueda robusta + botón de más categorías siempre visible */
.mg-cat-v11 .mg-cat-filters{
  display:flex;
  flex-wrap:wrap;
  overflow:visible;
  align-items:center;
  gap:8px;
  padding:4px 1px 12px;
}
.mg-cat-v11 .mg-cat-filter-extra{display:none}
.mg-cat-v11 .mg-cat-filters.is-expanded .mg-cat-filter-extra{display:flex}
.mg-cat-v11 .mg-cat-more-cats{display:flex!important;flex:0 0 auto!important}
.mg-cat-v11 .mg-cat-search{position:relative}
.mg-cat-v11 .mg-cat-search-clear{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  border-radius:50%;
  min-height:30px!important;
  width:30px;
  padding:0!important;
  color:#52657f;
}
.mg-cat-v11 .mg-cat-search.has-value input{padding-right:38px}
@media(max-width:680px){
  .mg-cat-v11 .mg-cat-filters{flex-wrap:wrap;overflow:visible}
}

/* v1.8 - selección de productos para cotización por WhatsApp */
.mg-cat-v11 .mg-card-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:6px;margin-top:auto}
.mg-cat-v11 .mg-card-actions .mg-card-link{margin-top:0!important}
.mg-cat-v11 .mg-card-quote{min-height:34px!important;padding:0 8px!important;border:1px solid #18c86b!important;background:#fff!important;color:#159b55!important;font-size:11px;border-radius:9px!important}
.mg-cat-v11 .mg-card-quote:hover{background:#effcf5!important}
.mg-quote-float{position:fixed;right:24px;bottom:24px;z-index:9998;background:#18c86b!important;color:#fff!important;border-radius:999px!important;box-shadow:0 8px 28px rgba(0,0,0,.2);min-height:50px!important;padding:0 18px!important}
.mg-quote-float span{display:inline-flex;align-items:center;justify-content:center;margin-left:7px;background:#fff;color:#159b55;border-radius:999px;min-width:23px;height:23px;font-size:12px}
.mg-quote-panel{position:fixed;right:24px;bottom:84px;width:min(390px,calc(100vw - 28px));max-height:70vh;z-index:9999;background:#fff;border:1px solid #dfe7ef;border-radius:17px;box-shadow:0 18px 45px rgba(16,39,70,.22);overflow:hidden}
.mg-quote-head{display:flex;justify-content:space-between;align-items:center;padding:15px 17px;background:#13233f;color:#fff;font-size:16px}
.mg-quote-head button{min-height:30px!important;width:30px;padding:0!important;border-radius:50%!important;background:rgba(255,255,255,.13)!important;color:#fff!important;font-size:20px}
.mg-quote-items{max-height:47vh;overflow:auto;padding:8px 12px}
.mg-quote-item{display:grid;grid-template-columns:48px 1fr 28px;gap:9px;align-items:center;padding:9px 2px;border-bottom:1px solid #edf1f5}
.mg-quote-item img{width:48px;height:48px;object-fit:contain;background:#f7f9fb;border-radius:7px}
.mg-quote-item strong{display:block;font-size:12px;line-height:1.25;color:#172844}
.mg-quote-item small{display:block;margin-top:3px;color:#0878d1;font-weight:800}
.mg-quote-item button{min-height:28px!important;width:28px;padding:0!important;background:#f3f5f8!important;color:#66768c!important;border-radius:50%!important}
.mg-quote-empty{padding:25px 10px;text-align:center;color:#718096;font-size:13px}
.mg-quote-foot{padding:12px;border-top:1px solid #e8edf3;display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center}
.mg-quote-foot span{font-size:12px;color:#65758b;font-weight:700}
.mg-quote-foot button{min-height:42px!important;background:#18c86b!important;color:#fff!important;padding:0 14px!important}
@media(max-width:680px){.mg-quote-float{right:12px;bottom:14px}.mg-quote-panel{right:12px;bottom:73px}.mg-cat-v11 .mg-card-actions{grid-template-columns:1fr}.mg-cat-v11 .mg-card-actions .mg-card-link{min-height:34px!important}}

/* v1.9 - cantidades por producto en la cotización */
.mg-quote-item{grid-template-columns:48px 1fr auto;align-items:start}
.mg-quote-item-main{min-width:0}
.mg-quote-qty{display:flex;align-items:center;gap:4px;margin-top:7px}
.mg-quote-qty button{min-height:26px!important;width:26px!important;padding:0!important;border:1px solid #dce5ee!important;background:#f6f8fb!important;color:#172b49!important;border-radius:7px!important;font-size:15px!important;line-height:1!important}
.mg-quote-qty input{width:46px!important;height:26px!important;min-height:26px!important;padding:0 4px!important;text-align:center;border:1px solid #dce5ee!important;border-radius:7px!important;background:#fff!important;color:#172b49!important;font-size:12px!important;font-weight:800!important}
.mg-quote-qty input::-webkit-outer-spin-button,.mg-quote-qty input::-webkit-inner-spin-button{margin:0}
.mg-quote-item-remove{margin-top:2px!important}
.mg-quote-foot{grid-template-columns:auto 1fr}

/* v2.3 - Cotizar es un enlace WhatsApp real; JS solo mejora el flujo con carrito. */
.mg-cat-v11 .mg-card-quote{display:flex!important;align-items:center;justify-content:center;text-decoration:none!important;cursor:pointer!important;box-sizing:border-box!important;font-family:inherit!important;font-weight:700!important}
