/* ═══════════════════════════════════════════════════════════════
   Wishlist & Compare — هماهنگ با header-pro / modern-ui
   ═══════════════════════════════════════════════════════════════ */

.shop-wc-page {
    --swc-brand: var(--head-pro-brand, var(--theam-color, #6554f2));
    --swc-brand2: var(--head-pro-brand2, var(--theam-secend-color, #00c7be));
    --swc-ink: var(--head-pro-ink, var(--ui-text, #172033));
    --swc-soft: var(--head-pro-soft, var(--ui-text-muted, #667085));
    --swc-line: var(--head-pro-line, var(--ui-border, #e7ebf3));
    --swc-bg: var(--head-pro-bg, var(--ui-surface-muted, #f7f9fe));
    --swc-surface: var(--ui-surface, #fff);
    --swc-shadow: var(--head-pro-shadow2, var(--ui-shadow-sm));
    --swc-radius: 20px;
    padding: 1.5rem 0 3rem;
    background: linear-gradient(180deg, var(--swc-bg) 0%, var(--swc-surface) 220px);
}

.shop-wc-page .shell-pro {
    width: min(1420px, calc(100% - 32px));
    margin-inline: auto;
}


/* ── Page hero ── */
.shop-wc-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding: 1.35rem 1.5rem;
    border-radius: var(--swc-radius);
    border: 1px solid var(--swc-line);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--swc-brand) 8%, #fff),
        color-mix(in srgb, var(--swc-brand2) 6%, #fff));
    box-shadow: var(--swc-shadow);
}

.shop-wc-hero__main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.shop-wc-hero__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    color: #fff;
    background: linear-gradient(135deg, var(--swc-brand), var(--swc-brand2));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--swc-brand) 28%, transparent);
    flex-shrink: 0;
}

.shop-wc-hero__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 900;
    color: var(--swc-ink);
    line-height: 1.35;
}

.shop-wc-hero__desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--swc-soft);
    line-height: 1.7;
    max-width: 42rem;
}

.shop-wc-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shop-wc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid var(--swc-line);
    background: var(--swc-surface);
    color: var(--swc-ink);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.shop-wc-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--swc-brand) 35%, var(--swc-line));
    color: var(--swc-brand);
    box-shadow: var(--swc-shadow);
}

.shop-wc-btn--brand {
    border: 0;
    color: var(--theam-text-color, #fff) !important;
    background: linear-gradient(135deg, var(--swc-brand), var(--swc-brand2));
    box-shadow: 0 12px 22px color-mix(in srgb, var(--swc-brand) 22%, transparent);
}

.shop-wc-btn--brand:hover {
    color: #fff !important;
}

.shop-wc-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--swc-brand);
    background: color-mix(in srgb, var(--swc-brand) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--swc-brand) 18%, var(--swc-line));
}

/* ── Utility bar (listing pages) ── */
.shop-utility-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.65rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--swc-line);
    background: var(--swc-surface);
    box-shadow: var(--swc-shadow);
}

.shop-utility-bar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shop-utility-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--swc-ink);
    background: var(--swc-bg);
    border: 1px solid var(--swc-line);
    transition: 0.15s ease;
}

.shop-utility-chip:hover {
    color: var(--swc-brand);
    border-color: color-mix(in srgb, var(--swc-brand) 30%, var(--swc-line));
}

.shop-utility-chip__count {
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--swc-brand), var(--swc-brand2));
}

.shop-utility-chip__count:empty,
.shop-utility-chip__count[data-count="0"] {
    display: none;
}

/* ── Product card / page action buttons ── */
.product-wc-toolbar {
    display: flex;
    gap: 0.4rem;
    z-index: 4;
}

.product-wc-toolbar--overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    flex-direction: column;
}

.product-wc-toolbar--panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 16px;
    border: 1px solid var(--swc-line);
    background: linear-gradient(180deg, var(--swc-bg), var(--swc-surface));
}

.product-wc-pill {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid color-mix(in srgb, #fff 70%, var(--swc-line));
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--swc-ink);
    background: color-mix(in srgb, #fff 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(20, 29, 56, 0.1);
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.product-wc-pill:hover {
    transform: translateY(-2px);
    color: var(--swc-brand);
    border-color: color-mix(in srgb, var(--swc-brand) 35%, var(--swc-line));
}

.product-wc-pill.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--swc-brand), var(--swc-brand2));
}

.product-wc-pill--wish.is-active {
    background: linear-gradient(135deg, #ef476f, #ff6b8a);
}

.product-wc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--swc-line);
    border-radius: 12px;
    background: var(--swc-surface);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--swc-ink);
    cursor: pointer;
    transition: 0.15s ease;
}

.product-wc-action:hover {
    border-color: color-mix(in srgb, var(--swc-brand) 30%, var(--swc-line));
    color: var(--swc-brand);
}

