/* Shopping page boundaries; shared navigation and payment screens stay independent. */
.sf-shopping-home, .sf-shopping-product, .sf-shopping-cart { min-width:0; }
.sf-shopping-home { max-width:1440px; }
.sf-shopping-product { max-width:760px; }
.sf-shopping-cart { max-width:1120px; }
.sf-shopping-home .announcement-card, .sf-shopping-home .promo-banner-info { overflow-wrap:anywhere; }
.sf-shopping-home .announcement-card h4 svg { flex-shrink:0; }
.sf-shopping-home .category-tabs { gap:6px; margin-bottom:1.3rem; }
.sf-shopping-home .category-tab { flex-shrink:0; min-height:44px; max-width:100%; overflow-wrap:anywhere; }
.sf-shopping-home .product-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,210px),1fr)); gap:16px; }
@media (min-width:1280px) {
    .sf-shopping-home .product-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
}
.sf-shopping-home .product-card { min-width:0; align-self:stretch; display:flex; flex-direction:column; }
.sf-shopping-home .product-card-image { flex-shrink:0; }
.sf-shopping-home .product-card-info { min-width:0; padding:10px; display:flex; flex-direction:column; flex:1; }
.sf-shopping-home .product-card-name, .sf-shopping-home .placeholder-label { overflow-wrap:anywhere; }
.sf-shopping-home .product-card-name { font-size:.9rem; line-height:1.35; margin-bottom:3px; }
.sf-shopping-home .product-card-desc { font-size:.75rem; line-height:1.35; margin-bottom:4px; }
.sf-shopping-home .product-card-tags { gap:6px; flex-wrap:wrap; align-items:center; margin-bottom:6px; }
/* Optional descriptions and wrapped names must not move the purchase area between cards. */
.sf-shopping-home .product-card-info .product-card-tags { margin-top:auto; }
.sf-shopping-home .product-card-tags-left { min-width:0; }
.sf-shopping-home .product-card-tags-left > span { padding:1px 6px; font-size:.7rem; line-height:1.4; }
.sf-shopping-home :is(.product-sold,.ss-shop-spec-count) { font-size:.7rem; line-height:1.4; }
/* Keep price and actions together when they fit; longer amounts can wrap. */
.sf-shopping-home .product-card-bottom { display:flex; flex-wrap:wrap; gap:6px 8px; padding-top:6px; }
.sf-shopping-home .product-price-compact { min-width:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.sf-shopping-home .product-price-compact span { font-size:1.2rem; }
.sf-card-actions { display:flex; gap:6px; min-width:0; max-width:100%; margin-left:auto; flex-wrap:wrap; }
.sf-shopping-home .btn-buy { min-height:44px; min-width:0; max-width:100%; padding:6px 12px; font-size:.8rem; white-space:normal; overflow-wrap:anywhere; text-align:center; }
.sf-card-actions .btn-buy { flex:1; }
.sf-shopping-home .btn-cart-add { flex:0 0 44px; min-width:44px; min-height:44px; padding:0; }
@media (hover:hover) and (pointer:fine) and (min-width:541px) {
    .sf-shopping-home .btn-buy, .sf-shopping-home .btn-cart-add { min-height:36px; }
    .sf-shopping-home .btn-cart-add { flex-basis:36px; min-width:36px; }
}
.sf-category-empty { grid-column:1/-1; padding:2rem 1rem; color:var(--dark-light); background:var(--white); border-radius:var(--radius); }
.sf-category-empty[hidden] { display:none; }
.sf-shopping-home .promo-banner-card { flex-wrap:wrap; gap:.6rem .8rem; }
.sf-shopping-home .promo-banner-desc { white-space:normal; overflow-wrap:anywhere; }
.sf-shopping-home .promo-banner-action { margin-left:auto; }
.sf-shopping-product .product-card-header h3, .sf-shopping-product .category-badge { overflow-wrap:anywhere; }
.sf-shopping-product .card-body { min-width:0; }
.sf-shopping-product .product-detail-content { max-width:100%; overflow-x:auto; overflow-wrap:anywhere; }
.sf-shopping-product .product-detail-content :is(img,video,iframe) { max-width:100%; }
.sf-shopping-product .product-detail-content :is(img,video) { height:auto; }
.sf-product-metrics { display:grid; grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,1fr)); gap:.6rem; align-items:start; margin-bottom:1.3rem; padding:1rem; background:var(--light); border-radius:var(--radius-sm); }
.sf-product-metrics > div { min-width:0; overflow-wrap:anywhere; }
.sf-product-metrics .product-price { margin:0; font-size:1.6rem; font-variant-numeric:tabular-nums; }
.sf-shopping-product .sku-selector { min-width:0; }
.sf-shopping-product .sku-btn { min-width:0; max-width:100%; min-height:44px; padding:10px 13px; flex-wrap:wrap; text-align:left; line-height:1.5; overflow-wrap:anywhere; }
.sf-sku-name { min-width:0; flex:1 1 auto; overflow-wrap:anywhere; }
.sf-shopping-product .sku-price { max-width:100%; overflow-wrap:anywhere; }
.sf-shopping-product .quantity-control { max-width:100%; }
.sf-shopping-product .quantity-control button { width:44px; height:44px; flex-shrink:0; }
.sf-shopping-product .quantity-control input { width:76px; height:44px; padding:0 6px; font-size:16px; font-variant-numeric:tabular-nums; }
.sf-shopping-product .qd-total-row { flex-wrap:wrap; gap:6px 12px; }
.sf-shopping-product .qd-total-amount { min-width:0; overflow-wrap:anywhere; }
.sf-product-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.sf-shopping-product #productOrderForm #btnAddCart, .sf-shopping-product #productOrderForm #btnSubmit { min-width:0; min-height:48px; padding:.8rem .65rem; white-space:normal; }
.sf-shopping-product .sf-product-actions svg { flex-shrink:0; }
.sf-shopping-product .sf-product-actions span { min-width:0; overflow-wrap:anywhere; }
.sf-shopping-product .gp-heading, .sf-shopping-cart .gp-heading { flex-wrap:wrap; gap:4px 10px; }
.sf-shopping-product .gp-heading strong, .sf-shopping-cart .gp-heading strong { min-width:0; overflow-wrap:anywhere; }
.sf-shopping-product .gp-visibility, .sf-shopping-cart .gp-visibility { min-height:44px; margin-left:auto; }
.sf-shopping-product .qd-retry, .sf-shopping-cart .qd-retry { min-height:44px; text-align:left; }
.sf-cart-heading { display:flex; align-items:center; gap:10px; margin-bottom:1.25rem; font-size:1.5rem; font-weight:700; color:var(--dark); }
.sf-cart-heading svg { flex-shrink:0; }
.sf-cart-empty { text-align:center; padding:2.5rem 1.25rem; }
.sf-cart-header { display:flex; justify-content:space-between; gap:8px 12px; align-items:center; flex-wrap:wrap; }
.sf-shopping-cart .cart-page-item { display:grid; grid-template-columns:60px minmax(0,1fr) auto minmax(100px,.3fr); gap:1rem; border-color:var(--gray-light); transition:none; }
.sf-shopping-cart .cart-page-item-info { min-width:0; }
.sf-shopping-cart .cart-page-item-name { overflow-wrap:anywhere; }
.sf-cart-sku { display:block; margin-top:4px; color:var(--primary); font-size:.82rem; font-weight:400; overflow-wrap:anywhere; }
.sf-shopping-cart .cart-page-item-qty { min-width:0; gap:6px; align-self:center; }
.sf-shopping-cart .cart-page-item-qty button { width:40px; height:40px; flex-shrink:0; }
.sf-shopping-cart .cart-page-item-qty span { min-width:28px; font-variant-numeric:tabular-nums; }
.sf-shopping-cart .cart-page-item-subtotal { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 6px; min-width:0; width:auto; align-items:center; }
.sf-cart-subtotal-label { grid-column:1; color:var(--dark-light); font-size:.75rem; }
.sf-shopping-cart .cart-page-item-subtotal > span { grid-column:1; min-width:0; overflow-wrap:anywhere; }
.sf-shopping-cart .cart-page-item-subtotal .cart-item-remove { grid-column:2; grid-row:1/3; min-width:40px; min-height:44px; }
.sf-shopping-cart .qd-page-summary > div { min-width:0; overflow-wrap:anywhere; }
.sf-shopping-cart .qd-page-total { overflow-wrap:anywhere; }
.sf-shopping-home :is(button,a):focus-visible, .sf-shopping-product button:focus-visible, .sf-shopping-cart button:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }

