.search-area { position: relative; flex: 1; min-width: 0; }
.search-area .header-search { width: 100%; }
.header-search .search-submit-icon { display: none; }
.header-search .search-clear { padding: 0 10px; border-radius: 0; background: transparent; font-size: 22px; }
.store-page .header-search button:hover { background: var(--pale); border-color: transparent; color: var(--accent); }
.search-suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px #17382d26; max-height: min(580px,70dvh); overflow-y: auto; z-index: 30; }
.search-suggestions [role=status] { margin: 0; padding: 14px 16px; font-size: 13px; color: var(--muted); }
.search-suggestions [role=option] { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 48px; font-size: var(--text-body,14px); }
.search-suggestions [role=option]>span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.search-suggestions [role=option]>img { width: 44px; height: 44px; object-fit: contain; }
.search-suggestions [role=option]>strong { white-space: nowrap; }
.search-suggestions [role=option]:hover,.search-suggestions [aria-selected=true] { background: var(--pale); }
.search-all { display: block; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; }
.catalog-menu-dialog { width: min(var(--content-width),calc(100% - 40px)); max-width: none; height: min(760px,calc(100dvh - 48px)); max-height: calc(100dvh - 48px); inset: 0; margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.catalog-menu-dialog::backdrop { background: #17382d66; }
.catalog-menu-dialog>header { display: flex; align-items: center; gap: 8px; height: 60px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.catalog-menu-dialog h2 { flex: 1; font-size: var(--section-heading); margin: 0; }
.catalog-menu-dialog>header button { min-width: 44px; min-height: 44px; }
.catalog-menu-columns { display: grid; grid-template-columns: 260px minmax(0,1fr); height: calc(100% - 60px); min-height: 0; }
.catalog-roots { border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; overscroll-behavior: contain; }
.catalog-roots>a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; min-height: 44px; border-radius: 6px; font-size: var(--text-body,14px); }
.catalog-roots>a>.icon { flex-shrink: 0; }
.catalog-roots>a>span { flex: 1; min-width: 0; }
.category-count { display: inline-block; margin-left: 6px; padding: 1px 6px; min-width: 22px; border-radius: 4px; background: var(--soft-surface); color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; text-align: center; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
.catalog-roots .category-count { margin-left: auto; flex: 0 0 auto; }

.catalog-roots>a:hover,.catalog-roots>a[aria-expanded=true] { background: var(--pale); color: var(--accent); }
.catalog-roots .catalog-sale { color: var(--accent); font-weight: 700; }
.catalog-category-panels { padding: 24px 28px; min-width: 0; overflow-y: auto; overscroll-behavior: contain; }
.catalog-panel-heading { font-size: var(--text-subheading,17px); margin: 0 0 12px; }
.category-groups { columns: 3 180px; column-gap: 28px; }
.category-groups,.category-groups ul { list-style: none; margin: 0; padding: 0; }
.category-groups>li { break-inside: avoid; margin-bottom: 28px; }
.category-group-heading>a { font-weight: 700; }
.category-groups a { display: block; padding: 8px 0; font-size: var(--text-body,14px); overflow-wrap: anywhere; }
.category-groups a:hover { color: var(--accent); }
.category-groups .category-counted { display: flex; align-items: baseline; gap: 6px; }
.category-counted>span { min-width: 0; }
.category-counted>.category-count { flex: 0 0 auto; margin-left: 0; }
.category-next { display: none; }
.category-more>summary { color: var(--accent); cursor: pointer; padding: 8px 0; }
.category-more>summary>span+span,.category-more[open]>summary>span:first-child { display: none; }
.category-more[open]>summary>span+span { display: inline; }
.catalog-category-all { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; }
html:has(#catalog-menu[open]) { overflow: hidden; }
.breadcrumb { flex-wrap: wrap; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.filter-chips>a { display: inline-flex; align-items: center; gap: 12px; padding: 8px 12px; background: white; border: 1px solid var(--line); border-radius: 24px; font-size: 13px; overflow-wrap: anywhere; }
.filter-chips>a:hover { border-color: var(--accent); }
.scroll-controls { display: flex; gap: 8px; }
.scroll-controls[hidden] { display: none; }
.scroll-controls button { width: 44px; min-width: 44px; min-height: 44px; padding: 8px; border-radius: 50%; }
.scroll-controls button:disabled { opacity: .4; cursor: default; }
.discovery-picks { position: relative; }
.discovery-picks>.scroll-controls { justify-content: flex-end; margin-bottom: 8px; }
@media(max-width:900px) {
 .header-content { gap: 12px; }
 .search-area { flex-basis: 100%; order: 3; }
}
@media(max-width:600px) {
 .search-suggestions [role=option] { gap: 8px; padding: 10px; }
 .search-suggestions [role=option]>strong { font-size: var(--text-small,12px); }
 .search-suggestions { max-height: 60dvh; }
}

.store-page [hidden] { display: none !important; }

.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.back-to-top { position: fixed; right: 20px; bottom: 20px; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); box-shadow: 0 2px 8px #17382d14; z-index: 18; }
.back-to-top:hover { border-color: var(--accent); }
.back-to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Shared storefront navigation; product pages add the order action. */
.header-actions { flex-shrink: 0; gap: 8px; }
.header-actions>:is(.header-chat,.cart-link) { position: relative; display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 9px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); transition: background .16s,border-color .16s,box-shadow .16s; }
.header-actions>:is(.header-chat,.cart-link):hover { background: var(--pale); border-color: var(--accent-border); }
.header-actions>:is(.header-chat,.cart-link)>.icon { width: 24px; height: 24px; filter: none; }
.header-actions :is(.cart-count,.chat-count) { top: -4px; right: -4px; }
.chat-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 10px; background: var(--accent); color: white; font-size: 9px; line-height: 16px; }
.view-payment .header-actions { margin-left: auto; }
.mobile-store-nav { display: none; }
@media(min-width:761px) {
 .store-page .store-header { position: sticky; top: 0; background: #17382d; color: white; border-bottom-color: #254d3d; }
 .store-page .store-header .brand-symbol,.store-page .catalog-button>.icon { filter: brightness(0) invert(1); }
 .store-page .header-search { color: var(--ink); background: white; }
 .store-page .catalog-button { background: var(--accent); color: white; }
 .store-page .catalog-button:hover { background: var(--accent-hover); }
 .store-page .store-header :is(.brand,.catalog-button):focus-visible { outline-color: #b8e0c8; }
 .store-page .header-content { flex-wrap: nowrap; padding: 8px 0; }
 .store-page .header-search { min-height: 44px; }
 .store-page .header-search input { min-height: 42px; }
 .store-page .search-area { order: 0; flex: 1; min-width: 0; }
}
@media(max-width:760px) {
 .store-page .desktop-top { display: none; }
 .store-page .store-header { position: sticky; top: 0; }
 .store-page:not(.view-payment) .header-content { min-height: 60px; padding: 8px 0; flex-wrap: nowrap; gap: 8px; }
 .store-page:not(.view-payment) .header-content>.brand { flex: 0 0 auto; width: auto; gap: 8px; }
 .store-page .catalog-button { display: none; }
 .store-page:not(.view-payment) .header-content>.brand>.icon,.store-page:not(.view-payment) .header-content>.brand>img { width: 28px; height: 28px; }
 .store-page .search-area { order: 0; flex: 1; min-width: 0; }
 .store-page .header-search { min-height: 44px; gap: 2px; padding-left: 10px; }
 .store-page .header-search>.icon,.store-page .search-submit-label { display: none; }
 .store-page .header-search button { min-height: 40px; padding: 6px 8px; }
 .store-page .header-search .search-submit-icon { display: block; width: 20px; height: 20px; filter: none; }
 .store-page .header-search input { min-width: 0; font-size: var(--text-control,16px); }
 .store-page .header-actions { display: none; }
 .store-page .store-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
 html:has(.store-page) { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
 .mobile-store-nav { display: flex; position: fixed; left: 50%; bottom: max(12px,env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(460px,calc(100% - 24px)); z-index: 18; align-items: center; justify-content: space-around; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 34px; background: white; box-shadow: 0 2px 12px #17382d14; }
 .mobile-store-nav:not(:has(.mobile-order)) { width: max-content; max-width: calc(100% - 24px); justify-content: center; gap: 8px; }
 .mobile-store-nav>.button { min-height: 46px; border-radius: 24px; padding: 6px; font-size: var(--text-small,12px); gap: 4px; }
 .mobile-store-nav>.mobile-order { flex: 1; min-width: 0; }
 .mobile-store-nav>.mobile-order[aria-disabled=true] { opacity: .5; cursor: default; }
 .mobile-store-nav>.mobile-cart,.mobile-store-nav>.mobile-catalog,.mobile-store-nav>.mobile-chat { position: relative; flex: 0 0 44px; width: 44px; gap: 0; }
 .mobile-store-nav .icon { width: 22px; height: 22px; }
 .mobile-store-nav .cart-count { top: 0; right: 0; }
 .mobile-store-nav .mobile-top { position: static; display: inline-flex; flex: 0 0 44px; width: 44px; height: 46px; box-shadow: none; }
 .store-page:has(dialog[open]) .mobile-store-nav { visibility: hidden; }
}


@media(max-width:760px) {
 .catalog-menu-dialog { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
 .catalog-menu-dialog>header { height: 64px; padding: 8px 12px; }
 .catalog-menu-dialog h2 { font-size: 18px; line-height: 1.3; }
 .catalog-menu-columns { display: block; height: calc(100% - 64px); }
 .catalog-roots,.catalog-category-panels { height: 100%; padding: 12px 16px max(20px,env(safe-area-inset-bottom)); border: 0; }
 .catalog-panel-heading,.category-leaves { display: none; }
 .category-groups { columns: auto; }
 .category-groups>li { margin-bottom: 0; border-bottom: 1px solid var(--line); }
 .category-group-heading { display: flex; align-items: center; gap: 8px; }
 .category-group-heading>a { flex: 1; min-width: 0; font-weight: 500; padding: 14px 0; font-size: 16px; }
 .category-next { display: inline-flex; flex: 0 0 44px; justify-content: center; align-items: center; width: 44px; min-height: 48px; }
 .catalog-category-all { margin-bottom: 12px; padding: 12px 0; }
}

.discovery .category-menu nav { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }

.category-nested>summary { cursor: pointer; padding: 8px 0; font-size: var(--text-body,14px); overflow-wrap: anywhere; }
.category-nested>ul { padding-left: 14px; border-left: 1px solid var(--line); }
.category-nested>.textlink { color: var(--accent); font-size: var(--text-small,12px); }
