/* Shared storefront surfaces inherit each merchant's existing light/dark palette. */
.site-public [hidden] { display:none !important; }
.topbar .brand { flex: 1 1 280px; max-width:360px; min-width:0; }
.topbar .brand__text { min-width:0; }
.topbar .brand__name { white-space:normal; overflow:visible; text-overflow:clip; text-wrap:balance; overflow-wrap:anywhere; }
.topbar .brand__sub { max-width:30ch; white-space:normal; text-wrap:pretty; overflow-wrap:anywhere; }
.topbar .nav { flex-wrap:wrap; justify-content:center; }
.topbar__inner { gap:20px; }
.store-filter-sheet { position:fixed; inset:0 0 0 auto; margin:0; width:min(440px,100%); max-width:100%; height:100dvh; max-height:100dvh; border:0; padding:24px; background:var(--surface,#fff); color:var(--text); box-shadow:-12px 0 50px #0002; }
.store-filter-sheet::backdrop, .store-editor::backdrop { background:#0f172a66; }
.store-sheet-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.store-filter-sheet .prod-filters { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin:24px 0; }
.store-filter-row { display:flex; align-items:center; gap:8px; }
.store-filter-row .prod-filter-btn { flex:1; text-align:left; white-space:normal; }
.store-filter-row .public-edit-btn { width:44px; height:44px; flex-shrink:0; }
.store-filter-sheet .prod-filter-btn--add { order:-1; }
.prod-toolbar { align-items:center; gap:16px; padding:16px; border:1px solid var(--border); border-radius:20px; background:var(--surface); }
.prod-toolbar-controls { flex-wrap:wrap; }
#cart-modal { padding:0; justify-content:flex-end; align-items:stretch; }
#cart-modal .modal--cart { margin:0; width:min(480px,100%); max-width:100%; max-height:100dvh; height:100dvh; border-radius:20px 0 0 20px; display:flex; flex-direction:column; overflow:hidden; }
#cart-modal .modal__header, #cart-modal .modal__foot { flex-shrink:0; padding:20px; }
#cart-modal .modal__body { min-height:0; overflow:auto; padding:20px; }
#cart-modal .modal__foot { display:flex; flex-direction:column; align-items:stretch; padding-bottom:max(20px,env(safe-area-inset-bottom)); }
#cart-modal .cart-line { flex-wrap:wrap; }
#cart-modal[data-cart-stage="drawer"] :is(#cart-contact,#cart-google-wrap,#cart-history,#cart-wa-btn,#cart-mp-btn,[data-cart-stage-go="checkout"]) { display:none !important; }
#cart-modal[data-cart-stage="full"] :is(#cart-contact,#cart-google-wrap,#cart-history,#cart-wa-btn,#cart-mp-btn,[data-cart-stage-go="full"]) { display:none !important; }
#cart-modal[data-cart-stage="checkout"] [data-cart-stage-go="checkout"] { display:none !important; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) { background:var(--surface); overflow:auto; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal--cart { width:min(100%,1080px); height:auto; min-height:100dvh; max-height:none; margin:auto; border-radius:0; box-shadow:none; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal__body { overflow:visible; }
#cart-modal .cart-contact { margin-top:24px; }
#cart-modal .cart-google { margin-top:24px; padding:16px; border:1px solid var(--border); border-radius:16px; }
#cart-modal .cart-contact__title { font-size:1.25rem; }
.store-product-page:not([hidden]) { display:block; position:relative; inset:auto; padding:40px 24px; background:var(--surface); z-index:auto; overflow:visible; opacity:1; }
.store-product-page .product-modal__dialog { width:min(1200px,100%); max-width:1200px; max-height:none; margin:auto; box-shadow:none; border:none; border-radius:0; overflow:visible; transform:none; }
.store-product-page .product-modal__content { padding:24px 0; }
.store-product-page .product-modal__close { position:static; width:auto; height:auto; min-height:44px; padding:8px 16px; font-size:1rem; border:1px solid var(--border); border-radius:12px; }
.store-product-page .product-modal__main-image { position:relative; }
.store-product-share { position:absolute; top:16px; right:16px; z-index:2; width:44px; height:44px; padding:0; border-radius:50%; background:var(--surface); }
.store-product-active > footer { display:none; }
.store-product-page .product-modal__title { text-wrap:balance; }
.store-editor { width:min(620px,calc(100% - 32px)); max-height:85dvh; border:1px solid var(--border); border-radius:20px; padding:24px; background:var(--surface,#fff); color:var(--text); }
.store-editor form { display:grid; gap:16px; }
.store-editor label { display:grid; gap:8px; }
.store-editor label.store-check { display:flex; align-items:center; gap:12px; }
.store-editor input:not([type="checkbox"]), .store-editor select { padding:12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); width:100%; }
.store-editor input[type="checkbox"] { width:20px; height:20px; }
.store-editor-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:12px; }
.store-editor-error { color:var(--danger,#b91c1c); }
:is(.store-filter-sheet,.store-product-page,.store-editor,#cart-modal) button { cursor:pointer; min-height:44px; }
:is(.store-filter-sheet,.store-product-page,.store-editor,#cart-modal) :focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
@media(max-width:700px) {
 .store-filter-sheet { inset:auto 0 0; width:100%; height:auto; max-height:85dvh; border-radius:24px 24px 0 0; padding-bottom:max(24px,env(safe-area-inset-bottom)); }
 .prod-toolbar { display:flex; flex-direction:column; align-items:stretch; padding:12px; }
 .prod-toolbar-controls { justify-content:space-between; gap:8px; }
 .prod-toolbar .prod-search-box { width:100%; }
 .prod-sort-box { flex:1; min-width:0; }
 .prod-sort-label { display:none; }
 .prod-sort-select { min-width:0; width:100%; max-width:100%; }
 .store-product-page:not([hidden]) { padding:24px 16px; }
 .store-product-page .product-modal__content { display:grid; grid-template-columns:1fr; gap:24px; }
 #cart-modal .modal--cart { border-radius:0; }
 #cart-modal .cart-contact__grid { grid-template-columns:1fr; }
 .topbar .brand { max-width:calc(100% - 100px); flex-basis:auto; }
}
@media(prefers-reduced-motion:reduce) { .store-product-page *, #cart-modal * { transition:none !important; scroll-behavior:auto !important; } }
.store-cart-active > footer { display:none; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]).is-open { position:relative; inset:auto; display:block; z-index:auto; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal--cart { min-height:70dvh; padding:24px 0; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal__foot { flex-direction:row; justify-content:flex-end; flex-wrap:wrap; border-top:1px solid var(--border); }
#cart-modal .store-cart-progress { margin:0 20px 20px; padding:16px; border-radius:12px; background:var(--surface-2); color:var(--text-soft); }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal__header h3 { font-size:clamp(1.5rem,4vw,2.2rem); }
@media(max-width:600px) { #cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal__foot { flex-direction:column-reverse; } }
@media(max-width:700px) {
 .prod-toolbar .prod-search-box { flex:0 0 auto; min-width:0; }
 .prod-toolbar-controls { display:grid; grid-template-columns:auto minmax(0,1fr); }
 .prod-view-toggle { grid-column:1/-1; justify-self:end; }
 .prod-sort-select { height:44px; }
}
#cart-modal .cart-line { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; }
#cart-modal .cart-line__info { grid-column:1/-1; min-width:0; }
#cart-modal .cart-line__info strong, #cart-modal .cart-line__info span { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
#cart-modal .cart-line__qty { justify-self:start; }
#cart-modal .cart-line__total { justify-self:end; }
@media(min-width:700px) {
 #cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .cart-line { grid-template-columns:minmax(0,1fr) auto auto; }
 #cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .cart-line__info { grid-column:auto; }
}
.store-product-page .product-modal__title { outline-offset:6px; }
.prod-card__name a { color:inherit; text-decoration:none; }
.prod-card__name a:hover { text-decoration:underline; }
#cart-modal .modal__header h1 { margin:0; font-size:1.5rem; line-height:1.3; }
#cart-modal:is([data-cart-stage="full"],[data-cart-stage="checkout"]) .modal__header h1 { font-size:clamp(1.5rem,4vw,2.2rem); }
#cart-modal .cart-delivery__option:focus-within .cart-delivery__card { outline:3px solid var(--primary); outline-offset:3px; }
@media(max-width:420px) {
 .topbar .topbar-cta, .topbar .client-auth-btn, .topbar .theme-toggle { display:none; }
 .topbar__inner { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
 .topbar .brand { min-width:0; max-width:none; gap:10px; }
 .topbar .brand__logo { flex:0 0 40px; width:40px; height:40px; }
 .topbar .brand__name { overflow-wrap:normal; word-break:normal; font-size:1rem; line-height:1.25; }
 .topbar .brand__sub { font-size:.75rem; }
 .topbar-actions { gap:6px; }
 .topbar-actions .cart-btn, .topbar-actions .menu-btn { min-width:40px; width:40px; }
}
.site-public[data-theme="dark"] #cart-modal .cart-line__total { color:#b8a7ff; }
.site-public[data-theme="dark"] #cart-modal .qty-btn--remove { color:#ffb4ba; border-color:#b55b65; }
.site-public[data-theme="dark"] :is(.store-filter-sheet,.store-editor) .btn--ghost { color:var(--text); }
