.store-panel .shop-dialog { width:min(760px,calc(100% - 24px)); max-height:88vh; max-height:88dvh; overflow:auto; margin:auto; padding:24px; border:1px solid #d7e3ee; border-radius:20px; color:#19344b; background:#fff; }
.shop-dialog::backdrop { background:#172e4680; }
.shop-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.shop-dialog-head h2 { font-size:24px; margin:0; overflow-wrap:anywhere; }
.shop-dialog-head button { min-width:44px; min-height:44px; border:0; border-radius:10px; font-size:25px; }
#shop-quick-body { display:grid; gap:14px; }
#shop-quick-body > img { width:100%; max-height:240px; object-fit:contain; }
#shop-quick-body > p { white-space:pre-line; overflow-wrap:anywhere; }
#shop-quick-body dl { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#shop-quick-body select { min-height:44px; font-size:16px; padding:8px; }
.shop-compare-dialog { width:min(1100px,calc(100% - 24px)) !important; }
.shop-compare-dialog table { width:100%; min-width:650px; border-collapse:collapse; }
.shop-compare-dialog th,.shop-compare-dialog td { vertical-align:top; padding:14px; border:1px solid #dee7ef; max-width:280px; overflow-wrap:anywhere; }
.shop-compare-dialog th { background:#f2f6fa; }
.shop-compare-bar { display:flex; justify-content:center; flex-wrap:wrap; align-items:center; gap:12px; padding:16px; background:#edf3f8; border:1px solid #d7e3ee; border-radius:14px; margin:20px auto; max-width:1000px; }
.shop-compare-bar button { border:1px solid #bcd0e1; border-radius:8px; min-height:44px; padding:10px; }
.shop-recommendations { margin:24px auto; max-width:1000px; padding:20px; }
.shop-recommendations div { display:flex; flex-wrap:wrap; gap:12px; }
.shop-recommendations a { padding:12px; border:1px solid #d7e3ee; border-radius:10px; background:#fff; }
.shop-suggestions { padding:10px; border-top:1px solid #d7e3ee; max-height:360px; overflow:auto; }
.shop-suggestions a { display:grid; grid-template-columns:44px 1fr; gap:4px 12px; align-items:center; padding:10px; border-radius:8px; }
.shop-suggestions a:hover,.shop-suggestions a:focus { background:#eef4fa; }
.shop-suggestions img,.shop-suggestions .shop-no-photo { grid-row:1/3; width:44px; height:44px; object-fit:contain; font-size:9px; }
.shop-suggestions small { grid-column:2; color:#5b7186; font-size:11px; }
.shop-campaign { font-size:11px; color:#8b532c; padding:8px; background:#fff3df; border-radius:8px; }
.shop-mobile-nav { display:none; }
.shop-theme-controls { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin:28px auto; padding:18px; font-size:12px; }
.shop-theme-controls select { min-height:44px; padding:8px; border:1px solid #d7e3ee; border-radius:8px; }
.shop-theme-controls input { width:44px; height:44px; border:0; }
.store-panel[data-shop-theme="dark"] { --panel-ink:#e7eff6; --panel-muted:#b4c6d6; --panel-border:#475d70; background:#162230 !important; color:#e7eff6; }
.store-panel[data-shop-theme="dark"] .card,.store-panel[data-shop-theme="dark"] .shop-dialog,.store-panel[data-shop-theme="dark"] .header-area,.store-panel[data-shop-theme="dark"] .market-cart,.store-panel[data-shop-theme="dark"] .cart-drawer-footer,.store-panel[data-shop-theme="dark"] .mp-sidebar,.store-panel[data-shop-theme="dark"] .shop-mobile-nav { background:#223345 !important; color:#e7eff6 !important; border-color:#475d70; }
.store-panel[data-shop-theme="dark"] main :is(h1,h2,h3,p,label,a,small,strong),.store-panel[data-shop-theme="dark"] .shop-dialog :is(h2,p,a,dt,dd,td,th),.store-panel[data-shop-theme="dark"] .market-cart :is(p,a,small,strong,span),.store-panel[data-shop-theme="dark"] .header-area :is(a,small) { color:#e7eff6 !important; }
.store-panel[data-shop-theme="dark"] :is(.vitrin-showcase,.directory-intro,.catalog-controls,.directory-toolbar,.vitrin-closing,.directory-invitation,.shop-compare-bar,.cart-heading,.directory-card-top) { background:#30475b !important; color:#e7eff6; }
.store-panel[data-shop-theme="dark"] :is(input,select,textarea,.shop-compare-dialog th) { background:#162230 !important; color:#e7eff6 !important; border-color:#6a8297; }
.store-panel[data-shop-theme="luxury"] { background:#f6f1e8 !important; --panel-accent:#806334; }
.store-panel[data-shop-theme="luxury"] .header-area { border-bottom:2px solid #b59969; }
.store-panel[data-shop-theme="luxury"] .btn-primary,.store-panel[data-shop-theme="luxury"] .vitrin-primary-link { background:#473921 !important; border-color:#473921 !important; color:#fff !important; }
.store-panel[data-shop-theme="luxury"] :is(.vitrin-showcase,.directory-card-top,.cart-heading) { background:#eee5d4 !important; }
.store-panel[data-shop-theme="dynamic"] { --panel-accent:var(--shop-accent); }
.store-panel[data-shop-theme="dynamic"] :is(.btn-primary,.panel-brand-mark) { border-color:var(--shop-accent) !important; box-shadow:inset 0 -3px 0 var(--shop-accent); }
.store-panel[data-shop-theme="dynamic"] .card { border-top:3px solid var(--shop-accent); }
@media(max-width:767px) { .shop-mobile-nav { position:fixed; bottom:0; left:0; right:0; z-index:1030; display:flex; justify-content:space-around; padding:8px 4px max(8px,env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #d7e3ee; box-shadow:0 -5px 20px #19344b0a; } .shop-mobile-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-height:44px; min-width:48px; font-size:10px; color:#365672; } .shop-mobile-nav i { font-size:20px; } .store-panel:has(.shop-mobile-nav) { padding-bottom:84px; } .store-panel:has(.shop-mobile-nav) .cart-message { bottom:90px; } .shop-dialog { padding:18px !important; } }
.store-panel[data-shop-theme="dark"] :is(.vitrin-featured,.directory-card,.catalog-recent,.catalog-search,.product-checkout-panel,.shop-recommendations a,.ui-site-footer,.market-benefits) { background:#223345 !important; border-color:#475d70 !important; }
.store-panel[data-shop-theme="dark"] .header-area nav a[aria-current="page"] { background:#30475b !important; }
.basket-edit { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:14px 0; }
.basket-edit input { width:75px; min-height:44px; padding:8px; font-size:16px; border:1px solid #cad9e6; border-radius:8px; }
.basket-edit button { min-height:44px; border:1px solid #dec4c7; border-radius:8px; padding:8px 12px; color:#9c3342; background:#fff; }
.shop-payment-dialog { width:min(900px,calc(100% - 24px)) !important; }
.shop-payment-dialog iframe { width:100%; height:70vh; height:70dvh; border:0; background:#fff; }

/* Discovery dialogs only; the payment dialog keeps its existing layout. */
.store-panel :is(#shop-quick,#shop-compare) { padding:0; border-radius:24px; border-color:#d7e1e8; box-shadow:0 24px 80px #172c4330; overscroll-behavior:contain; }
.store-panel :is(#shop-quick,#shop-compare)::backdrop { background:#101f32a6; }
.store-panel :is(#shop-quick,#shop-compare) .shop-dialog-head { position:sticky; top:0; z-index:3; padding:20px 24px; margin:0; border-bottom:1px solid #d7e1e8; background:#fff; border-radius:22px 22px 0 0; }
.store-panel :is(#shop-quick,#shop-compare) .shop-dialog-head h2 { font-size:22px; line-height:1.4; letter-spacing:-.5px; min-width:0; }
.store-panel :is(#shop-quick,#shop-compare) .shop-dialog-head button { flex-shrink:0; background:#edf2f6; color:#253d58; border:1px solid #d7e1e8; }
.store-panel #shop-quick { width:min(920px,calc(100% - 32px)); }
#shop-quick-body { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:start; gap:28px; padding:24px; }
.shop-quick-visual { display:grid; place-items:center; padding:20px; min-height:260px; border-radius:16px; background:#f4f7f9; border:1px solid #e1e8ed; }
.shop-quick-visual img { width:100%; height:260px; object-fit:contain; }
.shop-quick-visual .shop-no-photo { color:#53697e; font-size:14px; }
.shop-quick-info { min-width:0; display:grid; gap:14px; }
.shop-quick-info > p { margin:0; overflow-wrap:anywhere; }
.shop-quick-info > .mp-help { font-size:12px; color:#53697e; line-height:1.7; }
.shop-quick-price { font-size:22px; line-height:1.4; color:#203e63; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.shop-quick-description { font-size:14px; line-height:1.8; white-space:pre-line; }
#shop-quick-body dl { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0; margin:0; padding:12px; background:#f4f7fa; border-radius:12px; }
#shop-quick-body :is(dt,dd) { margin:0; padding:8px; border-bottom:1px solid #d7e1e8; font-size:13px; overflow-wrap:anywhere; }
#shop-quick-body dt:last-of-type,#shop-quick-body dd:last-of-type { border:0; }
#shop-quick-body label { margin:0; font-size:13px; font-weight:600; line-height:1.6; }
#shop-quick-body select { width:100%; min-width:0; min-height:48px; border:1px solid #b8cbd9; border-radius:10px; background:#fff; color:#172c43; }
.shop-quick-actions { display:grid; gap:10px; padding-top:6px; }
.shop-quick-actions :is(button,a) { min-height:48px; border-radius:10px; display:flex; align-items:center; justify-content:center; padding:12px; font-size:14px; }
.shop-quick-actions button { background:#203e63; border-color:#203e63; color:#fff; }
.shop-quick-actions button:disabled { opacity:.6; cursor:not-allowed; }
.shop-quick-actions a { border:1px solid #d7e1e8; background:#f4f7fa; color:#36516a; }
.shop-compare-help { padding:14px 24px; margin:0; font-size:13px; color:#53697e; background:#f4f7fa; }
#shop-compare-body { margin:0 24px 24px; border:1px solid #d7e1e8; border-radius:12px; }
#shop-compare-body caption { caption-side:top; padding:14px; font-size:13px; color:#53697e; text-align:left; }
#shop-compare-body table { margin:0; }
#shop-compare-body :is(th,td) { min-width:170px; max-width:300px; font-size:13px; line-height:1.7; }
#shop-compare-body th:first-child { position:sticky; left:0; z-index:1; min-width:130px; background:#edf2f6; }
#shop-compare-body thead th { background:#e8eef4; }
#shop-compare-body thead th a { display:block; padding:4px; color:#203e63; font-size:14px; }
#shop-compare-body tbody td { background:#fff; }
#shop-compare-body tbody tr:nth-child(even) td { background:#f7f9fa; }
.store-panel :is(#shop-quick,#shop-compare) :is(a,button,select,div[tabindex]):focus-visible { outline:3px solid #385a9b; outline-offset:-3px; }
.store-panel[data-shop-theme="dark"] :is(#shop-quick,#shop-compare) .shop-dialog-head { background:#223345; border-color:#60798e; }
.store-panel[data-shop-theme="dark"] :is(.shop-quick-visual,#shop-quick-body dl,.shop-quick-actions a,.shop-compare-help) { background:#172a3a; color:#e7eff6; border-color:#60798e; }
.store-panel[data-shop-theme="dark"] .shop-quick-price { color:#e7eff6; }
.store-panel[data-shop-theme="dark"] :is(#shop-quick,#shop-compare) .shop-dialog-head button { background:#30475b; color:#e7eff6; border-color:#60798e; }
.store-panel[data-shop-theme="dark"] #shop-compare-body tbody td { background:#223345; }
.store-panel[data-shop-theme="dark"] #shop-compare-body tbody tr:nth-child(even) td { background:#30475b; }
.store-panel[data-shop-theme="dark"] #shop-compare-body caption { color:#e7eff6; }
.store-panel[data-shop-theme="luxury"] :is(.shop-quick-visual,#shop-quick-body dl,.shop-compare-help) { background:#f6f1e8; border-color:#d8c7a9; }
@media(max-width:767px) {
 .store-panel :is(#shop-quick,#shop-compare) { padding:0 !important; width:calc(100% - 20px) !important; max-height:90vh; max-height:90dvh; border-radius:18px; }
 .store-panel :is(#shop-quick,#shop-compare) .shop-dialog-head { padding:16px; border-radius:16px 16px 0 0; }
 .store-panel :is(#shop-quick,#shop-compare) .shop-dialog-head h2 { font-size:18px; }
 #shop-quick-body { grid-template-columns:minmax(0,1fr); padding:16px; gap:18px; }
 .shop-quick-visual { min-height:180px; padding:12px; }
 .shop-quick-visual img { height:180px; }
 .shop-compare-help { padding:12px 16px; }
 #shop-compare-body { margin:0 16px 16px; }
 #shop-compare-body :is(th,td) { padding:10px; min-width:160px; }
 #shop-compare-body th:first-child { min-width:110px; max-width:130px; }
}

/* Mobile page context remains visible without relying on icon color alone. */
@media(max-width:767px) {
 .store-panel .shop-mobile-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; padding:8px max(6px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left)); }
 .store-panel .shop-mobile-nav a { min-width:0; min-height:52px; padding:6px 2px; border-radius:12px; font-size:11px; line-height:1.4; color:#41566a; }
 .store-panel .shop-mobile-nav a[aria-current="page"] { background:#e8eef4; color:#203e63; font-weight:750; box-shadow:inset 0 -3px 0 #203e63; }
 .store-panel .shop-mobile-nav a:focus-visible { outline:3px solid #385a9b; outline-offset:-3px; }
 .store-panel .shop-mobile-nav a:hover { background:#edf2f6; }
 .store-panel[data-shop-theme="dark"] .shop-mobile-nav a { color:#e7eff6; }
 .store-panel[data-shop-theme="dark"] .shop-mobile-nav a[aria-current="page"] { background:#30475b; color:#fff; box-shadow:inset 0 -3px 0 #b4c6d6; }
 .store-panel[data-shop-theme="dark"] .shop-mobile-nav a:hover { background:#30475b; }
 .store-panel[data-shop-theme="luxury"] .shop-mobile-nav a[aria-current="page"] { background:#eee5d4; color:#473921; box-shadow:inset 0 -3px 0 #806334; }
}
