/* Store browsing and product details. Load after existing storefront CSS. */
.store-page { padding-block: 26px 36px; color: var(--store-ink, #17263c); }
.store-page > .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 0; margin-bottom: 15px; background: none; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.store-page > .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: #5e6b7c; }
.store-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 20px; }
.store-head h1 { min-width: 0; margin: 0; color: #17263c; font-size: 28px; line-height: 1.6; overflow-wrap: anywhere; }
.store-head p { flex: 0 0 100%; order: 3; margin: 0; color: #5e6b7c; font-size: 14px; line-height: 1.8; }
.store-count { flex: 0 0 auto; padding: 5px 11px; background: #eaf0f5; color: #526176; font-size: 13px; font-weight: 600; border-radius: 8px; }
.store-page .store-toolbar { gap: 12px; margin-bottom: 18px; }
.store-page .store-search { gap: 5px; padding: 5px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; }
.store-page .store-search:focus-within { border-color: #2378b7; box-shadow: 0 0 0 3px #2378b71a; }
.store-page .store-search input { width: 100%; border: 0; min-height: 44px; padding: 9px 10px; border-radius: 7px; font-size: 16px; box-shadow: none; }
.store-page .store-search input:focus { outline: none; box-shadow: none; }
.store-page .store-search .btn { min-width: 74px; min-height: 44px; border-radius: 7px; padding-inline: 14px; }
.store-page .store-sort { min-width: 0; margin: 0; }
.store-page .store-sort select { min-width: 0; min-height: 48px; max-width: 100%; font-size: 14px; color: #17263c; }
.store-section-title { font-size: 21px; font-weight: 700; line-height: 1.6; margin: 28px 0 15px; color: #17263c; }
.store-categories { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.store-category { display: flex; min-width: 0; min-height: 92px; padding: 15px; gap: 12px; background: #fff; border: 1px solid #dfe5ec; border-radius: 12px; box-shadow: none; }
.store-category:hover { background: #fffaf6; border-color: #bc9578; box-shadow: none; transform: none; }
.store-category-text { min-width: 0; gap: 3px; }
.store-category-name { color: #17263c; font-size: 14px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.store-category-count { color: #617085; font-size: 12px; font-weight: 400; }
.store-category-thumb { width: 52px; height: 52px; flex: 0 0 52px; background: #f7f9fb; border-radius: 8px; }
.store-category-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; width: auto; height: auto; }
.store-brands { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.store-brands .store-category { flex-direction: column; justify-content: center; text-align: center; min-height: 126px; gap: 10px; padding: 15px 8px; }
.store-brands .store-category-thumb { width: 100%; max-width: 96px; height: 50px; flex: 0 0 50px; border-radius: 0; background: #fff; overflow: visible; }
.store-brands .store-category-thumb img { width: auto; height: auto; max-width: 80px; max-height: 44px; object-fit: contain; filter: none; }
.store-brands .store-category-name { font-size: 14px; }
.store-monogram { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: #edf2f7; color: #44536a; font-size: 17px; font-weight: 800; }
.store-feedback:empty { display: none; }
.store-feedback:not(:empty) { position: sticky; top: 84px; z-index: 20; margin: 12px 0; padding: 12px 15px; border: 1px solid #c9e3d7; border-radius: 9px; color: #176546; background: #f0faf4; line-height: 1.7; }
.store-feedback.is-error { color: #a13022; border-color: #f1cbc5; background: #fff4f1; }
.store-refine-panel { margin: 0 0 12px; border: 1px solid #dfe5ec; border-radius: 11px; background: #fff; }
.store-refine-panel > summary { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 12px 15px; margin: 0; color: #25364d; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; list-style: none; cursor: pointer; }
.store-refine-panel > summary::-webkit-details-marker { display: none; }
.store-refine-panel > summary::after { content: '+'; font-size: 23px; font-weight: 400; line-height: 1; margin-inline-start: auto; color: #66768b; }
.store-refine-panel[open] > summary::after { content: '−'; }
.store-refine-count { padding: 2px 7px; color: #617085; background: #edf2f7; border-radius: 6px; font-size: 12px; }
.store-refine-panel .store-subcats { padding: 0 12px 12px; margin: 0; }
.store-refine-panel .store-subcats a { min-width: 0; min-height: 48px; line-height: 1.6; overflow-wrap: anywhere; border-radius: 8px; }
.store-query-caption { margin: 18px 0 8px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.store-delivery-note { margin: 16px 0 13px; color: #627085; font-size: 12px; line-height: 1.8; }

/* Product cards keep price, reference and the buy action on separate lines. */
.store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.store-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #dfe5ec; border-radius: 12px; box-shadow: none; overflow: hidden; }
.store-card:hover { border-color: #b8c4d3; box-shadow: none; transform: none; }
.store-card.is-out { opacity: 1; }
.store-card.is-out .store-card-media img { opacity: .75; }
.store-card-link { min-width: 0; flex-grow: 0; }
.store-card-media { display: flex; align-items: center; justify-content: center; position: relative; height: 190px; padding: 16px; background: #fff; border-bottom: 1px solid #f0f3f7; }
.store-card-media img { width: 100%; height: 100%; object-fit: contain; }
.store-card-badge { max-width: calc(100% - 16px); inset-inline-start: 8px; inset-inline-end: auto; top: 8px; padding: 4px 8px; font-size: 11px; line-height: 1.5; border-radius: 6px; }
.store-card-name { min-height: 57px; padding: 11px 12px 0; color: #17263c; font-size: 14px; line-height: 1.65; font-weight: 700; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.store-card-reference { display: flex; flex-direction: column; gap: 2px; padding: 7px 12px 0; min-width: 0; color: #5e6b7c; font-size: 11px; line-height: 1.5; }
.store-card-reference bdi { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #34465c; font-size: 12px; font-weight: 600; }
.store-card-foot { display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-width: 0; padding: 10px 12px 12px; margin-top: auto; }
.store-card-fits { display: block; margin: 0; color: #53647b; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.store-card-fits > span { display: block; color: #708094; font-size: 10px; }
.store-card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 0; min-width: 0; margin-top: auto; }
.store-card-price strong { font-size: 18px; font-weight: 800; color: #17263c; overflow-wrap: anywhere; }
.store-card-price del { color: #738197; font-size: 12px; }
.store-card-add { justify-content: center; gap: 8px; min-height: 44px; width: 100%; border-radius: 8px; padding: 9px 10px; background: #b95408; color: #fff; font-size: 13px; }
.store-card-add:hover { background: #954306; }
.store-card-add svg { width: 18px; height: 18px; flex: 0 0 18px; }
.store-card-add span { display: inline; }
.store-card-add.is-added { background: #176546; }
.store-pager { flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.store-pager .btn { min-width: 90px; min-height: 44px; }

/* Detail view preserves the cart payload and quantity selector. */
.store-detail-grid { gap: 28px; }
.store-detail-media { min-width: 0; border-radius: 13px; border-color: #dfe5ec; padding: 22px; }
.store-detail-media img { width: 100%; max-height: 440px; object-fit: contain; }
.store-detail-info { min-width: 0; }
.store-detail-info h1 { font-size: 26px; line-height: 1.6; overflow-wrap: anywhere; }
.store-detail-fits { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 12px 14px; margin-bottom: 16px; background: #f0f4f8; border: 1px solid #dfe5ec; }
.store-detail-fits > span { font-size: 12px; }
.store-detail-fits strong { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.store-detail-fits small { color: #5e6b7c; font-size: 12px; line-height: 1.8; }
.store-fitment-note { color: #5e6b7c; font-size: 13px; line-height: 1.8; }
.store-detail-price { flex-wrap: wrap; gap: 6px 12px; margin-bottom: 5px; }
.store-detail-price strong { font-size: 29px; }
.store-detail-shipping { color: #5e6b7c; font-size: 13px; line-height: 1.8; margin-bottom: 13px; }
.store-stock { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 16px; padding: 4px 9px; border-radius: 6px; background: #edf7f1; color: #176546; }
.store-stock.is-out { background: #fff1ee; color: #a13022; }
.store-detail-sku { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid #dfe5ec; border-radius: 10px; }
.store-detail-sku > span { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: #5e6b7c; }
.store-detail-sku bdi { display: block; min-width: 0; font-size: 15px; line-height: 1.9; font-weight: 700; color: #17263c; overflow-wrap: anywhere; user-select: text; }
.store-copy-number { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; min-width: 64px; gap: 6px; padding: 8px 10px; border: 1px solid #dfe5ec; border-radius: 8px; background: #f6f8fa; color: #34465c; font-size: 13px; font-weight: 600; }
.store-copy-number svg { width: 17px; height: 17px; }
.store-detail-buy-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: end; gap: 10px; padding: 15px; background: #fff; border: 1px solid #dfe5ec; border-radius: 12px; }
.store-qty { min-width: 0; margin: 0; color: #5e6b7c; }
.store-qty input { width: 100%; min-height: 48px; }
.store-detail-buy { min-width: 0; min-height: 48px; justify-content: center; font-size: 15px; }
.store-detail-buy svg { width: 20px; height: 20px; flex: 0 0 20px; }
.store-detail-cart { grid-column: 1 / -1; display: inline-flex; justify-content: center; align-items: center; min-height: 44px; font-size: 13px; }
.store-detail-description { padding-top: 18px; border-top: 1px solid #dfe5ec; }
.store-detail-description h2 { font-size: 18px; }
.store-detail-description p { font-size: 14px; line-height: 1.9; white-space: pre-line; }
.store-page summary:focus-visible, .store-page a:focus-visible, .store-page button:focus-visible { outline: 3px solid #2378b7; outline-offset: 3px; }

@media (max-width: 991px) {
    .store-brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .store-sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 767px) {
    .store-page { padding-block: 16px 26px; }
    .store-page > .breadcrumb { margin-bottom: 10px; font-size: 12px; }
    .store-head { margin-bottom: 16px; gap: 7px 10px; }
    .store-head h1 { font-size: 23px; }
    .store-head p { font-size: 13px; }
    .store-count { font-size: 12px; padding: 4px 9px; }
    .store-page .store-toolbar { gap: 10px; margin-bottom: 15px; }
    .store-page .store-search { flex-basis: 100%; }
    .store-page .store-sort { justify-content: flex-end; flex-basis: 100%; gap: 10px; }
    .store-page .store-sort select { flex: 0 1 190px; width: auto; min-height: 44px; }
    .store-section-title { font-size: 19px; margin-top: 24px; }
    .store-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
    .store-brands .store-category { min-height: 121px; padding: 13px 7px; gap: 8px; }
    .store-brands .store-category-thumb { height: 44px; flex-basis: 44px; }
    .store-brands .store-category-thumb img { max-width: 68px; max-height: 38px; }
    .store-brands .store-category-name { font-size: 13px; }
    .store-category-count { font-size: 11px; }
    .store-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .store-sections .store-category { min-height: 84px; padding: 10px; gap: 8px; }
    .store-sections .store-category-thumb { width: 37px; height: 42px; flex-basis: 37px; }
    .store-sections .store-category-name { font-size: 12px; }
    .store-refine-panel > summary { padding-inline: 12px; min-height: 50px; font-size: 13px; }
    .store-refine-panel .store-subcats { padding-inline: 10px; gap: 7px; }
    .store-refine-panel .store-subcats a { padding-inline: 9px; font-size: 12px; }
    .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .store-card { border-radius: 10px; }
    .store-card-media { height: 138px; padding: 13px; }
    .store-card-name { font-size: 13px; line-height: 1.65; min-height: 53px; padding: 9px 10px 0; }
    .store-card-reference { padding-inline: 10px; font-size: 10px; }
    .store-card-reference bdi { font-size: 11px; }
    .store-card-foot { padding: 10px; gap: 8px; }
    .store-card-price { gap: 3px 6px; padding: 0; }
    .store-card-price strong { font-size: 16px; }
    .store-card-price del { font-size: 11px; }
    .store-card-fits { font-size: 11px; }
    .store-card-add { min-height: 44px; padding: 9px 6px; gap: 6px; font-size: 12px; }
    .store-card-add span { display: inline; }
    .store-feedback:not(:empty) { top: 74px; padding: 10px 12px; font-size: 13px; }
    .store-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .store-detail-media { padding: 16px; }
    .store-detail-media img { width: 100%; height: 245px; }
    .store-detail-info h1 { font-size: 22px; margin-bottom: 12px; }
    .store-detail-price strong { font-size: 27px; }
    .store-detail-fits { padding: 11px 13px; margin-bottom: 14px; }
    .store-detail-fits strong { font-size: 14px; }
    .store-detail-sku { padding: 10px 12px; }
    .store-detail-sku bdi { font-size: 14px; }
    .store-detail-buy-row { grid-template-columns: 70px minmax(0, 1fr); padding: 12px; gap: 9px; }
    .store-detail-buy-row .store-qty input { width: 100%; }
    .store-detail-buy { width: 100%; font-size: 14px; }
}
@media (max-width: 359px) {
    .store-brands .store-category-name { font-size: 12px; }
    .store-brands .store-category-thumb img { max-width: 58px; }
    .store-sections .store-category { gap: 6px; padding: 8px; }
    .store-sections .store-category-thumb { width: 30px; flex-basis: 30px; }
    .store-card-media { height: 118px; padding: 10px; }
    .store-card-price strong { font-size: 15px; }
    .store-card-add { font-size: 11px; }
    .store-card-add svg { width: 16px; flex-basis: 16px; }
    .store-detail-media img { height: 215px; }
}
@media (prefers-reduced-motion: reduce) {
    .store-card, .store-category, .store-card-add { transition: none; }
}
