/* ═══════════════════════════════════════════════
   بنر جشنواره (دیجی‌کالا استایل)
   ═══════════════════════════════════════════════ */
.sale-banner {
    margin-bottom: 24px;
}

.sale-banner__wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    background: linear-gradient(135deg, #6a1e55 0%, #4a1540 60%, #2d0e28 100%);
    border-radius: var(--shop-radius-lg);
    overflow: hidden;
    position: relative;
}

/* گرادیانت نور */
.sale-banner__wrap::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--shop-gold);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    top: -120px;
    left: -60px;
    pointer-events: none;
}

/* ─── ستون راست: تیتر ─── */
.sale-banner__head {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sale-banner__head-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--shop-gold);
    width: fit-content;
    backdrop-filter: blur(10px);
}

.sale-banner__head-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.sale-banner__head-title span {
    color: var(--shop-gold);
    font-size: 1.8rem;
}

.sale-banner__head-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 6px;
}

/* ─── تایمر ─── */
.sale-banner__timer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.sale-banner__timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 46px;
    backdrop-filter: blur(10px);
}

.sale-banner__timer-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--shop-gold);
    font-family: 'Courier New', monospace;
    direction: ltr;
    line-height: 1;
}

.sale-banner__timer-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.sale-banner__timer-sep {
    color: var(--shop-gold);
    font-weight: 800;
    opacity: 0.5;
}

/* ─── اسلایدر ─── */
.sale-banner__slider-wrap {
    overflow: hidden;
    position: relative;
}

.sale-banner__slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sale-banner__slider::-webkit-scrollbar {
    height: 4px;
}

.sale-banner__slider::-webkit-scrollbar-track {
    background: transparent;
}

.sale-banner__slider::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* ─── کارت محصول در بنر ─── */
.sale-card {
    flex: 0 0 180px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sale-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.sale-card__img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
    overflow: hidden;
}

.sale-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sale-card__img-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d0d0d0;
}

.sale-card__off {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 6px;
    direction: ltr;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.sale-card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.sale-card__title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--shop-text);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em;
}

.sale-card__price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
}

.sale-card__price-old {
    font-size: 0.68rem;
    color: #c0c0c0;
    text-decoration: line-through;
    direction: ltr;
    text-align: right;
}

.sale-card__price-new {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--shop-primary);
    direction: ltr;
    text-align: right;
    display: flex;
    align-items: baseline;
    gap: 3px;
    justify-content: flex-end;
}

.sale-card__price-new small {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--shop-text-mute);
}

@media (max-width: 991.98px) {
    .sale-banner__wrap {
        grid-template-columns: 1fr;
    }

    .sale-banner__head {
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 18px;
        text-align: center;
        align-items: center;
    }

    .sale-banner__head-title {
        font-size: 1.15rem;
    }

    .sale-banner__head-title span {
        font-size: 1.35rem;
    }

    .sale-banner__head-sub {
        font-size: 0.75rem;
    }

    .sale-card {
        flex: 0 0 155px;
    }

    .sale-banner__slider {
        padding: 14px;
    }
}

/* ═══════════════════════════════════════════════
   Toolbar — بازطراحی
   ═══════════════════════════════════════════════ */
.shop-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    margin-bottom: 12px;
}

.shop-toolbar__search {
    flex: 1;
    min-width: 0;
}

.shop-toolbar__search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.shop-toolbar__search-wrap>svg {
    position: absolute;
    right: 14px;
    color: var(--shop-text-mute);
    pointer-events: none;
}

.shop-toolbar__input {
    width: 100%;
    padding: 11px 44px 11px 40px;
    background: var(--shop-bg-soft);
    border: 1px solid var(--shop-border);
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s;
}

.shop-toolbar__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--shop-primary);
    box-shadow: 0 0 0 3px rgba(106, 30, 85, 0.08);
}

.shop-toolbar__clear {
    position: absolute;
    left: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--shop-border);
    border-radius: 50%;
    color: var(--shop-text-soft);
    transition: all 0.2s;
}

.shop-toolbar__clear:hover {
    background: var(--shop-danger);
    color: #fff;
}

.shop-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.shop-toolbar__count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--shop-text-soft);
    white-space: nowrap;
}

.shop-toolbar__count strong {
    font-size: 1rem;
    font-weight: 800;
    color: var(--shop-primary);
}

/* ─── sort dropdown ─── */
.shop-toolbar__sort {
    position: relative;
}

.shop-toolbar__sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--shop-bg-soft);
    border: 1px solid var(--shop-border);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--shop-text);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
}

.shop-toolbar__sort-btn:hover {
    background: #fff;
    border-color: var(--shop-primary);
    color: var(--shop-primary);
}

.shop-toolbar__sort-btn::after {
    display: none;
}

.shop-toolbar__sort-btn svg:last-child {
    transition: transform 0.2s;
    opacity: 0.6;
}

.shop-toolbar__sort-btn[aria-expanded="true"] svg:last-child {
    transform: rotate(180deg);
}

.shop-toolbar .dropdown-menu {
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    box-shadow: var(--shop-shadow-md);
    padding: 6px;
    min-width: 180px;
    margin-top: 6px;
}

