/* ANB Lab mobile-only corrections: isolated below 768px.
   Do not use these rules on desktop. */
@media (max-width:767px){
  /* Mobile catalog: round the actual photo rather than only the card. */
  body.anblab-theme #product-category.anb-category-page .anb-catalog-products .product-thumb>.image,
  body.anblab-theme #product-category.anb-category-page .anb-catalog-products .product-thumb>.image>a {
    overflow:hidden!important;border-radius:16px!important;
  }
  body.anblab-theme #product-category.anb-category-page .anb-catalog-products .product-thumb>.image>a {
    display:block!important;padding:8px!important;background:#fff!important;
    aspect-ratio:1/1!important;min-height:0!important;
  }
  body.anblab-theme #product-category.anb-category-page .anb-catalog-products .product-thumb>.image>a>img.img-responsive,
  body.anblab-theme #product-category.anb-category-page .anb-catalog-products .product-thumb>.image>a>img {
    display:block!important;width:100%!important;height:100%!important;
    object-fit:contain!important;max-width:100%!important;max-height:100%!important;
    border-radius:15px!important;clip-path:inset(0 round 15px)!important;
    -webkit-mask-image:-webkit-radial-gradient(white,black);
  }
  /* Subcategory photo has equal proportions on all widths, not a tiny tile. */
  body.anblab-theme #product-category.anb-category-page .anb-subcategory-card .anb-subcategory-media {
    aspect-ratio:5/4!important;padding:8px!important;
  }
  body.anblab-theme #product-category.anb-category-page .anb-subcategory-card .anb-subcategory-media>img {
    width:100%!important;height:100%!important;max-width:100%!important;
    max-height:100%!important;border-radius:15px!important;
    clip-path:inset(0 round 15px)!important;
  }
  /* Product details: preserve the full square photo and round the real image. */
  body.anblab-theme #product-product.anb-product-page .anb-gallery-main,
  body.anblab-theme #product-product.anb-product-page .anb-gallery-main>a.thumbnail {
    border-radius:19px!important;overflow:hidden!important;
  }
  body.anblab-theme #product-product.anb-product-page .anb-gallery-main>a.thumbnail>img {
    display:block!important;width:100%!important;height:100%!important;
    object-fit:contain!important;border-radius:16px!important;
    clip-path:inset(0 round 16px)!important;
    -webkit-mask-image:-webkit-radial-gradient(white,black);
  }
  body.anblab-theme #product-product.anb-product-page .anb-gallery-rail .thumbnail,
  body.anblab-theme #product-product.anb-product-page .anb-gallery-rail .thumbnail img {
    border-radius:12px!important;overflow:hidden!important;
  }
  /* Account registration: do not float the agreement and continue button
     side-by-side in a narrow Bootstrap form. */
  body.anblab-theme #account-register #content .buttons,
  body.anblab-theme #account-register #content .buttons .pull-right {
    float:none!important;display:block!important;width:100%!important;
    max-width:100%!important;box-sizing:border-box!important;
    text-align:left!important;white-space:normal!important;
    overflow-wrap:anywhere!important;line-height:1.7!important;
  }
  body.anblab-theme #account-register #content .buttons {
    padding:16px!important;border:1px solid #dfe8f5!important;
    background:#fff!important;border-radius:14px!important;
  }
  body.anblab-theme #account-register #content .buttons input[type="checkbox"] {
    display:inline-block!important;width:19px!important;height:19px!important;
    margin:0 6px!important;vertical-align:middle!important;position:static!important;
  }
  body.anblab-theme #account-register #content .buttons input[type="submit"],
  body.anblab-theme #account-register #content .buttons button[type="submit"] {
    display:block!important;float:none!important;width:100%!important;
    max-width:100%!important;min-height:45px!important;margin:15px 0 0!important;
    border-radius:11px!important;background:#195bb8!important;
    color:#fff!important;border-color:#195bb8!important;
  }
  body.anblab-theme #account-register #content .form-horizontal,
  body.anblab-theme #account-register #content .form-group,
  body.anblab-theme #account-register #content .form-group>[class*="col-"] {
    min-width:0!important;max-width:100%!important;
  }
  /* Success action buttons, not plain blue text links on iPhone. */
  body.anblab-theme #checkout-success .anb-order-success-card{
    padding:23px 17px!important;border-radius:17px!important;
    margin:14px auto 30px!important;
  }
  body.anblab-theme #checkout-success .anb-order-success-actions{
    flex-direction:column!important;align-items:stretch!important;
  }
  body.anblab-theme #checkout-success .anb-order-success-actions>a{
    width:100%!important;display:flex!important;
    min-height:47px!important;text-align:center!important;
  }
  /* Dropdown anchored at cart's right edge; old 427px min-width is neutralized. */
  body.anblab-theme .anb-header-cart #cart.anb-mini-cart>ul.dropdown-menu {
    right:0!important;left:auto!important;width:min(370px,calc(100vw - 22px))!important;
    max-width:calc(100vw - 22px)!important;
    max-height:68vh!important;
    border-radius:17px!important;
  }
  body.anblab-theme .anb-header-cart #cart.anb-mini-cart>ul.dropdown-menu>li>.anb-mini-content {
    min-width:0!important;max-width:100%!important;
  }
  body.anblab-theme .anb-header-cart #cart.anb-mini-cart .anb-mini-product {
    grid-template-columns:49px minmax(0,1fr) 26px!important;gap:8px!important;
  }
}
