/* Zendu Marketplace Core v0.2.3 */

.zendu-dashboard-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 78vh;
    background: #f5f6f8;
}

.zendu-sidebar {
    background: #21115a;
    color: #fff;
    padding: 28px 20px;
}

.zendu-sidebar .zendu-brand {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.zendu-sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-weight: 600;
}

.zendu-sidebar a:hover,
.zendu-sidebar a.active {
    background: rgba(255,255,255,0.16);
}

.zendu-main {
    padding: 34px 48px 60px;
}

.zendu-main h1,
.zendu-public-form h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

.zendu-subtitle {
    color: #68707d;
    margin: 0 0 24px;
}

.zendu-card,
.zendu-public-form {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 18px;
}

.zendu-card h2 {
    margin: 0 0 18px;
    font-size: 20px;
}

.zendu-list-form label,
.zendu-public-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 16px;
}

.zendu-list-form label span,
.zendu-public-form label span {
    color: #cc2936;
}

.zendu-list-form input[type="text"],
.zendu-list-form input[type="email"],
.zendu-list-form input[type="password"],
.zendu-list-form input[type="number"],
.zendu-list-form input[type="file"],
.zendu-list-form select,
.zendu-list-form textarea,
.zendu-public-form input[type="text"],
.zendu-public-form input[type="email"],
.zendu-public-form input[type="password"],
.zendu-public-form select,
.zendu-public-form textarea {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 12px 13px;
    border: 1px solid #d8dde6;
    border-radius: 6px;
    background: #fff;
    font-weight: 400;
}

.zendu-list-form textarea {
    min-height: 120px;
}

.zendu-checkbox {
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
}

.zendu-checkbox input {
    margin-top: 4px;
    width: auto !important;
}

.zendu-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.zendu-submit,
.zendu-button,
.zendu-public-form button {
    display: inline-block;
    background: #6f42e8;
    color: #fff !important;
    border: none;
    padding: 13px 22px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.zendu-cancel {
    text-decoration: none;
    font-weight: 600;
}

.zendu-success,
.zendu-error,
.zendu-notice {
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #eef8f0;
    border: 1px solid #b9e2c1;
}

.zendu-error {
    background: #fff2f2;
    border-color: #f0b8b8;
}

.zendu-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.zendu-stat {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 22px;
}

.zendu-stat strong {
    display: block;
    font-size: 28px;
    margin-bottom: 6px;
}

.zendu-stat span {
    color: #68707d;
}

.zendu-table {
    width: 100%;
    border-collapse: collapse;
}

.zendu-table th,
.zendu-table td {
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 8px;
    text-align: left;
    vertical-align: top;
}

.zendu-product-details table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.zendu-product-details th,
.zendu-product-details td {
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 8px;
    text-align: left;
    vertical-align: top;
}

.zendu-product-details th {
    width: 170px;
    font-weight: 700;
}

.single-product form.cart .quantity {
    display: none !important;
}

@media (max-width: 900px) {
    .zendu-dashboard-shell {
        grid-template-columns: 1fr;
    }

    .zendu-sidebar {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 14px;
    }

    .zendu-sidebar .zendu-brand {
        display: none;
    }

    .zendu-sidebar a {
        white-space: nowrap;
        margin-bottom: 0;
    }

    .zendu-main {
        padding: 24px 16px 40px;
    }

    .zendu-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.zendu-admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0 22px;
}
.zendu-admin-metric {
    background: #fff;
    border: 1px solid #dcdcde;
    border-left: 4px solid #2271b1;
    padding: 12px;
}
.zendu-admin-metric strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}
.zendu-admin-metric span {
    color: #646970;
}

/* v0.2.2 clean seller-dashboard page support */
body.zendu-clean-page .page-header,
body.zendu-clean-page .entry-header,
body.zendu-clean-page .page-title,
body.zendu-clean-page .entry-title,
body.zendu-clean-page .motta-page-header,
body.zendu-clean-page .page-title-bar,
body.zendu-clean-page .hero,
body.zendu-clean-page .site-breadcrumb,
body.zendu-clean-page .breadcrumbs {
    display: none !important;
}

