/* Product detail — hero / gallery / specs (desktop + mobile) */

:root {
    --product-text: #2d2e32;
    --product-muted: #9ca3af;
    --product-border: #e5e7eb;
    --product-breadcrumb: #5bb8d4;
    --product-sale: #e11d2e;
    --product-check: #22a45a;
    --product-btn: #2d2e32;
    --product-btn-hover: #1a1b1e;
    --product-share: #b0b3b8;
}

.product-area {
    color: var(--product-text);
    background: #fff;
}

/* Sticky progress while add-to-cart request is in flight */
.product-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1080;
    height: 3px;
    width: 100%;
    background: transparent;
    pointer-events: none;
}

.product-progress[hidden] {
    display: none !important;
}

.product-progress__bar {
    height: 100%;
    width: 35%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    animation: product-progress-slide 1s ease-in-out infinite;
}

@keyframes product-progress-slide {
    0% { transform: translateX(120%); }
    100% { transform: translateX(-320%); }
}

body.product-add-busy {
    cursor: progress;
}

.product-area.is-adding .js-add-to-cart {
    pointer-events: none;
}

/* —— Sale badge —— */
.product-sale-badge {
    color: var(--product-sale);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* —— Gallery —— */
.product-gallery__main {
    position: relative;
    background: #fff;
    border-radius: 0.25rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* <picture> must fill the box; otherwise img max-height:100% uses the
   image's intrinsic size and overflow:hidden crops the selected photo. */
.product-gallery__main > picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.product-gallery__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-gallery__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #adb5bd;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    font-size: 0.9rem;
}

.product-gallery__placeholder .bi {
    font-size: 2.5rem;
}

.product-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(230, 230, 230, 0.9);
    color: var(--product-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 2;
}

.product-gallery__main:hover .product-gallery__nav,
.product-gallery__nav:focus-visible {
    opacity: 1;
}

.product-gallery__nav:hover {
    background: #d8d8d8;
}

.product-gallery__nav--prev {
    right: 0.75rem;
}

.product-gallery__nav--next {
    left: 0.75rem;
}

.product-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.product-gallery__thumb {
    flex: 0 0 auto;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0;
    border: 1px solid var(--product-border);
    border-radius: 0.35rem;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery__thumb.is-active,
.product-gallery__thumb:hover {
    border-color: var(--product-text);
}

/* —— Mobile purchase bar —— */
.product-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fefefe;
    padding: 0.65rem 0.75rem;
    margin-top: 0;
    position: sticky;
    bottom: 0;
    z-index: 20;
}

.product-mobile-bar .product-add-to-cart {
    flex: 1 1 auto;
    min-width: 0;
}
.product-mobile-bar button.product-add-to-cart {
    font-size:0.8rem;
}
.product-mobile-bar__price {
    flex: 0 0 auto;
    text-align: start;
    color: #32325d;
}

    .product-mobile-bar__price .product-price__old {
        color: #6e7c91;
        font-size: 0.75rem;
    }

    .product-mobile-bar__price .product-price__final {
        color: #32325d;
        font-size: 0.95rem;
    }

    .product-mobile-bar__price .product-price__currency {
        color: #32325d;
        font-size: 0.7rem;
    }

    .product-mobile-bar__price .product-discount-badge {
        background: #32325d;
        color:white;
    }

/* —— Breadcrumb / title —— */
.product-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--product-breadcrumb);
}

.product-breadcrumb a {
    color: var(--product-breadcrumb);
    text-decoration: none;
}

.product-breadcrumb a:hover {
    text-decoration: underline;
}

.product-breadcrumb__sep {
    margin: 0 0.35rem;
    opacity: 0.7;
}

.product-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.55;
    margin: 0 0 1rem;
    color: var(--product-text);
}

/* —— Price —— */
.product-sku {
    display: inline-block;
    background: #4a4b50;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.product-price__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.product-mobile-bar__price .product-price__row{
    direction:ltr;
}

.product-price__old {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.product-discount-badge {
    display: inline-block;
    background: #1f2023;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
}

.product-price__final {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.product-price__final strong {
    font-size: 1.45rem;
    font-weight: 800;
}

.product-price__currency {
    font-size: 0.85rem;
    color: #6b7280;
}

/* —— Variant pickers (one dropdown per feature) —— */
.product-variant-pickers {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 22rem;
}

.product-variant-picker {
    max-width: 22rem;
}

.product-variant-picker__label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.45rem;
}

.product-variant-select {
    position: relative;
}

.product-variant-select__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--product-border);
    border-radius: 0.65rem;
    background: #fff;
    color: var(--product-text);
    cursor: pointer;
    text-align: start;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-variant-select__trigger:hover:not(:disabled),
.product-variant-select.is-open .product-variant-select__trigger {
    border-color: #c5c9d0;
}

