/* ═══════════════════════════════════════════
   Bazari Discount — "تخفیف بازاری" Section
   ═══════════════════════════════════════════ */

.naro-bazari-section {
    direction: rtl;
    padding: 20px 0 0;
    font-family: inherit;
}

.naro-bazari-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
}

/* ── Main pink box ── */
.naro-bazari-inner {
    display: flex;
    flex-direction: column;
    background: var(--naro-red, #D2435C);
    border-radius: 22px 22px 0 0;
    padding: 22px 0 0;
    gap: 10px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Bottom fade — red dissolves into white */
.naro-bazari-inner::after {
    content: '';
    position: relative;
    width: 100%;
    height: 60px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, var(--naro-red, #D2435C) 0%, rgba(210, 67, 92, 0.6) 30%, rgba(210, 67, 92, 0.2) 65%, transparent 100%);
    pointer-events: none;
}

/* ── Brand Panel — centered top ── */
.naro-bazari-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
}

.naro-bazari-brand-img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
}

.naro-bazari-brand-default {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.naro-bazari-icon {
    opacity: 0.95;
}

.naro-bazari-title {
    font-size: 26px;
    font-weight: 900;
    color: #FFD700;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.naro-bazari-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    font-weight: 500;
}

/* ── Carousel Wrapper ── */
.naro-bazari-carousel {
    width: 100%;
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Nav Arrow Row — top-left corner ── */
.naro-bazari-nav-row {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    direction: ltr;
    align-self: flex-end;
}

.naro-bazari-nav {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.45;
    transition: opacity 0.25s ease, background 0.2s ease;
    padding: 0;
}

.naro-bazari-nav:hover {
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.25);
}

/* ── Scroll Track ── */
.naro-bazari-scroll {
    display: flex;
    flex: 1;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 12px;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
    align-items: stretch;
}

.naro-bazari-scroll::-webkit-scrollbar {
    display: none;
}

.naro-bazari-scroll.is-grabbing {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

/* ══════════════════════════════════════
   Product Card — Woodmart style
   ══════════════════════════════════════ */
.naro-bazari-card {
    flex: 0 0 226px;
    background: #fff;
    border-radius: var(--naro-radius, 16px);
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.naro-bazari-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transform: translateY(-4px);
    color: inherit;
}

/* Product image — square like Woodmart .product-element-top */
.naro-bazari-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
}

.naro-bazari-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.naro-bazari-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.35s ease;
}

/* Secondary image — swap on hover, no zoom */
.naro-bazari-img-secondary {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.naro-bazari-card:hover .naro-bazari-img-secondary {
    opacity: 1;
}

/* Action buttons — show on hover */
.naro-bazari-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 3;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.naro-bazari-card:hover .naro-bazari-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Name link */
.naro-bazari-name-link {
    text-decoration: none;
    color: inherit;
}

/* Labels overlaid on image — Woodmart .product-labels style */
.naro-bazari-labels {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.naro-bazari-label {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    color: #fff;
    line-height: 1.5;
    white-space: nowrap;
}

.naro-bazari-label--omde {
    background: #d2435c;
}

.naro-bazari-label--ghesti {
    background: #008EFA;
}

/* Card info block — Woodmart .product-element-bottom style */
.naro-bazari-card-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* Product name — matches Woodmart .wd-entities-title */
.naro-bazari-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.6;
    text-align: right;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

/* Star rating */
.naro-bazari-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    direction: ltr;
    justify-content: flex-end;
}

.naro-bazari-stars svg {
    flex-shrink: 0;
}

/* Price — matches Woodmart .price style */
.naro-bazari-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    direction: rtl;
    margin-top: auto;
    padding: 0;
}

.naro-bazari-price del {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #aaa;
    text-decoration: none;
    position: relative;
}

.naro-bazari-price del::after {
    content: '';
    position: absolute;
    inset-inline-start: -2px;
    inset-inline-end: -2px;
    top: 50%;
    height: 1.5px;
    background: #D2435C;
    transform: rotate(-8deg);
    border-radius: 1px;
}

.naro-bazari-price del span {
    font-size: 0.6rem;
}

.naro-bazari-price ins {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    color: #D2435C;
    letter-spacing: -0.02em;
}

.naro-bazari-price ins span {
    font-size: 0.68rem;
    font-weight: 600;
}

/* Ghesti bar inside bazari cards */
.naro-bazari-card-info .naro-ghesti-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: calc(100% + 32px);
    margin: 6px -16px -16px;
    padding: 7px 0;
    background: #fff;
    border-top: 1px solid #eee;
    color: #008EFA;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    direction: rtl;
}
.naro-bazari-card-info .naro-ghesti-bar svg { flex-shrink: 0; stroke: #008EFA; }

/* ── View All Card ── */
.naro-bazari-viewall {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    scroll-snap-align: end;
}

.naro-bazari-viewall:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.naro-bazari-viewall-label {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}

.naro-bazari-viewall-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.naro-bazari-viewall:hover .naro-bazari-viewall-arrow {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════
   Archive Page
   ═══════════════════════════════════════════ */

.naro-bazari-archive {
    direction: rtl;
    padding: 20px 0;
}

.naro-bazari-archive-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 20px;
}

.naro-bazari-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    direction: ltr;
}

