.products-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    gap: 18px;
    align-items: start;
}

.product-editor,
.category-editor,
.managed-products {
    padding: 24px;
}

.managed-products {
    margin-top: 18px;
}

.product-alert {
    margin-bottom: 18px;
}

.product-form,
.category-form {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.form-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-form select,
.product-form textarea,
.category-form input,
.product-form input,
.category-form select {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
    background: var(--input, #11110f);
    color: var(--text);
    font: 14px var(--sans);
}

.product-form textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.menu-layout-selector {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #6a5230;
    border-radius: 9px;
    background: linear-gradient(145deg, #211b13, #171613);
}

.menu-layout-selector-head {
    display: grid;
    gap: 4px;
}

.menu-layout-selector-head strong {
    color: var(--text);
    font-size: 14px;
}

.menu-layout-selector-head small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.menu-layout-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.menu-layout-choice {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #151512;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.menu-layout-choice:hover,
.menu-layout-choice:focus-within {
    border-color: #9b763d;
    background: #211a11;
    transform: translateY(-1px);
}

.menu-layout-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.menu-layout-choice input:checked ~ .menu-layout-choice-preview {
    border-color: var(--gold);
    background: #3a2a18;
    box-shadow: 0 0 0 2px #d5a65725;
}

.menu-layout-choice input:checked ~ span:last-child strong {
    color: var(--gold);
}

.menu-layout-choice-preview {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 44px;
    padding: 6px;
    border: 1px solid #4f402b;
    border-radius: 5px;
    background: #11110f;
}

.menu-layout-choice-preview i {
    display: block;
    min-width: 0;
    min-height: 8px;
    border: 1px solid #9e7b42;
    border-radius: 2px;
    background: #2d2418;
}

.preview-cards,
.preview-triple {
    grid-template-columns: repeat(2, 1fr);
}

.preview-triple {
    grid-template-columns: repeat(3, 1fr);
}

.preview-horizontal {
    grid-template-columns: 1fr;
}

.menu-layout-choice > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.menu-layout-choice > span:last-child strong {
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-layout-choice > span:last-child small {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-customization-editor {
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.product-option-editor {
    flex: 1 1 auto;
    max-height: none;
    overflow: visible;
    margin-top: 14px;
    padding: 15px;
    border: 1px solid #403b31;
    border-radius: 13px;
    background: linear-gradient(160deg, #211d16, #151714);
}

.product-option-editor::-webkit-scrollbar {
    display: none;
}

.product-option-editor-head strong,
.product-option-editor-head small {
    display: block;
}

.product-option-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.product-option-editor-head strong {
    color: #f0c36b;
    font-size: 15px;
}

.product-option-editor-head small {
    margin-top: 5px;
    color: #97978e;
    font-size: 12px;
    line-height: 1.45;
}

.product-option-group {
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel, #171715);
}

.product-option-group > span {
    display: block;
    margin-bottom: 7px;
    color: #d9a951;
    font-size: 12px;
    font-weight: 700;
}

.product-option-checks {
    display: grid;
    gap: 6px;
}

.product-option-checks label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #d2cec3;
    font-size: 13px;
    cursor: pointer;
}

.product-option-checks label:hover {
    border-color: #5b472b;
    background: #251f15;
}

.product-option-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.product-option-checks input,
.product-custom-option-inputs input {
    accent-color: var(--gold);
}

.product-option-checks input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 19px;
    height: 19px;
    margin: 0;
    flex: 0 0 19px;
    border: 1px solid #806331;
    border-radius: 5px;
    outline: 0;
    background: #11110f;
    cursor: pointer;
}

.product-option-checks input:checked {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: 0 0 0 3px #d5a65720;
}

.product-option-checks input:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #21170d;
    font-size: 13px;
    font-weight: 800;
}

.product-option-checks input:focus-visible {
    box-shadow: 0 0 0 3px #d5a65735;
}

.product-option-checks input + span {
    min-width: 0;
}

.product-form .switch-row {
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel-2, #1c1c19);
}

.product-form .switch-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
}

.product-form .switch-row label:hover {
    border-color: #56462e;
    background: #241e15;
}

.product-form .switch-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 19px;
    height: 19px;
    margin: 0;
    padding: 0;
    border: 1px solid #806331;
    border-radius: 5px;
    outline: 0;
    background: #11110f;
    cursor: pointer;
}

.product-form .switch-row input[type="checkbox"]:checked {
    border-color: var(--gold);
    background: var(--gold);
}

.product-form .switch-row input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #21170d;
    font-size: 13px;
    font-weight: 800;
}

.service-fee-modal {
    position: fixed;
    inset: 0;
    z-index: 101;
    display: grid;
    place-items: center;
    padding: 20px;
}

.service-fee-modal[hidden] {
    display: none;
}

.service-fee-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(5px);
}

.service-fee-modal-card {
    position: relative;
    width: min(410px, 100%);
    padding: 22px;
    border: 1px solid #6d5127;
    border-radius: 14px;
    background: #1a1a17;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

.service-fee-modal-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.service-fee-modal-card h3 {
    margin: 7px 0 0;
    color: var(--text);
    font: 500 25px Georgia, serif;
}

.service-fee-modal-card p {
    margin: 13px 0 17px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.service-fee-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid #6d5127;
    border-radius: 50%;
    color: #e4bd72;
    background: #211b12;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.service-fee-percent-field {
    display: grid;
    gap: 7px;
    color: #d9a951;
    font-size: 13px;
    font-weight: 700;
}

.service-fee-percent-field > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-fee-percent-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    color: var(--text);
    background: #11110f;
    font: inherit;
}

.service-fee-percent-field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #d5a65720;
}

