/* =========================================================
   FACEVALY ADMIN PRODUCT MANAGEMENT
   File: resources/js/Pages/Admin/admin-products.css
========================================================= */

.apm-page,
.apm-page * {
    box-sizing: border-box;
}

.apm-page {
    --apm-orange: #ff5a00;
    --apm-orange-dark: #e94f00;
    --apm-orange-soft: #fff4ee;
    --apm-text: #172033;
    --apm-muted: #7b8799;
    --apm-border: #e2e7ef;
    --apm-bg: #f7f9fc;
    --apm-white: #ffffff;
    --apm-green: #159466;
    --apm-red: #dc4040;
    --apm-blue: #3b82f6;
    --apm-purple: #7156e8;
    --apm-shadow: 0 8px 26px rgba(15, 23, 42, 0.055);

    width: 100%;
    color: var(--apm-text);
}

.apm-page button,
.apm-page input,
.apm-page select,
.apm-page textarea {
    font: inherit;
}

.apm-page button {
    cursor: pointer;
}

.apm-page button:disabled,
.apm-page select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.apm-page a {
    text-decoration: none;
}

/* =========================================================
   PAGE HEADER
========================================================= */

.apm-page-head {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.apm-page-head > div {
    min-width: 0;
}

.apm-page-head > div > span {
    display: block;
    margin-bottom: 5px;
    color: var(--apm-orange);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.apm-page-head h1 {
    margin: 0;
    color: #101828;
    font-size: clamp(23px, 2.3vw, 31px);
    font-weight: 780;
    letter-spacing: -0.6px;
}

.apm-page-head p {
    max-width: 780px;
    margin: 6px 0 0;
    color: var(--apm-muted);
    font-size: 11px;
    line-height: 1.55;
}

.apm-refresh,
.apm-primary-btn,
.apm-secondary-btn,
.apm-success-btn,
.apm-danger-btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 700;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.apm-primary-btn {
    background: var(--apm-orange);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 90, 0, 0.18);
}

.apm-primary-btn:hover:not(:disabled) {
    background: var(--apm-orange-dark);
    transform: translateY(-1px);
}

.apm-secondary-btn,
.apm-refresh {
    border-color: var(--apm-border);
    background: #fff;
    color: #4d5b70;
}

.apm-secondary-btn:hover:not(:disabled),
.apm-refresh:hover:not(:disabled) {
    border-color: #d3dae5;
    background: #f9fafb;
}

.apm-success-btn {
    background: #13a36f;
    color: #fff;
}

.apm-success-btn:hover:not(:disabled) {
    background: #0d8b5e;
}

.apm-danger-btn {
    border-color: #ffd0d0;
    background: #fff3f3;
    color: #d33c3c;
}

.apm-danger-btn:hover:not(:disabled) {
    background: #ffe9e9;
}

.apm-success-btn.full-width {
    width: 100%;
}

/* =========================================================
   METRICS
========================================================= */

.apm-metrics {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.apm-metrics article {
    min-width: 0;
    min-height: 91px;
    padding: 14px;
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    box-shadow: var(--apm-shadow);
}

.apm-metric-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.apm-metric-icon.blue {
    background: #edf5ff;
    color: #377ee9;
}

.apm-metric-icon.green {
    background: #eafaf3;
    color: #10a16a;
}

.apm-metric-icon.amber {
    background: #fff7e6;
    color: #e79a08;
}

.apm-metric-icon.purple {
    background: #f2efff;
    color: #6c54df;
}

.apm-metric-icon.red {
    background: #fff0f1;
    color: #eb4852;
}

.apm-metric-icon.slate {
    background: #f1f5f9;
    color: #64748b;
}

.apm-metrics article > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.apm-metrics small {
    color: #718096;
    font-size: 9px;
    font-weight: 650;
}

.apm-metrics strong {
    margin-top: 2px;
    color: #1f2a3d;
    font-size: 20px;
    line-height: 1.1;
}

.apm-metrics article > div > span {
    margin-top: 4px;
    overflow: hidden;
    color: #9aa4b3;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   CARD / FILTERS
========================================================= */

.apm-card {
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--apm-shadow);
}

.apm-control-card {
    margin-bottom: 14px;
    overflow: hidden;
}

.apm-filters {
    padding: 11px;
    display: grid;
    grid-template-columns:
        minmax(250px, 2fr)
        minmax(160px, 0.9fr)
        minmax(160px, 0.9fr)
        auto
        auto;
    gap: 8px;
    border-bottom: 1px solid #edf0f4;
}

.apm-filters > select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dbe1e9;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #445168;
    font-size: 10px;
}

.apm-search {
    height: 38px;
    min-width: 0;
    display: flex;
    align-items: center;
    border: 1px solid #dbe1e9;
    border-radius: 8px;
    background: #fff;
}

.apm-search:focus-within,
.apm-filters > select:focus {
    border-color: #ff9c65;
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.08);
}

