.comments-item-rating {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comments-item-rating li {
    margin-bottom: 20px;
}

.cell-title {
    display: inline-block;
    width: 70%;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.cell-value {
    display: inline-block;
    width: 50%;
    text-align: left;
    color: #333;
    font-weight: 500;
}

.rating-general {
    width: 100%;
    height: 6px;
    background-color: #ddd;
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}

.rating-value {
    height: 100%;
    background-color: #7c3aed; /* رنگ بنفش */
    border-radius: 4px;
}

/*///////////////////////////////////////*/
.star {
    position: relative;
}

.star::before {
    content: '\2605'; /* Unicode برای ستاره پر */
    font-size: 2rem;
    color: #ccc; /* رنگ پیش‌فرض خاکی */
    text-align: center;
    line-height: 2rem;
}

.star-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: 0;
}

.star.bg-yellow-400::before {
    color: #fbbf24; /* رنگ طلایی برای ستاره‌های انتخاب‌شده */
}

.star:hover::before {
    color: #fbbf24; /* رنگ طلایی در هنگام hover */
}

.text-yellow-400 {
    color: #FFD700;
}

/*///////////////////////////////////*/
/* =========================
   MOBILE CART BAR (2026 MODERN UI)
========================= */

.mobile-cart-container {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 50;

    padding: 12px 14px;

    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-top: 1px solid rgba(226, 232, 240, 0.7);

    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);

    transition: transform .25s ease, opacity .25s ease;
}

/* hide on desktop */
@media (min-width: 1024px) {
    .mobile-cart-container {
        display: none;
    }
}

/* =========================
   INNER LAYOUT
========================= */

.mobile-cart-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* =========================
   INFO SECTION
========================= */

.mobile-cart-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #0f172a;
    gap: 2px;
}

/* stock warning (modern subtle alert) */
.stock-warning {
    color: #ef4444;
    font-weight: 700;
    font-size: 12px;
}

/* =========================
   PRICE SECTION (MODERN STACK)
========================= */

.price-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

/* old price */
.old-price {
    text-decoration: line-through;
    color: #f87171;
    font-size: 12px;
    opacity: 0.8;
}

/* wrapper */
.old-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* discount badge (pill modern 2026) */
.discount-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;

    font-size: 11px;
    font-weight: 800;

    padding: 3px 8px;

    border-radius: 999px;

    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.25);
}

/* current price (emphasis system) */
.discounted-price,
.rell-price-product {
    color: #16a34a;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.2px;
}

/* =========================
   STOCK INFO
========================= */

.stock-info {
    display: block;
    color: #dc2626;
    font-size: 12px;
    margin-bottom: 4px;
}

/* =========================
   ADD TO CART BUTTON (2026 CTA)
========================= */

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);

    color: #fff;

    padding: 11px 14px;

    border-radius: 14px;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    transition: all .2s ease;

    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.add-to-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

.add-to-cart-btn:active {
    transform: scale(.98);
}

/* =========================
   SCROLL AREA
========================= */

.space-y-4 {
    overflow-y: auto;
    max-height: 500px;
}

/* =========================
   UTILITIES
========================= */

.green-to {
    color: #16a34a;
}

/* soft modern shadow system */
.box-shadow {
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.06);
}

/*//////////////////////////////////////////////////*/
.star-rating {
    font-family: Arial, sans-serif;
    letter-spacing: 0; /* حذف فاصله اضافی */
    user-select: none;
    position: relative;
    display: inline-block;
    color: #ddd;
    font-size: 1.5rem;
    line-height: 1;
}

.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #facc15;
    pointer-events: none;
    transition: width 0.3s ease;
}

.heart-active {
    color: red;
    stroke: red;
    fill: red;
}

#size-result-container {
    display: none; /* پیش‌فرض مخفی */
    margin: 0 auto; /* مرکز افقی */
    padding: 1rem 1rem;
    max-width: 380px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5); /* پس‌زمینه */
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;

    /* وسط چین کردن محتوا */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* وقتی نمایش داده می‌شود */
#size-result-container.show {
    transform: scale(1);
    opacity: 1;
}


/* Header / Title */
.size-result-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e40af; /* آبی تیره */
    margin-bottom: 0.5rem;
}