@media (max-width:700px) {
    .sf-shopping-home, .sf-shopping-product, .sf-shopping-cart { padding:1rem; }
    .sf-shopping-home .category-tab { padding:9px 14px; }
    .sf-shopping-home .promo-banner-card { padding:.9rem 1rem; }
    .sf-shopping-product .card-body, .sf-shopping-cart .card-body { padding:1.1rem; }
    .sf-shopping-product .product-card-header { padding:1.25rem 1.1rem; }
    .sf-shopping-product .form-control, .sf-shopping-cart .form-control { min-height:44px; font-size:16px; }
    .sf-shopping-product .form-group { margin-bottom:1.15rem; }
    .sf-shopping-product .qd-total-box { margin-bottom:1rem; }
    .sf-shopping-product .gp-fields, .sf-shopping-cart .gp-fields { padding:12px; }
    .sf-shopping-cart .cart-page-item { grid-template-columns:48px minmax(0,1fr); gap:.7rem .8rem; padding:1rem; }
    .sf-shopping-cart .cart-page-item-img { width:48px; height:48px; }
    .sf-shopping-cart .cart-page-item-qty { grid-column:2; justify-self:start; }
    .sf-shopping-cart .cart-page-item-subtotal { grid-column:1/-1; text-align:left; padding-top:.65rem; border-top:1px solid var(--gray-light); }
    .sf-shopping-cart .cart-page-item-qty button { width:44px; height:44px; }
    .sf-shopping-cart .qd-page-summary > button { width:100%; min-width:0 !important; min-height:48px; }
}
@media (max-width:540px) {
    .sf-shopping-home .product-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:360px) {
    .sf-shopping-home, .sf-shopping-product, .sf-shopping-cart { padding-inline:12px; }
    .sf-shopping-product .card-body, .sf-shopping-cart .card-body { padding:1rem; }
    .sf-product-actions { grid-template-columns:minmax(0,1fr); }
    .sf-shopping-product .sku-btn { width:100%; }
    .sf-product-metrics { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:.85rem; }
    .sf-product-metrics > div:first-child { grid-column:1/-1; }
    .sf-product-metrics > div:nth-child(2) { text-align:left !important; }
}
@media (prefers-reduced-motion:reduce) {
    .sf-shopping-home :is(.product-card,.product-card-image img,.promo-banner-card,.category-tab),
    .sf-shopping-product .sku-btn { transition:none; }
}

