:root {
    --bg-body: #f2f5fb;
    --color-surface: #ffffff;
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-primary: #16a34a;
    --color-success: #16a34a;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-soft: 0 8px 30px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 14px 34px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #f8fbff 0%, #f2f5fb 45%, #eef3fa 100%);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text-main);
}

.my-products-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 18px 20px 24px;
}

.products-sidebar {
    display: none;
}

.products-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 14px;
}

.products-sidebar-card.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%);
}

.profile-copy strong {
    display: block;
    font-size: 14px;
}

.profile-copy span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.products-sidebar-card.nav {
    display: grid;
    gap: 8px;
}

.sidebar-link {
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 12px;
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    transition: all 160ms ease;
}

.sidebar-link:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.sidebar-link.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.products-sidebar-card.actions {
    display: grid;
    gap: 10px;
}

.sidebar-btn {
    border: none;
    border-radius: 12px;
    min-height: 42px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: transform 140ms ease, box-shadow 180ms ease;
}

.sidebar-btn:hover { transform: translateY(-1px); }

.sidebar-btn.primary {
    color: #fff;
    background: linear-gradient(170deg, #2f83ff 0%, #2563eb 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.sidebar-btn.subtle {
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.my-products-main {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 18px;
}

.page-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.page-title h1 {
    margin: 0 0 4px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.page-title p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-btn {
    border: 1px solid transparent;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}

.header-btn.primary {
    color: #fff;
    background: linear-gradient(170deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.22);
}

.header-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.28);
}

.header-btn.subtle {
    color: #334155;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.header-btn.subtle:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.control-panel {
    display: grid;
    gap: 14px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.my-products-stat,
.stat-card {
    background: var(--color-surface);
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    min-height: 94px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.my-products-stat-label,
.stat-label {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.my-products-stat-value,
.stat-value {
    font-size: 28px;
    line-height: 1;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dbe3ef;
}

.filter-tabs {
    display: inline-flex;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
}

.filter-tab {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 160ms ease;
}

.filter-tab.active {
    color: #166534;
    background: #dcfce7;
}

.search-box {
    position: relative;
    width: min(360px, 100%);
}

.search-box svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box input {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fbfdff;
    padding: 10px 40px 10px 14px;
    font-size: 13px;
    color: #0f172a;
}

.search-box input:focus {
    outline: 2px solid #bfdbfe;
    border-color: #93c5fd;
}

.unified-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    align-items: start;
}

.product-card {
    direction: rtl;
    background: #ffffff;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #d8e4f2;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.card-header {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.product-img {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    border: 1px solid #e8eef6;
    background: #f8fbff;
    object-fit: cover;
    display: block;
}

.product-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info {
    min-width: 0;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-sku {
    font-size: 11px;
    font-weight: 600;
    color: #7a8ba0;
    background: #f7f9fc;
    border: 1px solid #e7edf5;
    border-radius: 999px;
    padding: 3px 8px;
    line-height: 1.4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.product-meta-id {
    font-size: 11px;
    font-weight: 600;
    color: #7a8ba0;
    background: #f7f9fc;
    border: 1px solid #e7edf5;
    border-radius: 999px;
    padding: 3px 8px;
    line-height: 1.4;
}

.product-caption {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
    line-height: 2;
    background: #f8fbff;
    border: 1px solid #e8eff8;
    border-radius: 12px;
    padding: 10px 12px;
    max-height: 96px;
    overflow: auto;
}

.platforms-status {
    border: 1px solid #e8eff8;
    border-radius: 12px;
    padding: 9px;
    background: #fcfdff;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.platform-item {
    flex: 1 1 220px;
    min-width: 190px;
    border: 1px solid #e7edf5;
    border-radius: 12px;
    padding: 8px 9px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.platform-item.is-updated-pending { background: #fff7ed; border-color: #fed7aa; }
.platform-item.is-updated-success { background: #dcfce7; border-color: #86efac; }

.platform-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.platform-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    min-width: 0;
}

.platform-name > span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
}
.platform-dot.is-digikala { background: #3b82f6; }
.platform-dot.is-bale { background: #0ea5a4; }
.platform-dot.is-eitaa { background: #f97316; }
.platform-dot.is-rubika { background: #db2777; }
.platform-dot.is-soroushplus { background: #14b8a6; }
.platform-dot.is-default { background: #94a3b8; }

.status-badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}
.status-badge.success { background: #dcfce7; color: #166534; }
.status-badge.error { background: #ffe4e6; color: #be123c; }
.status-badge.pending { background: #fef3c7; color: #92400e; }

.error-details {
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
    font-size: 11px;
    direction: ltr;
    text-align: left;
    line-height: 1.65;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.btn-retry-platform {
    width: 100%;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    min-height: 34px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-retry-platform:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.btn-card {
    border: 1px solid transparent;
    background: #f8fafc;
    color: #334155;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn-card:hover { transform: translateY(-1px); }
.btn-edit {
    background: #16a34a;
    color: #fff;
    border-color: #15803d;
    box-shadow: 0 5px 14px rgba(22, 163, 74, 0.25);
}
.btn-edit:hover { background: #15803d; }

.btn-send-others {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
    grid-column: 1 / -1;
}
.btn-send-others:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

.btn-card[data-action="view-history"] {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}
.btn-card[data-action="view-history"]:hover { background: #f1f5f9; }

.my-products-empty {
    grid-column: 1 / -1;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    background: #fff;
    color: #64748b;
    font-weight: 700;
}

.my-products-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.68);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    /* Keep overlay fully compatible across Windows browsers */
}

.my-products-modal-overlay.is-windows {
    padding: 0;
    align-items: stretch;
}

.my-products-modal-card {
    width: min(540px, 100%);
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.2);
}

.my-products-modal-title { margin: 0 0 8px; font-size: 20px; font-weight: 900; }
.my-products-modal-text { margin: 0 0 12px; color: #64748b; font-size: 13px; line-height: 1.8; }
.my-products-modal-options { display: grid; gap: 8px; margin-bottom: 12px; }
.my-products-modal-option {
    display: flex;
    gap: 8px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 9px 10px;
    font-size: 13px;
}
.my-products-modal-option.is-disabled { opacity: 0.6; }
.my-products-modal-note {
    font-size: 12px;
    color: #64748b;
    line-height: 1.8;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f8fafc;
}

.my-products-field-label {
    display: block;
    margin: 8px 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.my-products-field-input,
.my-products-field-textarea {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fbfdff;
    min-height: 40px;
    padding: 10px 12px;
    font-size: 13px;
    color: #0f172a;
}

.my-products-field-textarea {
    resize: vertical;
    min-height: 120px;
}

.my-products-price-preview {
    margin-top: 8px;
    font-size: 12px;
    border: 1px dashed #99f6e4;
    background: #ecfeff;
    color: #0f766e;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
}

.my-products-price-policy-row {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    display: grid;
    gap: 8px;
}

.my-products-price-policy-row__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.my-products-price-policy-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #334155;
    font-weight: 600;
}

.my-products-price-replacement { margin: 0; }

.my-products-modal-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.my-products-modal-btn {
    border: none;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.my-products-modal-btn.secondary { background: #f1f5f9; color: #334155; }
.my-products-modal-btn.primary { background: #2563eb; color: #fff; }

.my-products-payment-list {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 8px 10px;
    margin-bottom: 10px;
}
.my-products-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 3px 0;
}
.my-products-payment-total {
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px dashed #67e8f9;
    background: #ecfeff;
    color: #0e7490;
    padding: 8px 10px;
    font-weight: 800;
}

.my-products-history-list {
    display: grid;
    gap: 12px;
    max-height: 60vh;
    overflow: auto;
}

.my-products-history-item {
    border: 1px solid #dde6f1;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.my-products-history-item.is-platform-added {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-color: #cfe0ff;
}

.my-products-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.my-products-history-diff {
    margin: 0 0 6px;
    padding-inline-start: 16px;
    color: #1e293b;
    font-size: 12px;
    line-height: 1.8;
}

.my-products-history-platform-list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.my-products-history-platform-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    background: #f8fafc;
    padding: 6px 8px;
}

.my-products-history-platform-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1e293b;
}

.my-products-history-platform-reason {
    width: 100%;
    font-size: 11px;
    color: #be123c;
}

.my-products-history-platform-summary {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 9px 10px;
}

.my-products-history-platform-summary-head {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 7px;
}

.my-products-history-platform-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.my-products-history-platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.my-products-history-platform-chip-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 1px;
}

.my-products-history-platform-chip.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.my-products-history-platform-chip.is-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #9f1239;
}

.my-products-history-platform-reason-list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.my-products-history-platform-reason-row {
    display: grid;
    gap: 2px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    padding: 7px 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 11px;
    line-height: 1.7;
}

.my-products-history-platform-reason-title {
    font-size: 11px;
    color: #881337;
    font-weight: 800;
}

.my-products-history-platform-reason-text {
    color: #9f1239;
}

.my-products-edit-card {
    width: min(1280px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    border-radius: 24px;
    overflow: hidden;
}

.my-products-edit-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 16px 20px;
    border-bottom: 1px solid #dbe3ef;
    background: linear-gradient(170deg, #f8fbff 0%, #f0f9ff 100%);
}

.my-products-edit-header__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
}

.my-products-edit-close {
    width: 34px;
    height: 34px;
    border: 1px solid #dbe3ef;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    color: #64748b;
}

.my-products-edit-body {
    overflow: auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    padding: 14px;
    background: #f8fbff;
}

.my-products-edit-main-column,
.my-products-edit-side-column {
    display: grid;
    gap: 12px;
    align-content: start;
}

.my-products-edit-section {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 12px;
}

.my-products-edit-section__head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.my-products-edit-section__badge {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: #eaf2ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.my-products-edit-section__title { margin: 0; font-size: 14px; font-weight: 800; }
.my-products-edit-section__sub { margin: 2px 0 0; font-size: 12px; color: #64748b; line-height: 1.7; }
.my-products-edit-section__hint {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px dashed #bfdbfe;
    background: #f0f9ff;
    font-size: 12px;
    color: #0c4a6e;
    line-height: 1.75;
}
.my-products-edit-empty {
    margin: 0;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    text-align: center;
    padding: 12px;
}

.my-products-edit-scope { display: grid; gap: 8px; }
.my-products-edit-scope__option {
    display: flex;
    gap: 10px;
    align-items: start;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
}
.my-products-edit-scope__option.is-active {
    border-color: #93c5fd;
    background: #eff6ff;
}
.my-products-edit-scope__title { display: block; font-size: 12px; font-weight: 800; }
.my-products-edit-scope__hint { display: block; font-size: 11px; color: #64748b; margin-top: 2px; }

.my-products-policy-grid,
.my-products-platform-grid {
    display: grid;
    gap: 8px;
}

.my-products-platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.my-products-platform-label { display: inline-flex; align-items: center; gap: 8px; }
.my-products-platform-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 2px;
    object-fit: contain;
}

.my-products-edit-actions {
    border-top: 1px solid #dbe3ef;
    background: #fff;
    padding: 12px 14px;
}
.my-products-edit-actions .my-products-modal-btn.primary {
    display: inline-flex;
    align-items: center;
    background: #2563eb;
}

.my-products-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1199px) {
    .my-products-shell { grid-template-columns: 1fr; }
    .products-sidebar { display: none; }
}

@media (max-width: 900px) {
    .products-sidebar { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .unified-product-grid { grid-template-columns: 1fr; }
    .card-header { grid-template-columns: 80px minmax(0, 1fr); }
    .product-img { width: 80px; height: 80px; }
    .platform-item { min-width: 100%; flex-basis: 100%; }
    .card-actions { grid-template-columns: 1fr; }
    .btn-send-others { grid-column: auto; }
    .my-products-edit-card { width: min(900px, calc(100vw - 20px)); }
    .my-products-edit-body { grid-template-columns: 1fr; }
    .my-products-platform-grid { grid-template-columns: 1fr; }
}

/* Smart product edit modal */
.my-products-smart-edit-card {
    width: calc(100vw - 16px);
    max-width: 1680px;
    max-height: calc(100vh - 16px);
    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 24px 80px rgba(15, 23, 42, 0.22),
        0 4px 18px rgba(15, 23, 42, 0.08);
}

.my-products-smart-header {
    position: relative;
    padding: 22px 32px 18px;
    border-bottom: 1px solid #edf1f7;
    background:
        radial-gradient(circle at 95% 0%, rgba(22, 163, 74, 0.1), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.my-products-smart-close {
    position: absolute;
    left: 24px;
    top: 22px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #e3e8f2;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.18s ease;
}

.my-products-smart-close:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.my-products-smart-title-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding-inline: 72px;
}

.my-products-smart-header-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.28);
}

.my-products-smart-title-copy {
    min-width: 0;
}

.my-products-smart-title {
    margin: 0;
    color: #0f172a;
    font-size: 23px;
    font-weight: 900;
    line-height: 1.55;
}

.my-products-smart-subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13.5px;
    line-height: 1.9;
}

.my-products-smart-subtitle strong {
    color: #334155;
    font-weight: 800;
}

.my-products-smart-stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0 36px;
    border-bottom: 1px solid #edf1f7;
    background: #ffffff;
}

.my-products-smart-step {
    position: relative;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.my-products-smart-step::before {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-start: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 0;
}

.my-products-smart-step:first-child::before {
    width: 50%;
    inset-inline-start: 0;
}

.my-products-smart-step:last-child::before {
    width: 50%;
    inset-inline-start: 50%;
}

.my-products-smart-step__number,
.my-products-smart-step__label {
    position: relative;
    z-index: 1;
    background: #ffffff;
}

.my-products-smart-step__number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #dbe3ef;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.my-products-smart-step__label {
    padding-inline: 6px;
}

.my-products-smart-step.is-active {
    color: #166534;
}

.my-products-smart-step.is-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline: 16px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: #16a34a;
}

.my-products-smart-step.is-active .my-products-smart-step__number {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.24);
}

.my-products-smart-body {
    flex: 1;
    overflow: auto;
    padding: 22px 36px 24px;
    display: block;
    align-items: flex-start;
    background: #fbfdff;
}

.my-products-smart-column {
    width: min(980px, 100%);
    display: block;
    margin: 0 auto;
}

.my-products-smart-panel {
    background: #ffffff;
    border: 1px solid #e4eaf3;
    border-radius: 20px;
    padding: 22px 24px;
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.035),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    margin-bottom: 18px;
}

.my-products-smart-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 13px;
    margin-bottom: 18px;
}

.my-products-smart-panel-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #ecfdf5;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.my-products-smart-panel-title {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.6;
}

.my-products-smart-panel-sub {
    margin: 2px 0 0;
    color: #7b8798;
    font-size: 12.8px;
    line-height: 1.8;
}

.my-products-smart-field-group {
    margin-top: 14px;
}

.my-products-smart-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.my-products-smart-input,
.my-products-smart-textarea {
    width: 100%;
    border: 1px solid #dfe6f1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 13px;
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.8;
    outline: none;
    transition: 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.my-products-smart-input {
    height: 48px;
}

.my-products-smart-textarea {
    min-height: 122px;
    resize: vertical;
}

.my-products-smart-input:focus,
.my-products-smart-textarea:focus {
    border-color: #93b4ff;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.09),
        0 1px 2px rgba(15, 23, 42, 0.025);
}

.my-products-smart-counter {
    margin-top: 7px;
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    color: #8a96a8;
    font-size: 12px;
}

.my-products-smart-price-preview {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px dashed #93b4ff;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    color: #475569;
    border-radius: 13px;
    font-size: 13.5px;
    line-height: 1.9;
    text-align: center;
}

.my-products-smart-policy-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-products-smart-policy-row {
    border: 1px solid #edf1f7;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px;
}

.my-products-smart-policy-main,
.my-products-smart-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.my-products-smart-platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13.5px;
    font-weight: 850;
}

.my-products-smart-platform-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 6px;
}

.my-products-smart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.my-products-smart-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.my-products-smart-toggle-ui {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    transition: 0.18s ease;
    flex: 0 0 auto;
}

.my-products-smart-toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.18);
    transition: 0.18s ease;
}

.my-products-smart-toggle input:checked + .my-products-smart-toggle-ui {
    background: #16a34a;
}

.my-products-smart-toggle input:checked + .my-products-smart-toggle-ui::after {
    left: 21px;
}

.my-products-smart-toggle-text {
    white-space: nowrap;
}

.my-products-smart-input-with-addon {
    position: relative;
}

.my-products-smart-input-with-addon .my-products-smart-input {
    padding-inline-start: 64px;
}

.my-products-smart-addon {
    position: absolute;
    inset-inline-start: 6px;
    top: 6px;
    height: 36px;
    min-width: 48px;
    border-radius: 10px;
    background: #f5f7fb;
    border: 1px solid #e8edf5;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.my-products-smart-note {
    margin: 14px 0 0;
    padding: 13px 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: #7b8798;
    font-size: 12.8px;
    line-height: 1.9;
}

.my-products-smart-scope {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-products-smart-scope-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid #e3e9f4;
    border-radius: 16px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.18s ease;
}

.my-products-smart-scope-option:hover {
    border-color: #b8c8e6;
    background: #fbfdff;
}

.my-products-smart-scope-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.my-products-smart-radio-ui {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    margin-top: 2px;
    flex: 0 0 auto;
    position: relative;
    transition: 0.18s ease;
}

.my-products-smart-radio-ui::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #16a34a;
    transform: scale(0);
    transition: 0.18s ease;
}

.my-products-smart-scope-option.is-selected {
    border-color: #22c55e;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.09);
}

.my-products-smart-scope-option.is-selected .my-products-smart-radio-ui {
    border-color: #16a34a;
}

.my-products-smart-scope-option.is-selected .my-products-smart-radio-ui::after {
    transform: scale(1);
}

.my-products-smart-scope-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.my-products-smart-scope-copy strong {
    color: #1e293b;
    font-size: 13.8px;
    font-weight: 900;
}

.my-products-smart-scope-copy small {
    color: #7b8798;
    font-size: 12.5px;
    line-height: 1.8;
}

.my-products-smart-platform-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    transition: 0.18s ease;
}

.my-products-smart-platform-grid.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.2);
}

.my-products-smart-platform-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid #e5eaf3;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.18s ease;
}

.my-products-smart-platform-option.is-selected {
    border-color: #22c55e;
    background: #f0fdf4;
}

.my-products-smart-platform-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.my-products-smart-check-ui {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    border: 2px solid #cbd5e1;
    flex: 0 0 auto;
    position: relative;
    transition: 0.18s ease;
}

.my-products-smart-check-ui::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 5px;
    border-inline-start: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) scale(0);
    top: 4px;
    left: 4px;
    transition: 0.18s ease;
}