body.zendu-dashboard-page .site-content,
body.zendu-dashboard-page .content-area,
body.zendu-dashboard-page main.site-main,
body.zendu-dashboard-page .container,
body.zendu-dashboard-page .wrap {
    max-width: none !important;
}

.zendu-dashboard-page .zendu-dashboard-shell {
    margin: 0 auto;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    overflow: hidden;
}

.zendu-sidebar-note {
    opacity: 0.72;
    font-size: 13px;
    font-weight: 600;
    margin: -16px 0 22px;
}

.zendu-dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 22px;
}

.zendu-dashboard-topbar strong,
.zendu-dashboard-topbar span {
    display: block;
}

.zendu-dashboard-topbar span {
    color: #68707d;
    font-size: 13px;
}

.zendu-small-link {
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .zendu-dashboard-topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* v0.2.3 dashboard polish and stronger theme isolation */
body.zendu-dashboard-page {
    background: #f3f4f7 !important;
}
body.zendu-dashboard-page .zendu-dashboard-shell {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    max-width: 1280px;
    width: calc(100% - 32px);
    margin: 24px auto !important;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}
.zendu-dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 24px;
}
.zendu-dashboard-topbar strong {
    display: block;
    font-size: 17px;
}
.zendu-dashboard-topbar span {
    color: #68707d;
    font-size: 13px;
}
.zendu-small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8dde6;
    border-radius: 8px;
    padding: 9px 12px;
    text-decoration: none !important;
    font-weight: 700;
    color: #21115a !important;
    background: #fff;
}
.zendu-main h1 {
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 14px !important;
}
.zendu-card a,
.zendu-main a {
    color: #5b35d5;
}
.zendu-main p {
    line-height: 1.55;
}
.zendu-dashboard-page .wp-site-blocks,
.zendu-dashboard-page .site,
.zendu-dashboard-page #page {
    min-height: 100vh;
}
@media (max-width: 900px) {
    body.zendu-dashboard-page .zendu-dashboard-shell {
        width: 100%;
        margin: 0 !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .zendu-dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* v0.2.5 category field logic */
.zendu-category-chip-preview {
    margin: 8px 0 6px;
    min-height: 28px;
}
.zendu-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #2e1065;
    font-weight: 700;
    font-size: 13px;
}
.zendu-field-hint,
.zendu-size-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

/* Zendu Marketplace Core v0.2.6 seller listing refinements */
.zendu-category-chip-preview {
    margin: 10px 0 8px;
}

.zendu-chip,
.zendu-chip-empty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ede7ff;
    color: #21115a;
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 700;
    font-size: 13px;
}

.zendu-chip-empty {
    background: #f1f3f6;
    color: #68707d;
}

.zendu-chip-remove {
    border: 0;
    background: rgba(33,17,90,0.12);
    color: #21115a;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    line-height: 1;
    font-weight: 800;
}

.zendu-media-picker {
    border: 1px dashed #cfd5df;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    background: #fbfcfe;
}

.zendu-media-picker label {
    margin-bottom: 10px;
}

.zendu-media-picker small,
.zendu-fallback-upload small {
    display: block;
    color: #68707d;
    margin-top: 9px;
}

.zendu-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.zendu-media-thumb {
    width: 110px;
    border: 1px solid #e4e7ec;
    background: #fff;
    border-radius: 8px;
    padding: 7px;
}

.zendu-media-thumb img {
    display: block;
    width: 94px;
    height: 94px;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f3f6;
}

.zendu-media-thumb span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #68707d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zendu-fallback-upload {
    margin-top: 8px;
    color: #68707d;
}

.zendu-fallback-upload summary {
    cursor: pointer;
    font-weight: 700;
    color: #21115a;
}

/* Zendu Marketplace Core v0.2.7 category path and smart size fields */
.zendu-category-select option:disabled {
    color: #8a8f99;
    font-weight: 700;
}
.zendu-size-row select[name="zendu_size"] {
    cursor: pointer;
}
.zendu-size-row[style*="display: none"] + .zendu-field-hint {
    margin-top: 0;
}

