/* Products: productEdit (tabs + general form), productsList, categoryEdit */

/* ---------- productEdit: page frame ---------- */

/*
 * spacing on productEdit: multiples of 5 and one inset per level, so nested blocks don't add up their paddings.
 * --pe-space: a panel's inset and the gap between blocks; --pe-space-half: the inset inside a block and the gutter.
 */
body.admin-new-theme.productEdit-css
{
    --pe-space: 20px;
    --pe-space-half: 10px;
}

@media (max-width: 767px)
{
    body.admin-new-theme.productEdit-css
    {
        --pe-space: 10px;
        --pe-space-half: 5px;
    }
}

body.admin-new-theme.productEdit-css .productEdit-section
{
    color: var(--adm-text);
}

body.admin-new-theme.productEdit-css #tabs.row
{
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    flex-wrap: wrap;
}

body.admin-new-theme.productEdit-css #tabs > .col-sm-9
{
    min-width: 0;
}

@media (min-width: 768px)
{
    body.admin-new-theme.productEdit-css #tabs > .selection-tabs
    {
        flex: 0 0 250px;
        width: 250px;
    }

    body.admin-new-theme.productEdit-css #tabs > .col-sm-9
    {
        flex: 1 1 0;
        width: auto;
    }
}

/* ---------- productEdit: tab bar (vertical, right side) ---------- */

body.admin-new-theme.productEdit-css .selection-tabs
{
    padding-left: 15px;
    position: sticky;
    top: 70px;
    z-index: 3;
}