.my-products-smart-platform-option:has(input:checked) {
    border-color: #22c55e;
    background: #f0fdf4;
}

.my-products-smart-platform-option:has(input:checked) .my-products-smart-check-ui {
    background: #16a34a;
    border-color: #16a34a;
}

.my-products-smart-platform-option:has(input:checked) .my-products-smart-check-ui::after {
    transform: rotate(-45deg) scale(1);
}

.my-products-smart-empty {
    margin: 0;
    color: #7b8798;
    font-size: 13px;
    line-height: 1.9;
}

.my-products-smart-footer {
    padding: 16px 30px;
    border-top: 1px solid #e8eef7;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.my-products-smart-btn {
    height: 48px;
    border-radius: 13px;
    border: 1px solid transparent;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.18s ease;
}

.my-products-smart-btn:focus-visible,
.my-products-smart-close:focus-visible,
.my-products-edit-close:focus-visible,
.my-products-modal-btn:focus-visible,
.btn-card:focus-visible,
.filter-tab:focus-visible,
.header-btn:focus-visible,
.sidebar-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.my-products-smart-btn--primary {
    min-width: 210px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.24);
}

.my-products-smart-btn--primary[data-action="confirm"] {
    color: #000000;
}

.my-products-smart-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(22, 163, 74, 0.3);
}