.service-fee-percent-field b {
    color: var(--gold);
    font-size: 17px;
}

.service-fee-modal-status {
    display: block;
    min-height: 18px;
    margin-top: 8px;
    color: #e89d8e;
    font-size: 12px;
}

.service-fee-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.product-custom-option-inputs {
    display: grid;
    gap: 7px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid #38372f;
}

.custom-option-added-list {
    display: grid;
    gap: 8px;
    margin-bottom: 3px;
    padding: 10px 11px;
    border: 1px solid #4c402e;
    border-radius: 9px;
    background: #151511;
}

.custom-option-added-title {
    color: #d9a951;
    font-size: 11px;
    font-weight: 700;
}

.custom-option-added-items {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.custom-option-added-chip {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 5px 10px;
    border: 1px solid #8b6529;
    border-radius: 999px;
    color: #f1d091;
    background: #241c10;
    font-size: 12px;
    line-height: 1.25;
}

.custom-option-added-empty {
    color: #97978e;
    font-size: 12px;
}

.product-custom-option-help {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #38372f;
}

.product-custom-option-help strong {
    color: #f0c36b;
    font-size: 13px;
}

.product-custom-option-help small {
    color: #97978e;
    font-size: 11px;
    line-height: 1.45;
}

.product-custom-option-inputs input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #45443b;
    border-radius: 8px;
    color: #f5f0e6;
    background: #10110f;
    font: inherit;
    font-size: 12px;
}

.custom-option-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 9px;
}

.custom-option-add-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.custom-option-add-row label > span {
    color: #d9a951;
    font-size: 11px;
    font-weight: 700;
}

.custom-option-add-row .custom-option-manage-button {
    min-height: 39px;
    white-space: nowrap;
}

.custom-option-manager-note {
    display: block;
    margin-top: 8px;
    color: #97978e;
    font-size: 11px;
    line-height: 1.45;
}

.custom-option-inline-status {
    display: block;
    min-height: 17px;
    margin-top: 6px;
    color: #9bc77c;
    font-size: 11px;
}

.custom-option-inline-status.is-error {
    color: #e89d8e;
}

