/* Combo management */
.combo-page-container {
    min-width: 0;
}
.combo-admin {
    --combo-border: var(--border-color, #dce2e8);
    width: 100%;
    min-width: 0;
    color: var(--text-dark);
    direction: rtl;
}
.combo-admin *,
.mm-combo-card * {
    box-sizing: border-box;
}
.combo-admin button {
    font: inherit;
    cursor: pointer;
}
.combo-admin-shell {
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--combo-border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--card-shadow);
}
.combo-admin-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding-bottom: 13px;
}
.combo-admin-title-icon,
.combo-card-icon,
.combo-preview-icon {
    display: grid;
    place-items: center;
    color: var(--brand-color);
    background: var(--brand-bg);
    border-radius: 10px;
}
.combo-admin-title-icon {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
}
.combo-admin-head > div {
    min-width: 0;
}
.combo-admin-head span:not(.combo-admin-title-icon),
.combo-preview-label {
    color: var(--brand-color);
    font-size: 0.68rem;
    font-weight: 850;
}
.combo-admin h1,
.combo-admin h2,
.combo-admin p {
    margin: 0;
}
.combo-admin h1 {
    margin-top: 2px;
    font-size: 1.15rem;
}
.combo-admin-head p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.combo-existing {
    padding: 12px;
    border: 1px solid var(--combo-border);
    border-radius: 12px;
    background: var(--bg-light);
}
.combo-existing > header {
    margin-bottom: 10px;
}
.combo-existing > header > div {
    display: flex;
    align-items: center;
    gap: 8px;
}
.combo-existing > header h2 {
    font-size: 0.9rem;
}
.combo-existing > header small {
    padding: 4px 7px;
    border-radius: 6px;
    color: var(--brand-color);
    background: var(--brand-bg);
    font-size: 0.61rem;
}
.combo-admin-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
}
.combo-admin-list > article {
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--combo-border);
    border-radius: 11px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    grid-template-areas: "head price" "photos price" "desc actions";
    gap: 9px 13px;
    background: var(--surface);
}
.combo-admin-list article > header {
    grid-area: head;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}
.combo-card-icon {
    width: 44px;
    height: 44px;
}
.combo-card-icon img,
.combo-card-icon i {
    width: 31px;
    height: 31px;
    object-fit: contain;
}
.combo-admin-list h2 {
    font-size: 0.86rem;
}
.combo-admin-list header small {
    color: var(--text-muted);
    font-size: 0.6rem;
}
.combo-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.combo-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.combo-toggle > span {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 10px;
    background: var(--border-color);
    transition: 0.2s;
}
.combo-toggle > span::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    border-radius: 7px;
    background: #fff;
    transition: 0.2s;
}
.combo-toggle input:checked + span {
    background: var(--brand-color);
}
.combo-toggle input:checked + span::after {
    right: 17px;
}
.combo-toggle b {
    color: var(--text-muted);
    font-size: 0.59rem;
}
.combo-photos {
    grid-area: photos;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}
.combo-product-photo,
.combo-photos > em {
    width: 50px;
    height: 50px;
    flex: none;
    border: 1px solid var(--combo-border);
    border-radius: 9px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--bg-light);
}
.combo-product-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.combo-product-photo i {
    color: var(--text-muted);
}
.combo-photos > em {
    color: var(--brand-color);
    font-style: normal;
    font-weight: 900;
}
.combo-admin-list article > p {
    grid-area: desc;
    padding: 7px 9px;
    border-radius: 9px;
    color: var(--text-muted);
    background: var(--bg-light);
    font-size: 0.64rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.combo-price {
    grid-area: price;
    display: grid;
    align-content: center;
    gap: 7px;
}
.combo-price span {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--combo-border);
    border-radius: 9px;
    display: grid;
    gap: 2px;
    background: var(--bg-light);
}
.combo-price small {
    color: var(--text-muted);
    font-size: 0.58rem;
}
.combo-price strong {
    color: var(--text-dark);
    font-size: 0.78rem;
    text-decoration: none;
}
.combo-price > b {
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--brand-color);
    background: var(--brand-bg);
    font-size: 0.63rem;
    text-align: center;
}
.combo-admin-list footer {
    grid-area: actions;
    align-self: center;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}