.naro-bazari-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

.naro-bazari-pagination .page-numbers.current {
    background: var(--naro-red, #D2435C);
    color: #fff;
    border-color: var(--naro-red, #D2435C);
}

.naro-bazari-pagination .page-numbers:hover:not(.current) {
    background: #f5f5f5;
}

/* ═══════════════════════════════════════════
   Archive Page — Full Template
   ═══════════════════════════════════════════ */

.naro-bazari-archive-page {
    direction: rtl;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 0;
}

/* ── Hero Banner ── */
.naro-bazari-hero {
    background: linear-gradient(135deg, #D2435C 0%, #a62d42 50%, #8c1f35 100%);
    border-radius: 22px;
    padding: 52px 32px 48px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.naro-bazari-hero-deco {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.naro-bazari-hero-deco::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
}

.naro-bazari-hero-content {
    position: relative;
    z-index: 1;
}

.naro-bazari-hero-img {
    max-height: 80px;
    width: auto;
    border-radius: 12px;
    margin-bottom: 16px;
}

.naro-bazari-hero-icon {
    margin-bottom: 12px;
    opacity: 0.9;
}

.naro-bazari-hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #FFD700;
    margin: 0 0 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.naro-bazari-hero-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 16px;
    font-weight: 500;
}

.naro-bazari-hero-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* ── Section Layout ── */
.naro-bazari-archive-section {
    margin-bottom: 48px;
}

.naro-bazari-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
}

.naro-bazari-section-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.naro-bazari-badge-count {
    font-size: 0.75rem;
    color: #fff;
    background: var(--naro-red, #D2435C);
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Alt section background */
.naro-bazari-section--alt {
    background: #fafafa;
    margin-right: -20px;
    margin-left: -20px;
    padding: 32px 20px;
}

/* ── Out of Stock Card ── */
.naro-bazari-card--oos .naro-bazari-thumb img {
    filter: grayscale(70%);
    opacity: 0.5;
}

.naro-bazari-card--oos:hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.naro-bazari-oos-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.naro-bazari-price-oos {
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Entrance Animation ── */
.naro-bazari-archive-page .naro-bazari-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.naro-bazari-archive-page .naro-bazari-card.naro-bazari-visible {
    opacity: 1;
    transform: translateY(0);
}

.naro-bazari-archive-page .naro-bazari-card--oos.naro-bazari-visible {
    opacity: 0.75;
}

/* ── Page Footer ── */
.naro-bazari-page-footer {
    text-align: center;
    padding: 32px 0 16px;
    border-top: 1px solid #eee;
}

.naro-bazari-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--naro-red, #D2435C);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: 10px;
    border: 1px solid var(--naro-red, #D2435C);
    transition: all 0.25s ease;
}

.naro-bazari-back-btn:hover {
    background: var(--naro-red, #D2435C);
    color: #fff;
}

/* ═══════════════════════════════════════════
   Responsive — Tablet
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
    .naro-bazari-inner {
        padding: 16px;
        gap: 12px;
    }

    .naro-bazari-brand {
        flex: 0 0 170px;
    }

    .naro-bazari-title {
        font-size: 22px;
    }

    .naro-bazari-card {
        flex: 0 0 190px;
    }

    .naro-bazari-archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .naro-bazari-hero {
        padding: 36px 24px;
    }

    .naro-bazari-hero-title {
        font-size: 1.7rem;
    }

    .naro-bazari-section-header h2 {
        font-size: 1.1rem;
    }

    .naro-bazari-section--alt {
        margin-right: -16px;
        margin-left: -16px;
        padding: 24px 16px;
    }
}

/* ═══════════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════════ */

@media (max-width: 600px) {
    .naro-bazari-section {
        padding: 10px 0 0;
    }

    .naro-bazari-container {
        padding: 0;
    }

    .naro-bazari-inner {
        padding: 10px 10px 0;
        gap: 8px;
        border-radius: 16px 16px 0 0;
    }

    .naro-bazari-inner::after {
        height: 40px;
    }

    .naro-bazari-brand {
        padding: 4px 6px;
    }

    .naro-bazari-icon {
        display: none;
    }

    .naro-bazari-title {
        font-size: 18px;
        margin: 0;
    }

    .naro-bazari-subtitle {
        font-size: 11px;
    }

    .naro-bazari-brand-img {
        max-height: 70px;
        width: auto;
        border-radius: 10px;
    }

    .naro-bazari-carousel {
        width: 100%;
    }

    /* Hide arrows on mobile — touch/swipe is enough */
    .naro-bazari-nav-row {
        display: none;
    }

    .naro-bazari-scroll {
        gap: 8px;
        padding: 2px 0;
    }

    .naro-bazari-card {
        flex: 0 0 calc((100vw - 48px) / 2);
    }

    .naro-bazari-labels {
        top: 6px;
        right: 6px;
        gap: 3px;
    }

    .naro-bazari-label {
        font-size: 9px;
        padding: 2px 7px;
    }

    .naro-bazari-card-info {
        padding: 10px 12px 12px;
        gap: 4px;
    }

    .naro-bazari-name {
        font-size: 0.8rem;
        min-height: auto;
        -webkit-line-clamp: 1;
    }

    .naro-bazari-stars svg {
        width: 12px;
        height: 12px;
    }

    .naro-bazari-price del { font-size: 0.65rem; }
    .naro-bazari-price del span { font-size: 0.52rem; }
    .naro-bazari-price ins { font-size: 0.85rem; }
    .naro-bazari-price ins span { font-size: 0.58rem; }

    .naro-bazari-viewall {
        flex: 0 0 80px;
    }

    .naro-bazari-viewall-label {
        font-size: 11px;
    }

    .naro-bazari-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .naro-bazari-archive-page {
        padding: 10px 10px 0;
    }

    .naro-bazari-hero {
        padding: 28px 16px;
        border-radius: 16px;
        margin-bottom: 24px;
    }

    .naro-bazari-hero-title {
        font-size: 1.4rem;
    }

    .naro-bazari-hero-sub {
        font-size: 0.85rem;
    }

    .naro-bazari-hero-count {
        font-size: 0.75rem;
        padding: 4px 14px;
    }

    .naro-bazari-archive-section {
        margin-bottom: 32px;
    }

    .naro-bazari-section-header {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .naro-bazari-section-header h2 {
        font-size: 1rem;
    }

    .naro-bazari-section--alt {
        margin-right: -10px;
        margin-left: -10px;
        padding: 20px 10px;
    }

    .naro-bazari-oos-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }

    .naro-bazari-page-footer {
        padding: 20px 0 10px;
    }

    .naro-bazari-back-btn {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
}
