:root {
    --mmpwc-accent: #4d9d14;
    --mmpwc-accent-soft: rgba(77, 157, 20, 0.10);
    --mmpwc-dark: #111827;
    --mmpwc-muted: #6b7280;
    --mmpwc-border: #e5e7eb;
    --mmpwc-bg: #ffffff;
    --mmpwc-soft: #f9fafb;
    --mmpwc-radius: 18px;
    --mmpwc-font: IRANYekanX, YekanBakh, yekanbakhR, Vazirmatn, Tahoma, sans-serif;
}

.mmpwc-action,
.mmpwc-page,
.mmpwc-page * {
    box-sizing: border-box;
    font-family: var(--mmpwc-font) !important;
}

.mmpwc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: rtl;
    border: 1px solid var(--mmpwc-border);
    background: var(--mmpwc-bg);
    color: var(--mmpwc-dark);
    border-radius: 999px;
    min-height: 42px;
    padding: 10px 14px;
    line-height: 1;
    cursor: pointer;
    transition: all .22s ease;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .06);
    appearance: none;
}

.mmpwc-action:hover,
.mmpwc-action.is-active {
    border-color: var(--mmpwc-accent);
    background: var(--mmpwc-accent-soft);
    color: var(--mmpwc-accent);
    transform: translateY(-1px);
}

.mmpwc-action:disabled {
    opacity: .65;
    cursor: wait;
}

.mmpwc-style-icon {
    width: 42px;
    min-width: 42px;
    padding: 0;
}

.mmpwc-icon,
.mmpwc-action img {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
}

.mmpwc-label {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.mmpwc-count {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--mmpwc-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 0 6px;
}

.mmpwc-page {
    direction: rtl;
    width: 100%;
    color: var(--mmpwc-dark);
}

.mmpwc-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--mmpwc-border);
    border-radius: var(--mmpwc-radius);
    background: linear-gradient(180deg, #fff 0%, #fbfbfb 100%);
}

.mmpwc-page-head h2 {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 900;
    color: var(--mmpwc-dark);
}

.mmpwc-page-head p {
    margin: 0;
    font-size: 14px;
    color: var(--mmpwc-muted);
}

.mmpwc-clear {
    border: 0;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
}

.mmpwc-clear:hover {
    transform: translateY(-1px);
    filter: brightness(.98);
}

.mmpwc-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    border: 1px dashed #d1d5db;
    border-radius: var(--mmpwc-radius);
    background: var(--mmpwc-soft);
    padding: 32px 20px;
}

.mmpwc-empty-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #fff;
    color: var(--mmpwc-accent);
    font-size: 36px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, .08);
}

.mmpwc-empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--mmpwc-muted);
}

.mmpwc-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(var(--mmpwc-columns, 4), minmax(0, 1fr));
    gap: 18px;
}

.mmpwc-product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #C8C8C8;
    border-radius: var(--mmpwc-radius);
    background: #fff;
    padding: 12px;
    transition: all .22s ease;
}

.mmpwc-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(17, 24, 39, .08);
}

.mmpwc-card-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--mmpwc-soft);
    aspect-ratio: 1 / 1;
}

.mmpwc-card-media a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.mmpwc-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform .25s ease;
}

.mmpwc-product-card:hover .mmpwc-card-media img {
    transform: scale(1.035);
}

.mmpwc-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
}

.mmpwc-card-remove {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(77, 157, 20, .22);
    background: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .12);
}

.mmpwc-card-remove img {
    width: 19px;
    height: 19px;
}

.mmpwc-card-body {
    padding: 12px 4px 2px;
}

.mmpwc-card-body h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.8;
}

.mmpwc-card-body h3 a {
    color: var(--mmpwc-dark);
    text-decoration: none;
}

.mmpwc-card-price {
    min-height: 30px;
    margin-bottom: 12px;
    color: var(--mmpwc-accent);
    font-size: 14px;
    font-weight: 900;
}

.mmpwc-card-price del {
    color: #9ca3af;
    font-weight: 600;
    margin-left: 6px;
}

.mmpwc-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 12px;
    background: var(--mmpwc-accent);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 900;
}

.mmpwc-compare-wrap {
    overflow-x: auto;
    border: 1px solid var(--mmpwc-border);
    border-radius: var(--mmpwc-radius);
    background: #fff;
}

.mmpwc-compare-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    direction: rtl;
}

.mmpwc-compare-table th,
.mmpwc-compare-table td {
    border-bottom: 1px solid var(--mmpwc-border);
    border-left: 1px solid var(--mmpwc-border);
    padding: 16px;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.9;
}

.mmpwc-compare-table th:last-child,
.mmpwc-compare-table td:last-child {
    border-left: 0;
}

.mmpwc-compare-table tr:last-child td {
    border-bottom: 0;
}

.mmpwc-compare-table thead th {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mmpwc-compare-table thead th:first-child,
.mmpwc-row-label {
    width: 170px;
    background: var(--mmpwc-soft);
    color: var(--mmpwc-dark);
    font-weight: 900;
}

.mmpwc-compare-product {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 210px;
}

.mmpwc-compare-remove {
    position: absolute;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    border: 1px solid var(--mmpwc-border);
    background: #fff;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(17,24,39,.08);
}

.mmpwc-compare-remove img {
    width: 15px;
    height: 15px;
}

.mmpwc-compare-image {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--mmpwc-soft);
    overflow: hidden;
}

.mmpwc-compare-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.mmpwc-compare-title {
    color: var(--mmpwc-dark);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.8;
    text-decoration: none !important;
}

.mmpwc-compare-price {
    color: var(--mmpwc-accent);
    font-size: 14px;
    font-weight: 900;
}

.mmpwc-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.mmpwc-stock.in-stock {
    background: var(--mmpwc-accent-soft);
    color: var(--mmpwc-accent);
}

.mmpwc-stock.out-stock {
    background: #fee2e2;
    color: #991b1b;
}

.mmpwc-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    max-width: min(360px, calc(100vw - 32px));
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    direction: rtl;
    padding: 13px 16px;
    border-radius: 14px;
    background: #111827;
    color: #fff;
    font-family: var(--mmpwc-font) !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.8;
    box-shadow: 0 18px 48px rgba(17, 24, 39, .22);
    transition: all .24s ease;
}

.mmpwc-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.mmpwc-toast.is-error {
    background: #991b1b;
}

.mmpwc-toast.is-success {
    background: #111827;
}

.is-loading {
    position: relative;
    pointer-events: none;
}

.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: mmpwcSpin .7s linear infinite;
}

@keyframes mmpwcSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .mmpwc-wishlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .mmpwc-page-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .mmpwc-page-head h2 {
        font-size: 20px;
    }

    .mmpwc-clear {
        width: 100%;
    }

    .mmpwc-wishlist-grid {
        grid-template-columns: 1fr;
    }

    .mmpwc-action {
        min-height: 40px;
        padding: 9px 12px;
    }

    .mmpwc-label {
        font-size: 12px;
    }

    .mmpwc-toast {
        right: 16px;
        bottom: 16px;
    }
}