body.admin-new-theme.productEdit-css .selection-tabs ul.navbar
{
    min-height: 0;
    margin: 0;
    padding: 5px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

body.admin-new-theme.productEdit-css .selection-tabs ul li
{
    float: none;
    margin: 0;
    padding: 0 !important;
    border: 0;
    border-radius: 8px !important;
    background: transparent;
    transition: background var(--adm-transition);
}

body.admin-new-theme.productEdit-css .selection-tabs ul li:hover
{
    background: var(--adm-surface-alt);
}

body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-tabs-active,
body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-state-active
{
    background: var(--adm-brand-tint);
}

body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-tabs-active:before
{
    content: none;
}

body.admin-new-theme.productEdit-css .selection-tabs ul li a
{
    display: block;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 20px;
    color: var(--adm-muted) !important;
    text-decoration: none;
    transition: color var(--adm-transition);
}

body.admin-new-theme.productEdit-css .selection-tabs ul li:hover a
{
    color: var(--adm-text) !important;
}

body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-tabs-active a,
body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-state-active a
{
    color: var(--adm-brand) !important;
    font-weight: 600;
}

body.admin-new-theme.productEdit-css .selection-tabs ul li a:focus-visible
{
    outline: none;
    box-shadow: var(--adm-focus);
    border-radius: 8px;
}

/* ---------- productEdit: tab panels as cards ---------- */

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel
{
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
    padding: var(--pe-space);
    margin-bottom: var(--pe-space);
}

/*
 * one Bootstrap gutter, half the panel's inset: a column's content lines up with the panel's, two columns sit
 * --pe-space apart. :where() keeps it under the page's own rules (the dock, the cards) and over Bootstrap's.
 */
body.admin-new-theme.productEdit-css #tabs :where(.ui-tabs-panel .row, .ui-tabs-panel .form-horizontal .form-group)
{
    margin-left: calc(-1 * var(--pe-space-half));
    margin-right: calc(-1 * var(--pe-space-half));
}

body.admin-new-theme.productEdit-css #tabs :where(.ui-tabs-panel [class*="col-xs-"], .ui-tabs-panel [class*="col-sm-"], .ui-tabs-panel [class*="col-md-"], .ui-tabs-panel [class*="col-lg-"], .ui-tabs-panel .container-fluid):not(.input-group)
{
    padding-left: var(--pe-space-half);
    padding-right: var(--pe-space-half);
}

/* a Bootstrap panel inside a tab is a block in the card, not a second card: half the inset */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel
{
    margin-bottom: var(--pe-space);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel > .panel-heading,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel > .panel-body,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel > .panel-footer,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .alert
{
    padding: var(--pe-space-half);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .alert
{
    margin-bottom: var(--pe-space);
}

/* a panel part whose children are columns without a row: the columns' gutter is its inset, not a second one */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel :is(.panel-heading, .panel-body, .panel-footer):has(> :is([class*="col-xs-"], [class*="col-sm-"], [class*="col-md-"], [class*="col-lg-"]))
{
    padding-left: 0;
    padding-right: 0;
}

/* legacy blocks with a fixed width (inline 500px title, 400px upload box) stop at the panel's edge */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel :is(h1, .product-document-upload)
{
    max-width: 100%;
}

/* Documente produs: the block had its own 20px margin inside the panel's inset */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel #product_document
{
    margin: 0;
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .product-document-upload,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .store-assignments
{
    padding: var(--pe-space-half);
}

/* Preț: the price row padded 14/16 inside a panel body that already pads */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .pp-prices
{
    gap: var(--pe-space-half) var(--pe-space);
    padding: var(--pe-space-half) 0;
}

/* Istoric stoc: its own 3px !important cells */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel #product-history-table :is(th, td)
{
    padding: 5px !important;
}

/* Rețetar: the table is wider than a phone; it scrolls inside the panel instead of the page */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel table.retetarProducts
{
    display: block;
    overflow-x: auto;
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel th,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel td
{
    padding: 5px var(--pe-space-half);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .page-header
{
    margin: 0 0 var(--pe-space);
    padding-bottom: var(--pe-space-half);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .ui-tabs-panel
{
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

body.admin-new-theme.productEdit-css #tabs > .col-sm-9 > #tabs-general.ui-tabs-panel
{
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* ---------- productEdit: general tab ---------- */

body.admin-new-theme.productEdit-css .productEditGeneral > .row,
body.admin-new-theme.productEdit-css #tab_general_products
{
    margin: 0 0 var(--pe-space) !important;
    padding: var(--pe-space) 0;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

/* the card is a row: it doesn't pad, its columns hold the card's inset */
body.admin-new-theme.productEdit-css #tabs .productEditGeneral > .row > [class*="col-"],
body.admin-new-theme.productEdit-css #tabs #tab_general_products > [class*="col-"]
{
    padding-left: var(--pe-space);
    padding-right: var(--pe-space);
}

/* beside the statuses, the picture already sits on its row's padding: no column inset of its own
   (stacked on a phone it keeps it, so its edges line up with the status box under it) */
@media (min-width: 768px)
{
    body.admin-new-theme.productEdit-css #tabs #pictureGroup
    {
        padding-left: 0;
        padding-right: 0;
    }
}

/* the product's picture, on Setări generale and on Categorii */
body.admin-new-theme.productEdit-css #pictureGroup .large_thumbnail,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .img_prod_medium
{
    display: block;
    position: relative;
    max-width: 100%;
    max-height: 260px;
    min-width: 160px;
    min-height: 160px;
    /* a broken img has no natural size: as a block it would stretch to the column, fit-content shrinks it to 160px */
    width: fit-content;
    margin: 0;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    background: var(--adm-surface-alt);
    object-fit: contain;
}

/*
 * a picture that fails to load: Chrome and Firefox draw an img's pseudo-elements only then, so these cover the
 * browser's broken-image icon with the same 160px frame the "missing picture" placeholder has, an icon and the alt text
 */
body.admin-new-theme.productEdit-css #pictureGroup .large_thumbnail::before,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .img_prod_medium::before
{
    content: '';
    position: absolute;
    inset: 0;
    background: var(--adm-surface-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center 40% / 40px no-repeat;
    border-radius: inherit;
}

body.admin-new-theme.productEdit-css #pictureGroup .large_thumbnail::after,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .img_prod_medium::after
{
    content: attr(alt);
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 30px;
    font-size: 12px;
    line-height: 15px;
    text-align: center;
    color: var(--adm-muted);
}

body.admin-new-theme.productEdit-css #statusGroup
{
    color: var(--adm-muted);
    line-height: 1.9;
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-groups
{
    display: flex;
    flex-direction: column;
    margin: 5px 0;
    overflow: hidden;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    background: var(--adm-surface-alt);
}

/* the "Product status" title and its box, stacked */
body.admin-new-theme.productEdit-css #statusGroup .product-status
{
    display: flex;
    flex-direction: column;
}

/* beside the picture there is room to spare: title and box only as wide as the statuses, at the column's right edge */
@media (min-width: 768px)
{
    body.admin-new-theme.productEdit-css #statusGroup .product-status
    {
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
    }
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-group
{
    --status-group-color: var(--adm-danger);
    min-width: 0;
    margin: 0;
    padding: 5px 0;
    border: 0;
}

/*
 * a legend covers its fieldset's top border, so the divider lives on the legend: in the box's border colour, 5px off
 * the box's sides, its text still 15px in (5px margin + 10px padding)
 */
body.admin-new-theme.productEdit-css #statusGroup .product-status-group + .product-status-group legend
{
    width: calc(100% - 10px);
    margin: 5px 5px 0;
    padding: 10px 10px 0;
    border-top: 1px solid var(--adm-border);
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-group--listed
{
    --status-group-color: var(--adm-success);
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-group--link
{
    --status-group-color: var(--adm-warning);
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-group legend
{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 5px;
    width: 100%;
    margin: 0;
    /* a legend sits on its fieldset's top edge, so the fieldset's padding can't make room above it */
    padding: 10px 15px 0;
    border: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--adm-muted);
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-group legend strong
{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--status-group-color);
}

body.admin-new-theme.productEdit-css #statusGroup .product-status-group legend strong::before
{
    content: '';
    width: 8px;
    height: 8px;
    border-radius: var(--adm-radius-pill);
    background: currentColor;
}

body.admin-new-theme.productEdit-css #statusGroup ul
{
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* rows keep 15px at every width: the selected chip takes 5 of it as its margin and keeps 10 around its radio */
body.admin-new-theme.productEdit-css #statusGroup ul li
{
    margin: 0;
    padding: 0 15px;
}

/* one row height for every status, also when the 301 row turns into a flex row and only the label's own line counts */
body.admin-new-theme.productEdit-css #statusGroup ul li > label
{
    line-height: 30px;
}

/* the statuses that open an input go last in their group, so the input doesn't push a sibling down */
body.admin-new-theme.productEdit-css #statusGroup ul li:has(#redirect301_url),
body.admin-new-theme.productEdit-css #statusGroup ul li:has(#available_from)
{
    order: 1;
}

/* the selected status: a rounded chip inset from the box's edge, its text where the other statuses' text is
   (5px margin + 1px border + 9px padding = the other rows' 15px) */
body.admin-new-theme.productEdit-css #statusGroup ul li:has(input:checked)
{
    margin: 0 5px;
    padding: 0 9px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-brand);
    border-radius: var(--adm-radius);
}

/* Redirecționare 301: the URL field and its save button on their own line under the label, the hint under them */
body.admin-new-theme.productEdit-css #statusGroup ul li:has(#redirect301_url)
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

body.admin-new-theme.productEdit-css #statusGroup ul li:has(#redirect301_url):has(input:checked)
{
    padding-bottom: 5px;
}

body.admin-new-theme.productEdit-css #statusGroup ul li:has(#redirect301_url) > :is(label, div.redirect301)
{
    flex: 0 0 100%;
}

/* the URL field and its hint take the width the statuses give the box, they don't widen it: the field's width
   comes from the flex row, not from its size="25"; the hint wraps */
body.admin-new-theme.productEdit-css #statusGroup ul li > #redirect301_url
{
    flex: 1 1 0;
    width: 0;
    min-width: 0;
}

body.admin-new-theme.productEdit-css #statusGroup ul li > div.redirect301
{
    contain: inline-size;
}

body.admin-new-theme.productEdit-css #statusGroup input[type="button"].redirect301
{
    height: 28px;
    padding: 0 10px;
    background: var(--adm-brand);
    border: 1px solid var(--adm-brand);
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--adm-transition);
}

body.admin-new-theme.productEdit-css #statusGroup input[type="button"].redirect301:hover,
body.admin-new-theme.productEdit-css #statusGroup input[type="button"].redirect301:focus
{
    background: var(--adm-brand-strong);
    border-color: var(--adm-brand-strong);
}

body.admin-new-theme.productEdit-css #statusGroup input[type="button"].redirect301:focus-visible
{
    outline: none;
    box-shadow: var(--adm-focus);
}

body.admin-new-theme.productEdit-css #statusGroup label
{
    margin: 0;
    font-weight: 400;
    color: var(--adm-text);
    cursor: pointer;
}

body.admin-new-theme.productEdit-css #statusGroup ul li:has(input:checked) label
{
    /* the chip's 1px border top and bottom, so the selected row keeps every row's 30px */
    line-height: 28px;
    font-weight: 600;
    color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #statusGroup input[type="radio"],
body.admin-new-theme.productEdit-css #statusGroup input[type="checkbox"]
{
    accent-color: var(--adm-brand);
    margin-right: 5px;
}

body.admin-new-theme.productEdit-css #statusGroup input[type="text"]
{
    height: 28px;
    padding: 0 5px;
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    background: var(--adm-surface);
}

/* size="7" cuts the date and its AAAA-LL-ZZ placeholder */
body.admin-new-theme.productEdit-css #statusGroup #available_from
{
    width: 120px;
    /* off the selected chip's border above and below */
    margin: 5px 0;
}

body.admin-new-theme.productEdit-css #tab_general_products .form-group
{
    margin-bottom: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--adm-surface-alt);
}

body.admin-new-theme.productEdit-css #tab_general_products .form-group:last-child
{
    border-bottom: 0;
}

/* visual breaks between the logical blocks of the long form */
body.admin-new-theme.productEdit-css #tab_general_products #priceGroup,
body.admin-new-theme.productEdit-css #tab_general_products #manufacturerGroup,
body.admin-new-theme.productEdit-css #tab_general_products #lengthGroup,
body.admin-new-theme.productEdit-css #tab_general_products #measurementunitGroup,
body.admin-new-theme.productEdit-css #tab_general_products #descriptionGroup
{
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--adm-border);
}

body.admin-new-theme.productEdit-css #tab_general_products .control-label
{
    padding-top: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-muted);
}

body.admin-new-theme.productEdit-css #tab_general_products .form-control[readonly],
body.admin-new-theme.productEdit-css #tab_general_products .form-control[disabled]
{
    background: var(--adm-surface-alt);
    color: var(--adm-muted);
}

/*
 * save / duplicate / delete: a compact dock floating at the panel's bottom left, where the form's fields start.
 * Update goes last, where the eye ends, set apart from the two secondary actions so a click can't slip onto them.
 */
body.admin-new-theme.productEdit-css #tab_general_products + .row
{
    position: sticky;
    bottom: 15px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: var(--pe-space) auto 0 0;
    padding: 5px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow-pop);
    backdrop-filter: blur(6px);
}

body.admin-new-theme.productEdit-css #tab_general_products + .row::before,
body.admin-new-theme.productEdit-css #tab_general_products + .row::after
{
    content: none;
}

body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton
{
    width: auto;
    min-width: 0;
    float: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton:first-child
{
    order: 1;
    margin-left: 30px;
}

/* the general panel is the size container, so the dock's labels scale with the panel, not with themselves */
body.admin-new-theme.productEdit-css #tabs-general
{
    container-type: inline-size;
}

body.admin-new-theme.productEdit-css .productEditButton .btn
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 5px;
    height: 32px;
    margin: 0;
    min-width: 0;
    max-width: 100%;
    padding-top: 0;
    padding-bottom: 0;
    /*
     * measured: the phone row is 102px of paddings and icons + 11.6px per px of font, and it may be at most the
     * panel's width (100cqi) minus 4px; solved for the font that gives 8.62cqi - 9.14px, so 15px from a 290px panel up
     */
    font-size: clamp(12px, calc(8.62cqi - 9.14px), 15px);
    white-space: nowrap;
}

/* delete is its bin icon alone: a square button, the label is in its title */
body.admin-new-theme.productEdit-css .productEditButton .btn.btn-danger
{
    aspect-ratio: 1;
    padding: 0;
}

/* a longer translation ellipsises instead of pushing the dock past the panel */
body.admin-new-theme.productEdit-css .productEditButton-label
{
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}


body.admin-new-theme.productEdit-css .productEditButton label.btn-success
{
    padding: 0 20px;
    background: var(--adm-brand);
    border-color: var(--adm-brand);
    color: #fff;
    font-weight: 600;
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow-raised);
    transition: background var(--adm-transition);
}

body.admin-new-theme.productEdit-css .productEditButton label.btn-success:hover,
body.admin-new-theme.productEdit-css .productEditButton label.btn-success:focus
{
    background: var(--adm-brand-strong);
    border-color: var(--adm-brand-strong);
    color: #fff;
}

body.admin-new-theme.productEdit-css .productEditButton label.btn-success:focus-visible
{
    outline: none;
    box-shadow: var(--adm-focus);
}

@media (max-width: 767px)
{
    /* the picture stacks on what is next to it on desktop (the statuses, the category tree): a gap between them */
    body.admin-new-theme.productEdit-css #pictureGroup,
    body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .row > :has(> .img_prod_medium)
    {
        margin-bottom: var(--pe-space);
    }

    /* stacked above its field, the label needs no offset to centre on it */
    body.admin-new-theme.productEdit-css #tab_general_products .control-label
    {
        padding-top: 0;
    }

    /* the column already sits in the row's gutter, like the panel below it */
    body.admin-new-theme.productEdit-css .selection-tabs
    {
        position: static;
        z-index: auto;
        padding-left: 0;
        margin-top: 0;
        margin-bottom: var(--pe-space);
    }

    /*
     * the desktop card as one row of tabs, scrolled natively. The right edge fades out, so the tab under it reads as
     * cut whatever the screen width, and the active tab docks at the edge it is swiped past, so it never leaves the row.
     */
    body.admin-new-theme.productEdit-css .selection-tabs ul.navbar
    {
        display: flex;
        flex-wrap: nowrap;
        gap: 5px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        /* the fade and the docked tab reach the card's edge */
        padding-right: 0;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul.navbar::-webkit-scrollbar
    {
        display: none;
    }

    /* Bootstrap's clearfix ::before would be an empty flex item */
    body.admin-new-theme.productEdit-css .selection-tabs ul.navbar::before
    {
        content: none;
    }

    /* the fade: pinned to the right edge while there is more to scroll, the room after the last pill at the end */
    body.admin-new-theme.productEdit-css .selection-tabs ul.navbar::after
    {
        content: '';
        position: sticky;
        right: 0;
        z-index: 1;
        flex: 0 0 40px;
        background: linear-gradient(to right, transparent, var(--adm-surface));
        pointer-events: none;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul li
    {
        flex: 0 0 auto;
        margin: 0;
        scroll-snap-align: start;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul li a
    {
        padding: 7px 12px;
        line-height: 20px;
        white-space: nowrap;
    }

    /* the ring, in the card's colour, parts the docked tab from the ones it covers */
    body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-tabs-active,
    body.admin-new-theme.productEdit-css .selection-tabs ul li.ui-state-active
    {
        position: sticky;
        left: 0;
        right: 0;
        z-index: 2;
        box-shadow: 0 0 0 5px var(--adm-surface);
    }

    /* the dock spans the panel; update fills the rest under the thumb */
    body.admin-new-theme.productEdit-css #tab_general_products + .row
    {
        width: auto;
        bottom: 10px;
        gap: 5px;
        margin-left: 0;
        margin-right: 0;
        padding: 5px;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton:first-child
    {
        flex: 1 1 auto;
        margin-left: 0;
    }

    body.admin-new-theme.productEdit-css .productEditButton .btn
    {
        gap: 5px;
        height: 36px;
        padding: 0 10px;
    }

    /* drawn 36px tall, tapped on 44 */
    body.admin-new-theme.productEdit-css .productEditButton .btn::before
    {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 44px;
        transform: translateY(-50%);
    }

    body.admin-new-theme.productEdit-css .productEditButton label.btn-success
    {
        width: 100%;
        padding: 0 10px;
    }
}

/* ---------- productEdit: headings inside ajax tabs ---------- */

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel > h1,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel > h2,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .page-header h1
{
    margin: 0 0 var(--pe-space);
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--adm-text);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel > h1 .btn
{
    margin-left: 10px;
    vertical-align: middle;
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .alert
{
    border-radius: var(--adm-radius);
}

/* ---------- productEdit: pictures ---------- */

body.admin-new-theme.productEdit-css #product_pictures,
body.admin-new-theme.productEdit-css #gpsr_pictures
{
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--pe-space-half);
}

body.admin-new-theme.productEdit-css #product_pictures .product_picture .inner-wrapper,
body.admin-new-theme.productEdit-css #gpsr_pictures .product_picture .inner-wrapper
{
    height: 100%;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    transition: border-color var(--adm-transition), box-shadow var(--adm-transition);
}

body.admin-new-theme.productEdit-css #product_pictures .product_picture .inner-wrapper:hover,
body.admin-new-theme.productEdit-css #gpsr_pictures .product_picture .inner-wrapper:hover
{
    border-color: var(--adm-brand-soft);
    box-shadow: var(--adm-shadow-raised);
}

body.admin-new-theme.productEdit-css #product_pictures .product_picture:first-of-type .inner-wrapper
{
    border-color: var(--adm-brand);
    box-shadow: 0 0 0 2px var(--adm-brand-tint);
}

body.admin-new-theme.productEdit-css #product_pictures .product_picture .inner-wrapper .picture-item,
body.admin-new-theme.productEdit-css #gpsr_pictures .product_picture .inner-wrapper .picture-item
{
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--adm-surface-alt);
    border-bottom: 1px solid var(--adm-border);
}

body.admin-new-theme.productEdit-css #product_pictures .product_picture .picture-item img,
body.admin-new-theme.productEdit-css #gpsr_pictures .product_picture .picture-item img
{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

body.admin-new-theme.productEdit-css #product_pictures .container-picture-actions,
body.admin-new-theme.productEdit-css #gpsr_pictures .container-picture-actions
{
    justify-content: center;
    gap: 5px;
    margin: 5px 0;
    font-size: 12px;
    color: var(--adm-muted);
}

body.admin-new-theme.productEdit-css #product_pictures .container-picture-actions .btn,
body.admin-new-theme.productEdit-css #gpsr_pictures .container-picture-actions .btn
{
    border-radius: 8px;
}

body.admin-new-theme.productEdit-css #product_pictures .product_picture .inner-wrapper.selected
{
    border-color: var(--adm-danger) !important;
    box-shadow: 0 0 0 2px var(--adm-danger-bg);
}

body.admin-new-theme.productEdit-css #product_pictures .inner-wrapper.new-picture,
body.admin-new-theme.productEdit-css #gpsr_pictures .inner-wrapper.new-picture
{
    min-height: 220px;
    justify-content: center;
    border: 1px dashed var(--adm-brand-soft);
    background: var(--adm-brand-tint);
    border-radius: var(--adm-radius);
    box-shadow: none;
}

body.admin-new-theme.productEdit-css #product_pictures .inner-wrapper.new-picture:hover,
body.admin-new-theme.productEdit-css #gpsr_pictures .inner-wrapper.new-picture:hover
{
    background: #ebe3fb;
}

body.admin-new-theme.productEdit-css #product_pictures .top-left
{
    top: 10px;
    left: 10px;
    z-index: 1;
    accent-color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #product_pictures .inner-wrapper.new-picture input[type="file"]
{
    max-width: 100%;
}

body.admin-new-theme.productEdit-css #product_pictures .inner-wrapper.new-picture
{
    font-size: 12px;
    line-height: 1.45;
    color: var(--adm-muted);
    overflow-wrap: anywhere;
}

/* ---------- productEdit: panels inside tabs (price, timeline, ...) ---------- */

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel
{
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel > .panel-heading
{
    border-bottom-color: var(--adm-border);
    border-radius: var(--adm-radius) var(--adm-radius) 0 0;
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel > .panel-heading h2,
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .panel > .panel-heading h3
{
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--adm-text);
}

/* ---------- productEdit: tags as a grid of chips ---------- */

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel ul:has(> li > input.product-tag)
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--pe-space-half);
    margin: 0;
    padding: 0;
    list-style: none;
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel li:has(> input.product-tag)
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    transition: border-color var(--adm-transition), background var(--adm-transition);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel li:has(> input.product-tag):hover
{
    border-color: var(--adm-brand-soft);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel li:has(> input.product-tag:checked)
{
    background: var(--adm-brand-tint);
    border-color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel li > input.product-tag
{
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel li > input.product-tag + label
{
    flex: 1 1 auto;
    margin: 0;
    padding: var(--pe-space-half) 0;
    font-weight: 500;
    color: var(--adm-text);
    cursor: pointer;
    overflow-wrap: anywhere;
}

body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel li > input.product-tag:checked + label
{
    color: var(--adm-brand);
    font-weight: 600;
}

/* ---------- productEdit: categories tab ---------- */

/*
 * the tree reads like a file browser: branches are disclosure rows (their checkbox is always disabled, so it hides),
 * leaves are checkbox + clickable name. Everything follows state the tab's JS already leaves in the DOM: jQuery's
 * inline display:none on a collapsed list, the checked boxes callback_checkCategory sets, the main category's disabled box.
 */
body.admin-new-theme.productEdit-css #product_main_category
{
    width: auto;
    max-width: 100%;
}

body.admin-new-theme.productEdit-css .category-main-label::before,
body.admin-new-theme.productEdit-css #cat_list li:not(.parent):has(> input:checked:disabled) > label::after
{
    content: '\2605';
    color: var(--adm-warning);
}

body.admin-new-theme.productEdit-css .category-main-label::before
{
    margin-right: 5px;
}

body.admin-new-theme.productEdit-css #cat_list
{
    margin-top: var(--pe-space);
}

body.admin-new-theme.productEdit-css #cat_list ul
{
    margin: 0;
    padding: 0;
    list-style: none;
}

/* a nested level: one guide line under the chevron above it, instead of a 30px step */
body.admin-new-theme.productEdit-css #cat_list ul ul
{
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--adm-surface-alt);
}

body.admin-new-theme.productEdit-css #cat_list > ul > li + li
{
    border-top: 1px solid var(--adm-surface-alt);
}

body.admin-new-theme.productEdit-css #cat_list li
{
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

body.admin-new-theme.productEdit-css #cat_list li > ul
{
    grid-column: 1 / -1;
}

/* a quarter smaller than the 20px column it shares with the chevron, centred in it so the names stay aligned */
body.admin-new-theme.productEdit-css #cat_list li > input
{
    justify-self: center;
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--adm-brand);
    cursor: pointer;
}

body.admin-new-theme.productEdit-css #cat_list li > input:disabled
{
    cursor: default;
}

body.admin-new-theme.productEdit-css #cat_list li > :is(a, label)
{
    margin: 0;
    padding: 5px 0;
    font-weight: 400;
    line-height: 20px;
    color: var(--adm-text);
    text-decoration: none;
    cursor: pointer;
    overflow-wrap: anywhere;
}

body.admin-new-theme.productEdit-css #cat_list li.parent > input
{
    display: none;
}

/* a branch: the chevron takes the checkbox's column, the whole row opens it */
body.admin-new-theme.productEdit-css #cat_list li.parent > a
{
    display: flex;
    align-items: baseline;
    gap: 10px;
    grid-column: 1 / -1;
    /* the chevron marks a branch; bold is kept for the ticked categories */
    font-weight: 400;
}

body.admin-new-theme.productEdit-css #cat_list li.parent > a::before
{
    content: '';
    flex: 0 0 20px;
    align-self: center;
    height: 20px;
    background: var(--adm-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
    transition: transform var(--adm-transition);
}

body.admin-new-theme.productEdit-css #cat_list li.parent:has(> ul[style*="display: none"]) > a::before
{
    transform: rotate(-90deg);
}

/* a branch that holds the product: brand colour and a dot, visible while it is closed */
body.admin-new-theme.productEdit-css #cat_list li.parent:has(li:not(.parent) > input:checked) > a
{
    color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #cat_list li.parent:has(li:not(.parent) > input:checked) > a::after
{
    content: '';
    flex: 0 0 auto;
    align-self: center;
    width: 5px;
    height: 5px;
    border-radius: var(--adm-radius-pill);
    background: currentColor;
}

body.admin-new-theme.productEdit-css #cat_list li > :is(a, label):hover
{
    color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #cat_list li:not(.parent):has(> input:checked) > label
{
    font-weight: 600;
    color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #cat_list li:not(.parent):has(> input:checked:disabled) > label::after
{
    margin-left: 5px;
}

/* the category's ID, written like one (#583) so it can't pass for a product count */
body.admin-new-theme.productEdit-css #cat_list .category-id
{
    margin-left: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 400;
    line-height: 15px;
    color: var(--adm-muted);
}

body.admin-new-theme.productEdit-css #cat_list .category-id::before
{
    content: '#';
}

/* a branch's row: the row's 10px gap already parts the ID from the name, about the leaf's space + 5px margin */
body.admin-new-theme.productEdit-css #cat_list li.parent > a > .category-id
{
    margin-left: 0;
}

/* the ID footnote sits after the tree's row */
body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel .row:has(#cat_list) + p
{
    margin: var(--pe-space) 0 0;
}

@media (max-width: 767px)
{
    /* thumb-sized rows */
    body.admin-new-theme.productEdit-css #cat_list li > :is(a, label)
    {
        padding: 10px 0;
    }
}

/* ---------- productsList: toolbar (sort + pagination) ---------- */

body.admin-new-theme.productsList-css .sort_product_list label,
body.admin-new-theme.productsList-css .top-paginate .paginate-info
{
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-muted);
}

body.admin-new-theme.productsList-css .top-paginate .paginate-info b,
body.admin-new-theme.productsList-css .top-paginate .paginate-info strong
{
    color: var(--adm-text);
}

/* ---------- productsList: filters ---------- */

body.admin-new-theme.productsList-css .product-filters-wrapper
{
    margin: 0 15px;
    background: var(--adm-surface);
    border-radius: var(--adm-radius-lg);
}

body.admin-new-theme.productsList-css .product-filters-wrapper.product-filters-active
{
    margin-bottom: 16px;
    border: 1px solid var(--adm-border);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.productsList-css .product-filters-wrapper form
{
    padding: 20px 20px 8px;
    background: transparent;
}

body.admin-new-theme.productsList-css .product-filters-wrapper .control-label,
body.admin-new-theme.productsList-css .product-filters-wrapper label
{
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--adm-muted);
}

body.admin-new-theme.productsList-css .product-filters-wrapper .form-group
{
    margin-bottom: 12px;
}

body.admin-new-theme.productsList-css .close-filter-wrapper
{
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 18px;
    line-height: 32px;
    color: var(--adm-muted);
    border-radius: var(--adm-radius);
    transition: background var(--adm-transition), color var(--adm-transition);
}

body.admin-new-theme.productsList-css .close-filter-wrapper:hover
{
    background: var(--adm-surface-alt);
    color: var(--adm-text);
}

/* ---------- productsList: status tabs (keep the meaning dots) ---------- */

body.admin-new-theme.productsList-css .product-list-tabs
{
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 0 8px;
    border-bottom: 0;
}

body.admin-new-theme.productsList-css .product-list-tabs > li
{
    float: none;
    margin: 0;
    padding: 0;
}

body.admin-new-theme.productsList-css .product-list-tabs > li.active
{
    overflow: visible;
}

body.admin-new-theme.productsList-css .product-list-tabs > li > a
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-muted);
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-pill);
    box-shadow: none;
    transition: border-color var(--adm-transition), color var(--adm-transition), background var(--adm-transition);
}

body.admin-new-theme.productsList-css .product-list-tabs > li > a:hover
{
    color: var(--adm-text);
    background: var(--adm-surface);
    border-color: var(--adm-brand-soft);
}

body.admin-new-theme.productsList-css .product-list-tabs > li.active > a,
body.admin-new-theme.productsList-css .product-list-tabs > li.active > a:hover,
body.admin-new-theme.productsList-css .product-list-tabs > li.active > a:focus
{
    color: var(--adm-brand);
    font-weight: 600;
    background: var(--adm-brand-tint);
    border-color: var(--adm-brand);
    box-shadow: none;
}

body.admin-new-theme.productsList-css .product-list-tabs > li > a:before
{
    width: 8px;
    height: 8px;
}

/* ---------- productsList: list card + rows ---------- */

body.admin-new-theme.productsList-css .products-list .tabel_afisare_produse
{
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    border-collapse: separate;
    border-spacing: 0;
    background: var(--adm-surface);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.productsList-css .products-list .tabel_afisare_produse > tbody > tr.hideItemForWMS > td
{
    padding: 10px 14px;
    background: var(--adm-surface-alt);
    border-top: 0;
    border-bottom: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg) var(--adm-radius-lg) 0 0;
}

body.admin-new-theme.productsList-css .products-list .tabel_afisare_produse #check_all,
body.admin-new-theme.ProductManagement-css .tabel_rand_produs .product-checkbox
{
    accent-color: var(--adm-brand);
}

body.admin-new-theme.productsList-css .products-list .tabel_afisare_produse #check_all + label
{
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-muted);
}

body.admin-new-theme.productsList-css .products-list .products-table-wrapper
{
    border-top: 0;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs
{
    margin: 0;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs > tbody > tr.product > td
{
    padding: 12px 10px;
    border-top: 0;
    border-bottom: 1px solid var(--adm-border);
    vertical-align: middle;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs > tbody > tr.product:last-of-type > td
{
    border-bottom: 0;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs > tbody > tr.product:hover > td
{
    background: #fafbfe;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_checkbox
{
    width: 36px;
    padding-left: 14px;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_poza
{
    width: 96px;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_poza img
{
    width: 72px;
    height: 72px;
    max-height: none;
    object-fit: contain;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_poza img::before
{
    background-color: var(--adm-surface-alt);
    background-size: 22px;
    border-radius: var(--adm-radius);
    opacity: .7;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info
{
    font-size: 13px;
    color: var(--adm-muted);
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info li
{
    margin: 0 0 2px;
    line-height: 1.5;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info li b
{
    font-weight: 600;
    color: var(--adm-text);
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info li:first-child
{
    margin-bottom: 4px;
    font-size: 14px;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info li:first-child b a
{
    color: var(--adm-text);
    text-decoration: none;
    transition: color var(--adm-transition);
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info li:first-child b a:hover
{
    color: var(--adm-brand);
    text-decoration: underline;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info .children-button
{
    margin-top: 4px;
    padding: 3px 10px;
    font-weight: 500;
    color: var(--adm-brand);
    background: var(--adm-brand-tint);
    border: 1px solid transparent;
    border-radius: var(--adm-radius-pill);
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_info .children-button:hover
{
    border-color: var(--adm-brand-soft);
}

/* status button: keep the meaning colours, calmer shape */
body.admin-new-theme.ProductManagement-css .tabel_rand_produs .btnStatus
{
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--adm-radius-pill);
    box-shadow: none;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .btnStatus .caret
{
    margin-left: 4px;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .dropdown-menu
{
    padding: 4px;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: 0 12px 28px -12px rgba(16, 24, 40, .25);
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .dropdown-menu > li > a.btn
{
    display: block;
    text-align: left;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .dropdown-menu > li > a.btn:hover
{
    background: var(--adm-surface-alt);
}

/* row actions: one tidy column of equal buttons */
body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_actiuni
{
    width: 130px;
    padding-right: 14px;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_actiuni br
{
    display: none;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_actiuni .btn
{
    display: block;
    width: 100%;
    margin: 0 0 4px;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 8px;
}

body.admin-new-theme.ProductManagement-css .tabel_rand_produs .col_actiuni .btn:last-of-type
{
    margin-bottom: 0;
}

/* ---------- categoryEdit ---------- */

body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs
{
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 16px;
    padding: 4px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs > li
{
    float: none;
    margin: 0;
}

body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs > li > a
{
    margin: 0;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-muted);
    border: 0;
    border-radius: var(--adm-radius);
    background: transparent;
    transition: background var(--adm-transition), color var(--adm-transition);
}

body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs > li > a:hover
{
    color: var(--adm-text);
    background: var(--adm-surface-alt);
}

body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs > li.active > a,
body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs > li.active > a:hover,
body.admin-new-theme.categoryEdit-css .categories-module #tabs > .nav-tabs > li.active > a:focus
{
    color: var(--adm-brand);
    font-weight: 600;
    background: var(--adm-brand-tint);
    border: 0;
}

body.admin-new-theme.categoryEdit-css .categories-module #tabs > .tab-content
{
    padding: 20px 24px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.categoryEdit-css .edit_category_section > h2
{
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 500;
    color: var(--adm-muted);
}

body.admin-new-theme.categoryEdit-css .edit_category_section > h2 strong
{
    font-weight: 600;
    color: var(--adm-text);
}

body.admin-new-theme.categoryEdit-css .edit_category_section .form-horizontal > .form-group
{
    margin-bottom: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--adm-surface-alt);
}

body.admin-new-theme.categoryEdit-css .edit_category_section .form-horizontal > .form-group > label
{
    padding-top: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-muted);
}

body.admin-new-theme.categoryEdit-css .edit_category_section .form-horizontal > .form-group:last-child
{
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin: 12px -24px -20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, .94);
    border-top: 1px solid var(--adm-border);
    border-bottom: 0;
    border-radius: 0 0 var(--adm-radius-lg) var(--adm-radius-lg);
    backdrop-filter: blur(6px);
}

body.admin-new-theme.categoryEdit-css .edit_category_section .form-horizontal > .form-group:last-child input[type="submit"]
{
    padding: 9px 22px;
    font-weight: 600;
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow-raised);
}

body.admin-new-theme.categoryEdit-css .edit_category_section input[type="checkbox"]
{
    accent-color: var(--adm-brand);
}

/* ---------- productsList on a phone: each product as a stacked card row ---------- */

@media (max-width: 767px)
{
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse > tbody,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse > tbody > tr,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.products-table-wrapper,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.products-table-wrapper > table,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.products-table-wrapper > table > tbody
    {
        display: block;
        width: 100%;
        white-space: normal;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.products-table-wrapper > table > tbody > tr
    {
        display: grid;
        grid-template-columns: 22px 64px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 12px 10px;
        border-bottom: 1px solid var(--adm-border);
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.products-table-wrapper > table > tbody > tr > td
    {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_info,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_info *
    {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_poza img
    {
        width: 64px;
        height: 64px;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.product-is-ready-to-go-online,
    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_actiuni
    {
        grid-column: 1 / -1;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_actiuni
    {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_actiuni br
    {
        display: none;
    }

    body.admin-new-theme.ProductManagement-css .tabel_afisare_produse td.col_actiuni > .btn
    {
        flex: 1 1 0;
        width: auto;
        margin: 0;
    }
}

/* Variation edit page: the picture in its own column, big enough to tell products apart when packing an order, next to the form split into sections and the prices and orders */

.variation-edit
{
    --variation-sticky-top: 76px;
    padding: 4px 0 24px;
    color: var(--adm-text);
}

.variation-edit-head
{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 20px;
}

.variation-edit-eyebrow
{
    color: var(--adm-brand);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.variation-edit-head h1
{
    margin: 0;
    padding: 0;
    color: var(--adm-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.variation-edit-layout
{
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 20px;
    align-items: start;
}

.variation-edit-media
{
    position: sticky;
    top: var(--variation-sticky-top);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variation-edit .variation-picture-link
{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    background: var(--adm-surface-alt);
    cursor: zoom-in;
}

.variation-edit .variation-picture
{
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--variation-sticky-top) - 90px);
    object-fit: contain;
    transition: transform .3s ease;
}

.variation-edit .variation-picture-link:hover .variation-picture
{
    transform: scale(1.03);
}

.variation-picture-zoom
{
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    border-radius: var(--adm-radius-pill);
    background: rgba(23, 26, 33, .72);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--adm-transition);
}

.variation-edit .variation-picture-link:hover .variation-picture-zoom,
.variation-edit .variation-picture-link:focus-visible .variation-picture-zoom
{
    opacity: 1;
}

.variation-edit .variation-picture-change
{
    align-self: flex-start;
}

.variation-edit-form,
.variation-edit-side
{
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.variation-card
{
    padding: 18px 20px;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    background: var(--adm-surface);
    box-shadow: var(--adm-shadow);
}

.variation-card-title,
.variation-card h3
{
    margin: 0 0 14px;
    padding: 0;
    color: var(--adm-text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.variation-fields
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px 16px;
}

.variation-fields-four
{
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.variation-field
{
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-weight: 400;
}

.variation-edit .variation-field-label
{
    margin: 0;
    color: var(--adm-muted);
    font-size: 12px;
    font-weight: 500;
}

.variation-field-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.variation-statuses
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.variation-status
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-sm);
    font-weight: 400;
    cursor: pointer;
    transition: border-color var(--adm-transition), background var(--adm-transition);
}

.variation-status:hover
{
    border-color: var(--adm-brand-soft);
}

.variation-status:has(input[type="radio"]:checked)
{
    border-color: var(--adm-brand);
    background: var(--adm-brand-tint);
    color: var(--adm-brand);
    font-weight: 600;
}

.variation-status input[type="radio"]
{
    flex: none;
    margin: 0;
}

.variation-status span
{
    flex: 1 1 auto;
    min-width: 0;
    word-break: normal;
}

.variation-edit .variation-status-date
{
    flex: 1 0 100%;
    width: auto;
    height: 28px;
}

.variation-check
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-weight: 400;
}

.variation-check input[type="checkbox"]
{
    margin: 0;
}

.variation-edit .variation-free-shipping-qty
{
    display: none;
    width: 80px;
    height: 28px;
}

.variation-attribute
{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.variation-empty,
.variation-hint
{
    margin: 0;
    color: var(--adm-muted);
    font-size: 12px;
}

.variation-hint
{
    margin-top: 12px;
}

.variation-edit-actions
{
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding: 4px 0 12px;
}

.variation-card-scroll
{
    overflow-x: auto;
}

.variation-edit .productTimeline
{
    width: 100%;
    font-size: 12px;
}

.variation-edit .productTimeline td
{
    padding: 3px 8px 3px 0;
    white-space: nowrap;
}

.variation-edit #related-products
{
    float: none;
}

.variation-edit .variation-card ul
{
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 1499px)
{
    .variation-edit-layout
    {
        grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    }

    .variation-edit-side
    {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
        align-items: start;
    }
}

@media (max-width: 900px)
{
    .variation-edit-layout
    {
        grid-template-columns: minmax(0, 1fr);
    }

    .variation-edit-media
    {
        position: static;
    }

    .variation-edit .variation-picture
    {
        max-height: 60vh;
    }

    .variation-edit-side
    {
        grid-template-columns: minmax(0, 1fr);
    }

    .variation-edit-head h1
    {
        font-size: 22px;
    }

    .variation-edit-actions .btn
    {
        width: 100%;
        box-shadow: var(--adm-shadow-raised);
    }
}

/* Product edit page, general tab: the picture fills its own column next to the status tiles; the form puts each label
   next to its field without empty columns, and on wide screens the short fields go two per row */

body.admin-new-theme.productEdit-css .productEditGeneral > .row:first-child
{
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 20px;
}

body.admin-new-theme.productEdit-css .productEditGeneral > .row:first-child::before,
body.admin-new-theme.productEdit-css .productEditGeneral > .row:first-child::after,
body.admin-new-theme.productEdit-css #tab_general_products::before,
body.admin-new-theme.productEdit-css #tab_general_products::after,
body.admin-new-theme.productEdit-css #tab_general_products .form-group::before,
body.admin-new-theme.productEdit-css #tab_general_products .form-group::after,
body.admin-new-theme.productEdit-css #tab_general_products .row:has(> .col-md-1)::before,
body.admin-new-theme.productEdit-css #tab_general_products .row:has(> .col-md-1)::after
{
    display: none;
}

body.admin-new-theme.productEdit-css #pictureGroup,
body.admin-new-theme.productEdit-css #statusGroup
{
    float: none;
    width: auto;
    padding: 0;
}

body.admin-new-theme.productEdit-css #pictureGroup > a
{
    display: block;
}

body.admin-new-theme.productEdit-css #pictureGroup .large_thumbnail
{
    width: 100%;
    height: auto;
    max-height: 440px;
    border-radius: var(--adm-radius-lg);
}

body.admin-new-theme.productEdit-css #tab_general_products
{
    padding: 12px 20px;
}

body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12
{
    float: none;
    padding: 0;
}

body.admin-new-theme.productEdit-css #tab_general_products .form-group
{
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
}

body.admin-new-theme.productEdit-css #tab_general_products .form-group > [class*="col-"]
{
    float: none;
    width: auto;
    padding: 0;
}

body.admin-new-theme.productEdit-css #tab_general_products .form-group:not(:has(> .control-label))
{
    display: block;
}

body.admin-new-theme.productEdit-css #tab_general_products .form-group > :only-child,
body.admin-new-theme.productEdit-css #tab_general_products .form-group > :nth-child(n+3)
{
    grid-column: 1 / -1;
}

body.admin-new-theme.productEdit-css #tab_general_products .control-label
{
    text-align: left;
}

body.admin-new-theme.productEdit-css #tab_general_products .row:has(> .col-md-1)
{
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px !important;
}

body.admin-new-theme.productEdit-css #tab_general_products .row:has(> .col-md-1) > [class*="col-"]
{
    float: none;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0;
}

body.admin-new-theme.productEdit-css #tab_general_products .row:has(> .col-md-1) > .col-md-1
{
    flex: none;
    min-width: 28px;
    padding: 2px 6px;
    border-radius: var(--adm-radius-pill);
    background: var(--adm-surface-alt);
    color: var(--adm-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}

body.admin-new-theme.productEdit-css #tab_general_products .row:has(> .col-md-1) > .seo-name-edit
{
    flex: none;
}

@media (min-width: 1600px)
{
    body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12
    {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 40px;
    }

    body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12 > :not(.form-group),
    body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12 > .form-group:has(.row > .col-md-1),
    body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12 > .form-group:has(> :only-child),
    body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12 > .form-group:not(:has(> .control-label)),
    body.admin-new-theme.productEdit-css #tab_general_products > .col-xs-12 > .form-group:has(textarea)
    {
        grid-column: 1 / -1;
    }

    body.admin-new-theme.productEdit-css #tab_general_products #priceGroup,
    body.admin-new-theme.productEdit-css #tab_general_products #manufacturerGroup,
    body.admin-new-theme.productEdit-css #tab_general_products #lengthGroup,
    body.admin-new-theme.productEdit-css #tab_general_products #measurementunitGroup,
    body.admin-new-theme.productEdit-css #tab_general_products #descriptionGroup
    {
        grid-column-start: 1;
        margin-top: 0;
        padding-top: 10px;
        border-top: 0;
    }
}

@media (max-width: 767px)
{
    body.admin-new-theme.productEdit-css .productEditGeneral > .row:first-child,
    body.admin-new-theme.productEdit-css #tab_general_products .form-group
    {
        grid-template-columns: minmax(0, 1fr);
    }

    body.admin-new-theme.productEdit-css #pictureGroup .large_thumbnail
    {
        max-height: 50vh;
    }
}

/* Product edit page on a phone: the tabs are one row that scrolls sideways under the admin header, instead of a
   list of twenty links that pushes the form below the first screen */

@media (max-width: 767px)
{
    body.admin-new-theme.productEdit-css .selection-tabs
    {
        top: 50px;
        z-index: 5;
        width: 100%;
        margin: 0 0 12px;
        padding: 6px 0;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul.navbar
    {
        display: flex;
        gap: 4px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul.navbar::-webkit-scrollbar
    {
        display: none;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul li
    {
        flex: none;
        margin: 0;
    }

    body.admin-new-theme.productEdit-css .selection-tabs ul li a
    {
        white-space: nowrap;
    }

    body.admin-new-theme.productEdit-css #tabs > .col-sm-9
    {
        width: 100%;
        padding: 0;
    }

    body.admin-new-theme.productEdit-css #tabs .ui-tabs-panel
    {
        padding: 14px;
    }

    body.admin-new-theme.productEdit-css .productEditGeneral > .row:first-child,
    body.admin-new-theme.productEdit-css #tab_general_products
    {
        padding: 14px;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row
    {
        flex-wrap: nowrap;
        padding: 8px 10px;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton
    {
        width: auto;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton:first-child
    {
        flex: 1 1 auto;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton:first-child .btn
    {
        width: 100%;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton button.btn
    {
        padding: 8px 12px;
        font-size: 0;
    }

    body.admin-new-theme.productEdit-css #tab_general_products + .row .productEditButton button.btn i
    {
        font-size: 15px;
    }
}

/* Product edit page, related products tab: the search, the notes with each group's link settings, the groups as one
   segmented row and the related products as cards you drag to reorder */

body.admin-new-theme.productEdit-css #related_product_add_input
{
    display: grid;
    grid-template-columns: minmax(0, 420px) auto;
    justify-content: start;
    align-items: center;
    gap: 6px 8px;
}

body.admin-new-theme.productEdit-css #related_product_add_input label
{
    grid-column: 1 / -1;
    margin: 0;
    font-weight: 600;
}

body.admin-new-theme.productEdit-css #related_product_add_input .autocomplete
{
    width: 100%;
    text-indent: 0;
}

body.admin-new-theme.productEdit-css .related-product-checkbox
{
    margin: 10px 0 16px;
}

body.admin-new-theme.productEdit-css .related-product-checkbox label
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
}

body.admin-new-theme.productEdit-css .related-product-checkbox input
{
    margin: 0;
}

body.admin-new-theme.productEdit-css .related-products-notes
{
    padding: 12px 14px;
    color: var(--adm-text-soft);
    background: var(--adm-info-bg);
    border-radius: var(--adm-radius);
}

body.admin-new-theme.productEdit-css .related-products-notes p
{
    margin: 0 0 6px;
}

body.admin-new-theme.productEdit-css .related-products-notes .icon-info-sign
{
    color: var(--adm-info);
}

body.admin-new-theme.productEdit-css .related-products-notes a
{
    color: var(--adm-brand);
    font-weight: 600;
    text-decoration: underline;
}

body.admin-new-theme.productEdit-css .related-products-group-links
{
    margin-top: 10px;
    font-size: 12px;
}

body.admin-new-theme.productEdit-css .related-products-group-links th,
body.admin-new-theme.productEdit-css .related-products-group-links td
{
    padding: 4px 20px 4px 0;
    text-align: left;
    border-top: 1px solid rgba(23, 92, 211, .12);
}

body.admin-new-theme.productEdit-css .related-products-group-links th
{
    color: var(--adm-muted);
    font-weight: 600;
    border-top: 0;
}

body.admin-new-theme.productEdit-css .related-link-state
{
    display: inline-block;
    padding: 0 8px;
    line-height: 18px;
    color: var(--adm-muted);
    background: var(--adm-surface);
    border-radius: var(--adm-radius-pill);
}

body.admin-new-theme.productEdit-css .related-link-state.is-on
{
    color: var(--adm-success);
    background: var(--adm-success-bg);
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 20px 0 16px;
    padding: 4px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav::before,
body.admin-new-theme.productEdit-css #tabs .related-groups-nav::after
{
    display: none;
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li
{
    float: none;
    margin: 0;
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.related-products-group > a
{
    margin: 0;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    color: var(--adm-muted);
    background: transparent;
    border: 0;
    border-radius: var(--adm-radius);
    transition: background var(--adm-transition), color var(--adm-transition);
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.related-products-group > a:hover
{
    color: var(--adm-text);
    background: var(--adm-surface-alt);
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.related-products-group.active > a,
body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.related-products-group.active > a:hover,
body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.related-products-group.active > a:focus
{
    color: var(--adm-brand);
    font-weight: 600;
    background: var(--adm-brand-tint);
    border: 0;
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.pull-right
{
    margin-left: auto;
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav .new-related-group
{
    margin: 0;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 18px;
    color: var(--adm-text-soft);
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-sm);
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav .new-related-group:hover,
body.admin-new-theme.productEdit-css #tabs .related-groups-nav .new-related-group:focus
{
    color: var(--adm-text);
    background: var(--adm-surface-alt);
    border-color: #d5d9e3;
}

body.admin-new-theme.productEdit-css #tabs .related-groups-nav .new-related-group .icon-plus
{
    margin-right: 4px;
    color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #related-products-tab-contents
{
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    min-height: 0;
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product
{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    cursor: grab;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    transition: border-color var(--adm-transition), box-shadow var(--adm-transition);
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product:hover
{
    border-color: #d5d9e3;
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product > .text-center
{
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product img
{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product h3
{
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    overflow-wrap: anywhere;
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product h3 a
{
    font-size: inherit;
    line-height: inherit;
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-product h3 a:hover
{
    color: var(--adm-brand);
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-delete-btn
{
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 14px;
    color: var(--adm-danger);
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-sm);
}

body.admin-new-theme.productEdit-css #related-products-tab-contents .related-delete-btn:hover
{
    color: #ffffff;
    background: var(--adm-danger);
    border-color: var(--adm-danger);
    filter: none;
}

@media (max-width: 767px)
{
    body.admin-new-theme.productEdit-css #related_product_add_input
    {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body.admin-new-theme.productEdit-css #related-products-tab-contents
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* the groups as one row scrolled sideways, like the product tabs above: the right edge fades out and the chosen
       group docks at the edge it is swiped past */
    body.admin-new-theme.productEdit-css #tabs .related-groups-nav
    {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding-right: 0;
    }

    body.admin-new-theme.productEdit-css #tabs .related-groups-nav::-webkit-scrollbar
    {
        display: none;
    }

    body.admin-new-theme.productEdit-css #tabs .related-groups-nav::after
    {
        content: '';
        display: block;
        position: sticky;
        right: 0;
        z-index: 1;
        flex: 0 0 40px;
        align-self: stretch;
        background: linear-gradient(to right, transparent, var(--adm-surface));
        pointer-events: none;
    }

    body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li
    {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li > a
    {
        white-space: nowrap;
    }

    body.admin-new-theme.productEdit-css #tabs .related-groups-nav > li.related-products-group.active
    {
        position: sticky;
        left: 0;
        right: 0;
        z-index: 2;
        border-radius: var(--adm-radius);
        box-shadow: 0 0 0 4px var(--adm-surface);
    }
}