/* دکمه کوچک بستن در صورت نیاز */
.size-result-close {
    margin-top: 0.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.size-result-close:hover {
    background: #1e40af;
}


/* Wrapper برای حالت غیر عضو */
.size-overlay-wrapper {
    position: relative;
}

/* تار شدن فرم پشت */
.size-overlay-wrapper form {
    filter: blur(2px);
    pointer-events: none; /* غیرقابل کلیک */
}

/* لایه محتوا روی فرم */
.overlay-content {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 0.5rem;
}


/* Wrapper بخش غیر عضو */
.non-member-prompt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    margin: 0 auto;
}

/* متن پیام */
.non-member-prompt p {
    font-size: 1.3rem; /* کمی بزرگ‌تر */
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

/* دکمه ورود */
.non-member-prompt a {
    display: inline-block;
    background-color: #2563eb;
    color: #fff;
    font-weight: 350;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.3s, transform 0.2s;
}

.non-member-prompt a:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
}

/*///////////////////////////////////// نقشه راه محصول /////////////////////////////*/


/* =========================
   SPECIAL OFFER BADGE (MODERN 2025)
========================= */

.spx-offer-bar {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.spx-offer-badge {

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;

    border-radius: 999px;

    background: #fef2f2;

    color: #dc2626;

    font-size: 12.5px;
    font-weight: 700;

    border: 1px solid #fee2e2;

    letter-spacing: 0;

    box-shadow: none;

    position: relative;
}

/* dot (modern minimal pulse) */
.spx-offer-dot {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #ef4444;

    box-shadow: none;
}

/* =========================
   MOBILE ACTIONS (MODERN)
========================= */

.spx-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 18px;
    margin-bottom: 18px;

    direction: rtl; /* مهم برای فارسی */
}

/* =========================
   SIZE BUTTON (RIGHT SIDE)
========================= */

.spx-size-finder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 42px;

    padding: 0 14px;
    gap: 8px;

    border-radius: 12px;

    background: #0f172a;
    color: #fff;

    font-size: 12.5px;
    font-weight: 700;

    border: 1px solid rgba(255, 255, 255, 0.06);

    cursor: pointer;

    transition: all .18s ease;

    white-space: nowrap;
}

.spx-size-finder-btn:hover {
    background: #111827;
}

.spx-size-finder-btn:active {
    transform: scale(.97);
}

/* =========================
   ICON GROUP (LEFT SIDE)
========================= */

.spx-mobile-actions-icons {
    display: flex;
    align-items: center;
    gap: 8px;

    flex-shrink: 0;
}

/* =========================
   ICON BUTTONS (MODERN SQUARE)
========================= */

.spx-action-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    border: 1px solid #e2e8f0;

    background: #ffffff;
    color: #0f172a;

    cursor: pointer;

    transition: all .18s ease;
}

.spx-action-icon:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.spx-action-icon:active {
    transform: scale(.97);
}

/* =========================
   FAVORITE ACTIVE STATE
========================= */

.favorite-toggle.active {
    color: #ef4444;
    border-color: #fecaca;
    background: #fff5f5;
}

/* =========================
   MOBILE OPTIMIZATION
========================= */

@media (max-width: 480px) {

    .spx-size-finder-btn {
        height: 40px;
        font-size: 12px;
        padding: 0 12px;
    }

    .spx-action-icon {
        width: 40px;
        height: 40px;
    }
}

/* =========================
   HIDE ON DESKTOP
========================= */

@media (min-width: 1024px) {
    .spx-mobile-actions {
        display: none !important;
    }
}

/*///////////////////////////// نام محصول  /////////////////////////////*/

/* =========================
   PRODUCT HEADER (MODERN CLEAN)
========================= */

.spx-product-head {
    display: flex;
    flex-direction: column;
}

/* TITLE (keep original size feel, just refined) */
.spx-product-title {
    margin-bottom: 10px;

    font-size: 18px;
    font-weight: 700;

    color: #0f172a;

    letter-spacing: -0.1px;
    line-height: 1.4;
}

/* SUBTITLE */
.spx-product-subtitle {
    display: flex;
    align-items: center;

    margin-bottom: 10px;
}

.spx-product-desc {
    font-size: 13px;
    font-weight: 400;

    color: #64748b;
    line-height: 1.7;

    max-width: 100%;
}

/* META ROW */
.spx-product-meta {
    display: flex;
    align-items: center;

    gap: 10px;

    padding-top: 6px;
}