/* Category images and counts are shared by the main shop and subsite shops. */
.sf-shopping-home .category-tab { display:inline-flex; align-items:center; gap:10px; min-width:140px; max-width:min(260px,100%); min-height:64px; padding:10px 15px; text-align:left; line-height:1.35; transition:background-color .15s,color .15s,box-shadow .15s; }
.category-tab-icon { position:relative; display:inline-flex; align-items:center; justify-content:center; flex:0 0 32px; width:32px; height:32px; border-radius:8px; overflow:hidden; background:var(--light); color:var(--primary); }
.category-tab-icon img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; background:#fff; border-radius:inherit; }
.category-tab-initial { font-size:1rem; font-weight:700; line-height:1; }
.category-tab-all { background:transparent; color:inherit; }
.category-tab-label { display:flex; flex-direction:column; gap:4px; min-width:0; }
.category-tab-name { display:block; max-width:100%; font-size:.9rem; font-weight:650; overflow-wrap:anywhere; }
.category-tab-count { display:block; font-size:.72rem; font-weight:400; line-height:1.4; color:var(--dark-light); font-variant-numeric:tabular-nums; white-space:nowrap; }
.category-tab.active .category-tab-count { color:rgba(255,255,255,.85); }
.category-tab:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
@media(max-width:600px) {
 .sf-shopping-home .category-tabs { overflow-x:auto; flex-wrap:nowrap; padding:6px; gap:6px; }
 .sf-shopping-home .category-tab { min-width:130px; max-width:210px; min-height:60px; padding:9px 12px; }
 .category-tab-name { font-size:.84rem; }
}