.apm-search i {
    margin-left: 12px;
    color: #9da8b7;
    font-size: 11px;
}

.apm-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #344054;
    font-size: 11px;
}

.apm-search input::placeholder {
    color: #9da7b6;
}

/* =========================================================
   TABS
========================================================= */

.apm-tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    overflow-x: auto;
    padding: 6px 8px 5px;
    scrollbar-width: thin;
    scrollbar-color: #aeb7c4 transparent;
}

.apm-tabs::-webkit-scrollbar {
    height: 5px;
}

.apm-tabs::-webkit-scrollbar-thumb {
    background: #aeb7c4;
    border-radius: 20px;
}

.apm-tab {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 10px;
    border: 0;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #667085;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.apm-tab:hover {
    background: #fffaf7;
    color: var(--apm-orange);
}

.apm-tab.active {
    border-bottom-color: var(--apm-orange);
    background: #fff6f0;
    color: var(--apm-orange);
}

.apm-tab span {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef1f5;
    color: #637083;
    font-size: 8px;
    font-weight: 800;
}

.apm-tab.active span {
    background: #ffe6d8;
    color: var(--apm-orange);
}

/* =========================================================
   BULK ACTION BAR
========================================================= */

.apm-bulk-bar {
    position: sticky;
    top: 77px;
    z-index: 30;
    min-height: 54px;
    margin-bottom: 13px;
    padding: 8px 10px;
    border: 1px solid #ffd5bd;
    border-radius: 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 249, 245, 0.97);
    box-shadow: 0 8px 24px rgba(255, 90, 0, 0.09);
    backdrop-filter: blur(8px);
}

.apm-bulk-count {
    display: flex;
    align-items: center;
    gap: 7px;
}

.apm-bulk-count strong {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apm-orange);
    color: #fff;
    font-size: 10px;
}

.apm-bulk-count span {
    color: #445168;
    font-size: 10px;
    font-weight: 700;
}

.apm-clear-selection {
    padding: 0;
    border: 0;
    background: transparent;
    color: #7b8797;
    font-size: 9px;
    font-weight: 700;
}

.apm-bulk-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
}

.apm-bulk-controls select {
    height: 36px;
    min-width: 165px;
    padding: 0 10px;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #465268;
    font-size: 10px;
}

/* =========================================================
   ERROR
========================================================= */

.apm-error {
    margin-bottom: 13px;
    padding: 11px 13px;
    border: 1px solid #ffd0d0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff4f4;
    color: #d43d3d;
    font-size: 10px;
    font-weight: 650;
}

/* =========================================================
   TABLE
========================================================= */

.apm-table-card {
    overflow: hidden;
}

.apm-table-wrap {
    width: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #aeb7c4 transparent;
}

.apm-table-wrap::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.apm-table-wrap::-webkit-scrollbar-thumb {
    background: #aeb7c4;
    border-radius: 20px;
}