/* COMMENTS (modern pill, subtle like Shopify Horizon) */
.spx-product-comments {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: 12.5px;
    font-weight: 600;

    color: #334155;

    padding: 6px 10px;

    border-radius: 999px;

    background: #f8fafc;

    border: 1px solid rgba(226, 232, 240, 0.8);

    cursor: pointer;
    margin-bottom: 10px;
    transition: all .2s ease;
}

.spx-product-comments:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

/* number highlight (very subtle modern accent) */
.spx-product-comments span:first-child {
    font-weight: 700;
    color: #0f172a;
}

/*/////////////////////////////////////// ایکون ها و سایزبندی //////////////////////////*/

/* =========================
   DESKTOP SIZE FINDER (MODERN CTA)
========================= */

.desktop-size-finder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 44px;
    padding: 0 18px;

    border-radius: 999px;

    background: linear-gradient(180deg, #1d4ed8, #1e40af);
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    border: 1px solid rgba(255, 255, 255, 0.08);

    cursor: pointer;

    width: fit-content;
    min-width: 180px;

    box-shadow: 0 10px 22px rgba(29, 78, 216, .25),
    0 2px 6px rgba(0, 0, 0, .08);

    transition: all .2s ease;

    white-space: nowrap;
}

/* HOVER (modern lift effect) */
.desktop-size-finder-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #1e40af, #1d4ed8);
    box-shadow: 0 14px 30px rgba(29, 78, 216, .28),
    0 4px 10px rgba(0, 0, 0, .12);
}

/* ACTIVE */
.desktop-size-finder-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(29, 78, 216, .22);
}

/* FOCUS (accessibility) */
.desktop-size-finder-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, .5);
    outline-offset: 3px;
}

/* MOBILE HIDE */
@media (max-width: 1023px) {
    .desktop-size-finder-btn {
        display: none;
    }
}

/*/////////////////////////////////// رنگ و سایز   /////////////////////////*/

/* =========================
   PRODUCT VARIANTS (MODERN SYSTEM)
========================= */

.spx-product-variant-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================
   SECTION TITLE
========================= */

.spx-variant-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

/* =========================
   SIZE GRID (MODERN PILLS)
========================= */

.spx-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

/* wrapper */
.spx-size-item {
    position: relative;
}

/* hide input */
.spx-size-input {
    display: none;
}

/* pill */
.spx-size-pill {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border-radius: 14px;

    border: 1px solid #e2e8f0;
    background: #ffffff;

    font-size: 14px;
    font-weight: 700;

    color: #0f172a;

    cursor: pointer;

    transition: all .18s ease;

    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

/* hover */
.spx-size-pill:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
}

/* selected */
.spx-size-input:checked + .spx-size-pill {
    background: linear-gradient(180deg, #1d4ed8, #1e40af);
    color: #fff;
    border-color: transparent;

    box-shadow: 0 10px 20px rgba(29, 78, 216, .25);
}

/* =========================
   COLOR GRID (MODERN DOTS)
========================= */

.spx-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0;
}

/* item */
.spx-color-item {
    position: relative;
}

/* label */
.spx-color-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* input */
.spx-color-input {
    display: none;
}

/* color dot */
.spx-color-dot {
    width: 30px;
    height: 30px;

    border-radius: 999px;

    border: 2px solid #fff;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .08),
    inset 0 0 0 1px rgba(0, 0, 0, .08);

    cursor: pointer;

    transition: all .18s ease;
}

/* hover */
.spx-color-dot:hover {
    transform: scale(1.05);
}

/* check icon */
.spx-color-check {
    position: absolute;
    font-size: 16px;

    opacity: 0;
    transform: scale(.6);

    transition: all .15s ease;
}

/* selected */
.spx-color-input:checked ~ .spx-color-dot {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

.spx-color-input:checked ~ .spx-color-check {
    opacity: 1;
    transform: scale(1);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 480px) {

    .spx-size-pill {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }

    .spx-color-dot {
        width: 26px;
        height: 26px;
    }
}


/*////////////////////// ویژگی ها ////////////////////////////////////////*/

/* =========================
   PRODUCT FEATURES (MODERN GRID)
========================= */

.spx-product-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* TITLE */

.spx-features-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

/* GRID */

.spx-features-grid {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 768px) {
    .spx-features-grid {
        grid-template-columns:repeat(3, minmax(0, 1fr));
    }
}

/* CARD */

.spx-feature-card {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;

    border-radius: 14px;

    background: linear-gradient(180deg, #ffffff, #f8fafc);

    border: 1px solid #e2e8f0;

    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);

    transition: all .18s ease;
}

.spx-feature-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
}