.combo-admin-list footer > span {
    margin-inline-end: auto;
    color: var(--text-muted);
    font-size: 0.64rem;
}
.combo-admin-list footer button,
.combo-editor-head button {
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid var(--combo-border);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-dark);
    background: var(--surface);
}
.combo-admin-list footer button:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
    background: var(--brand-bg);
}
.combo-admin-list footer button.danger {
    color: var(--error-color);
}
.combo-admin-list footer.is-confirming {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 9px;
    border-top: 1px solid var(--combo-border);
}
.combo-empty,
.combo-load-error {
    min-height: 240px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-align: center;
}
.combo-empty {
    grid-column: 1 / -1;
}
.combo-empty > i,
.combo-load-error > i {
    color: var(--brand-color);
    font-size: 1.8rem;
}
.combo-empty b,
.combo-load-error b {
    color: var(--text-dark);
}
.combo-empty small,
.combo-load-error small {
    font-size: 0.67rem;
}
.combo-load-error button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--combo-border);
    border-radius: 8px;
    color: var(--brand-color);
    background: var(--surface);
}
.combo-builder-entry {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid
        color-mix(in srgb, var(--brand-color) 28%, var(--combo-border));
    border-radius: 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    background: color-mix(in srgb, var(--brand-color) 5%, var(--surface));
}
.combo-builder-entry > span {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--brand-color);
}
.combo-builder-entry h2 {
    font-size: 0.88rem;
}
.combo-builder-entry p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.64rem;
}
.combo-builder-guide {
    display: none;
}
.combo-builder-entry > button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--brand-color);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    background: var(--brand-color);
    font-weight: 850;
}
.combo-builder-entry > button:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}
.combo-builder-entry.is-editor {
    display: block;
    padding: 11px;
    background: var(--surface);
}
.combo-editor-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--combo-border);
}
.combo-editor-head > div {
    min-width: 0;
}
.combo-editor-head > div > span {
    color: var(--brand-color);
    font-size: 0.62rem;
    font-weight: 850;
}
.combo-editor-head h2 {
    font-size: 0.92rem;
}
.combo-editor-head button[data-back] {
    width: 40px;
    padding: 0;
}
.combo-editor-footer { margin-top:11px;padding-top:11px;border-top:1px solid var(--combo-border);display:flex;justify-content:flex-end; }
.combo-editor-footer button[data-save] { min-width:170px;min-height:43px;padding:0 18px;border:1px solid var(--brand-color);border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;color:#fff;background:var(--brand-color);font-weight:850; }
.combo-editor-error {
    margin-bottom: 9px;
    padding: 9px 11px;
    border: 1px solid
        color-mix(in srgb, var(--error-color) 40%, var(--combo-border));
    border-radius: 9px;
    color: var(--error-color);
    background: color-mix(in srgb, var(--error-color) 7%, var(--surface));
    font-size: 0.69rem;
}
.combo-editor-page {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(245px, 0.55fr);
    gap: 10px;
    align-items: start;
}
.combo-editor-page > main {
    min-width: 0;
    display: grid;
    gap: 9px;
}
.combo-editor-section {
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--combo-border);
    border-radius: 10px;
    background: var(--bg-light);
}
.combo-editor-section > header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}
.combo-editor-section > header > i {
    width: 35px;
    height: 35px;
    flex: none;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: var(--brand-color);
    background: var(--brand-bg);
}
.combo-editor-section h2 {
    font-size: 0.82rem;
}
.combo-editor-section header p {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.6rem;
}
.combo-editor-section header > [data-count] {
    margin-inline-start: auto;
    color: var(--brand-color);
    font-size: 0.64rem;
    font-weight: 850;
}
.combo-editor-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}
.combo-editor-fields label,
.combo-editor-fields fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 5px;
    font-size: 0.66rem;
}
.combo-editor-fields .wide {
    grid-column: span 2;
}
.combo-editor-fields input,
.combo-product-search input {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--combo-border);
    border-radius: 9px;
    color: var(--text-dark);
    background: var(--surface);
    font: inherit;
}
.combo-position-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.combo-position-options button {
    min-height: 42px;
    padding: 0 7px;
    border: 1px solid var(--combo-border);
    border-radius: 9px;
    color: var(--text-muted);
    background: var(--surface);
}
.combo-position-options button[aria-pressed="true"] {
    border-color: var(--brand-color);
    color: var(--brand-color);
    background: var(--brand-bg);
}
.combo-active-option {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
}
.combo-active-option input {
    position: absolute;
    opacity: 0;
}
.combo-active-option > span {
    width: 40px;
    height: 40px;
    border: 1px solid var(--combo-border);
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: transparent;
    background: var(--surface);
}
.combo-active-option input:checked + span {
    border-color: var(--brand-color);
    color: #fff;
    background: var(--brand-color);
}
.combo-product-options {
    direction: ltr;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-color) transparent;
}
.combo-product-options > * {
    direction: rtl;
}
.combo-product-search {
    position: relative;
    margin-bottom: 8px;
}
.combo-product-search > i {
    position: absolute;
    z-index: 1;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.combo-product-search input {
    padding-right: 37px;
}
.combo-product-options {
    max-height: 350px;
    padding: 2px 2px 2px 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 7px;
}
.combo-product-options::-webkit-scrollbar {
    width: 5px;
}
.combo-product-options::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: var(--brand-color);
}
.combo-product-option {
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--combo-border);
    border-radius: 9px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 8px;
    background: var(--surface);
}
.combo-product-option.selected {
    border-color: var(--brand-color);
    background: color-mix(in srgb, var(--brand-color) 5%, var(--surface));
}
.combo-product-option > .combo-product-photo {
    width: 48px;
    height: 48px;
}
.combo-product-option > div:nth-child(2) {
    min-width: 0;
}
.combo-product-option b,
.combo-product-option small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.combo-product-option b {
    font-size: 0.67rem;
}
.combo-product-option small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.57rem;
}
.combo-product-option > button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--combo-border);
    border-radius: 8px;
    color: var(--brand-color);
    background: var(--surface);
}
.combo-product-option.selected > button {
    color: #fff;
    background: var(--brand-color);
}
.combo-quantity {
    grid-column: 2 / 4;
    padding-top: 6px;
    border-top: 1px solid var(--combo-border);
    display: grid !important;
    grid-template-columns: 30px 1fr 30px;
    align-items: center;
    text-align: center;
}
.combo-quantity button {
    height: 28px;
    border: 1px solid var(--combo-border);
    border-radius: 7px;
    color: var(--brand-color);
    background: var(--surface);
}
.combo-no-result {
    grid-column: 1 / -1;
    padding: 22px;
    color: var(--text-muted);
    text-align: center;
}
.combo-live-preview {
    position: sticky;
    top: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid
        color-mix(in srgb, var(--brand-color) 30%, var(--combo-border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand-color) 4%, var(--surface));
}
.combo-preview-icon {
    width: 52px;
    height: 52px;
    margin: 8px 0 9px;
}
.combo-preview-icon img,
.combo-preview-icon i {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.combo-live-preview > h2 {
    margin-bottom: 9px;
    font-size: 0.94rem;
}
.combo-preview-products {
    direction: ltr;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}
.combo-preview-products .combo-product-photo,
.combo-preview-products > i {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border: 1px solid var(--combo-border);
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--surface);
}
.combo-live-preview ul {
    min-height: 36px;
    margin: 8px 0;
    padding: 0 17px 0 0;
    color: var(--text-muted);
    font-size: 0.61rem;
    line-height: 1.75;
}
.combo-preview-price {
    padding-top: 9px;
    border-top: 1px solid var(--combo-border);
    display: grid;
    gap: 7px;
}
.combo-preview-price span {
    display: flex;
    justify-content: space-between;
    gap: 7px;
    font-size: 0.65rem;
}
.combo-preview-price small {
    color: var(--text-muted);
}
.combo-preview-price > b {
    justify-self: start;
    padding: 4px 7px;
    border-radius: 6px;
    color: var(--brand-color);
    background: var(--brand-bg);
    font-size: 0.61rem;
}