.product-wc-action.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--swc-brand), var(--swc-brand2));
}

.product-wc-action--wish.is-active {
    background: linear-gradient(135deg, #ef476f, #ff6b8a);
}

.product-wc-action--compare.is-active,
.product-wc-pill--compare.is-active {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.product-wc-action i {
    font-size: 1.1rem;
}

.product-page__gallery-main {
    position: relative;
}

.product-page__gallery-main .product-wc-toolbar--overlay {
    top: 12px;
    left: 12px;
}

/* home card: badges on right, tools on left */
.home-product-card__media .product-wc-toolbar--overlay,
.sin-product-card__media .product-wc-toolbar--overlay {
    top: 10px;
    left: 10px;
}

.products_page_color .product-image .product-wc-toolbar--overlay,
.products_page_color .sin-product-card__media .product-wc-toolbar--overlay {
    top: 10px;
    left: 10px;
    right: auto;
}

.products_page_color .product-badges,
.products_page_color .sin-product-card__badges {
    right: 10px;
    left: auto;
}

/* ── Wishlist grid cards ── */
.shop-wc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.shop-wc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--swc-line);
    border-radius: var(--swc-radius);
    overflow: hidden;
    background: var(--swc-surface);
    box-shadow: var(--swc-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-wc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--head-pro-shadow, var(--ui-shadow-md));
}

.shop-wc-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: var(--swc-bg);
    overflow: hidden;
}

.shop-wc-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.shop-wc-card:hover .shop-wc-card__media img {
    transform: scale(1.04);
}

.shop-wc-card__body {
    padding: 1rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.65rem;
}

.shop-wc-card__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.55;
}

.shop-wc-card__title a {
    color: var(--swc-ink);
    text-decoration: none;
}

.shop-wc-card__title a:hover {
    color: var(--swc-brand);
}

.shop-wc-card__price {
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--swc-brand);
}

.shop-wc-card__price-old {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--swc-soft);
    text-decoration: line-through;
}

.shop-wc-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.shop-wc-card__actions .shop-wc-btn {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    padding: 0.55rem 0.65rem;
    font-size: 0.78rem;
}

/* ── Empty & loading ── */
.shop-wc-empty,
.shop-wc-loading {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: var(--swc-radius);
    border: 1px dashed color-mix(in srgb, var(--swc-brand) 25%, var(--swc-line));
    background: var(--swc-surface);
}

.shop-wc-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: var(--swc-brand);
    background: color-mix(in srgb, var(--swc-brand) 12%, #fff);
}

.shop-wc-empty__title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--swc-ink);
}

.shop-wc-empty__text {
    margin: 0 0 1.25rem;
    color: var(--swc-soft);
    font-size: 0.9rem;
}

/* ── Compare table ── */
.shop-compare-shell {
    border-radius: var(--swc-radius);
    border: 1px solid var(--swc-line);
    background: var(--swc-surface);
    box-shadow: var(--swc-shadow);
    overflow: hidden;
}

.shop-compare-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.shop-compare-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.shop-compare-table th,
.shop-compare-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--swc-line);
    vertical-align: middle;
    font-size: 0.85rem;
}

.shop-compare-table thead th {
    border-bottom-width: 2px;
    background: var(--swc-bg);
}

.shop-compare-table__feature {
    min-width: 150px;
    font-weight: 900;
    color: var(--swc-ink);
    background: color-mix(in srgb, var(--swc-bg) 80%, #fff);
    position: sticky;
    right: 0;
    z-index: 2;
}

.shop-compare-table tbody th.shop-compare-table__feature {
    font-weight: 800;
    color: var(--swc-soft);
}

.shop-compare-table tbody tr:nth-child(even) td,
.shop-compare-table tbody tr:nth-child(even) th.shop-compare-table__feature {
    background: color-mix(in srgb, var(--swc-bg) 45%, #fff);
}

.shop-compare-table td {
    text-align: center;
    color: var(--swc-ink);
    font-weight: 700;
    min-width: 150px;
}

.shop-compare-product {
    position: relative;
    text-align: center;
    min-width: 140px;
}

.shop-compare-product__remove {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--swc-soft);
    box-shadow: 0 4px 12px rgba(20, 29, 56, 0.12);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 0.15s ease;
    z-index: 2;
}

.shop-compare-product__remove:hover {
    color: #ef476f;
    transform: scale(1.05);
}

.shop-compare-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding-top: 0.35rem;
}

.shop-compare-product__img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 0.55rem;
    display: block;
    border: 1px solid var(--swc-line);
}

.shop-compare-product__title {
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-compare-product__link:hover .shop-compare-product__title {
    color: var(--swc-brand);
}

@media (max-width: 575.98px) {
    .shop-wc-hero {
        padding: 1rem;
    }

    .product-wc-toolbar--panel {
        grid-template-columns: 1fr;
    }

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