/* DOT (modern bullet) */

.spx-feature-dot {
    width: 8px;
    height: 8px;

    border-radius: 999px;

    background: #1d4ed8;

    box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
}

/* TEXT */

.spx-feature-text {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* MOBILE TWEAK */

@media (max-width: 480px) {

    .spx-feature-card {
        padding: 9px 10px;
    }

    .spx-feature-text {
        font-size: 12.5px;
    }
}

/*/////////////////////////////////////  کالای مرتبط ///////////////////////*/

/* =================================
   PRODUCT SECTIONS
================================= */


.spx-products {
    margin-top: 64px;
    padding: 24px 18px;
    border-radius:11px;
    background: linear-gradient(
            145deg,
            rgba(255, 255, 255, .7),
            rgba(248, 249, 252, .45)
    );
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .05),
    inset 0 1px 0 rgba(255, 255, 255, .8);
}

/* فاصله بین سکشن ها */
.spx-products + .spx-products {
    margin-top: 8px;

}

/* =================================
   HEADER
================================= */

.spx-products-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}


.spx-products-header h2 {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
    letter-spacing: -.3px;
}


.spx-products-header div {

    flex: 1;

    height: 1px;


    background: linear-gradient(
            90deg,
            rgba(15, 23, 42, .15),
            transparent
    );


}


/* =================================
   SECTION IDENTITY
================================= */


/* کالاهای مرتبط */

.spx-products:first-of-type h2::before {


    content: "";


    width: 8px;

    height: 8px;


    margin-left: 9px;


    border-radius: 50%;


    background: #007aff;


}


/* محبوب ترین */

.spx-popular-products h2::before {


    content: "";


    width: 8px;

    height: 8px;


    margin-left: 9px;


    border-radius: 50%;


    background: #ff9500;


}


/* =================================
   PRODUCT CARD
================================= */


/* =================================
   PRODUCT CARD - IOS MINIMAL STYLE
================================= */


.spx-product-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: none;
    transition: background .3s ease,
    border-color .3s ease,
    transform .3s cubic-bezier(.22, 1, .36, 1);
}

.spx-product-card:hover {
    background: rgba(255, 255, 255, .75);
    border-color: rgba(15, 23, 42, .14);
}

.spx-product-card:active {
    transform: scale(.97);
}


/* =================================
   IMAGE
================================= */
.spx-product-media {
    position: relative;
    padding: 6px;
}

.spx-product-media img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 18px;
}

/* =================================
   DISCOUNT BADGE
================================= */
.spx-product-discount {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 12px;
    border-radius: 18px;
    background: rgba(255, 59, 48, .9);
    color: white;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
}

/* =================================
   CONTENT
================================= */


.spx-product-content {


    padding: 8px 14px 16px;


}


.spx-product-content h3 {


    height: 50px;


    display: -webkit-box;


    -webkit-line-clamp: 2;


    -webkit-box-orient: vertical;


    overflow: hidden;


    font-size: 14px;


    line-height: 1.8;


    font-weight: 700;


    color: #111827;


}


/* =================================
   PRICE
================================= */


.spx-product-price {


    margin-top: 10px;


    display: flex;


    flex-direction: column;


    align-items: flex-end;


}


.spx-product-price del {


    color: #9ca3af;


    font-size: 12px;


}


.spx-product-price strong {


    color: #111827;


    font-size: 16px;


    font-weight: 900;


}


.spx-product-price small {


    font-size: 11px;


    font-weight: 500;


}


/* =================================
   SWIPER
================================= */
.spx-products-slider {
    padding: 6px 2px 12px;
}

.spx-products-slider .swiper-slide {
    width: 235px;
}

/* =================================
   MOBILE
================================= */


@media (max-width: 640px) {


    .spx-products {

        margin-top: 20px;
        padding: 18px 12px;
        border-radius: 10px;
    }

    .spx-products-header {
        margin-bottom: 20px;
    }

    .spx-products-header h2 {
        font-size: 17px;
    }

    .spx-products-slider .swiper-slide {
        width: 205px;
    }


    .spx-product-card {
        border-radius: 22px;
    }

    .spx-product-media img {
        border-radius: 18px;
    }
}