/* v0.2.8 seller listing thumbnails and status labels */
.zendu-listing-thumb-cell { width: 82px; }
.zendu-listing-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e4e7ec;
    background: #f5f6f8;
    display: block;
}
.zendu-listing-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #667085;
    text-align: center;
}
.zendu-muted {
    color: #68707d;
    font-size: 12px;
    margin-top: 4px;
}
.zendu-status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #eef2ff;
    color: #21115a;
}
.zendu-status-active { background: #ecfdf3; color: #027a48; }
.zendu-status-sold { background: #fff7ed; color: #b45309; }
.zendu-status-transit { background: #eff6ff; color: #1d4ed8; }
.zendu-status-review { background: #fef3c7; color: #92400e; }
.zendu-status-ready { background: #ecfdf3; color: #047857; }
.zendu-status-paid { background: #f0fdf4; color: #166534; }
.zendu-status-hold { background: #fef2f2; color: #b42318; }

/* v0.2.9 seller listing edit / withdraw / delete actions */
.zendu-listing-actions {
    min-width: 180px;
}
.zendu-action-link,
.zendu-action-muted {
    display: inline-flex;
    align-items: center;
    margin: 3px 4px 3px 0;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    background: #eef2ff;
    color: #21115a;
    border: 1px solid #d8ddff;
}
.zendu-action-link:hover {
    background: #e2e8ff;
    color: #21115a;
}
.zendu-action-warn {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}
.zendu-action-danger {
    background: #fef2f2;
    color: #b42318;
    border-color: #fecaca;
}
.zendu-action-muted {
    color: #667085;
    background: #f2f4f7;
    border-color: #eaecf0;
}

/* v0.3.0 edit listing photo gallery polish */
.zendu-photo-card .zendu-field-hint {
    margin-top: -4px;
    margin-bottom: 16px;
}
.zendu-photo-grid {
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 20px;
    align-items: start;
}
.zendu-photo-panel {
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fbfcfe;
    padding: 16px;
}
.zendu-photo-panel label {
    display: block;
    font-weight: 800;
    margin-bottom: 10px;
}
.zendu-photo-panel .zendu-button {
    margin-bottom: 12px;
}
.zendu-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 88px;
    align-items: flex-start;
}
.zendu-main-photo-preview {
    min-height: 132px;
}
.zendu-media-thumb {
    width: 96px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.zendu-media-thumb img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto 5px;
}
.zendu-media-thumb span {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    color: #667085;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.zendu-media-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    padding: 12px;
    border: 1px dashed #cfd4dc;
    border-radius: 10px;
    color: #667085;
    font-size: 13px;
    background: #fff;
}
@media (max-width: 820px) {
    .zendu-photo-grid { grid-template-columns: 1fr; }
}

/* v0.3.1 gallery management polish */
.zendu-media-thumb {
    position: relative;
}
.zendu-media-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b42318;
    font-weight: 900;
    line-height: 18px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(16,24,40,.12);
}
.zendu-media-remove:hover {
    background: #fef2f2;
}
.zendu-photo-panel small,
.zendu-photo-card > small {
    display: block;
    margin-top: 10px;
    color: #667085;
    line-height: 1.45;
}
.zendu-photo-panel .zendu-button {
    width: 100%;
    justify-content: center;
    text-align: center;
}
.zendu-gallery-preview .zendu-media-thumb {
    cursor: default;
}

/* v0.3.2 seller orders and shipping foundation */
.zendu-orders-table .zendu-order-line + .zendu-order-line,
.zendu-shipping-table .zendu-order-line + .zendu-order-line {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #edf0f5;
}
.zendu-orders-table td,
.zendu-shipping-table td {
    vertical-align: top;
}
.zendu-status-order {
    background: #eef2ff;
    color: #312e81;
}
@media (max-width: 900px) {
    .zendu-orders-table,
    .zendu-shipping-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