.custom-option-modal,
.custom-option-delete-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.custom-option-modal[hidden],
.custom-option-delete-modal[hidden] {
    display: none;
}

.custom-option-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(5px);
}

.custom-option-modal-card {
    position: relative;
    width: min(470px, 100%);
    max-height: min(620px, calc(100vh - 40px));
    overflow: auto;
    padding: 22px;
    border: 1px solid #6d5127;
    border-radius: 14px;
    background: #1a1a17;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

.custom-option-modal-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.custom-option-modal-card h3 {
    margin: 7px 0 0;
    color: var(--text);
    font: 500 25px Georgia, serif;
}

.custom-option-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid #6d5127;
    border-radius: 50%;
    color: #e4bd72;
    background: #211b12;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.custom-option-modal-help,
.custom-option-delete-card p {
    margin: 13px 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.custom-option-modal-list {
    display: grid;
    gap: 8px;
}

.custom-option-modal-empty {
    padding: 20px;
    border: 1px dashed #5a472a;
    border-radius: 9px;
    color: var(--muted);
    text-align: center;
}

.custom-option-delete-open {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid #7a403c;
    border-radius: 7px;
    color: #f0b1a7;
    background: #2b1b1b;
    font-size: 12px;
    cursor: pointer;
}

.custom-option-delete-open:hover {
    border-color: #b55d55;
    background: #422323;
}

.custom-option-delete-open:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.custom-option-delete-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #11110f;
    cursor: pointer;
}

.custom-option-delete-row:hover {
    border-color: #6d5127;
    background: #211b12;
}

.custom-option-delete-row input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 21px;
    height: 21px;
    margin: 0;
    flex: 0 0 21px;
    border: 1px solid #9a6e2c;
    border-radius: 6px;
    background: #11110f;
    cursor: pointer;
}

.custom-option-delete-row input::after {
    position: absolute;
    inset: 2px;
    display: grid;
    place-items: center;
    content: '';
    color: #21170d;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.custom-option-delete-row input:checked {
    border-color: #e4b860;
    background: linear-gradient(135deg, #efc976, #b68037);
    box-shadow: 0 0 0 3px #d5a65720;
}

.custom-option-delete-row input:checked::after {
    content: '✓';
}

.custom-option-delete-row input:focus-visible {
    outline: 2px solid #e4b860;
    outline-offset: 2px;
}

.custom-option-delete-row span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.custom-option-modal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.custom-option-modal-row input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    color: var(--text);
    background: #11110f;
    font: inherit;
}

.custom-option-modal-row input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #d5a65720;
}

.custom-option-modal-row button,
.danger-btn {
    min-height: 39px;
    padding: 8px 12px;
    border: 1px solid #7a403c;
    border-radius: 8px;
    color: #f0b1a7;
    background: #2b1b1b;
    font: inherit;
    cursor: pointer;
}

.custom-option-modal-row button:hover,
.danger-btn:hover {
    border-color: #b55d55;
    background: #422323;
}

.danger-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.custom-option-save-status {
    display: block;
    min-height: 18px;
    margin-top: 12px;
    color: #9bc77c;
    font-size: 12px;
}

.custom-option-save-status.is-error {
    color: #e89d8e;
}

.custom-option-delete-confirm {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.custom-option-delete-confirm input {
    width: 19px;
    height: 19px;
    accent-color: var(--gold);
}

.custom-option-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

@media (max-width: 520px) {
    .custom-option-add-row {
        grid-template-columns: 1fr;
    }

    .custom-option-add-row .custom-option-manage-button {
        width: 100%;
    }

    .custom-option-modal-card {
        padding: 18px;
    }
}

@media (max-width: 760px) {
    .menu-layout-choice-grid {
        grid-template-columns: 1fr;
    }

    .product-option-sections {
        grid-template-columns: 1fr;
    }
}

.product-form input:focus,
.product-form select:focus,
.product-form textarea:focus,
.category-form input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #d5a65720;
}