.product-variant-select__trigger:disabled {
    cursor: default;
    opacity: 1;
}

.product-variant-select__value {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.product-variant-select__swatch {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.2rem;
    border: 1px solid #d1d5db;
    flex-shrink: 0;
    display: inline-block;
}

.product-variant-select__chevron {
    font-size: 0.85rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.product-variant-select__menu {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 0.35rem);
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--product-border);
    border-radius: 0.65rem;
    box-shadow: 0 8px 24px rgba(45, 46, 50, 0.08);
    z-index: 40;
    max-height: 14rem;
    overflow-y: auto;
}

.product-variant-select__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.product-variant-select__option:hover,
.product-variant-select__option.is-selected {
    background: #f5f6f8;
}

.product-variant-select__badge {
    margin-inline-start: auto;
    font-size: 0.75rem;
    color: #6b7280;
}

/* —— Add to cart —— */
.product-add-to-cart {
    appearance: none;
    border: none;
    background: var(--product-btn);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.25rem;
    border-radius: 0.65rem;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.product-add-to-cart--full {
    width: 100%;
    max-width: 22rem;
    padding: 0.85rem 1.5rem;
}

.product-add-to-cart:hover:not(:disabled) {
    background: var(--product-btn-hover);
}

.product-add-to-cart:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* —— Share —— */
.product-share {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1.25rem 0;
}

.product-share__btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--product-share);
    background: transparent;
    text-decoration: none;
    font-size: 1.15rem;
    transition: color 0.15s ease;
}

.product-share__btn:hover {
    color: var(--product-text);
}

/* —— Short description / مشخصات —— */
.product-specs {
    margin-top: 0.5rem;
}

.product-specs__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
    color: var(--product-text);
}

.product-specs__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    background: var(--product-check);
    color: #fff;
    border-radius: 0.2rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.product-specs__body {
    font-size: 0.92rem;
    line-height: 1.9;
    color: #3f4147;
}

/* Plain-text short description: preserve line breaks */
.product-specs__body:not(:has(ul)):not(:has(ol)):not(:has(p)) {
    white-space: pre-line;
}

.product-specs__body ul,
.product-specs__body ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-specs__body li {
    position: relative;
    padding-right: 1.1rem;
    margin-bottom: 0.35rem;
}

.product-specs__body li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.55em;
    width: 0.4rem;
    height: 0.4rem;
    background: var(--product-text);
    border-radius: 0.05rem;
}

.product-description {
    line-height: 1.8;
    color: #3f4147;
}

/* —— Desktop —— */
@media (min-width: 992px) {
    .product-title {
        font-size: 1.65rem;
    }

    .product-gallery__main {
        aspect-ratio: 4 / 3;
        max-height: 420px;
    }

    .product-gallery__thumb {
        width: 5rem;
        height: 5rem;
    }

    .product-gallery__nav {
        opacity: 0.85;
    }

    /* Vertical share rail on the far start (left in RTL visual far side) */
    .product-share {
        position: fixed;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        margin: 0;
        z-index: 30;
    }

    .product-info-col {
        padding-top: 0.25rem;
    }
}