.my-products-smart-btn--secondary {
    background: #ffffff;
    color: #475569;
    border-color: #e0e7f0;
}

.my-products-smart-btn--secondary:hover {
    background: #f8fafc;
    color: #0f172a;
}

.my-products-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1100px) {
    .my-products-smart-edit-card {
        width: min(1080px, calc(100vw - 24px));
    }
}

.my-products-smart-edit-card--windows {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
}

@media (max-width: 760px) {
    .my-products-shell {
        padding: 12px;
        gap: 14px;
    }

    .page-header {
        padding: 16px;
    }

    .header-actions {
        width: 100%;
    }

    .header-btn {
        flex: 1 1 calc(50% - 4px);
    }

    .my-products-smart-edit-card {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }

    .my-products-smart-header {
        padding: 18px 18px 14px;
    }

    .my-products-smart-close {
        left: 16px;
        top: 16px;
        width: 42px;
        height: 42px;
    }

    .my-products-smart-title-wrap {
        padding-inline: 48px 0;
        justify-content: flex-start;
        text-align: right;
    }

    .my-products-smart-stepper {
        padding: 0 14px;
        overflow-x: auto;
        grid-template-columns: repeat(4, 150px);
    }

    .my-products-smart-body { padding: 16px; }

    .my-products-smart-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .my-products-smart-platform-grid {
        grid-template-columns: 1fr;
    }

    .my-products-smart-footer {
        padding: 14px 16px;
        flex-direction: column-reverse;
    }

    .my-products-smart-btn {
        width: 100%;
    }
}
