.modal.product-editor { padding: 0 !important; overflow: hidden; }
.product-editor .product-editor__drawer {
  width: min(1280px, max(74%, min(948px, calc(100% - 72px))));
  max-width: 100%; height: 100%; height: 100dvh; margin: 0 0 0 auto;
}
.product-editor.fade { transition: opacity .25s ease-out; }
.product-editor.fade .product-editor__drawer { transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.7,.25,1); }
.product-editor.show .product-editor__drawer { transform: translateX(0); }
body:has(.product-editor[data-drawer-open]) > .modal-backdrop {
  --bs-backdrop-opacity: .24; background-color: #182337; backdrop-filter: none;
}
.product-editor .modal-content {
  height: 100%; max-height: 100%; min-height: 0; overflow: hidden; border: 0; border-inline-start: 1px solid var(--border);
  border-radius: 14px 0 0 14px; box-shadow: -8px 0 34px rgba(22,32,51,.12);
}
.product-editor .modal-header, .product-editor__navigation, .product-editor .modal-footer { flex: none; }
.product-editor .modal-header { padding: 17px 22px 10px; border: 0; align-items: flex-start; }
.product-editor .modal-title { margin: 3px 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.25; overflow-wrap: anywhere; }
.product-editor__heading { min-width: 0; }
.product-editor__menu-city { color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.product-editor__fields-wrapper { min-width: 0; margin: 0; border: 0; padding: 0; }
.product-editor .modal-header .orders-icon-button { flex: none; margin-inline-start: auto; }
.product-editor__navigation { padding: 0 22px 14px; background: var(--surface, #fff); border-bottom: 1px solid var(--border); }
.product-editor__navigation .admin-segmented { --admin-segment-count: 5; display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.product-editor__navigation .admin-segmented::-webkit-scrollbar { display: none; }
.product-editor__navigation button { flex: 0 0 auto; white-space: nowrap; }
.product-editor__navigation button[aria-selected="true"] { color: var(--text-primary); }
.product-editor .modal-body { min-height: 0; padding: 16px 20px; overflow-y: auto; background: var(--surface-soft, #f5f6f9); scrollbar-gutter: stable; overscroll-behavior: contain; }
.product-editor [role="tabpanel"] { min-width: 0; outline-offset: -2px; }
.product-editor [role="tabpanel"]:not([hidden]) { animation: product-editor-appear .16s ease-out; }
.product-editor__card, .product-editor__disclosure {
  min-width: 0; padding: 17px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface, #fff);
}
.product-editor__disclosure { margin-top: 10px; }
.product-editor h3 { margin: 0 0 14px; color: var(--text-primary); font-size: 16px; line-height: 1.35; font-weight: var(--admin-weight-semibold); }
.product-editor h4 { margin: 17px 0 8px; color: var(--text-primary); font-size: 13px; line-height: 1.35; font-weight: var(--admin-weight-semibold); }
.product-editor .form-label { display: block; margin: 0 0 5px; font-size: 13px; color: var(--text-secondary); }
.product-editor__fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; min-width: 0; }
.product-editor__fields:not(:first-child) { margin: 13px 0; }
.product-editor h3 + .product-editor__fields, .product-editor h4 + .product-editor__fields { margin-top: 0; }
.product-editor__fields:last-child { margin-bottom: 0; }
.product-editor__short { max-width: 10rem; }
.product-editor__hint { display: block; margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.product-editor__hint:empty { display: none; }
.product-editor__section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.product-editor__section-title h3 { margin: 0; }
.product-groups-toolbar__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.product-groups-toolbar__actions .product-editor__link { min-height: 36px; margin: 0; }
.product-groups-toolbar__actions .btn { min-height: 36px; }
.product-editor #optionGroupsList:not(:empty) { margin-top: 14px; }
.product-editor__group { overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: 9px; }
.product-editor__group + .product-editor__group { margin-top: 7px; }
.product-editor__group > summary { display: flex; align-items: center; gap: 10px; padding: 12px; font-size: 14px; cursor: pointer; list-style: none; }
.product-editor__group > summary::-webkit-details-marker { display: none; }
.product-group__summary { display: grid; gap: 3px; min-width: 0; flex: 1; }
.product-group__summary small { color: var(--text-secondary); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.product-group__role { flex: none; padding: 3px 8px; border-radius: 999px; color: var(--text-secondary); background: var(--surface-soft); font-size: 12px; }
.product-group__role--primary { color: var(--text-primary); background: var(--border-light, #edf0f4); }
.product-editor__group > summary i { flex: none; color: var(--text-secondary); font-size: 12px; transition: transform .18s ease; }
.product-editor__group[open] > summary { border-bottom: 1px solid var(--border); }
.product-editor__group[open] > summary i { transform: rotate(180deg); }
.product-editor__group-body { container: option-group / inline-size; padding: clamp(10px, 1.5vw, 16px); }
.product-group__fields, .product-group__settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; }
.product-group__fields > *, .product-group__settings > * { min-width: 0; }
.product-editor__group .form-select { padding-inline-end: 2.5rem; background-position: right .8rem center; }
.product-group__settings { margin-block-start: 13px; align-items: start; }
.product-group__pricing { min-width: 0; margin: 0; padding: 0; border: 0; }
.product-group__pricing legend { float: none; width: auto; margin: 0 0 5px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.product-group__mode-hint { margin: 5px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.product-group__nutrition { margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.product-group__fixed-role { padding-block: 7px; color: var(--text-primary); font-size: 14px; font-weight: var(--admin-weight-medium); }
.product-group__nutrition .product-editor__check { width: fit-content; color: var(--text-primary); }
.product-group__pricing .admin-segmented { width: min(100%, 300px); }
.product-group__pricing .admin-segmented > button { min-height: 32px; padding-inline: 8px; font-size: 13px; }
.product-group__owner-link { padding: 1px 0; background: transparent; border: 0; color: var(--text-primary); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.product-variant__weight-example, .product-variant__price-total { display: block; color: var(--text-secondary); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.product-variant__price-total { grid-column: 2 / -1; }
@container product-variant (max-width: 580px) {
  .product-variant__price-total { grid-column: 1 / -1; }
}
.product-variant__price-total[hidden] { display: none; }
.product-group__items-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 15px 0 10px; border-top: 1px solid var(--border); padding-top: 13px; }
.product-group__items-heading h4 { margin: 0; font-size: 14px; }
.product-group__items-heading .btn { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.product-group__remove { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 2px; background: transparent; border: 0; border-radius: 4px; color: var(--text-secondary); font-size: 13px; }
.product-group__remove:hover, .product-group__remove:focus-visible { color: var(--danger); }
@container option-group (max-width: 540px) {
  .product-group__settings { grid-template-columns: minmax(0, 1fr); }
}
@container option-group (max-width: 375px) {
  .product-group__fields { grid-template-columns: minmax(0, 1fr); }
  .product-group__pricing .admin-segmented { width: 100%; }
}
.product-editor__section-title .btn, .product-editor__archive .btn { white-space: normal; }
.product-editor__disclosure { padding: 0; }
.product-editor__disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; color: var(--text-primary);
}
.product-editor__disclosure > summary { padding: 13px 18px; font-size: 14px; font-weight: var(--admin-weight-medium); }
.product-editor__disclosure > summary::-webkit-details-marker { display: none; }
.product-editor__disclosure > summary::after {
  content: ''; width: 7px; height: 7px; flex: none; border: solid var(--text-secondary); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .17s ease;
}
.product-editor__disclosure[open] > summary::after { transform: rotate(225deg); }
.product-editor__disclosure > div { padding: 2px 18px 16px; }
.product-editor__disclosure > .product-editor__fields { margin: 0; }
.product-editor__link:hover { color: var(--text-primary); }
.product-editor__link { padding: 6px 0; border: 0; background: transparent; color: var(--text-secondary); font-size: 13px; text-align: start; }
.product-editor__range { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 8px; margin: 7px 0 12px; font-size: 12px; }
.product-editor__range input { grid-column: 1 / -1; }
.product-editor__range output { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.product-editor__checks, .product-editor__archive { display: flex; flex-wrap: wrap; gap: 6px 13px; align-items: center; }
.product-editor__checks + .form-label { margin-bottom: 10px; }
.product-editor__check { display: flex; align-items: center; gap: 8px; min-height: 29px; cursor: pointer; font-size: 13px; }
.product-editor__check input { margin: 0; flex: none; }
.product-editor__check:has(input:disabled) { cursor: default; }
.product-editor__archive { padding: 12px 0 0; }
.product-editor__archive:not(:has(button:not(.d-none))) { display: none; }
.product-editor .modal-footer { justify-content: space-between; margin: 0; padding: 12px 20px; background: var(--surface, #fff); }
.product-editor .modal-footer .btn { margin: 0; }

#comboVariantTypesModal.product-variant-dictionary[open] {
  display: block; position: fixed; inset: 0; width: min(800px, calc(100% - 24px)); height: fit-content;
  max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 14px;
  overflow: auto; background: var(--surface, #fff); color: var(--text-primary);
}
.product-variant-dictionary > .modal-dialog { margin: 0; max-width: none; }
.product-variant-dictionary::backdrop { background: rgb(24 35 55 / 32%); }

#productEditorPanel-composition { container: composition / inline-size; }
.product-composition__nutrition h3 { margin-bottom: 4px; }
.product-composition__nutrition .product-editor__hint { margin: 0 0 12px; }
.product-composition__values, .product-composition__lists { display: grid; gap: 12px; }
.product-composition__values { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-composition__lists { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; margin-top: 12px; }
.product-composition__list { max-block-size: min(26rem, 48dvh); overflow-y: auto; scrollbar-gutter: stable; }
#ingredientsChips:not(:empty) { margin-top: 10px; border-top: 1px solid var(--border); }
@container composition (max-width: 680px) {
  .product-composition__lists { grid-template-columns: minmax(0, 1fr); }
}
@container composition (max-width: 520px) {
  .product-composition__values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#productEditorPanel-storefront { container: storefront / inline-size; }
.product-storefront__media-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: start;
}
.product-storefront__media-card { min-width: 0; }
.product-storefront__media-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin-bottom: 5px; }
.product-storefront__media-heading h4 { margin: 0; font-size: 14px; }
.product-storefront__media-heading .product-storefront__clear { width: 30px; height: 30px; flex: none; }
.product-storefront__clear:hover { color: var(--bs-danger); }
.product-storefront__preview {
  display: grid; grid-template-rows: minmax(0,1fr) auto; justify-items: center; align-items: center;
  width: 100%; height: clamp(95px, 11vh, 128px); padding: 7px 9px; gap: 3px; overflow: hidden;
  border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text-secondary);
  font-size: 12px; line-height: 1.25; transition: border-color .15s ease, background-color .15s ease;
}
.product-storefront__preview:has(img) { border-style: solid; }
.product-storefront__preview img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.product-storefront__preview i { align-self: end; font-size: 20px; }
.product-storefront__preview:has(i) { grid-template-rows: 1fr 1fr; }
.product-storefront__preview:has(i) span { align-self: start; }
.product-storefront__preview:hover, .product-storefront__preview:focus-visible { border-color: var(--platform-orange); color: var(--text-primary); }
.product-storefront__controls { display: grid; gap: 8px; margin-top: 12px; }
.product-storefront__range { margin: 0; gap: 0 6px; color: var(--text-secondary); }
.product-storefront__range input { margin: 0; }
.product-storefront__range input::-webkit-slider-thumb { background-color: var(--platform-orange); }
.product-storefront__range input::-moz-range-thumb { background-color: var(--platform-orange); }
.product-storefront__controls .product-editor__check { margin: 0; font-size: 12px; }
.product-storefront__colors { margin-top: 12px; }
.product-price-colors__themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.product-price-theme { --sample-stage: #f4f5f8; min-width: 0; padding: 0; margin: 0; border: 0; }
.product-price-theme--dark { --sample-stage: #36373e; }
.product-price-theme__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.product-price-theme__name { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: var(--admin-weight-medium); }
.product-price-theme__name i { color: var(--text-secondary); }
.product-price-theme__auto, .product-price-swatch { position: relative; margin: 0; cursor: pointer; }
.product-price-theme__auto > span {
  display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 9px; border-radius: 999px;
  color: var(--text-secondary); background: var(--surface-soft); font-size: 12px; font-weight: var(--admin-weight-medium); line-height: 1.2;
}
.product-price-theme__auto i {
  display: grid; place-items: center; width: 13px; height: 13px; border: 1px solid var(--text-secondary);
  border-radius: 50%; color: transparent; font-size: 9px; line-height: 1;
}
.product-price-theme__auto input:checked + span { color: var(--text-primary); }
.product-price-theme__auto input:checked + span i { color: white; background: var(--platform-orange); border-color: var(--platform-orange); }
.product-price-theme__samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 82px), 1fr)); gap: 7px; }
.product-price-swatch { display: block; min-width: 0; }
.product-price-swatch__tile {
  display: flex; flex-direction: column; height: 100%; position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 9px; color: var(--text-primary); background: var(--surface);
}
.product-price-swatch__stage { display: grid; place-items: center; min-height: 56px; padding: 9px 6px; background: var(--sample-stage); }
.product-price-swatch__amount {
  display: inline-block; padding: 5px 12px; max-width: 100%; border-radius: 999px; box-shadow: 0 0 0 1px rgb(0 0 0 / 7%);
  font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; text-align: center;
}
.product-price-swatch__name { padding: 6px 5px 7px; line-height: 1.3; text-align: center; font-size: 12px; overflow-wrap: anywhere; }
.product-price-swatch__check {
  position: absolute; inset: 3px 3px auto auto; display: grid; place-items: center; width: 15px; height: 15px;
  border-radius: 50%; color: white; background: var(--platform-orange); opacity: 0; font-size: 11px; line-height: 1;
}
.product-price-swatch input:checked + span { border-color: var(--platform-orange); box-shadow: 0 0 0 1px var(--platform-orange); }
.product-price-swatch input:checked + span .product-price-swatch__check { opacity: 1; }
.product-price-theme label input:focus-visible + span { outline: 2px solid var(--admin-field-focus); outline-offset: 2px; }
@media (hover: hover) {
  .product-price-swatch:hover input:not(:checked) + span { border-color: var(--text-secondary); }
  .product-price-theme__auto:hover > span { color: var(--text-primary); }
}
@media (prefers-reduced-motion: no-preference) {
  .product-price-swatch__tile, .product-price-swatch__check, .product-price-theme__auto > span {
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease, opacity .15s ease;
  }
}
@container storefront (max-width: 720px) {
  .product-price-colors__themes { grid-template-columns: minmax(0, 1fr); }
}
.product-storefront__labels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 20px; }
.product-gift-wording { margin-top: 7px; border-inline-start: 2px solid var(--border); padding-inline-start: 9px; }
.product-gift-wording small, .product-gift-wording output { display: block; overflow-wrap: anywhere; }
.product-gift-wording small { color: var(--text-secondary); font-size: 12px; }
.product-gift-wording output { color: var(--text-primary); font-size: 13px; }
.product-storefront__settings-card--badges, .product-storefront__settings-card--labels { margin-top: 12px; }
.product-storefront__badge-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 28px; }
.product-menu-markers { min-width: 0; margin: 0; padding: 0; border: 0; }
.product-menu-markers legend { float: none; width: auto; margin: 0 0 8px; font-size: 13px; font-weight: var(--admin-weight-medium); }
.product-menu-markers__choice { gap: 5px; }
.product-menu-markers__choice input { margin-inline-end: 2px; }
.product-menu-markers .product-editor__check { min-height: 34px; padding: 2px 6px; border-radius: 6px; }
.product-menu-markers .product-editor__check:hover,
.product-menu-markers .product-editor__check:focus-within { background: var(--surface-soft); }
.product-menu-markers__preview:not([hidden]) { display: grid; gap: 3px; margin-top: 8px; padding-inline-start: 9px; border-inline-start: 2px solid var(--border); }
.product-menu-markers__preview small { font-size: 12px; color: var(--text-secondary); }
.product-menu-markers__preview strong { font-size: 14px; overflow-wrap: anywhere; }
.product-menu-markers__preview .product-title-icon { margin-inline-start: 3px; }
.product-title-icon { display: inline-block; flex: none; width: 16px; height: 16px; vertical-align: -.15em; }
.product-title-icon--spicy { color: var(--primary, #ff5722); }
.product-title-icon--vegan { color: #4caf50; }
.product-entry__identity .product-title-icon { margin-inline-start: 3px; }
.product-storefront__priority { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.product-storefront__priority h3 { margin-bottom: 4px; }
.product-storefront__priority p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.product-storefront__priority-input { display: flex; align-items: center; gap: 8px; }
.product-storefront__priority .form-label { margin: 0; }
.product-storefront__priority input { width: 6rem; }
@container storefront (max-width: 620px) {
  .product-storefront__badge-groups, .product-storefront__labels { grid-template-columns: minmax(0,1fr); }
}
@container storefront (max-width: 860px) {
  .product-storefront__media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-storefront__media-grid { row-gap: 18px; }
}
@container storefront (max-width: 550px) {
  .product-storefront__media-grid { grid-template-columns: minmax(0,1fr); }
  .product-storefront__media-grid { gap: 14px; }
  .product-storefront__media-card { display: grid; grid-template-columns: minmax(72px, .65fr) minmax(0,1.35fr); gap: 0 12px; align-items: start; }
  .product-storefront__media-card + .product-storefront__media-card { border-top: 1px solid var(--border); padding-top: 9px; }
  .product-storefront__media-heading { grid-column: 1 / -1; }
  .product-storefront__controls { margin: 0; }
  .product-storefront__preview { height: 88px; }
}
@keyframes product-editor-appear { from { opacity: .6; } to { opacity: 1; } }
@media (max-width: 700px) {
  .product-editor .product-editor__drawer { width: 100%; }
  .product-editor .modal-content { border: 0; border-radius: 0; }
  .product-editor .modal-header { padding: 14px 14px 8px; }
  .product-editor__navigation { padding: 0 12px 10px; }
  .product-editor__navigation button { font-size: 13px; padding-inline: 10px; }
  .product-editor .modal-body { padding: 10px; }
  .product-editor__card { padding: 13px; }
  .product-editor__disclosure > summary { padding: 12px 13px; }
  .product-editor__disclosure > div { padding: 0 13px 13px; }
  .product-editor .modal-footer { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 440px) {
  .product-editor__navigation .admin-segmented { width: 100%; }
  .product-editor__navigation .admin-segmented > button { flex: 1 0 auto; padding-inline: 5px; font-size: 12.5px; }
}
@media (max-width: 380px) {
  .product-editor__navigation { padding-inline: 6px; }
  .product-editor__navigation .admin-segmented > button { padding-inline: 3px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-editor.fade, .product-editor.fade .product-editor__drawer, .product-storefront__preview { transition: none; }
  .product-editor [role="tabpanel"]:not([hidden]), .product-editor summary::after { animation: none; transition: none; }
}