.check-grid,
.switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.check-grid {
    margin-top: 7px;
}

.badge-group {
    flex: 1 1 100%;
    margin: 5px 0 4px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2, #1c1c19);
}

.badge-group > strong {
    display: block;
    margin-bottom: 9px;
    color: var(--text);
    font-size: 13px;
}

.product-tag-editor > .field-help {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.product-tag-editor {
    align-self: start;
    min-width: 0;
}

.badge-group-help {
    display: block;
    margin: -3px 0 11px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.badge-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.badge-section {
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel, #171715);
}

.badge-section > strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gold);
    font-size: 11px;
    line-height: 1.3;
}

.badge-section .expanded-badge-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
}

.expanded-badge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 0;
}

.backoffice .product-tag-editor .expanded-badge-grid label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    line-height: 1.25;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.backoffice .product-tag-editor .expanded-badge-grid label:hover {
    border-color: #56462e;
    background: #241e15;
    color: var(--text);
}

.backoffice .product-tag-editor .expanded-badge-grid input[type="checkbox"] {
    width: 22px !important;
    min-width: 22px;
    height: 22px !important;
    min-height: 22px !important;
    flex: 0 0 22px;
    margin: 0 !important;
    padding: 0 !important;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #806331;
    border-radius: 6px;
    outline: 0;
    background: #11110f;
    cursor: pointer;
    box-shadow: none;
}

.backoffice .product-tag-editor .expanded-badge-grid input[type="checkbox"]:checked {
    border-color: var(--gold);
    background-color: var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='%2321170d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 15px;
    box-shadow: 0 0 0 3px #d5a65720;
}

.backoffice .product-tag-editor .expanded-badge-grid input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.check-grid label,
.switch-row label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.check-grid input,
.switch-row input {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #77613c;
    border-radius: 6px;
    background: #11110f;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.check-grid input:hover,
.switch-row input:hover {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #d5a65718;
}

.check-grid input:checked,
.switch-row input:checked {
    border-color: var(--gold);
    background-color: var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='%2321170d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 15px;
    box-shadow: 0 0 0 3px #d5a65720;
}

.check-grid label,
.switch-row label {
    min-height: 30px;
    padding: 4px 9px 4px 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.check-grid label:hover,
.switch-row label:hover {
    border-color: #56462e;
    background: #241e15;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.category-list {
    display: grid;
    gap: 7px;
    margin-top: 20px;
}

.category-row {
    display: grid;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-2, #1c1c19);
}

.category-row-head {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
}

.category-row-head > span,
.category-admin-image {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #80653a;
    border-radius: 50%;
    background: #17140f;
    color: var(--gold);
    font-size: 17px;
    object-fit: cover;
}

.category-row-head > span {
    color: var(--gold);
    text-align: center;
}

.category-row-head strong {
    color: var(--text);
    font-size: 13px;
}

.category-row-head small {
    color: var(--muted);
    font-size: 11px;
}

.category-image-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
}

.category-image-form input[type="url"] {
    min-width: 0;
    width: 100%;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    outline: 0;
    background: #11110f;
    color: var(--text);
    font-size: 11px;
}

.category-file-button,
.category-image-form button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid #655131;
    border-radius: 5px;
    background: #241c12;
    color: var(--gold);
    font-size: 10px;
    cursor: pointer;
}

.category-file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.category-image-form button {
    background: var(--gold);
    color: #21170d;
}

.category-delete-form {
    display: flex;
    justify-content: flex-end;
}

.category-delete-button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #70413f;
    border-radius: 5px;
    background: #2b1918;
    color: #e7a39d;
    font-size: 10px;
}

.category-delete-button:hover {
    border-color: #d16d64;
    background: #492322;
}

.admin-confirm-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.admin-confirm-modal[hidden] {
    display: none;
}