/* MenuGo combo card */
.mm-combo-section > .mm-category-transition {
    margin-bottom: 12px;
}
.mm-combo-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    padding-top: 9px;
}
.mm-combo-card {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line, rgba(128, 128, 128, 0.3));
    border-radius: 20px;
    color: inherit;
    background: var(--solid, var(--card, rgba(128, 128, 128, 0.08)));
    overflow: visible;
}
.mm-combo-card h3 {
    margin: 0;
    min-height: 38px;
    padding: 2px 8px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    font-weight: 900;
    text-align: center;
}
.mm-combo-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 12px 0;
}
.mm-combo-image {
    position: relative;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    overflow: hidden;
    background: var(--soft);
}
.mm-combo-image img,
.mm-combo-image > i {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    display: grid;
    place-items: center;
}
.mm-combo-image > b {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 36px;
    min-height: 23px;
    padding: 3px 7px;
    border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: var(--brand);
    background: color-mix(in srgb, var(--solid) 90%, transparent);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}
.mm-combo-items-table {
    margin: 10px 0;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    overflow: hidden;
    background: var(--soft);
}
.mm-combo-table-head {
    min-height: 31px;
    padding: 5px 9px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(82px, auto);
    align-items: center;
    gap: 7px;
    color: var(--muted);
    background: color-mix(in srgb, var(--brand) 7%, var(--solid));
    font-size: 9px;
    font-weight: 900;
}
.mm-combo-table-head span:nth-child(2),
.mm-combo-table-head span:nth-child(3) {
    text-align: center;
}
.mm-combo-card ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    list-style: none;
}
.mm-combo-card li {
    min-height: 44px;
    padding: 7px 9px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(82px, auto);
    align-items: center;
    gap: 7px;
    background: transparent;
}
.mm-combo-card li:last-child {
    border-bottom: 0;
}
.mm-combo-card li > span {
    min-width: 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.65;
}
.mm-combo-card li > em {
    justify-self: center;
    min-width: 42px;
    padding: 4px 6px;
    border-radius: 6px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 9%, var(--solid));
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}
.mm-combo-card li > b {
    color: var(--muted);
    font-size: 10px;
    text-align: left;
    white-space: nowrap;
}
.mm-combo-card li > b small {
    font-size: 8px;
    font-weight: 700;
}
.mm-combo-price {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 11px;
}
.mm-combo-price > span {
    min-width: 0;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    display: grid;
    place-items: center;
    gap: 4px;
    text-align: center;
}
.mm-combo-original {
    border-color: color-mix(in srgb, #ef4444 35%, var(--line)) !important;
    background: color-mix(in srgb, #ef4444 20%, var(--solid)) !important;
}
.mm-combo-final {
    border-color: color-mix(in srgb, #22c55e 35%, var(--line)) !important;
    background: color-mix(in srgb, #22c55e 20%, var(--solid)) !important;
}
.mm-combo-price small {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.mm-combo-price small em {
    color: inherit;
    font-size: 0.72em;
    font-style: normal;
    font-weight: 700;
}
.mm-combo-price strong {
    color: var(--brand);
    font-size: 19px;
    text-align: center;
    text-decoration: none;
}
.mm-combo-original strong {
    color: var(--muted);
}
.mm-combo-saving {
    grid-column: 1 / -1;
    min-height: 40px;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 3fr 7fr;
    gap: 0;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--brand) 25%, var(--line)) !important;
    background: color-mix(in srgb, var(--brand) 8%, var(--solid)) !important;
}
.mm-combo-saving b,
.mm-combo-saving small {
    width: 100%;
    min-height: 40px;
    padding: 9px 8px;
    display: grid;
    place-items: center;
    font-size: 12px;
    text-align: center;
}
.mm-combo-saving b {
    border-left: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
    color: var(--brand);
}
.mm-combo-card [data-add-to-cart] {
    position: relative;
    width: 100%;
    min-height: 43px;
    margin-top: 12px;
    padding: 9px 46px;
    border: 1px solid var(--brand);
    border-radius: var(--card-radius, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    background: var(--brand);
    font: inherit;
    cursor: pointer;
}
.mm-combo-card [data-add-to-cart].is-in-cart > i {
    display: none;
}
.mm-combo-card [data-add-to-cart].is-in-cart > span {
    margin: auto;
    text-align: center;
}
.mm-combo-card [data-add-to-cart].is-in-cart > b {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 0;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 10px;
}
.mm-combo-card[data-discount-hidden] {
    display: none;
}

@media (min-width: 768px) {
    .combo-page-container {
        flex: 1;
        min-height: 100%;
    }
    .combo-admin {
        flex: 1;
        display: flex;
    }
    .combo-admin-shell {
        min-height: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "head head"
            "existing builder";
        align-items: stretch;
        gap: 12px;
    }
    .combo-admin-head {
        grid-area: head;
        min-height: 58px;
        padding: 0 2px 12px;
        border-bottom: 1px solid var(--combo-border);
    }
    .combo-existing {
        grid-area: existing;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .combo-admin-list {
        min-height: 0;
        overflow-y: auto;
        direction: ltr;
        padding-left: 5px;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: var(--brand-color) transparent;
    }
    .combo-admin-list > * {
        direction: rtl;
    }
    .combo-admin-list::-webkit-scrollbar {
        width: 5px;
    }
    .combo-admin-list::-webkit-scrollbar-thumb {
        border-radius: 3px;
        background: var(--brand-color);
    }
    .combo-builder-entry {
        grid-area: builder;
        min-width: 0;
        min-height: 0;
        margin-top: 0;
        padding: 18px;
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-content: start;
        align-items: start;
        border-radius: 12px;
    }
    .combo-builder-entry > span {
        width: 52px;
        height: 52px;
    }
    .combo-builder-entry > div {
        align-self: center;
    }
    .combo-builder-entry .combo-builder-guide {
        grid-column: 1 / -1;
        align-self: stretch;
        display: grid;
        align-content: center;
        gap: 9px;
        padding-block: 18px;
    }
    .combo-builder-guide article {
        min-width: 0;
        padding: 11px;
        border: 1px solid var(--combo-border);
        border-radius: 10px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        background: var(--surface);
    }
    .combo-builder-guide article > i {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        display: grid;
        place-items: center;
        color: var(--brand-color);
        background: var(--brand-bg);
    }
    .combo-builder-guide b,
    .combo-builder-guide small {
        display: block;
    }
    .combo-builder-guide b {
        font-size: 0.72rem;
    }
    .combo-builder-guide small {
        margin-top: 3px;
        color: var(--text-muted);
        font-size: 0.59rem;
        line-height: 1.75;
    }
    .combo-builder-guide .is-menugo {
        border-color: color-mix(
            in srgb,
            var(--brand-color) 35%,
            var(--combo-border)
        );
        background: color-mix(in srgb, var(--brand-color) 6%, var(--surface));
    }
    .combo-builder-entry > button {
        grid-column: 1 / -1;
        align-self: end;
        justify-content: center;
        width: 100%;
    }
    .combo-admin-shell:has(.combo-builder-entry.is-editor) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto minmax(0, 1fr);
        grid-template-areas:
            "head"
            "existing"
            "builder";
    }
    .combo-admin-shell:has(.combo-builder-entry.is-editor) .combo-existing {
        max-height: 270px;
    }
    .combo-builder-entry.is-editor {
        min-height: 0;
        padding: 14px;
    }
}

@media (max-width: 900px) {
    .combo-admin-list > article {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "head" "photos" "desc" "price" "actions";
    }
    .combo-price {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .combo-price > b {
        grid-column: 1 / -1;
    }
    .combo-editor-page {
        grid-template-columns: minmax(0, 1fr);
    }
    .combo-live-preview {
        position: static;
    }
    .combo-editor-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .combo-editor-fields .wide {
        grid-column: 1 / -1;
    }
    .combo-product-options {
        max-height: none;
    }
}

@media (max-width: 767px) {
    .m-settings-feature-page.combo-admin {
        padding: 12px 10px
            calc(var(--tab-h, 0px) + env(safe-area-inset-bottom, 0px) + 16px);
    }
    .m-settings-feature-page .combo-admin-shell {
        padding: 9px;
        border-radius: 13px;
        box-shadow: none;
    }
    .combo-admin-head {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 9px;
        padding-bottom: 10px;
    }
    .combo-admin-title-icon {
        width: 40px;
        height: 40px;
        border-radius: 9px;
    }
    .combo-admin h1 {
        font-size: 0.98rem;
    }
    .combo-admin-head p {
        display: none;
    }
    .combo-existing {
        padding: 9px;
        border-radius: 10px;
    }
    .combo-admin-list {
        max-height: min(34dvh, 290px);
        padding-left: 5px;
        direction: ltr;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: var(--brand-color) transparent;
    }
    .combo-admin-list > * {
        direction: rtl;
    }
    .combo-admin-list::-webkit-scrollbar {
        width: 5px;
    }
    .combo-admin-list::-webkit-scrollbar-thumb {
        border-radius: 3px;
        background: var(--brand-color);
    }
    .combo-admin-list > article {
        padding: 9px;
    }
    .combo-admin-list article > header {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }
    .combo-card-icon {
        width: 40px;
        height: 40px;
    }
    .combo-card-icon img,
    .combo-card-icon i {
        width: 28px;
        height: 28px;
    }
    .combo-photos .combo-product-photo,
    .combo-photos > em {
        width: 44px;
        height: 44px;
    }
    .combo-admin-list footer {
        justify-content: stretch;
    }
    .combo-admin-list footer button {
        flex: 1;
    }
    .combo-builder-entry {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 10px;
    }
    .combo-builder-entry > span {
        width: 40px;
        height: 40px;
    }
    .combo-builder-entry > button {
        grid-column: 1 / -1;
        width: 100%;
    }
    .combo-builder-entry.is-editor {
        padding: 8px;
    }
    .combo-editor-head {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 7px;
    }
    .combo-editor-head button[data-back] {
        width: 36px;
        min-height: 36px;
    }
    .combo-editor-footer { justify-content:stretch; }
    .combo-editor-footer button[data-save] { width:100%; }
    .combo-editor-fields {
        grid-template-columns: minmax(0, 1fr);
    }
    .combo-editor-fields .wide {
        grid-column: auto;
    }
    .combo-position-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .combo-product-options {
        grid-template-columns: minmax(0, 1fr);
        max-height: min(42dvh, 360px);
        overscroll-behavior: contain;
    }
    .mm-combo-card {
        padding: 10px;
    }
    .mm-combo-price strong {
        font-size: 17px;
    }
}
