.shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0;flex-wrap:wrap}.shop-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.shop-dialog{width:min(1180px,calc(100vw - 32px));max-width:1180px;max-height:90dvh;overflow:auto;padding:24px;color:var(--text,#20252d);background:var(--surface,#fff)}.shop-editor{max-width:780px}.shop-dialog label{display:grid;gap:6px;margin:12px 0}.shop-dialog input,.shop-dialog select,.shop-dialog textarea,#shop select{width:100%;min-width:0;padding:10px;border:1px solid var(--border,#d6dbe2);border-radius:8px;color:inherit;background:var(--surface,#fff);font:inherit}.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.shop-dialog fieldset{border:1px solid var(--border,#d6dbe2);border-radius:10px;margin:16px 0;padding:12px}.shop-dialog .shop-check{display:flex;align-items:center}.shop-check input{width:auto}.shop-variant-row{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:center}.shop-table-wrap{overflow:auto;margin:18px 0}.shop-table{border-collapse:collapse;width:100%;min-width:750px}.shop-table th,.shop-table td{padding:14px 12px;text-align:left;border-bottom:1px solid var(--border,#d6dbe2);vertical-align:top}.shop-table p{margin:0 0 6px}.shop-table th{font-size:13px;color:var(--muted,#657080)}.shop-point-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:12px;margin:16px 0}.shop-map{min-height:380px;background:#e5e9ed;border-radius:10px}.shop-point-list{max-height:420px;overflow:auto;display:flex;flex-direction:column;gap:8px}.shop-point-item{display:grid;gap:5px;text-align:left;background:var(--surface,#fff);color:inherit;border:1px solid var(--border,#d6dbe2);border-radius:8px;padding:12px;cursor:pointer}.shop-point-item:hover{border-color:currentColor}.shop-city-suggestions{display:flex;flex-direction:column;gap:5px;max-height:220px;overflow:auto}.shop-city-suggestions button{text-align:left}.shop-selected-point{font-weight:600}.shop-error,[data-shop-error],[data-products-error],[data-editor-error]{color:var(--danger,#b42318)}.shop-dialog .leaflet-popup-content{color:#20252d}.shop-dialog [hidden]{display:none!important}
html[data-theme=dark] .shop-dialog{background:#19212d;color:#ecf0f5;--surface:#19212d;--text:#ecf0f5;--border:#394555;--muted:#b0bbca;--danger:#ff9a90}html[data-theme=dark] #shop{--surface:#19212d;--border:#394555;--muted:#b0bbca;--danger:#ff9a90}html[data-theme=dark] .shop-point-item{background:#232e3e}.shop-settings .leaflet-container{z-index:0}
@media(max-width:700px){.shop-dialog{width:calc(100vw - 12px);max-height:96dvh;padding:14px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-point-layout{grid-template-columns:1fr}.shop-map{min-height:280px}.shop-point-list{max-height:240px}.shop-variant-row{grid-template-columns:1fr 1fr}.shop-variant-row button{grid-column:1/-1;justify-self:start}.shop-table{min-width:720px}.shop-toolbar h1{font-size:26px}.shop-settings .shop-actions{position:sticky;bottom:-14px;padding:12px 0;background:var(--surface,#fff)}}

/* One set of fields: a guided creation flow and a complete editing form. */
#shop-product-editor {
  --shop-accent:#6153de; --shop-tint:#f3f1ff; --shop-line:#e5e8f1;
  --shop-muted:#707a91; --shop-panel:#fff;
  width:min(1060px,calc(100vw - 48px)); max-width:1060px;
  max-height:min(94dvh,1000px); padding:0; border-radius:22px;
  overflow:hidden; background:var(--shop-panel); color:var(--text,#20233b);
}
#shop-product-editor[open]{display:flex;flex-direction:column}
.shop-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 28px;border-bottom:1px solid var(--shop-line);flex-shrink:0}
.shop-editor-head h2{font-size:24px;line-height:1.25;margin:0;letter-spacing:-.5px}
.shop-editor-head p{color:var(--shop-muted);font-size:14px;margin:7px 0 0;line-height:1.5}
#shop-product-form{display:flex;flex-direction:column;min-height:0;overflow:hidden;margin:0}
.shop-editor-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:24px 28px;scrollbar-gutter:stable;scroll-padding:24px}
.shop-wizard .shop-editor-body{display:grid;grid-template-columns:205px minmax(0,1fr);gap:28px;height:450px;min-height:0}
.shop-stepper{border-right:1px solid var(--shop-line);padding-right:20px}
.shop-stepper ol{list-style:none;padding:0;margin:0;display:grid;gap:12px}
.shop-stepper button{display:flex;align-items:center;gap:12px;padding:10px 0;width:100%;border:0;background:transparent;color:var(--shop-muted);font:inherit;font-size:14px;text-align:left;cursor:pointer;line-height:1.5}
.shop-stepper button:disabled{cursor:default;opacity:.7}
.shop-step-number,.shop-section-number{flex-shrink:0;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:var(--shop-tint);color:var(--shop-accent);font-weight:700;font-size:13px}
.shop-stepper [aria-current=step]{color:var(--shop-accent);font-weight:650}
.shop-stepper [aria-current=step] .shop-step-number{background:var(--shop-accent);color:#fff}
.shop-stepper .complete .shop-step-number{box-shadow:inset 0 0 0 1px var(--shop-accent)}
.shop-step-panels{min-width:0}
.shop-editor-error:empty{display:none}
.shop-editor-error{margin:0 0 18px;padding:12px;border:1px solid currentColor;border-radius:10px}
.shop-form-section{border:1px solid var(--shop-line);border-radius:14px;padding:22px;margin:0 0 18px}
.shop-form-section:last-child{margin-bottom:0}
.shop-wizard .shop-form-section{border:0;padding:0;margin:0}
.shop-section-title{display:flex;gap:12px;align-items:flex-start;margin-bottom:20px}
.shop-section-title h3{font-size:17px;line-height:1.4;margin:0;color:inherit;letter-spacing:-.15px}
.shop-section-title p{font-size:13px;line-height:1.6;margin:5px 0 0;color:var(--shop-muted)}
.shop-wizard .shop-section-number{display:none}
.shop-wizard .shop-section-title h3{font-size:25px}
.shop-editor label{font-size:13px;font-weight:550;color:inherit;margin:0 0 14px;line-height:1.5;min-width:0}
.shop-editor input,.shop-editor select{height:46px;margin:0;border-color:var(--shop-line);border-radius:9px;background:var(--shop-panel);font-size:14px}
.shop-editor textarea{margin:0;border-color:var(--shop-line);background:var(--shop-panel);font-size:14px;resize:vertical;min-height:88px;max-height:240px}
.shop-editor input:focus,.shop-editor select:focus,.shop-editor textarea:focus{outline:2px solid var(--shop-accent);outline-offset:1px;box-shadow:none}
.shop-editor button:focus-visible{outline:2px solid var(--shop-accent);outline-offset:3px}
.shop-type-grid{display:grid;grid-template-columns:1fr 1fr .85fr;gap:18px;align-items:start}
.shop-type-grid>div{min-width:0}
.shop-wizard .shop-type-grid{grid-template-columns:1fr 1fr}
.shop-wizard .shop-type-grid>div:last-child{grid-column:1/-1;max-width:280px;margin-top:4px}
.shop-type-grid label{margin-bottom:5px}
.shop-add-link{display:inline-flex;align-items:center;gap:6px;min-height:36px;border:0;padding:4px 0;background:transparent;color:var(--shop-accent);font:inherit;font-size:13px;font-weight:550;cursor:pointer;text-align:left}
.shop-add-link::before{content:'+';font-size:19px;font-weight:400}
.shop-add-link:disabled{opacity:.45;cursor:default}
.shop-field-hint{font-size:12px;color:var(--shop-muted);line-height:1.6;margin:10px 0 0}
.shop-stock-table{border:1px solid var(--shop-line);border-radius:10px;overflow:hidden}
.shop-stock-head,.shop-editor .shop-variant-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:14px;align-items:center;margin:0;padding:10px 12px}
.shop-stock-head{font-size:12px;color:var(--shop-muted);background:var(--shop-tint);font-weight:550}
.shop-editor .shop-variant-row+.shop-variant-row{border-top:1px solid var(--shop-line)}
.shop-editor .shop-variant-row input{width:100%;min-width:0}
.shop-stock-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px}
.shop-stock-footer [data-stock-total]{font-size:13px;color:var(--shop-muted)}
.shop-editor .button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:44px;padding:10px 18px;border-radius:9px;font-size:13px;line-height:1.4;font-weight:600;white-space:nowrap}
.shop-editor .button:not(.button-outline){background:var(--shop-accent);color:#fff;border:1px solid var(--shop-accent)}
.shop-editor .button-outline{border:1px solid var(--shop-line);color:inherit;background:var(--shop-panel)}
.shop-editor .button-outline:hover{background:var(--shop-tint);border-color:var(--shop-accent)}
.shop-editor .shop-icon-button{width:44px;height:44px;min-width:44px;padding:0;flex-shrink:0;font-size:22px}
.shop-editor .shop-variant-row .shop-icon-button{grid-column:auto;border-color:transparent;color:var(--shop-muted);background:transparent}
.shop-editor .shop-icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.shop-package-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 1.5fr;gap:14px}
.shop-wizard .shop-package-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.shop-wizard .shop-weight-field{grid-column:1/-1;max-width:280px}
.shop-sale-switch{display:flex!important;align-items:center;gap:10px!important;padding-top:8px;margin:0!important}
.shop-editor .shop-sale-switch input{appearance:none;box-sizing:border-box;flex:0 0 42px;width:42px!important;min-width:42px;height:24px;min-height:24px;max-height:24px;padding:0;border-radius:20px!important;background:#b8c0d0!important;border:0;position:relative;cursor:pointer}
.shop-sale-switch input::after{content:'';width:18px;height:18px;position:absolute;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .15s}
.shop-editor .shop-sale-switch input:checked{background:var(--shop-accent)!important}
.shop-sale-switch input:checked::after{transform:translateX(18px)}
.shop-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 28px;border-top:1px solid var(--shop-line);background:var(--shop-panel);flex-shrink:0}
.shop-editor-footer [data-step-progress]{font-size:13px;color:var(--shop-muted)}
.shop-footer-actions{display:flex;gap:10px;align-items:center;margin-left:auto}
.shop-footer-actions .button{min-width:112px}
html[data-theme=dark] #shop-product-editor{--shop-panel:#19212d;--shop-tint:#262c46;--shop-line:#354054;--shop-muted:#a9b4c7;--shop-accent:#9387ff}
html[data-theme=dark] .shop-editor .button:not(.button-outline){background:#6555dc;border-color:#6555dc}
@media(max-width:700px){
  #shop-product-editor{width:100vw;max-width:none;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0}
  .shop-editor-head{padding:18px 18px 16px;gap:12px}
  .shop-editor-head h2{font-size:22px}
  .shop-editor-head p{font-size:13px}
  #shop-product-form{flex:1}
  .shop-editor-body{padding:18px;flex:1;scrollbar-gutter:auto}
  .shop-wizard .shop-editor-body{display:block;min-height:0;height:auto}
  .shop-stepper{border:0;padding:0;margin:0 0 24px}
  .shop-stepper ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .shop-stepper button{font-size:0;gap:0;padding:0;min-height:32px;justify-content:center;position:relative}
  .shop-stepper button>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .shop-stepper .shop-step-number{height:6px;width:100%;border-radius:9px;font-size:0;background:var(--shop-line)}
  .shop-stepper .complete .shop-step-number{background:var(--shop-accent);box-shadow:none}
  .shop-form-section{padding:16px;margin-bottom:14px}
  .shop-section-title{gap:10px;margin-bottom:18px}
  .shop-section-title h3{font-size:16px}
  .shop-section-title p{font-size:12px}
  .shop-section-number{width:28px;height:28px;font-size:11px}
  .shop-type-grid,.shop-wizard .shop-type-grid{grid-template-columns:1fr;gap:14px}
  .shop-wizard .shop-type-grid>div:last-child{max-width:none;margin:0}
  .shop-editor input,.shop-editor select{height:48px;font-size:16px}
  .shop-editor textarea{font-size:16px}
  .shop-package-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .shop-weight-field,.shop-wizard .shop-weight-field{grid-column:1/-1;max-width:none}
  .shop-package-grid label{font-size:12px}
  .shop-stock-head,.shop-editor .shop-variant-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;gap:8px;padding:10px 8px}
  .shop-editor .shop-variant-row .shop-icon-button{width:36px;min-width:36px}
  .shop-editor-footer{display:block;padding:12px 18px max(16px,env(safe-area-inset-bottom));box-shadow:0 -5px 20px #00000004}
  .shop-editor-footer [data-step-progress]{display:block;margin-bottom:10px;font-size:12px}
  .shop-footer-actions{display:flex;margin:0;gap:10px}
  .shop-footer-actions .button{flex:1;min-width:0;min-height:48px;padding:10px 12px}
}

/* Native top-layer dialog: stays above the product editor on every viewport. */
#shop-taxon-dialog{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 32px));max-width:440px;height:fit-content;max-height:calc(100dvh - 32px);box-sizing:border-box;padding:24px;border:1px solid var(--border,#e5e8f1);border-radius:18px;overflow:auto;overscroll-behavior:contain;box-shadow:0 24px 80px #0005}
#shop-taxon-dialog::backdrop{background:rgba(10,15,25,.6);backdrop-filter:blur(2px)}
.shop-taxon-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.shop-taxon-head h2{margin:0;font-size:21px;line-height:1.35}
#shop-taxon-hint{font-size:14px;line-height:1.6;color:var(--muted,#707a91);margin:12px 0 22px}
#shop-taxon-form{margin:0}
#shop-taxon-dialog label{font-size:14px;gap:8px;margin:0}
#shop-taxon-dialog input{box-sizing:border-box;height:48px;font-size:16px;margin:0;border-radius:9px}
#shop-taxon-dialog input:focus{outline:2px solid #9387ff;outline-offset:1px;box-shadow:none}
#shop-taxon-dialog .button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;border-radius:9px;padding:10px 16px;font-size:14px;line-height:1.4}
#shop-taxon-dialog .shop-taxon-head .button{width:40px;min-height:40px;flex-shrink:0;padding:0;font-size:22px}
.shop-taxon-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px}
#shop-taxon-dialog [data-taxon-error]{color:var(--danger,#b42318);font-size:14px;line-height:1.5;margin:12px 0 0}
#shop-taxon-dialog [data-taxon-error]:empty{display:none}

/* Parameter rows keep name, stock and optional price aligned. */
.shop-type-grid,.shop-wizard .shop-type-grid{grid-template-columns:1fr 1fr}
.shop-wizard .shop-type-grid>div:last-child{grid-column:auto;max-width:none;margin-top:0}
.shop-stock-head,.shop-editor .shop-variant-row{grid-template-columns:minmax(0,1.2fr) minmax(0,.7fr) minmax(0,1fr) 36px;gap:10px}
.shop-editor .shop-variant-row .shop-icon-button{width:36px;min-width:36px}
@media(max-width:700px){
 .shop-type-grid,.shop-wizard .shop-type-grid{grid-template-columns:1fr}
 .shop-stock-head,.shop-editor .shop-variant-row{grid-template-columns:minmax(0,1fr) 60px minmax(0,1fr) 32px;gap:6px;padding:10px 6px}
 .shop-editor .shop-variant-row input{padding:8px 5px}
 .shop-editor .shop-variant-row .shop-icon-button{width:32px;min-width:32px}
}

#shop .shop-status-filter{display:flex;align-items:center;gap:10px;margin:0;white-space:nowrap}
#shop .shop-status-filter select{width:auto;max-width:100%;height:40px;box-sizing:border-box;margin:0;padding:0 10px}

.shop-selected-product{border:1px solid var(--border,#d6dbe2);border-radius:12px;padding:16px;margin:16px 0}.shop-offer-price{display:block;font-size:26px;margin:8px 0}[data-shop-automation] [name=shop_discount_percent]{max-width:140px}[data-shop-automation-error]{color:var(--danger,#b42318)}
