/* Nashr - Product Carousel (scroll-snap slider with arrows) */

.nashr-pc {
    padding: 14px 0 22px;
    direction: rtl;
}

/* white rounded container like screenshot */
.nashr-pc-box {
    position: relative;
    background: var(--nashr-pc-box-bg, #fff);
    border-radius: var(--nashr-pc-box-radius, 18px);
    padding: var(--nashr-pc-box-pad, 18px);
    border: 1px solid var(--nashr-pc-box-border, rgba(0,0,0,0.06));
    box-shadow: var(--nashr-pc-box-shadow, 0 14px 32px rgba(0,0,0,0.08));
}

/* viewport */
.nashr-pc-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 6px 2px;
    direction: rtl; /* برای کنترل ساده اسکرول */
}

/* hide scrollbar */
.nashr-pc-viewport::-webkit-scrollbar { height: 0; }
.nashr-pc-viewport { scrollbar-width: none; }

/* track = columns slider */
.nashr-pc-track {
    display: grid;
    grid-auto-flow: column;
    gap: var(--nashr-pc-gap, 18px);

    /* responsive columns via CSS vars */
    grid-auto-columns: calc((100% - (var(--nashr-pc-gap, 18px) * (var(--nashr-pc-cols-d, 4) - 1))) / var(--nashr-pc-cols-d, 4));
}

@media (max-width: 1024px) {
    .nashr-pc-track {
        grid-auto-columns: calc((100% - (var(--nashr-pc-gap, 18px) * (var(--nashr-pc-cols-t, 2) - 1))) / var(--nashr-pc-cols-t, 2));
    }
}
@media (max-width: 768px) {
    .nashr-pc-track {
        grid-auto-columns: calc((100% - (var(--nashr-pc-gap, 14px) * (var(--nashr-pc-cols-m, 1) - 1))) / var(--nashr-pc-cols-m, 1));
    }
}

/* card */
.nashr-pc-card {
    scroll-snap-align: start;
    background: var(--nashr-pc-card-bg, #fff);
    border-radius: var(--nashr-pc-card-radius, 16px);
    border: 1px solid var(--nashr-pc-card-border, rgba(0,0,0,0.10));
    box-shadow: var(--nashr-pc-card-shadow, 0 10px 22px rgba(0,0,0,0.06));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    direction: rtl; /* متن فارسی داخل کارت */
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.nashr-pc-card:hover {
    transform: translateY(var(--nashr-pc-hover-lift, -2px));
    box-shadow: var(--nashr-pc-card-hover-shadow, 0 18px 34px rgba(0,0,0,0.12));
    border-color: rgba(0,0,0,0.14);
}

/* image */
.nashr-pc-img {
    position: relative;
    padding: var(--nashr-pc-img-pad, 12px);
}

.nashr-pc-img a {
    display: block;
    border-radius: var(--nashr-pc-img-radius, 14px);
    overflow: hidden;
    background: #fff;
}

.nashr-pc-img img {
    width: 100%;
    height: var(--nashr-pc-img-h, 240px);
    object-fit: cover;
    display: block;
    transition: transform .22s ease;
}

.nashr-pc-card:hover .nashr-pc-img img { transform: scale(1.02); }

/* small square icon button like screenshot */
.nashr-pc-mini {
    position: absolute;
    left: 18px;
    bottom: 16px;
    padding: 7px 7px;
    width: 34px;
    height: 34px;
    border-radius: var(--nashr-pc-mini-radius, 8px);
    background: var(--nashr-pc-mini-bg, #fff);
    color: var(--nashr-pc-mini-color, #6b584c);
    border: 1px solid var(--nashr-pc-mini-border, rgba(0,0,0,0.20));
    box-shadow: 0 10px 18px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.nashr-pc-mini svg { width: 16px; height: 16px; }

/* body */
.nashr-pc-body {
    padding: var(--nashr-pc-body-pad, 10px 14px 14px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: IRANSansXFaNum;
}

.nashr-pc-title {
    display: block;
    text-decoration: none;
    color: var(--nashr-pc-title-color, #2b2420);
    font-weight: 900;
    font-size: 14px;
    line-height: 1.7;
}

.nashr-pc-meta {
    font-size: 12.5px;
    color: var(--nashr-pc-meta-color, rgba(43,36,32,.55));
    line-height: 1.6;
}

/* price row like screenshot */
.nashr-pc-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.nashr-pc-price-label {
    font-size: 12px;
    color: var(--nashr-pc-meta-color, rgba(43,36,32,.55));
}

.nashr-pc-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--nashr-pc-price-color, #2b2420);
}

/* Woo price styling (sale) */
.nashr-pc-price del { opacity: .45; margin-left: 6px; }
.nashr-pc-price ins { text-decoration: none; color: var(--nashr-pc-price-sale, #B3261E); }

/* button */
.nashr-pc-btn {
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: var(--nashr-pc-btn-radius, 12px);
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 900;
    color: var(--nashr-pc-btn-color, #fff);
    background: var(--nashr-pc-btn-bg, #6b584c);
    box-shadow: var(--nashr-pc-btn-shadow, 0 10px 18px rgba(107,88,76,0.22));
    transition: transform .15s ease, opacity .15s ease;
    font-family: IRANSansXFaNum;
}

.nashr-pc-btn:hover { opacity: .92; transform: translateY(-1px);  color: var(--nashr-pc-btn-color, #fff);  }

/* arrows */
.nashr-pc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--nashr-pc-arrow-size, 34px);
    height: var(--nashr-pc-arrow-size, 34px);
    border-radius: var(--nashr-pc-arrow-radius, 10px);
    border: 0;
    cursor: pointer;
    background: var(--nashr-pc-arrow-bg, #f4d44d);
    color: var(--nashr-pc-arrow-color, #2b2420);
    box-shadow: var(--nashr-pc-arrow-shadow, 0 10px 18px rgba(0,0,0,0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.nashr-pc-arrow svg { width: 16px; height: 16px; }

.nashr-pc-arrow.prev { left: -12px; }
.nashr-pc-arrow.next { right: -12px; }

.nashr-pc-arrow:disabled { opacity: .35; cursor: default; }

/* mobile arrows a bit inside */
@media (max-width: 768px){
    .nashr-pc-box{ padding: 14px; }
    .nashr-pc-arrow.prev{ left: 6px; }
    .nashr-pc-arrow.next{ right: 6px; }
    .nashr-pc-img img{ height: var(--nashr-pc-img-h-m, 220px); }
}