.admin-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: #000b;
    backdrop-filter: blur(4px);
}

.admin-confirm-card {
    position: relative;
    width: min(100%, 410px);
    padding: 28px;
    border: 1px solid #76582b;
    border-radius: 12px;
    background: linear-gradient(145deg, #242019, #131311);
    box-shadow: 0 20px 70px #000b, 0 0 0 1px #d5a65712;
}

.admin-confirm-card h2 {
    margin: 10px 0 8px;
    color: var(--text);
    font: 500 25px var(--serif);
}

.admin-confirm-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.admin-confirm-card p strong {
    color: var(--gold);
}

.admin-confirm-close {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #181714;
    color: var(--muted);
    font-size: 21px;
}

.admin-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
}

.admin-confirm-actions button {
    min-height: 42px;
}

.admin-confirm-danger {
    background: linear-gradient(135deg, #e1ad64, #a46b38);
}

.admin-confirm-open {
    overflow: hidden;
}

.category-upload-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 12px 13px;
    border: 1px dashed #806331;
    border-radius: 9px;
    background: linear-gradient(135deg, #201a12, #151513);
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.category-upload-field:hover,
.category-upload-field:focus-within {
    border-color: var(--gold);
    background: linear-gradient(135deg, #2b2115, #171613);
    transform: translateY(-1px);
}

.category-upload-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border: 1px solid #806331;
    border-radius: 50%;
    background: #17130e;
    color: var(--gold);
    font-size: 21px;
    line-height: 1;
}

.category-upload-copy {
    display: grid;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.category-upload-copy strong {
    color: var(--text);
    font-size: 13px;
}

.category-upload-copy small {
    overflow: hidden;
    color: var(--dim);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-upload-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #806331;
    border-radius: 6px;
    background: #2a2115;
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.category-upload-field input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.category-form {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.full {
    width: 100%;
}

.count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-left: 5px;
    border-radius: 50%;
    background: #3d3020;
    color: var(--gold);
    font: 12px var(--sans);
}

.managed-product-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.managed-product {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-2, #1c1c19);
}

.managed-product.is-hidden {
    opacity: .58;
}

.managed-product-image {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #25231e;
    color: var(--gold);
    font-size: 24px;
}

.managed-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.managed-product-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.managed-product-info strong {
    color: var(--text);
    font: 500 16px var(--serif);
}

.managed-product-info > small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.stock-pill {
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 10px;
}

.stock-pill.normal {
    background: #29422d;
    color: #a8d39d;
}

.stock-pill.low {
    background: #4b3a21;
    color: #e1bd76;
}

.stock-pill.out {
    background: #4a2b2b;
    color: #efaaa5;
}

.managed-product-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.managed-product-actions .ghost-btn {
    padding: 9px 11px;
    font-size: 11px;
}

.managed-product-actions form {
    margin: 0;
}

.managed-product-actions .text-btn {
    padding: 0;
    color: var(--gold);
    background: transparent;
    font-size: 11px;
}

@media (max-width: 760px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .product-editor,
    .category-editor,
    .managed-products {
        padding: 17px;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .product-option-editor {
        max-height: none;
        overflow: visible;
    }

    .managed-product {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 11px;
    }

    .managed-product-image {
        width: 54px;
        height: 54px;
    }

    .managed-product-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .managed-product-actions .ghost-btn,
    .managed-product-actions .text-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .category-image-form {
        grid-template-columns: 1fr 1fr;
    }

    .category-image-form input[type="url"] {
        grid-column: 1 / -1;
    }

    .category-file-button,
    .category-image-form button {
        min-height: 42px;
    }

    .check-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
    }

    .check-grid label,
    .badge-group,
    .expanded-badge-grid {
        min-width: 0;
        width: 100%;
    }

    .expanded-badge-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .badge-group label {
        overflow-wrap: anywhere;
    }

    .badge-sections {
        grid-template-columns: minmax(0, 1fr);
    }
}
