/* Dominika 39 — narrow mobile layout safeguards. Staging only, 2026-11-07. */
/* Keep product images and their alt text from expanding the layout when assets fail. */
.shop-grid .shop-item { min-width:0; box-sizing:border-box; }
.shop-item--type-standard .shop-item__image,
.shop-item--type-standard .shop-item__image-inner {width:100%;min-width:0;max-width:100%;}
.shop-item--type-standard .shop-item__image-inner {aspect-ratio: 4 / 3;overflow:hidden;display:block;background:#faf7f4;}
.shop-item--type-standard .shop-item__image-inner > img,
.shop-item--type-standard .shop-item__image-inner > a > img {display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:none!important;object-fit:cover;object-position:center;}
.shop-item__image-inner img.dominika-image-failed {visibility:hidden!important;}
.shop-item__image-inner.dominika-image-missing::after {content:"Фото временно недоступно";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;text-align:center;font:500 14px/1.45 system-ui,-apple-system,Arial,sans-serif;color:#6d5850;z-index:1;pointer-events:none;}
.shop-grid .shop-item__title { overflow-wrap:anywhere;word-break:normal; }
.shop-grid .shop-item__title a { font-size:clamp(15px,3.1vw,19px);line-height:1.35; }
.shop-grid .shop-item__buttons { max-width:100%; }
.shop-grid .shop-item__buttons .button {max-width:100%;white-space:normal;}
@media (max-width:767px) {
 /* Main category selector on the homepage: one horizontal, touch-scrollable row. */
 body.home .section-html .woocommerce-tabs.wc-tabs-wrapper > ul.tabs,
 body.home .section-html ul.tabs.wc-tabs { display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;overflow-x:auto!important;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding:4px 0 10px!important;margin:0 0 16px!important;list-style:none;max-width:100%;}
 body.home .section-html ul.tabs.wc-tabs > li {flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important;float:none!important;}
 body.home .section-html ul.tabs.wc-tabs > li > a {display:block!important;padding:9px 12px!important;font-size:15px!important;line-height:1.25!important;white-space:nowrap!important;}
 body.home .section-html .woocommerce-tabs.wc-tabs-wrapper {max-width:100%;min-width:0;}
 body.home .section-html .woocommerce-tabs .wc-tab {max-width:100%;min-width:0;}
 .shop-grid--columns-4 .shop-item, .shop-grid--columns-4 .product-category {box-sizing:border-box;}
 .shop-item--type-standard .shop-item__image-inner{aspect-ratio: 1 / 1;}
 .site-header img {max-width:100%;height:auto;}
}
@media (max-width:359px) {body.home .section-html ul.tabs.wc-tabs > li > a {font-size:14px!important;padding:8px 10px!important;}}