@media (max-width: 991.98px) {
    .product-gallery__nav {
        opacity: 0.75;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-share {
        justify-content: flex-start;
    }
}

/* —— Add-to-cart product form modal —— */
.product-form-modal {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.product-form-modal__body {
    padding: 1.5rem 1.5rem 0.75rem;
}

.product-form-modal__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: #1e293b;
}

.product-form-modal__title--sub {
    font-size: 1rem;
    margin-top: 1.25rem;
}

.product-form-modal__desc {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.product-form-modal__field {
    margin-bottom: 1rem;
}

.product-form-modal__label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: #334155;
}

.product-form-modal__sep {
    color: #94a3b8;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin: 0.75rem 0 1rem;
}

.product-form-modal__check {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding: 0;
    min-height: auto;
}

/* In RTL: checkbox (order 1) on the right, label text to its left */
.product-form-modal__check .form-check-input {
    float: none;
    position: static;
    margin: 0;
    flex-shrink: 0;
    order: 1;
}

.product-form-modal__check .form-check-label {
    padding: 0;
    margin: 0;
    order: 2;
}

.product-form-modal__footer {
    display: flex;
    flex-direction: row-reverse;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.product-form-modal__btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.95rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.product-form-modal__btn--ghost {
    color: #64748b;
    border-left: 1px solid #e2e8f0;
}

.product-form-modal__btn--primary {
    color: #0f172a;
}

.product-form-modal__btn:hover {
    background: #f1f5f9;
}

/* ——— ProductReviews (system component) ——— */
.product-reviews {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    font-family: IRANYekan, Vazirmatn, sans-serif;
    color: #0f172a;
}

.product-reviews__head {
    margin-bottom: 1.25rem;
}

.product-reviews__title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.product-reviews__avg {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.95rem;
}

.product-reviews__avg .bi-star-fill {
    color: #f59e0b;
}

.product-reviews__item {
    padding: 1.15rem 0;
    border-top: 1px solid #eef2f7;
}

.product-reviews__item:first-child {
    border-top: none;
}

.product-reviews__who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
}

.product-reviews__name {
    font-weight: 700;
    color: #1e293b;
}

.product-reviews__buyer {
    display: inline-flex;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-reviews__date {
    color: #94a3b8;
    font-size: 0.85rem;
}

.product-reviews__stars {
    display: flex;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.product-reviews__stars .bi-star-fill {
    color: #f59e0b;
}

.product-reviews__suggest {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-reviews__suggest.is-yes {
    color: #ca8a04;
}

.product-reviews__suggest.is-no {
    color: #94a3b8;
}

.product-reviews__body {
    margin: 0 0 0.35rem;
    color: #475569;
    line-height: 1.7;
    font-size: 0.92rem;
    white-space: pre-wrap;
}

.product-reviews__body.is-clamped {
    max-height: calc(1.7em * 4);
    overflow: hidden;
}

.product-reviews__more {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0 0 0.75rem;
    color: #0ea5e9;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.product-reviews__more:hover {
    color: #0284c7;
    text-decoration: underline;
}

.product-reviews__points {
    margin-bottom: 0.5rem;
}

.product-reviews__points-title {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: #334155;
}

.product-reviews__points ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-reviews__points li {
    position: relative;
    padding-right: 1.1rem;
    margin-bottom: 0.25rem;
    font-size: 0.88rem;
    color: #475569;
}

.product-reviews__points li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.45rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
}

.product-reviews__points.is-pro li::before {
    background: #22c55e;
}

.product-reviews__points.is-con li::before {
    background: #f87171;
}

/* Aggregate review photos strip */
.product-reviews__gallery {
    margin: 0 0 1.25rem;
}

.product-reviews__gallery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-reviews__gallery-thumb {
    appearance: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.product-reviews__gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-reviews__gallery-all {
    appearance: none;
    border: none;
    background: none;
    color: #0284c7;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.55rem;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.product-reviews__item-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.65rem 0 0.85rem;
}

.product-reviews__item-photo {
    appearance: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.product-reviews__item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Review photo lightbox */
.review-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.review-gallery-lightbox[hidden] {
    display: none !important;
}

.review-gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
}

.review-gallery-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
    width: min(1100px, 100%);
    max-height: min(90vh, 820px);
    background: #0b1220;
    border-radius: 16px;
    overflow: hidden;
    color: #e2e8f0;
}

.review-gallery-lightbox__close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    cursor: pointer;
}

.review-gallery-lightbox__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    min-height: 320px;
}

.review-gallery-lightbox__img {
    max-width: 100%;
    max-height: min(88vh, 780px);
    object-fit: contain;
}

.review-gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-gallery-lightbox__nav.is-prev {
    right: 0.75rem;
}

.review-gallery-lightbox__nav.is-next {
    left: 0.75rem;
}

.review-gallery-lightbox__side {
    padding: 1.25rem 1.15rem;
    background: #111827;
    overflow: auto;
    direction: rtl;
    text-align: right;
}

.review-gallery-lightbox__who {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}

.review-gallery-lightbox__name {
    font-weight: 700;
    color: #f8fafc;
}

.review-gallery-lightbox__buyer {
    font-size: 0.72rem;
    font-weight: 600;
    color: #047857;
    background: #d1fae5;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.review-gallery-lightbox__stars {
    color: #f59e0b;
    margin-bottom: 0.65rem;
    letter-spacing: 0.05em;
}

.review-gallery-lightbox__body {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #cbd5e1;
    white-space: pre-wrap;
}

.review-gallery-lightbox__points {
    margin-bottom: 0.65rem;
    font-size: 0.85rem;
}

.review-gallery-lightbox__points ul {
    margin: 0.25rem 0 0;
    padding: 0 1rem 0 0;
}

.review-gallery-lightbox__points.is-pro {
    color: #86efac;
}

.review-gallery-lightbox__points.is-con {
    color: #fca5a5;
}

.review-gallery-lightbox__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

@media (max-width: 767px) {
    .review-gallery-lightbox__dialog {
        grid-template-columns: 1fr;
        max-height: 92vh;
    }

    .review-gallery-lightbox__media {
        min-height: 240px;
        max-height: 48vh;
    }

    .review-gallery-lightbox__img {
        max-height: 48vh;
    }

    .review-gallery-lightbox__side {
        max-height: 42vh;
    }
}

/* ——— Leave review CTA + modal ——— */
.product-reviews__head--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-reviews__leave-btn {
    appearance: none;
    border: none;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.product-reviews__leave-btn:hover {
    background: #1e293b;
}

.product-reviews__hint {
    margin: -0.5rem 0 1.25rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.product-reviews__empty {
    padding: 1.25rem 0;
    color: #64748b;
    font-size: 0.95rem;
}

.product-review-modal[hidden] {
    display: none !important;
}

.product-review-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.product-review-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    font-family: IRANYekan, Vazirmatn, sans-serif;
}

.product-review-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.product-review-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.product-review-modal__close {
    appearance: none;
    border: none;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: #334155;
}

.product-review-modal__body {
    padding: 1.15rem;
}

.product-review-modal__field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.product-review-modal__field input,
.product-review-modal__field textarea {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-weight: 400;
    font-size: 0.9rem;
}

.product-review-modal__submit {
    width: 100%;
    appearance: none;
    border: none;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.5rem;
}

.product-review-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.review-field {
    margin-bottom: 1rem;
}

.review-field__label {
    margin: 0 0 0.55rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.review-stars {
    display: flex;
    gap: 0.35rem;
    direction: ltr;
    justify-content: flex-end;
}

.review-stars__btn {
    appearance: none;
    border: none;
    background: none;
    color: #cbd5e1;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.review-stars__btn.is-on {
    color: #38bdf8;
}

.review-suggest {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.review-suggest__btn {
    appearance: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    padding: 0.65rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
}

.review-suggest__btn.is-active {
    border-color: #12192c;
    background: #f8fafc;
    color: #0f172a;
}

.review-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.review-points__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.review-points__label.is-pro {
    color: #15803d;
}

.review-points__label.is-con {
    color: #b91c1c;
}

.review-points__add {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.review-points__add input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
    font-family: inherit;
}

.review-points__submit {
    appearance: none;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
}

.review-points__submit.is-pro {
    background: #15803d;
}

.review-points__submit.is-con {
    background: #b91c1c;
}

.review-points__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.review-points__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.82rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.review-points__list li button {
    appearance: none;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.review-points__hint {
    margin: -0.5rem 0 1rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.review-photos {
    margin-bottom: 1rem;
}

.review-dropzone {
    border: 1.5px dashed #0f172a;
    border-radius: 14px;
    padding: 1.35rem 1rem;
    text-align: center;
    cursor: pointer;
    background: #fff;
    color: #64748b;
}

.review-dropzone:hover,
.review-dropzone.is-dragover {
    background: #f8fafc;
    border-color: #38bdf8;
}

.review-dropzone .bi-cloud-arrow-up {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.45rem;
    color: #94a3b8;
}

.review-dropzone__title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.review-dropzone__hint {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
}

.review-photos__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0.75rem 0 0;
}

.review-photos__item {
    position: relative;
    width: 72px;
    height: 72px;
}

.review-photos__item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.review-photos__item button {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: none;
    background: #0f172a;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.review-photos__status.is-error {
    color: #b91c1c;
}

.review-photos__status.is-ok {
    color: #15803d;
}

.review-anon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
}

@media (max-width: 575px) {
    .review-points {
        grid-template-columns: 1fr;
    }

    .review-suggest {
        grid-template-columns: 1fr;
    }
}

/* ——— ProductQuestions (optional component) ——— */
.product-questions {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    font-family: IRANYekan, Vazirmatn, sans-serif;
    color: #0f172a;
}

.product-questions__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.product-questions__title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.product-questions__subtitle {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
}

.product-questions__ask-btn {
    appearance: none;
    border: none;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.product-questions__ask-btn:hover {
    background: #1e293b;
}

.product-questions__empty {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.product-questions__item {
    padding: 1.15rem 0;
    border-top: 1px solid #eef2f7;
}

.product-questions__item:first-child {
    border-top: none;
}

.product-questions__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.product-questions__name {
    font-weight: 700;
}

.product-questions__date {
    color: #94a3b8;
}

.product-questions__headline {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}

.product-questions__text {
    margin: 0;
    color: #475569;
    line-height: 1.7;
    font-size: 0.92rem;
    white-space: pre-wrap;
}

.product-questions__a {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border-right: 3px solid #0ea5e9;
}

.product-questions__a-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 0.35rem;
}

.product-question-modal[hidden] {
    display: none !important;
}

.product-question-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-question-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.product-question-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    font-family: IRANYekan, Vazirmatn, sans-serif;
}

.product-question-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
}

.product-question-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.product-question-modal__close {
    appearance: none;
    border: none;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: #334155;
}

.product-question-modal__body {
    padding: 1.15rem;
}

.product-question-modal__field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.product-question-modal__field input,
.product-question-modal__field textarea {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-weight: 400;
    font-size: 0.9rem;
}

.product-question-modal__hint {
    margin: -0.5rem 0 1rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
}

.product-question-modal__submit {
    width: 100%;
    appearance: none;
    border: none;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.product-question-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

