/* Merchant navigation, category lists and upload controls share Bistrivo's existing palette. */
.merchant-sidebar .sidebar-view-menu {
    display: block;
    padding: 10px 13px;
    margin-bottom: 10px;
}
.sidebar-disclosure > summary {
    display: none;
}
.merchant-sidebar nav {
    gap: 6px;
    white-space: normal;
}
.sidebar-group {
    margin-top: 22px;
}
.sidebar-group h2 {
    position: relative;
    margin: 0 0 9px;
    padding-left: 13px;
    font-family: inherit;
    font-size: 10px;
    line-height: 1.6;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--muted);
}
.sidebar-group h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 3px;
    background: var(--ink);
}
.sidebar-footer {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.action-menu {
    position: relative;
    flex-shrink: 0;
}
.action-menu > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.action-menu > summary::-webkit-details-marker {
    display: none;
}
.action-menu-options {
    position: absolute;
    z-index: 15;
    right: 0;
    top: calc(100% + 7px);
    width: 290px;
    max-width: calc(100vw - 36px);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(24, 60, 49, .1);
    text-align: left;
}
.action-menu-options a {
    display: block;
    padding: 13px 12px;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.5;
}
.action-menu-options a:hover,
.action-menu-options a:focus-visible {
    background: #edf1e6;
}
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}
.products-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 13px;
}
.products-category {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
}
.products-category > header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 22px;
    background: #f0f2e9;
}
.products-category h2 {
    margin: 0;
    font-size: 25px;
}
.products-category > header > span {
    font-size: 12px;
    color: var(--muted);
}
.product-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.5fr) minmax(90px, .8fr) minmax(120px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 21px 22px;
    border-top: 1px solid var(--line);
}
.product-row h3 {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}
.product-row-price {
    font-size: 14px;
}
.product-row-price small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}
.product-row-status,
.product-unavailable {
    font-size: 12px;
    color: var(--muted);
}
.product-row .row-actions {
    justify-content: flex-end;
    gap: 14px;
    font-size: 12px;
}
.product-row .row-actions a,
.product-row .text-button {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.product-create-panel {
    margin: 28px 0;
    scroll-margin-top: 20px;
}
.product-create-panel > summary {
    padding: 16px 0;
    font-weight: 600;
    cursor: pointer;
}
.product-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 22px;
    margin-top: 10px;
    align-items: start;
}
#product-form {
    scroll-margin-top: 25px;
}
.qr-panel .action-menu-options {
    width: 180px;
    right: auto;
    left: 0;
}
/* The native file input stays focusable and opens the device's own photo picker. */
.gallery-upload {
    padding: 0;
    border: 0;
    background: transparent;
}
.gallery-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 32px 20px;
    text-align: center;
    border: 2px dashed #abb9a3;
    border-radius: 18px;
    background: #f0f3e9;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.gallery-dropzone strong {
    font-size: 21px;
    font-weight: 600;
}
.gallery-dropzone > span:not(.button) {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}
.gallery-upload-icon {
    width: 48px;
    height: 48px;
}
.gallery-dropzone .button {
    margin-top: 4px;
    background: #fff;
}
.gallery-dropzone:hover,
.gallery-dropzone.is-dragging {
    border-color: var(--ink);
    background: #e4ebdb;
}
.gallery-dropzone:focus-within,
.action-menu > summary:focus-visible,
.sidebar-disclosure > summary:focus-visible {
    outline: 3px solid #b68131;
    outline-offset: 4px;
}
.has-upload-enhancement .gallery-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.gallery-dropzone.is-disabled {
    opacity: .6;
    cursor: default;
}
.gallery-upload-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.gallery-upload-footer .gallery-upload-status {
    flex: 1;
    color: var(--muted);
}
.gallery-upload-status.is-error {
    color: #a33c30;
}
.gallery-selection:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 0;
    margin: 20px 0;
    list-style: none;
}
.gallery-selection li {
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-wrap: anywhere;
    font-size: 12px;
}
.gallery-selection img {
    display: block;
    width: 100%;
    height: 85px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 8px;
}
.demo-interactions {
    margin-top: 30px;
    scroll-margin-top: 25px;
}
.demo-interactions p {
    margin: 0 0 10px;
}
@media (max-width: 1100px) {
    .product-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .product-row-price {
        text-align: right;
    }
    .product-form-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 760px) {
    .sidebar-disclosure > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 13px;
        border: 1px solid var(--line);
        border-radius: 9px;
        font-size: 14px;
        cursor: pointer;
    }
    .sidebar-disclosure[open] > summary {
        margin-bottom: 15px;
    }
    .merchant-sidebar nav {
        display: block;
        overflow: visible;
        margin-bottom: 20px;
    }
    .merchant-sidebar .sidebar-group {
        margin-top: 20px;
    }
    .merchant-sidebar nav a {
        min-height: 44px;
    }
    .merchant-sidebar form {
        display: block;
        margin: 12px 13px 0;
    }
    .products-toolbar {
        justify-content: space-between;
        gap: 20px;
    }
    .products-tools {
        width: 100%;
    }
    .products-toolbar .action-menu {
        width: 100%;
    }
    .products-toolbar .action-menu-options {
        width: 100%;
    }
    .product-row {
        padding: 18px;
        gap: 10px;
    }
    .product-row .row-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px 20px;
    }
    .product-row .row-actions a,
    .product-row .row-actions button {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
    .product-row-status {
        grid-column: 1 / -1;
    }
    .gallery-dropzone {
        padding: 25px 15px;
    }
    .gallery-upload-footer > [type="submit"] {
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-dropzone {
        transition: none;
    }
}
