/* Storefront mobile refinement V1 — compact home hierarchy without changing commerce logic */
@media(max-width:760px){
  /* Mobile home should open directly into shopping navigation. Keep the full
     branded hero on desktop, but remove it from the mobile home entirely. */
  body.storefront-v2 .hero{display:none!important}

  body.storefront-v2 .home-v2-section{padding-top:17px!important}
  body.storefront-v2 .home-v2-section-head{margin-bottom:10px!important;gap:9px!important}
  body.storefront-v2 .home-v2-section-head h2{font-size:19px!important}
  body.storefront-v2 .home-v2-section-head p{font-size:10.8px!important;line-height:1.65!important}
  body.storefront-v2 .home-v2-section-head a{font-size:10.5px!important;white-space:nowrap}
  body.storefront-v2 .home-v2-categories{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  body.storefront-v2 .home-v2-category{min-height:88px!important;border-radius:15px!important;padding:10px 5px 9px!important;gap:5px!important}
  body.storefront-v2 .home-v2-category-icon{width:40px!important;height:40px!important;border-radius:12px!important}
  body.storefront-v2 .home-v2-category-icon svg{width:22px!important;height:22px!important}
  body.storefront-v2 .home-v2-category strong{font-size:10.4px!important;line-height:1.5!important}

  /* Keep these merchandising/support sections on desktop, but remove them
     from the mobile home so shoppers reach navigation choices immediately. */
  body.storefront-v2 .home-v2-trust{display:none!important}
  body.storefront-v2 #products{display:none!important}

  /* Mobile-only real product shelf. This is intentionally separate from the
     full desktop merchandising/filter area so the first products arrive fast. */
  body.storefront-v2 .mobile-product-shelf{display:block;padding:18px 0 8px}
  body.storefront-v2 .mobile-product-shelf .container{width:min(100% - 20px,720px)}
  body.storefront-v2 .mobile-product-shelf-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:10px}
  body.storefront-v2 .mobile-product-shelf-head h2{margin:0;font-size:19px;line-height:1.45;font-weight:900;letter-spacing:-.25px}
  body.storefront-v2 .mobile-product-shelf-head p{margin:3px 0 0;color:#667085;font-size:10.6px;line-height:1.65}
  body.storefront-v2 .mobile-product-shelf-count{flex:0 0 auto;color:#9f111b;background:#fff4f4;border:1px solid #f0d9db;border-radius:999px;padding:4px 8px;font-size:9.8px;font-weight:900}
  body.storefront-v2 .mobile-product-shelf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  body.storefront-v2 .mobile-product-card{min-width:0;overflow:hidden;background:#fff;border:1px solid #e7eaf0;border-radius:16px;box-shadow:0 6px 18px rgba(17,24,39,.045)}
  body.storefront-v2 .mobile-product-card-media{display:grid;place-items:center;height:132px;padding:8px;background:linear-gradient(180deg,#fff,#fafbfc);overflow:hidden}
  body.storefront-v2 .mobile-product-card-media img{display:block;width:100%;height:100%;object-fit:contain;border-radius:10px}
  body.storefront-v2 .mobile-product-placeholder{display:grid;place-items:center;width:100%;height:100%;border-radius:10px;background:linear-gradient(145deg,#fff4f4,#fff9e9);color:#9f111b;font-size:11px;font-weight:900;text-align:center;padding:10px}
  body.storefront-v2 .mobile-product-card-body{padding:9px 10px 10px}
  body.storefront-v2 .mobile-product-card-title{display:block;color:#172033;font-size:11.7px;font-weight:900;line-height:1.65;min-height:39px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body.storefront-v2 .mobile-product-card-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:7px}
  body.storefront-v2 .mobile-product-price{min-width:0;color:#9f111b;font-size:11.1px;font-weight:900;line-height:1.5}
  body.storefront-v2 .mobile-product-stock{display:block;margin-top:3px;color:#667085;font-size:9.4px;line-height:1.4}
  body.storefront-v2 .mobile-product-add{width:36px;height:36px;min-width:36px;border:1px solid #f0d9db;border-radius:11px;background:#fff4f4;color:#9f111b;font:inherit;font-size:20px;font-weight:700;line-height:1;cursor:pointer}
  body.storefront-v2 .mobile-product-add:disabled{opacity:.42;cursor:not-allowed}
  body.storefront-v2 .mobile-product-more{display:flex;align-items:center;justify-content:center;width:100%;min-height:42px;margin-top:9px;border:1px solid #e2e5eb;border-radius:12px;background:#fff;color:#344054;font:inherit;font-size:11px;font-weight:900;cursor:pointer}
  body.storefront-v2 .mobile-product-more[hidden]{display:none!important}
  body.storefront-v2 .mobile-product-shelf-error{padding:14px;border:1px dashed #e5e7eb;border-radius:14px;background:#fff;color:#667085;text-align:center;font-size:11px;line-height:1.8}

  body.storefront-v2 .advanced-product-filters{margin:9px 0 13px!important;padding:10px!important;border-radius:14px!important}
  body.storefront-v2 .advanced-product-filters .apf-head{margin-bottom:0!important;min-height:32px;font-size:10.5px!important}
  body.storefront-v2 .apf-mobile-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:40px;margin-top:6px;padding:7px 10px;border:1px solid #e4e7ec;border-radius:10px;background:#f8f9fb;color:#344054;font:inherit;font-size:11px;font-weight:900;cursor:pointer}
  body.storefront-v2 .apf-mobile-toggle:after{content:'⌄';font-size:16px;line-height:1;transition:transform .18s ease}
  body.storefront-v2 .advanced-product-filters.is-open .apf-mobile-toggle:after{transform:rotate(180deg)}
  body.storefront-v2 .advanced-product-filters.apf-mobile-collapsible .apf-grid{display:none!important;margin-top:8px}
  body.storefront-v2 .advanced-product-filters.apf-mobile-collapsible.is-open .apf-grid{display:grid!important;grid-template-columns:1fr 1fr!important}

  /* Compact mobile footer: preserve all information while reducing the large
     dark block seen at the end of the home page. */
  body.storefront-v2 .footer{margin-top:24px!important;padding:22px 0 14px!important}
  body.storefront-v2 .footer .container{width:min(100% - 28px,720px)!important}
  body.storefront-v2 .footer-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px 18px!important}
  body.storefront-v2 .footer-grid>div:first-child{grid-column:1/-1}
  body.storefront-v2 .footer-grid h4{margin:0 0 5px!important;font-size:11px!important;line-height:1.5!important}
  body.storefront-v2 .footer-grid strong{font-size:12px!important;line-height:1.5!important}
  body.storefront-v2 .footer-grid p{margin:3px 0 0!important;font-size:9.8px!important;line-height:1.65!important}
  body.storefront-v2 .footer-grid a,body.storefront-v2 .footer-grid span{font-size:9.8px!important;line-height:1.65!important}
  body.storefront-v2 .contact-whatsapp{gap:6px!important;margin-top:4px!important}
  body.storefront-v2 .contact-whatsapp-link img{width:28px!important;height:28px!important}
  body.storefront-v2 .footer-trust-links{margin-top:11px!important;padding-top:9px!important;gap:5px 11px!important}
  body.storefront-v2 .footer-trust-links a{font-size:9.4px!important;line-height:1.55!important}
  body.storefront-v2 .copy{margin-top:9px!important;padding-top:9px!important;font-size:8.8px!important;line-height:1.55!important}
}

@media(min-width:761px){
  .apf-mobile-toggle{display:none!important}
  .mobile-product-shelf{display:none!important}
}

@media(max-width:430px){
  body.storefront-v2 .mobile-product-card-media{height:126px}
}

@media(max-width:390px){
  body.storefront-v2 .home-v2-categories{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.storefront-v2 .mobile-product-card-media{height:120px}
}

@media(prefers-reduced-motion:reduce){.apf-mobile-toggle:after{transition:none!important}}


/* Mobile product skeleton CLS reservation v1 */
@media(max-width:760px){
  body.storefront-v2 .mobile-product-skeleton{min-height:216px;pointer-events:none}
  body.storefront-v2 .mobile-product-skeleton .mobile-product-card-media{background:linear-gradient(110deg,#f5f6f8 30%,#fafbfc 45%,#f5f6f8 60%)}
  body.storefront-v2 .mobile-product-skeleton-line{display:block;height:14px;border-radius:7px;background:#eef0f3;margin-bottom:7px}
  body.storefront-v2 .mobile-product-skeleton-line.short{width:58%;height:10px}
  body.storefront-v2 .mobile-product-skeleton-price{display:block;width:72px;height:13px;border-radius:7px;background:#eef0f3}
  body.storefront-v2 .mobile-product-skeleton-add{display:block;width:36px;height:36px;border-radius:11px;background:#f4f5f7}
}

/* Mobile product image contained-in-square v4 */
@media(max-width:760px){
  body.storefront-v2 .mobile-product-card-media{
    aspect-ratio:1 / 1!important;
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
    padding:10px!important;
    background:#fff!important;
  }
  body.storefront-v2 .mobile-product-card-media img{
    display:block!important;
    width:82%!important;
    height:82%!important;
    max-width:82%!important;
    max-height:82%!important;
    object-fit:contain!important;
    object-position:center center!important;
    border-radius:10px!important;
    background:#fff!important;
    position:static!important;
    transform:none!important;
  }
}
