/* SI Portal - ajustes moviles V2. Solo pantallas pequenas. */
@media (max-width: 767px) {
 html,body {width:100%;max-width:100%;overflow-x:clip!important}
 *,*::before,*::after{box-sizing:border-box}
 .container{width:calc(100% - 28px)!important;max-width:100%!important}
 .main-head-inner,.nav-wrap{max-width:100%;min-width:0}
 .main-head-inner>*{min-width:0}
 .brand-logo-modern{max-width:82px;height:auto}
 .top-strip-inner{overflow:hidden;white-space:nowrap}
 .hero-modern,.slider-modern,.slider,.slide{max-width:100%!important}
 .slider-modern .slide,.slider .slide{overflow:hidden}
 .hero-modern-content,.hero-content{max-width:100%!important;width:100%!important;min-width:0!important;padding:20px!important;margin:0!important}
 .hero-modern h1,.hero h1{font-size:clamp(26px,8vw,38px)!important;line-height:1.12!important;overflow-wrap:anywhere!important;max-width:100%!important}
 .hero-modern p,.hero p{font-size:14px!important;line-height:1.5!important;max-width:100%!important}
 .hero-actions-modern,.hero-actions{gap:9px!important;max-width:100%;flex-wrap:wrap}
 .hero-actions-modern .btn,.hero-actions .btn{max-width:100%;white-space:normal;text-align:center}
 .products-grid,.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 .product-card,.product-body,.product-footer{min-width:0!important;max-width:100%!important}
 .product-body{padding:12px!important}
 .product-body h3,.product-detail h1{overflow-wrap:anywhere;word-break:normal;font-size:clamp(16px,5vw,24px)!important}
 .product-image{height:155px!important;padding:10px!important}
 .product-image img,.detail-image img{max-width:100%!important;object-fit:contain!important}
 .product-detail,.checkout-grid,.order-detail{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
 .detail-image{height:260px!important;padding:15px!important}
 .catalog-filters{grid-template-columns:minmax(0,1fr)!important}
 .cart-table-wrap{overflow:visible!important;max-width:100%!important}
 .cart-table,.cart-table tbody{display:block!important;width:100%!important;max-width:100%!important}
 .cart-table tr:first-child{display:none!important}
 .cart-table tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px!important;padding:15px!important;margin:0 0 12px!important;border:1px solid #dfe9e5;border-radius:15px;background:#fff}
 .cart-table td{display:block!important;min-width:0!important;width:auto!important;padding:5px!important;border:0!important;overflow-wrap:anywhere!important}
 .cart-table td:first-child{grid-column:1/-1;font-size:15px}
 .cart-table td:nth-child(2)::before{content:'Precio';display:block;color:#65756f;font-size:12px}
 .cart-table td:nth-child(3)::before{content:'Cantidad';display:block;color:#65756f;font-size:12px}
 .cart-table td:nth-child(4)::before{content:'Total';display:block;color:#65756f;font-size:12px}
 .cart-table td:last-child{align-self:end;text-align:right}
 .cart-table input{max-width:100%!important;width:90px!important}
 .cart-summary{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 .cart-summary>div{min-width:0!important;width:100%!important;grid-template-columns:minmax(0,1fr) auto!important;padding:15px!important}
 .cart-summary .btn{width:100%;white-space:normal}
 .whatsapp{position:fixed!important;right:12px!important;left:auto!important;bottom:calc(92px + env(safe-area-inset-bottom,0px))!important;z-index:150!important;padding:10px 13px!important;font-size:12px!important;line-height:1.2!important;max-width:115px!important;white-space:nowrap!important}
 #onlineSupportButton.online-support-button,.online-support-button{position:fixed!important;right:12px!important;left:auto!important;bottom:calc(18px + env(safe-area-inset-bottom,0px))!important;width:54px!important;height:54px!important;z-index:160!important}
 .online-support-badge{display:none!important}
 #soporte-en-linea.virtual-assistant-panel,.online-support-panel{position:fixed!important;left:10px!important;right:10px!important;bottom:calc(82px + env(safe-area-inset-bottom,0px))!important;width:auto!important;max-width:none!important;max-height:70dvh!important;z-index:180!important}
 .virtual-chat{min-height:0!important;max-height:42dvh!important}
 .section{padding-top:32px!important;padding-bottom:32px!important}
}
@media (max-width:360px){.products-grid{grid-template-columns:minmax(0,1fr)!important}}

/* V3: fichas de producto y paneles de almacenes; solo pantallas de telefono. */
@media (max-width:767px) {
  html,body {overflow-x:hidden!important}
  main,main section,main article,.container,.product-detail,.product-details,.product-info,.product-summary,.product-single,.single-product,.product-page,.product-content,.product-meta,.product-description,.product-specs,.product-stock,.stock-list,.warehouse-list,.availability-box,.delivery-note,.notice,.alert {min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  .product-detail,.product-details,.single-product,.product-page,.product-layout,.product-detail-grid,.product-grid-detail {width:100%!important;display:flex!important;flex-direction:column!important;gap:16px!important}
  .product-detail>*,.product-details>*,.product-layout>*,.product-detail-grid>*,.product-info>*,.product-summary>* {min-width:0!important;max-width:100%!important}
  .product-detail h1,.product-details h1,.product-info h1,.product-title,.single-product h1,.product-page h1 {font-size:clamp(22px,6vw,30px)!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;max-width:100%!important}
  .product-price,.detail-price,.price,.product-detail .price,.product-info .price {max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:clamp(20px,6.5vw,30px)!important;line-height:1.2!important}
  .product-detail p,.product-details p,.product-info p,.product-description,.product-specs,.product-meta,.availability-box,.delivery-note,.stock-list,.warehouse-list,.warehouse-card,.stock-card,.notice,.alert {white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .product-detail img,.product-details img,.product-page img {max-width:100%!important;height:auto!important;object-fit:contain!important}
  .warehouse-list,.stock-list,.warehouse-grid,.stock-grid,.availability-grid,.warehouses {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important}
  .warehouse-card,.stock-card,.warehouse-option,.stock-option,.availability-box,.delivery-note,.notice,.alert {width:100%!important;max-width:100%!important;min-width:0!important;padding:12px!important}
  .warehouse-card>*,.stock-card>*,.warehouse-option>*,.stock-option>* {min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
  .warehouse-card label,.stock-card label,.warehouse-option label,.stock-option label {display:flex!important;align-items:flex-start!important;gap:8px!important;flex-wrap:wrap!important;white-space:normal!important}
  .warehouse-card input[type=radio],.stock-card input[type=radio],.warehouse-option input[type=radio] {flex:0 0 auto}
  .product-detail table,.product-details table,.product-info table {max-width:100%!important}
  .product-detail button,.product-details button,.product-info button {max-width:100%!important;white-space:normal!important}
  .whatsapp {bottom:calc(100px + env(safe-area-inset-bottom,0px))!important}
  #onlineSupportButton.online-support-button,.online-support-button {bottom:calc(22px + env(safe-area-inset-bottom,0px))!important}
}

/* V4: top strip legible on mobile, with full phone number visible. */
@media (max-width: 767px) {
  .top-strip .top-strip-inner {
    display: flex !important; flex-wrap: wrap !important;
    justify-content: space-between !important; align-items: center !important;
    gap: 4px 12px !important; padding: 7px 0 !important;
    white-space: normal !important; overflow: visible !important;
    min-height: 0 !important;
  }
  .top-strip .top-strip-inner > span:first-child {
    display: block !important; flex: 1 1 100% !important;
    min-width: 0 !important; white-space: normal !important;
    font-size: 12px !important;
  }
  .top-strip .top-strip-inner > span:nth-child(2),
  .top-strip .top-strip-inner > span:nth-child(3),
  .top-strip .top-strip-inner > .top-social,
  .top-strip .top-strip-inner > .visit-counter-top {display: none !important;}
  .top-strip .top-strip-inner > a[href^="https://wa.me/"] {
    display: inline-block !important; flex: 0 1 auto !important;
    max-width: 100% !important; white-space: normal !important;
    overflow-wrap: anywhere !important; font-size: 12px !important;
  }
}