.shop-toolbar .dropdown-item {
    border-radius: 8px;
    font-size: 0.82rem;
    padding: 9px 14px;
    color: var(--shop-text-soft);
    transition: all 0.15s;
}

.shop-toolbar .dropdown-item:hover {
    background: var(--shop-bg-soft);
    color: var(--shop-primary);
}

.shop-toolbar .dropdown-item.active {
    background: var(--shop-primary);
    color: #fff;
    font-weight: 700;
}

.shop-toolbar .dropdown-item.active:hover {
    background: var(--shop-primary-light);
    color: #fff;
}

/* ═══════════════════════════════════════════════
   Chips — مثل آکادمی
   ═══════════════════════════════════════════════ */
.shop-toolbar__chips {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.shop-chips__count {
    font-size: 0.82rem;
    color: var(--shop-text-soft);
    white-space: nowrap;
}

.shop-chips__count strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--shop-primary);
}

.shop-chips__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    justify-content: flex-end;
}

.shop-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(106, 30, 85, 0.06);
    border: 1px solid rgba(106, 30, 85, 0.12);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--shop-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.shop-chip:hover {
    background: rgba(106, 30, 85, 0.12);
    color: var(--shop-primary);
}

.shop-chip__x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--shop-primary);
    opacity: 0.6;
    line-height: 1;
}

.shop-chip:hover .shop-chip__x {
    opacity: 1;
}

.shop-chips__reset {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--shop-danger);
    text-decoration: none;
    transition: all 0.2s;
}

.shop-chips__reset:hover {
    background: var(--shop-danger);
    color: #fff;
    border-color: var(--shop-danger);
}

/* ═══════════════════════════════════════════════
   Product Card — بازطراحی
   ═══════════════════════════════════════════════ */
.pc {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pc:hover {
    border-color: rgba(106, 30, 85, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(106, 30, 85, 0.12);
}

/* ─── Image ─── */
.pc__img-wrap {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fafafa;
}

.pc__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.pc:hover .pc__img {
    transform: scale(1.05);
}

.pc__img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d0d0d0;
}

/* ─── Discount badge ─── */
.pc__discount {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 6px;
    direction: ltr;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
    z-index: 2;
}

/* ─── Out of stock ─── */
.pc__out {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-text-soft);
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
}

/* ─── Wishlist ─── */
.pc__wishlist {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: var(--shop-text-mute);
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pc__wishlist:hover {
    color: var(--shop-danger);
    transform: scale(1.1);
}

.pc__wishlist.is-active {
    color: var(--shop-danger);
}

/* ─── Body ─── */
.pc__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.pc__title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.55;
    margin: 0;
    color: var(--shop-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.65em;
}

.pc__title a {
    color: inherit;
    text-decoration: none;
}

.pc__title a:hover {
    color: var(--shop-primary);
}

.pc__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--shop-text-mute);
}

.pc__dot {
    color: #ddd;
}

.pc__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--shop-text-soft);
}

.pc__rating svg {
    color: #ffb321;
}

.pc__rating-count {
    color: var(--shop-text-mute);
}

/* ─── Footer ─── */
.pc__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--shop-border);
}

.pc__price {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.pc__price-old {
    font-size: 0.68rem;
    color: #c0c0c0;
    text-decoration: line-through;
    direction: ltr;
    text-align: right;
    line-height: 1.2;
}

.pc__price-new {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--shop-primary);
    direction: ltr;
    text-align: right;
    line-height: 1.2;
}

.pc__price-unit {
    font-size: 0.65rem;
    color: var(--shop-text-mute);
    text-align: right;
}

/* ─── Cart button ─── */
.pc__cart-form {
    display: contents;
}

.pc__cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-light));
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(106, 30, 85, 0.25);
    font-family: inherit;
    flex-shrink: 0;
}

.pc__cart-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 16px rgba(106, 30, 85, 0.4);
}

.pc__cart-btn--out {
    background: #f5f5f5;
    color: var(--shop-text-mute);
    box-shadow: none;
    cursor: not-allowed;
}

.pc__cart-btn--out:hover {
    transform: none;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .shop-toolbar {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .shop-toolbar__search {
        width: 100%;
    }

    .shop-toolbar__actions {
        justify-content: space-between;
        width: 100%;
    }

    .shop-toolbar__chips {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .shop-chips__list {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .pc__body {
        padding: 10px;
        gap: 5px;
    }

    .pc__title {
        font-size: 0.78rem;
        -webkit-line-clamp: 2;
        min-height: 2.5em;
    }

    .pc__meta {
        font-size: 0.65rem;
    }

    .pc__rating {
        font-size: 0.65rem;
    }

    .pc__price-old {
        font-size: 0.62rem;
    }

    .pc__price-new {
        font-size: 0.85rem;
    }

    .pc__price-unit {
        font-size: 0.6rem;
    }

    .pc__cart-btn {
        width: 34px;
        height: 34px;
    }

    .pc__wishlist {
        width: 28px;
        height: 28px;
        top: 6px;
        left: 6px;
    }

    .pc__discount {
        font-size: 0.62rem;
        padding: 2px 6px;
        top: 6px;
        right: 6px;
    }
}