.apm-table {
    width: 100%;
    min-width: 1300px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.apm-table th {
    height: 42px;
    padding: 0 9px;
    border-bottom: 1px solid #dde4ed;
    background: #f8fafc;
    color: #718096;
    text-align: left;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    white-space: nowrap;
}

.apm-table td {
    min-height: 80px;
    padding: 10px 9px;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
    color: #344054;
    font-size: 9.5px;
}

.apm-table tbody tr {
    background: #fff;
    transition: background 0.18s ease;
}

.apm-table tbody tr:hover {
    background: #fcfdff;
}

.apm-table tbody tr.deleted-row {
    background: #fbfcfd;
    opacity: 0.88;
}

.apm-table tbody tr:last-child td {
    border-bottom: 0;
}

.apm-table input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--apm-orange);
}

.apm-table .check-col {
    width: 34px;
    text-align: center;
}

/* PRODUCT CELL */

.apm-product-cell {
    min-width: 220px;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    background: transparent;
    text-align: left;
}

.apm-product-thumb {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border: 1px solid #e4e9f0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f8fa;
    color: #a2acba;
}

.apm-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apm-product-cell > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.apm-product-cell strong {
    max-width: 210px;
    overflow: hidden;
    color: #273448;
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apm-product-cell:hover strong {
    color: var(--apm-orange);
}

.apm-product-cell small {
    margin-top: 3px;
    color: #8995a7;
    font-size: 8px;
}

.apm-product-cell em {
    margin-top: 2px;
    color: #adb5c0;
    font-size: 7.5px;
    font-style: normal;
}

/* SELLER */

.apm-seller-cell {
    min-width: 165px;
}

.apm-seller-main {
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    text-align: left;
}

.apm-shop-avatar {
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff0e7;
    color: var(--apm-orange);
    font-size: 10px;
    font-weight: 800;
}

.apm-shop-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apm-shop-avatar.large {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 15px;
}

.apm-shop-avatar.xlarge {
    width: 62px;
    height: 62px;
    border-radius: 15px;
    font-size: 22px;
}

.apm-seller-main > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.apm-seller-main strong {
    max-width: 130px;
    overflow: hidden;
    color: #344054;
    font-size: 9.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apm-seller-main:hover strong {
    color: var(--apm-orange);
}

.apm-seller-main small {
    margin-top: 2px;
    color: #98a2b3;
    font-size: 7.5px;
}

.apm-shop-phone-row {
    margin-top: 5px;
    margin-left: 39px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.apm-shop-phone-row > a:first-child {
    max-width: 112px;
    overflow: hidden;
    color: #667085;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apm-wa {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #14b866;
    color: #fff;
    font-size: 11px;
}

/* CATEGORY */

.apm-category-list {
    min-width: 115px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.apm-category-list > span:not(.muted) {
    padding: 3px 6px;
    border-radius: 5px;
    background: #f2f4f7;
    color: #596579;
    font-size: 7.5px;
    font-weight: 650;
}

.apm-category-list .muted,
.apm-category-list small {
    color: #9aa4b2;
    font-size: 7.5px;
}

/* PRICE / STOCK */

.apm-price,
.apm-stock {
    display: block;
    color: #182230;
    font-size: 11px;
    font-weight: 800;
}

.apm-regular-price {
    display: block;
    margin-top: 3px;
    color: #98a2b3;
    font-size: 8px;
    text-decoration: line-through;
}

.apm-table td[data-label="Stock"] > small {
    display: block;
    margin-top: 3px;
    color: #8994a5;
    font-size: 7.5px;
}

/* APPROVAL */

.apm-approval-select {
    min-width: 105px;
    height: 31px;
    padding: 0 24px 0 9px;
    border: 1px solid #dbe1e8;
    border-radius: 7px;
    outline: 0;
    background: #fff;
    color: #536074;
    font-size: 8.5px;
    font-weight: 700;
}

.apm-approval-select.approved {
    border-color: #afe7d0;
    background: #effcf6;
    color: #11875b;
}

.apm-approval-select.pending {
    border-color: #f2d79e;
    background: #fff9e9;
    color: #b5790b;
}

.apm-approval-select.draft {
    border-color: #dbe1e8;
    background: #f8fafc;
    color: #657185;
}

.apm-approval-select.rejected {
    border-color: #ffc7c7;
    background: #fff2f2;
    color: #d03d3d;
}

.apm-status {
    min-height: 25px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e5ec;
    background: #f8fafc;
    color: #667085;
    font-size: 7.5px;
    font-weight: 750;
}

.apm-status-approved,
.apm-status-active {
    border-color: #afe7d0;
    background: #effcf6;
    color: #11875b;
}

.apm-status-pending {
    border-color: #f2d79e;
    background: #fff9e9;
    color: #b5790b;
}

.apm-status-rejected,
.apm-status-suspended,
.apm-status-inactive {
    border-color: #ffc7c7;
    background: #fff2f2;
    color: #d03d3d;
}

.apm-status-draft {
    border-color: #dce2ea;
    background: #f8fafc;
    color: #657185;
}

/* PUBLISH TOGGLE */

.apm-publish-toggle {
    min-width: 94px;
    height: 29px;
    padding: 0 8px;
    border: 1px solid #dfe5ec;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #768296;
    font-size: 7.5px;
    font-weight: 700;
}

.apm-publish-toggle > span {
    position: relative;
    width: 23px;
    height: 13px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #d8dee7;
    transition: background 0.2s ease;
}

.apm-publish-toggle > span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.apm-publish-toggle.on {
    border-color: #b7ead5;
    background: #f2fcf7;
    color: #12845a;
}

.apm-publish-toggle.on > span {
    background: #16a36e;
}

.apm-publish-toggle.on > span::after {
    transform: translateX(10px);
}

.apm-mini-badge {
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 7.5px;
    font-weight: 750;
}

.apm-mini-badge.yes {
    background: #ecfbf4;
    color: #12845a;
}

.apm-mini-badge.no {
    background: #f3f5f8;
    color: #758095;
}

.apm-date {
    max-width: 105px;
    display: block;
    color: #7f8a9c;
    font-size: 8px;
    line-height: 1.4;
}

/* ACTIONS */

.apm-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.apm-actions button {
    width: 29px;
    height: 29px;
    padding: 0;
    border: 1px solid #dde3eb;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #69778c;
    font-size: 9px;
}

.apm-actions button:hover:not(:disabled) {
    border-color: #ffc8aa;
    background: #fff6f0;
    color: var(--apm-orange);
}

.apm-actions button.success {
    color: #159466;
}

.apm-actions button.danger {
    color: #df4343;
}

.apm-actions button.restore {
    color: #167a55;
}

/* =========================================================
   EMPTY / PAGINATION
========================================================= */

.apm-empty {
    padding: 44px 20px !important;
    color: #98a2b3 !important;
    text-align: center !important;
    font-size: 10px !important;
}

.apm-empty i {
    margin-right: 6px;
}

.apm-pagination {
    min-height: 50px;
    padding: 8px 11px;
    border-top: 1px solid #edf0f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #7c8799;
    font-size: 8.5px;
}

.apm-pagination > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.apm-pagination select {
    height: 28px;
    padding: 0 6px;
    border: 1px solid #dfe4eb;
    border-radius: 6px;
    background: #fff;
    color: #667085;
    font-size: 8.5px;
}

.apm-pagination button {
    width: 30px;
    height: 30px;
    border: 1px solid #dfe4eb;
    border-radius: 7px;
    background: #fff;
    color: #667085;
}

.apm-pagination strong {
    min-width: 30px;
    height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apm-orange);
    color: #fff;
}

/* =========================================================
   MODAL
========================================================= */

.apm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2600;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(3px);
}

.apm-modal {
    width: min(100%, 680px);
    max-height: calc(100vh - 48px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
    animation: apmModalIn 0.2s ease;
}

.apm-modal-small {
    max-width: 500px;
}

.apm-modal-medium {
    max-width: 720px;
}

.apm-modal-large {
    max-width: 1080px;
}

@keyframes apmModalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.apm-modal-head {
    min-height: 61px;
    padding: 0 18px;
    border-bottom: 1px solid #e9edf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.apm-modal-head > div > span {
    display: block;
    margin-bottom: 3px;
    color: var(--apm-orange);
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.9px;
}

.apm-modal-head h3 {
    max-width: 820px;
    margin: 0;
    overflow: hidden;
    color: #273244;
    font-size: 16px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apm-modal-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: #f5f7fa;
    color: #778197;
    font-size: 13px;
}

.apm-modal-close:hover {
    background: #fff1ea;
    color: var(--apm-orange);
}

.apm-modal-body {
    padding: 17px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.apm-modal-loading {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8792a3;
    font-size: 11px;
}

/* =========================================================
   PRODUCT DETAIL
========================================================= */

.apm-product-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.apm-detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
}

.apm-detail-gallery {
    min-width: 0;
}

.apm-main-image {
    width: 100%;
    aspect-ratio: 1.25 / 1;
    border: 1px solid #e3e8ef;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f9fb;
    color: #a5afbd;
    font-size: 30px;
}

.apm-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.apm-thumb-strip {
    margin-top: 8px;
    display: flex;
    gap: 7px;
    overflow-x: auto;
}

.apm-thumb-strip span {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border: 1px solid #e0e6ee;
    border-radius: 9px;
    overflow: hidden;
    background: #f7f8fa;
}

.apm-thumb-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apm-detail-summary {
    min-width: 0;
    padding: 4px 3px;
}

.apm-detail-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.apm-detail-summary h2 {
    margin: 13px 0 0;
    color: #1e293b;
    font-size: clamp(21px, 2.3vw, 30px);
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.apm-detail-sku {
    margin: 7px 0 0;
    color: #8a95a6;
    font-size: 9px;
}

.apm-detail-price {
    margin-top: 14px;
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.apm-detail-price strong {
    color: var(--apm-orange);
    font-size: 23px;
}

.apm-detail-price span {
    color: #9ca5b3;
    font-size: 11px;
    text-decoration: line-through;
}

.apm-detail-seller {
    width: 100%;
    margin-top: 18px;
    padding: 10px;
    border: 1px solid #e4e9ef;
    border-radius: 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fbfcfd;
    text-align: left;
}

.apm-detail-seller:hover {
    border-color: #ffd0b6;
    background: #fff9f5;
}

.apm-detail-seller > span:nth-child(2) {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.apm-detail-seller small {
    color: #98a2b3;
    font-size: 7.5px;
}

.apm-detail-seller strong {
    margin-top: 2px;
    color: #344054;
    font-size: 10px;
}

.apm-detail-seller em {
    margin-top: 2px;
    color: #7f8a9b;
    font-size: 8px;
    font-style: normal;
}

.apm-detail-seller > i {
    color: #a4adba;
    font-size: 9px;
}

.apm-detail-grid,
.apm-description-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.apm-detail-card {
    padding: 15px;
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    background: #fff;
}

.apm-detail-card h4 {
    margin: 0 0 12px;
    color: #344054;
    font-size: 11px;
    font-weight: 750;
}

.apm-detail-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.apm-detail-card dl > div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.apm-detail-card dl > div.full {
    grid-column: 1 / -1;
}

.apm-detail-card dt {
    color: #98a2b3;
    font-size: 7.5px;
    font-weight: 650;
}

.apm-detail-card dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    color: #344054;
    font-size: 9px;
    font-weight: 650;
}

.apm-detail-card > p {
    margin: 0;
    color: #667085;
    font-size: 9px;
    line-height: 1.65;
    white-space: pre-line;
}

.apm-detail-card.moderation label {
    display: block;
}

.apm-detail-card.moderation label > span {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 8px;
    font-weight: 650;
}

.apm-detail-card.moderation select {
    width: 100%;
    height: 37px;
    padding: 0 10px;
    border: 1px solid #dde3eb;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #48556b;
    font-size: 9px;
}

.apm-detail-actions {
    margin-top: 11px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.apm-detail-actions .apm-danger-btn {
    grid-column: 1 / -1;
}

.apm-rejection-box {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #ffd0d0;
    border-radius: 8px;
    background: #fff5f5;
}

.apm-rejection-box strong {
    color: #c43c3c;
    font-size: 8px;
}

.apm-rejection-box p {
    margin: 4px 0 0;
    color: #805050;
    font-size: 8.5px;
    line-height: 1.5;
}

.apm-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.apm-section-title-row span {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff0e6;
    color: var(--apm-orange);
    font-size: 8px;
    font-weight: 800;
}

.apm-variant-table-wrap {
    overflow-x: auto;
}

.apm-variant-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.apm-variant-table th,
.apm-variant-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    font-size: 8px;
}

.apm-variant-table th {
    color: #7f8a9d;
    font-size: 7.5px;
    text-transform: uppercase;
}

.apm-variant-table td {
    color: #4b586e;
}

.apm-muted {
    padding: 18px;
    color: #98a2b3;
    text-align: center;
    font-size: 9px;
}

/* =========================================================
   SHOP DETAILS
========================================================= */

.apm-shop-modal-head {
    padding-bottom: 14px;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.apm-shop-modal-head > div {
    min-width: 0;
}

.apm-shop-modal-head h3 {
    margin: 0;
    color: #273244;
    font-size: 17px;
}

.apm-shop-modal-head p {
    margin: 4px 0 7px;
    color: #98a2b3;
    font-size: 8px;
}

.apm-shop-info-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.apm-shop-info-grid > div {
    min-width: 0;
    padding: 10px;
    border-radius: 9px;
    background: #f8fafc;
}

.apm-shop-info-grid > div.wide {
    grid-column: 1 / -1;
}

.apm-shop-info-grid span {
    display: block;
    color: #98a2b3;
    font-size: 7.5px;
    font-weight: 650;
}

.apm-shop-info-grid strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: #344054;
    font-size: 9px;
}

.apm-shop-contact-actions {
    margin-top: 8px;
    display: flex;
    gap: 7px;
}

.apm-shop-contact-actions a {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid #dfe5ec;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    color: #536074;
    font-size: 8px;
    font-weight: 700;
}

.apm-shop-contact-actions a.whatsapp {
    border-color: #b7ead5;
    background: #edfbf5;
    color: #12855a;
}

/* =========================================================
   CONFIRM MODAL
========================================================= */

.apm-confirm {
    text-align: center;
}

.apm-confirm-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.apm-confirm-icon.warning {
    background: #fff7e8;
    color: #dc9206;
}

.apm-confirm-icon.danger {
    background: #fff0f0;
    color: #db4141;
}

.apm-confirm h4 {
    margin: 0;
    color: #2e394c;
    font-size: 15px;
}

.apm-confirm p {
    max-width: 390px;
    margin: 8px auto 13px;
    color: #7d8798;
    font-size: 9px;
    line-height: 1.6;
}

.apm-confirm textarea {
    width: 100%;
    min-height: 95px;
    padding: 10px;
    border: 1px solid #dce2ea;
    border-radius: 8px;
    outline: 0;
    resize: vertical;
    color: #455267;
    font-size: 9px;
}

.apm-confirm textarea:focus {
    border-color: #ff9c65;
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.08);
}

.apm-confirm-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

/* =========================================================
   TOAST
========================================================= */

.apm-toast {
    position: fixed;
    z-index: 4000;
    top: 84px;
    right: 22px;
    max-width: 360px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1f2937;
    color: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.2);
    font-size: 10px;
    font-weight: 650;
    animation: apmToastIn 0.2s ease;
}

.apm-toast.error {
    background: #c93f3f;
}

.apm-toast.warning {
    background: #ad710b;
}

.apm-toast.success {
    background: #147e58;
}

@keyframes apmToastIn {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1450px) {
    .apm-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .apm-filters {
        grid-template-columns: minmax(220px, 1.6fr) 1fr 1fr;
    }

    .apm-filters .apm-primary-btn,
    .apm-filters .apm-secondary-btn {
        width: 100%;
    }

    .apm-detail-hero {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .apm-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .apm-page-head .apm-refresh {
        align-self: flex-end;
    }

    .apm-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apm-filters {
        grid-template-columns: 1fr 1fr;
    }

    .apm-search {
        grid-column: 1 / -1;
    }

    .apm-bulk-bar {
        top: 68px;
        flex-wrap: wrap;
    }

    .apm-bulk-controls {
        width: 100%;
        margin-left: 0;
    }

    .apm-bulk-controls select {
        flex: 1;
        min-width: 0;
    }

    .apm-detail-hero {
        grid-template-columns: 1fr;
    }

    .apm-main-image {
        max-height: 360px;
    }

    .apm-detail-grid,
    .apm-description-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .apm-metrics {
        gap: 8px;
    }

    .apm-metrics article {
        min-height: 78px;
        padding: 11px;
    }

    .apm-metric-icon {
        width: 36px;
        height: 36px;
    }

    .apm-metrics strong {
        font-size: 17px;
    }

    .apm-filters {
        grid-template-columns: 1fr;
    }

    .apm-search {
        grid-column: auto;
    }

    .apm-table {
        min-width: 0;
    }

    .apm-table thead {
        display: none;
    }

    .apm-table,
    .apm-table tbody,
    .apm-table tr,
    .apm-table td {
        display: block;
        width: 100%;
    }

    .apm-table tbody {
        padding: 8px;
    }

    .apm-table tbody tr {
        margin-bottom: 10px;
        border: 1px solid var(--apm-border);
        border-radius: 11px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(15, 23, 42, 0.035);
    }

    .apm-table td {
        min-height: 0;
        padding: 9px 11px 9px 118px;
        border-bottom: 1px solid #edf0f4;
        position: relative;
        text-align: left;
    }

    .apm-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 11px;
        top: 10px;
        width: 94px;
        color: #8a95a5;
        font-size: 7.5px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .apm-table td.check-col {
        padding-left: 118px;
        text-align: left;
    }

    .apm-table td:last-child {
        border-bottom: 0;
    }

    .apm-product-cell {
        min-width: 0;
    }

    .apm-product-cell strong {
        max-width: 180px;
    }

    .apm-shop-phone-row {
        margin-left: 39px;
    }

    .apm-actions {
        justify-content: flex-start;
    }

    .apm-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .apm-pagination > div:last-child {
        align-self: flex-end;
    }

    .apm-modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .apm-modal {
        width: 100%;
        max-width: none;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .apm-modal-head {
        min-height: 57px;
    }

    .apm-modal-body {
        padding: 13px;
    }

    .apm-shop-info-grid {
        grid-template-columns: 1fr;
    }

    .apm-shop-info-grid > div.wide {
        grid-column: auto;
    }

    .apm-shop-contact-actions {
        flex-direction: column;
    }

    .apm-shop-contact-actions a {
        width: 100%;
    }

    .apm-toast {
        top: auto;
        right: 10px;
        bottom: 12px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 430px) {
    .apm-metrics {
        grid-template-columns: 1fr;
    }

    .apm-metrics article > div > span {
        white-space: normal;
    }

    .apm-table td {
        padding-left: 103px;
    }

    .apm-table td::before {
        width: 80px;
    }

    .apm-detail-actions {
        grid-template-columns: 1fr;
    }

    .apm-detail-actions .apm-danger-btn {
        grid-column: auto;
    }

    .apm-confirm-actions {
        flex-direction: column-reverse;
    }

    .apm-confirm-actions button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .apm-modal,
    .apm-toast,
    .apm-publish-toggle > span,
    .apm-publish-toggle > span::after {
        animation: none;
        transition: none;
    }
}
