/* ===== Reset & RTL Safe ===== */
html, body {
    margin: 0; padding: 0;
    overflow-x: clip;
	overflow-y: visible;
    width: 100%;
	 
}
*, *::before, *::after { box-sizing: border-box; }
.wd-page-wrapper {
    width: 100%; max-width: 100%;
    /*overflow-x: hidden;*/
    margin: 0; padding: 0;
}
button,input,select,textarea {
    font-family: inherit;
}
/* اگر مرورگر از clip پشتیبانی نکرد، به visible برگرد */
@supports not (overflow: clip) {
    html, body {
        overflow-x: visible;
    }
}
/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1600px;
    margin-left: auto; margin-right: auto;
    padding-left: 15px; padding-right: 15px;
}
@media (max-width: 1640px) { .container { max-width: 100%; } }

/* ===== Header ===== */
.whb-header {
    width: 100%; max-width: 100%;
    background: #fff;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.whb-top-bar, .whb-general-header, .whb-header-bottom { width: 100%; }
.whb-flex-row { display: flex; align-items: center; gap: 15px; width: 100%; }
.whb-col-left, .whb-col-right { display: flex; align-items: center; flex-shrink: 0; }
.whb-col-center { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }

/* ===== Main Content ===== */
.wd-page-content, .main-page-wrapper { width: 100%; padding: 10px; }
#main-content { width: 100%; min-height: 60vh; }

/* ===== Swiper Safe ===== */
.swiper { width: 100% !important; max-width: 100% !important; overflow: hidden; position: relative; padding: 2px !important;}
.wd-carousel-container, .wd-carousel-inner { width: 100%; max-width: 100%; position: relative; overflow: hidden; }
/* ============================================
   تنظیمات نهایی ارتفاع و چیدمان اسلایدرها
   ============================================ */
/* ============================================
   تنظیمات نهایی ارتفاع و چیدمان اسلایدرها
   ============================================ */

/* ۱. به سواپر بگوییم فرزندانش را بکشد */
.swiper-wrapper {
    align-items: stretch !important; 
}

/* ۲. اسلایدها را به حالت فلکس درآوریم */
.swiper-slide {
    height: auto !important;
    display: flex;
    box-sizing: border-box;
}

/* ۳. کارت محصول را فقط در اسلایدرها به حالت فلکس درآوریم (نه در حالت ردیفی) */
.swiper-slide > .wd-product:not(.wd-card-row) {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ۴. پکیج داخلی کارت را فقط در اسلایدرها فلکس کنیم */
.swiper-slide > .wd-product:not(.wd-card-row) .product-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ۵. بخش پایینی (عنوان و قیمت) را فقط در اسلایدرها بکشیم */
.swiper-slide > .wd-product:not(.wd-card-row) .product-element-bottom {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* ===== Images ===== */
img { max-width: 100%; height: auto; display: block; }

.wd-product .product-image-link img { width: 100%; height: 180px; object-fit: contain; padding: 5px; /*background: #fafafa;*/ }
.wd-post-thumb img { width: 100%; height: 180px; object-fit: cover; }
.banner-triple .promo-banner img { width: 100%; height: 300px; object-fit: cover; border-radius: 15px; }

/* ===== Pre-init Swiper (fallback) ===== */
.swiper:not(.swiper-initialized) .swiper-wrapper { display: flex; flex-wrap: nowrap; /*overflow: hidden;*/ }
.swiper:not(.swiper-initialized) .swiper-slide { flex: 0 0 auto; width: 100%; }
.wd-carousel-container .swiper:not(.swiper-initialized) .swiper-slide { width: 16.666%; }

/* ===== Hero Slider (اصلی) ===== */
.home-hero-section { /*padding: 20px 0;*/ margin-bottom: 20px; }

.home-hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: stretch;
}

.home-hero-main {
    min-width: 0;
    border-radius: 15px;
    overflow: hidden;
}

.home-hero-side {
    min-width: 0;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
}
.home-hero-side .promo-banner,
.home-hero-side .promo-banner-link { width: 100%; height: 400px; display: block; }
.home-hero-side .promo-banner img { width: 100%; height: 100%; border-radius: 15px; }

.hero-slider-wrapper { width: 100%; max-width: 100%; border-radius: 15px; overflow: hidden; position: relative; }
.hero-swiper { width: 100% !important; max-width: 100% !important; border-radius: 15px; overflow: hidden; position: relative;}

.hero-swiper .swiper-slide { width: 100% !important; max-width: 100% !important; flex-shrink: 0; height: auto; position: relative; }

.hero-slide-link { display: block; position: relative; width: 100%; text-decoration: none; }
.hero-slide-link img { display: block; width: 100% !important; height: 400px; object-fit: cover; border-radius: 15px; }

/* محتوای روی اسلاید */
.hero-slide-content {
    position: absolute; top: 50%; right: 8%;
    transform: translateY(-50%);
    text-align: right; color: #333; z-index: 2; max-width: 45%;
}
.hero-slide-badge {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--wd-primary-color); color: #fff;
    padding: 8px 14px; border-radius: 50%; width: 80px; height: 80px;
    justify-content: center; margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(214, 6, 68, 0.4);
}
.hero-slide-badge .badge-percent { font-size: 22px; font-weight: 700; line-height: 1; }
.hero-slide-badge .badge-text { font-size: 11px; margin-top: 2px; }
.hero-slide-content h2 { font-size: 28px; font-weight: 700; margin: 0 0 10px; color: #333; line-height: 1.3; }
.hero-slide-content p { font-size: 16px; margin: 0 0 20px; color: #555; }
.hero-slide-btn {
    display: inline-block; background: var(--wd-primary-color); color: #fff;
    padding: 10px 32px; border-radius: 25px; font-size: 14px; font-weight: 600;
    transition: all 0.2s;
}
.hero-slide-btn:hover { background: #c40545; transform: translateY(-2px); }

/* فلش‌های ناوبری */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 50%;
    color: #fff;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.hero-arrow:hover { background: rgba(0, 0, 0, 0.7); }
.hero-arrow::after {
    content: '›';
    font-family: inherit;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.swiper-button-prev.hero-arrow::after {
    content: '‹';
}
.swiper-button-next.hero-arrow { left: 20px; right: auto; }
.swiper-button-prev.hero-arrow { right: 20px; left: auto; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .swiper:not(.swiper-initialized) .swiper-slide { width: 25%; }
    .banner-triple .promo-banner img { height: 220px; }
    .hero-slide-link img { height: 300px; }
    .hero-slide-content { right: 5%; max-width: 55%; }
    .hero-slide-content h2 { font-size: 20px; }
    .hero-slide-content p { font-size: 14px; }
    .hero-slide-badge { width: 60px; height: 60px; }
    .hero-slide-badge .badge-percent { font-size: 16px; }
    .hero-slide-badge .badge-text { font-size: 9px; }
}

@media (max-width: 767px) {
    .swiper:not(.swiper-initialized) .swiper-slide { width: 50%; }
    .banner-triple .promo-banner img { height: 180px; }
    .wd-product .product-image-link img { height: 140px; }
    .container { padding-left: 10px; padding-right: 10px; }
    .hero-slide-link img { height: 200px; }
    .hero-slide-content h2 { font-size: 16px; margin-bottom: 5px; }
    .hero-slide-content p { font-size: 12px; margin-bottom: 10px; }
    .hero-slide-btn { padding: 6px 20px; font-size: 12px; }
    .hero-slide-badge { width: 50px; height: 50px; margin-bottom: 8px; }
    .hero-slide-badge .badge-percent { font-size: 14px; }
    .hero-arrow { width: 32px; height: 32px; }
    .hero-arrow::after { font-size: 14px !important; }
}
/* ===== Fix: Hide side banner on mobile ===== */
@media (max-width: 1024px) {
    .home-hero-side {
        display: none !important;
    }
    /* اسلایدر تمام عرض شود */
    .home-hero-grid {
        grid-template-columns: 1fr !important;
    }
}
/* ===== Products Tabs (?????) ===== */
.wd-tabs {
    margin-bottom: 40px;
}

.wd-tabs-header {
    display: flex;
    align-items: center;
    gap: 30px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 0;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.wd-tabs-header .tabs-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0;
    padding: 12px 0;
    line-height: 1.5;
    white-space: nowrap;
    order: 1;   /* ????? ??? ?? RTL � ???? ??? ???? */
}

.wd-nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    order: 2;
}

.wd-nav-tabs li {
    position: relative;
}

.wd-nav-tabs li a {
    display: block;
    padding: 5px 5px;
    font-size: 13px;
    color: #777;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.wd-nav-tabs li a:hover {
    color: var(--wd-primary-color);
}

.wd-nav-tabs li.wd-active a {
    color: var(--wd-title-color);
    font-weight: 700;
    border-bottom-color: var(--wd-primary-color);
}

/* ?? ?????? ????? ? ????? ??? ?? */
@media (max-width: 767px) {
    .wd-tabs-header {
        gap: 15px;
        justify-content: center;
        text-align: center;
    }
    .wd-tabs-header .tabs-name {
        font-size: 16px;
        width: 100%;
        text-align: center;
    }
    .wd-nav-tabs {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .wd-nav-tabs li a {
        padding: 10px 10px;
        font-size: 13px;
    }
}

/* ===== Featured Row � Responsive ===== */
@media (max-width: 1024px) {
    .featured-row {
        grid-template-columns: 1fr !important;
        padding: 15px;
        gap: 15px;
    }
    .featured-side {
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    .featured-side img {
        max-height: 80px;
        width: auto;
    }
    .featured-side .btn {
        white-space: nowrap;
    }
}

.featured-products {
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

/* ===== Hide Featured Side on Mobile ===== */
@media (max-width: 1024px) {
    .featured-side {
        display: none !important;
    }
    .featured-row {
        grid-template-columns: 1fr !important;
        padding: 15px;
    }
}

/* ===== Gift Carousel � Mobile ===== */
@media (max-width: 1024px) {
    .gift-carousel {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        padding-bottom: 10px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* ?????????? ???? */
        scrollbar-width: thin;
        scrollbar-color: #ddd transparent;
    }

    .gift-carousel .gift-item {
        flex: 0 0 calc(50% - 7.5px);   /* ?? ???? ?? ?? ???? */
        min-width: 0;
        box-sizing: border-box;
    }

    /* ?????????? ???? ???? Chrome/Safari */
    .gift-carousel::-webkit-scrollbar {
        height: 6px;
    }
    .gift-carousel::-webkit-scrollbar-track {
        background: transparent;
    }
    .gift-carousel::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
}
/* ===== Footer Badges – Final ===== */
.footer-badges h5 {
    margin: 0 0 15px 0;
}

.badges-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.badges-wrapper img {
    display: block;
    width: 100px;
    height: 100px;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    .badges-wrapper {
        justify-content: center;
    }
    .badges-wrapper img {
        width: 80px;
        height: 80px;
    }
    .footer-badges h5 {
        text-align: center;
    }
}

/* ============================================
   اسلایدر مقالات در صفحه اصلی (تک‌خطی با اسکرول)
   ============================================ */
.home-blog-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* اسکرول نرم در موبایل */
    padding-bottom: 15px; /* فاصله برای اسکرول‌بار */
}

/* برای اینکه کارت‌ها در دسکتاپ ۴ تا و در موبایل ۱ تا باشند */
.home-blog-slider .mag-card {
    flex: 0 0 calc(25% - 15px); /* در دسکتاپ ۴ ستون (۲۵ درصد منهای گپ) */
    min-width: 0;
}

/* در تبلت: ۲ یا ۳ ستون */
@media (max-width: 1024px) {
    .home-blog-slider .mag-card {
        flex: 0 0 calc(33.33% - 14px); /* ۳ ستون */
    }
}

/* در موبایل: ۱ ستون (تمام عرض) با اسکرول */
@media (max-width: 767px) {
    .home-blog-slider .mag-card {
        flex: 0 0 85%; /* ۸۵ درصد عرض صفحه برای اینکه کارت بعدی کمی دیده شود */
    }
    
    /* استایل زیبا برای اسکرول‌بار */
    .home-blog-slider::-webkit-scrollbar {
        height: 6px;
    }
    .home-blog-slider::-webkit-scrollbar-track {
        background: transparent;
    }
    .home-blog-slider::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
}
/* ===== ?????? ===== */
@media (max-width: 767px) {
    .blog-carousel {
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 15px;
    }
    .blog-carousel .wd-post {
        flex: 0 0 100% !important; /* ??????: 1 ???? */
        scroll-snap-align: center;
    }
}

/* ===== Hamburger Menu Button ===== */
.wd-mobile-menu-btn {
    background: transparent;
    border: 0;
    padding: 8px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.wd-mobile-menu-btn:hover {
    background: #f7f7f7;
}

/* ============================================
   Hamburger Icon (منوی موبایل و دسته‌بندی)
   ============================================ */
.hamburger {
    display: inline-block;
    width: 24px;
    height: 18px;
    position: relative;
    box-sizing: border-box;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

.hamburger::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    background: #333;
}
/* ============================================
   Category Menu (Mega Menu) — Desktop
   ============================================ */

/* Dropdown دسته‌بندی: پس‌زمینه خاکستری */
@media (min-width: 1025px) {
    .wd-header-cats .wd-dropdown-cats {
        background: #f5f5f5 !important;
        border: 1px solid #e0e0e0;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,.12);
        padding: 8px 0;
        min-width: 260px;
        z-index: 200;
    }

    /* آیتم‌ها: پس‌زمینه خاکستری، متن تیره */
    .wd-header-cats .wd-dropdown-cats ul li a {
        display: block;
        padding: 10px 18px;
        color: #333;
        background: transparent;
        font-size: 13px;
        transition: background .15s, color .15s;
        border-right: 3px solid transparent;
    }

    /* هاور روی گزینه: پس‌زمینه سفید */
    .wd-header-cats .wd-dropdown-cats ul li a:hover {
        background: #ffffff !important;
        color: #d32f2f;
        border-right-color: #d32f2f;
    }

    /* هاور روی خود دسته‌بندی: dropdown نمایش داده شود (از قبل هست) */
    .wd-header-cats:hover .wd-dropdown-cats {
        display: block;
    }
}

/* ============================================
   Overlay تاریک روی کل صفحه (فقط دسکتاپ)
   ============================================ */
.category-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    pointer-events: none;
}

.category-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* روی موبایل مخفی */
@media (max-width: 1024px) {
    .category-overlay {
        display: none !important;
    }
}
/* ============================================
   Page Builder — Row Layout
   ============================================ */
.page-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.page-row:last-child { margin-bottom: 0; }
.page-block { min-width: 0; }

@media (max-width: 1024px) {
    .page-row { grid-template-columns: 1fr !important; }
}
/* ============================================
   Block: Categories (همه variantها)
   ============================================ */
.block-categories { margin-bottom: 24px; }

.block-categories-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0 0 16px;
    text-align: center;
}

/* --- Grid (مشترک) --- */
.block-categories-grid {
    display: grid;
    gap: 16px;
}

.block-categories .cat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.block-categories .cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.block-categories .cat-card-name {
    padding: 10px 12px 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--wd-title-color);
}

.block-categories .cat-card-count {
    padding: 0 12px 10px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* --- grid-image --- */
.block-categories .cat-card-image .cat-card-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}
.block-categories .cat-card-image .cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- grid-plain --- */
.block-categories .cat-card-plain {
    background: #f5f5f5;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    padding: 8px 0;
}
.block-categories .cat-card-plain:hover {
    background: #eef2f7;
    border-color: #d1d5db;
    box-shadow: none;
}

/* --- list (سایدبار) --- */
.block-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.block-categories-list li {
    border-bottom: 1px solid #f0f0f0;
}
.block-categories-list li:last-child {
    border-bottom: none;
}
.block-categories-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 4px;
    font-size: 13px;
    color: var(--wd-text-color);
    text-decoration: none;
    transition: color 0.15s, padding 0.15s;
}
.block-categories-list li a::before {
    content: '•';
    color: #d1d5db;
    margin-inline-end: 6px;
    font-size: 16px;
    line-height: 1;
}
.block-categories-list li a:hover {
    color: var(--wd-primary-color);
    padding-inline-start: 8px;
}
.block-categories-list .cat-name {
    flex: 1;
}
.block-categories-list .cat-count {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* --- responsive --- */
@media (max-width: 767px) {
    .block-categories-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

.page-row .page-block {
    height: 100%;
    min-height: 0;
}

.page-row .page-block > * {
    height: 100%;
}
/* ============================================
   Block: Banner Triple
   ============================================ */
.block-banner-triple {
    margin-bottom: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.block-banner-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0 0 16px;
    text-align: center;
    flex-shrink: 0;
}

.block-banner-grid {
    display: grid;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
}

.block-banner-grid .banner-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    min-height: 0;
}
.block-banner-grid .banner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.block-banner-grid .banner-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
}

/* فقط وقتی در row نیست (تمام‌عرض) — نسبت تصویر */
.block-banner-triple:not([data-in-row]) .block-banner-grid[style*="grid-template-columns:1fr"] .banner-inner {
    aspect-ratio: 21 / 9;
    height: auto;
}

.block-banner-grid .banner-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.block-banner-grid .banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .block-banner-grid {
        grid-template-columns: 1fr !important;
    }
    .block-banner-grid .banner-inner {
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
    }
}
/* ============================================
   Block: Blog List
   ============================================ */
.block-blog-list { margin-bottom: 24px; }

.block-blog-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0 0 16px;
    text-align: center;
}

.block-blog-grid {
    display: grid;
    gap: 20px;
}

.block-blog-item .mag-card {
    height: 100%;
}

/* اگر showExcerpt=false، خلاصه را مخفی کن */
.block-blog-item.no-excerpt .mag-card-excerpt {
    display: none;
}

@media (max-width: 1024px) {
    .block-blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    .block-blog-grid {
        grid-template-columns: 1fr !important;
    }
}
/* ============================================
   Block: Gift Categories
   ============================================ */
.block-gift-categories { margin-bottom: 24px; }

.block-gift-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0 0 16px;
    text-align: center;
}

.block-gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.block-gift-grid .gift-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.block-gift-grid .gift-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.block-gift-grid .gift-img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.block-gift-grid .gift-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.block-gift-grid .gift-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wd-title-color);
    line-height: 1.5;
}

@media (max-width: 767px) {
    .block-gift-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .block-gift-grid .gift-img {
        width: 80px;
        height: 80px;
    }
}
/* ============================================
   Block: Products Grid
   ============================================ */
.block-products-grid { margin-bottom: 24px; }

.block-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.block-products-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0;
}

.block-products-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--wd-primary-color);
    text-decoration: none;
    white-space: nowrap;
}
.block-products-more:hover { text-decoration: underline; }

.block-products-items {
    display: grid;
    gap: 16px;
}

/* کارت محصول — از products.js می‌آید. برای گرید (نه اسلایدر) */
.block-products-items .swiper-slide {
    width: auto !important;  /* override عرض اسلایدر */
}

.block-products-items .wd-product {
    height: 100%;
	width: 100%;
}

/* صفحه‌بندی */
.block-products-pg {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.block-products-pg .page-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    min-width: 38px;
}
.block-products-pg .page-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: var(--wd-primary-color);
}
.block-products-pg .page-btn.active {
    background: var(--wd-primary-color);
    color: #fff;
    border-color: var(--wd-primary-color);
    font-weight: 700;
}
.block-products-pg .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.block-products-pg .page-dots {
    padding: 8px 6px;
    color: #999;
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .block-products-items { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 767px) {
    .block-products-items { grid-template-columns: repeat(2, 1fr) !important; }
}
/* ============================================
   Block: Tabs
   ============================================ */
.block-tabs { margin-bottom: 24px; }

.block-tabs-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.block-tabs-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0;
    padding: 12px 0;
    white-space: nowrap;
}

.block-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.block-tabs-nav li { position: relative; }
.block-tabs-nav a {
    display: block;
    padding: 12px 14px;
    font-size: 13px;
    color: #777;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.block-tabs-nav a:hover { color: var(--wd-primary-color); }
.block-tabs-nav li.active a {
    color: var(--wd-title-color);
    font-weight: 700;
    border-bottom-color: var(--wd-primary-color);
}

/* اسلایدر */
.block-tabs-slider { position: relative; }
.block-tabs-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
}
.block-tabs-swiper .swiper-slide {
    width: auto;
    flex-shrink: 0;
}
.block-tabs-swiper .swiper-wrapper {
    display: flex;
}

/* فلش‌های ناوبری — از .hero-arrow موجود استفاده می‌کند */
.block-tabs-swiper .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    border-radius: 50%;
    color: #fff;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    appearance: none;
    transition: background 0.2s;
}
.block-tabs-swiper .hero-arrow:hover { background: rgba(0, 0, 0, 0.75); }
.block-tabs-swiper .hero-arrow::after {
    content: '›';
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}
.block-tabs-swiper .hero-arrow.swiper-button-prev::after { content: '‹'; }
.block-tabs-swiper .hero-arrow.swiper-button-next { left: 8px; right: auto; }
.block-tabs-swiper .hero-arrow.swiper-button-prev { right: 8px; left: auto; }

@media (max-width: 767px) {
    .block-tabs-header { gap: 10px; justify-content: center; }
    .block-tabs-title { font-size: 16px; width: 100%; text-align: center; }
    .block-tabs-nav { justify-content: center; }
    .block-tabs-nav a { padding: 10px 10px; font-size: 13px; }
}
/* ============================================
   Block: Featured Random
   ============================================ */
.block-featured-random {
    margin-bottom: 0px;
    padding: 16px;
    border-radius: 12px;
}

.block-featured-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-title-color);
    margin: 0 0 16px;
    text-align: center;
}

.block-featured-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: stretch;
	max-height: 400px
}
.block-featured-grid.img-left {
    grid-template-columns: 1fr 200px;
}

/* ستون تصویر + دکمه */
.block-featured-right-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    height: 100%;
	justify-content: flex-end;
}

.block-featured-image {
    display: block;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    /*background: #f5f5f5;*/
    flex: 1 1 auto;
    min-height: 0;
    text-decoration: none;
}
.block-featured-image img {
    width: 150px;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.block-featured-more {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 10px;
    border-radius: 0 0 12px 12px;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.block-featured-more:hover {
    background: #b71c1c;
    color: #fff;
}

/* اسلایدر */
.block-featured-slider {
    position: relative;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    /* ارتفاع را از محتوا بگیر، نه از گرید */
    align-self: start;
    height: auto;
}

.block-featured-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: auto;
}

.block-featured-swiper .swiper-wrapper {
    display: flex;
    height: auto;          /* ← مهم */
    align-items: stretch;
}

.block-featured-swiper .swiper-slide {
    width: auto;
    flex-shrink: 0;
    height: auto;          /* ← مهم */
    display: flex;         /* ← تا کارت داخل اسلاید کشیده شود */
}

.block-featured-swiper .swiper-slide > .wd-product {
    width: 100%;           /* ← کارت کامل عرض اسلاید */
}

/* فلش‌ها — از .hero-arrow */
.block-featured-swiper .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    border-radius: 50%;
    color: #fff;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    appearance: none;
    transition: background 0.2s;
}
.block-featured-swiper .hero-arrow:hover { background: rgba(0, 0, 0, 0.75); }
.block-featured-swiper .hero-arrow::after {
    content: '›';
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.block-featured-swiper .hero-arrow.swiper-button-prev::after { content: '‹'; }
.block-featured-swiper .hero-arrow.swiper-button-next { left: 6px; right: auto; }
.block-featured-swiper .hero-arrow.swiper-button-prev { right: 6px; left: auto; }

/* ریسپانسیو */
@media (max-width: 1024px) {
    .block-featured-grid,
    .block-featured-grid.img-left {
        grid-template-columns: 1fr !important;
    }
    .block-featured-right-col {
        max-width: 220px;
        margin: 0 auto;
        height: 180px;
    }
    .block-featured-image { border-radius: 12px; }
    .block-featured-more { border-radius: 12px; margin-top: 8px; }
}
@media (max-width: 767px) {
    .block-featured-right-col { display: none; }
}
/* ============================================
   Product Card (Grid & Row)
   ============================================ */

/* دکمه‌های تعویض نمایش */
.wd-view-toggle {
    display: flex;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 2px;
    background: #fff;
}
.view-btn {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.view-btn:hover { color: #333; }
.view-btn.active { background: #f3f4f6; color: #111; }

/* هدر بلوک */
.block-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 12px; }

/* گرید */
.block-products-items.view-grid {
    display: grid;
    gap: 16px;
}
.block-products-items.view-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   حالت شبکه‌ای (شبیه دیجی‌کالا)
   ============================================ */
.wd-card-grid {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s;
    position: relative;
}
.wd-card-grid:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.wd-card-grid .wd-card-image {
    display: block;
    padding: 20px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wd-card-grid .wd-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wd-card-grid .wd-card-body {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wd-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 8px;
    height: 42px; /* ۲ خط */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.wd-card-title a { color: #333; text-decoration: none; }
.wd-card-title a:hover { color: var(--wd-primary-color); }

/* امتیاز */
.wd-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-bottom: 8px;
    color: #666;
}
.wd-rating-star { color: #f59e0b; font-size: 14px; }
.wd-rating-count { color: #999; }

/* موجودی */
.wd-card-stock {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: auto; /* قیمت را به پایین می‌فرستد */
    text-align: left;
}
.text-success { color: #16a34a; }
.text-danger { color: #dc2626; }

/* قیمت و تخفیف */
.wd-card-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 12px;
}

.wd-card-discount-badge {
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
/* ============================================
   حالت ردیفی (Row) - سه ستونه
   ============================================ */
.wd-card-row {
    display: grid;
    grid-template-columns: 120px 1fr 1.5fr; /* ستون ۱: عکس، ستون ۲: عنوان و قیمت، ستون ۳: توضیحات */
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    gap: 20px;
    align-items: center; /* محتوا وسط‌چین عمودی */
    height: 100%;
    transition: box-shadow 0.2s;
}
.wd-card-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ستون تصویر */
.wd-card-row-img {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.wd-card-row-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ستون اطلاعات (عنوان، قیمت، دکمه) */
.wd-card-row-info {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    padding: 4px 0;
}
.wd-card-row-info .wd-entities-title {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 8px;
}
/* ============================================
   استایل یکپارچه قیمت در کارت محصول
   ============================================ */

/* رنگ قیمت جدید (اصلی) */


/* کلمه تومان (کوچک و خاکستری) */
.wd-dk-prices .currency,
.price .currency {
    font-size: 9px;
    font-weight: 400;
    color: #888;
    margin-right: 2px;
}

/* تنظیم فاصله‌ها در حالت شبکه‌ای */


/* تنظیم فاصله‌ها در حالت ردیفی */


/* ستون توضیحات */
.wd-card-row-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    border-right: 1px solid #eee;
    padding-right: 20px;
    height: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* حداکثر ۴ خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wd-card-row-excerpt p {
    margin: 0;
}
.wd-card-row-excerpt img {
    display: none; /* جلوگیری از به‌هم‌ریختگی با عکس‌های داخل متن */
}

/* دکمه‌های اقدام در حالت ردیفی */
.wd-card-row-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px; /* فاصله بین دکمه‌ها */
	justify-content: center;
}

/* استایل دکمه اصلی (سبد خرید) در حالت ردیفی */
.wd-card-row-actions .wd-btn-cart {
    padding: 8px 16px;
    height: 36px;
    border-radius: 6px;
    background: var(--wd-primary-color); 
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
/* استایل برای دکمه‌ی غیرفعال در کارت محصول */
.wd-card-row-actions .wd-btn-cart.disabled,
.wd-card-row-actions .wd-btn-cart:disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}
.wd-card-row-actions .wd-btn-cart:hover {
    background: #740079;
}

/* استایل دکمه‌های آیکونی در حالت ردیفی */
.wd-card-row-actions .wd-btn-quick,
.wd-card-row-actions .wd-btn-compare,
.wd-card-row-actions .wd-btn-wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #555;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    padding: 0;
}

/* افکت هاور برای دکمه‌های آیکونی */
.wd-card-row-actions .wd-btn-quick:hover,
.wd-card-row-actions .wd-btn-compare:hover,
.wd-card-row-actions .wd-btn-wishlist:hover {
    background: var(--wd-primary-color, #23A455);
    color: #fff;
    border-color: var(--wd-primary-color, #23A455);
}

/* ریسپانسیو برای موبایل (تبدیل به یک ستون) */
@media (max-width: 768px) {
    .wd-card-row {
        grid-template-columns: 100px 1fr; /* توضیحات به ردیف بعد می‌رود */
        gap: 12px;
    }
    .wd-card-row-excerpt {
        grid-column: span 2; /* توضیحات تمام عرض شود */
        border-right: none;
        border-top: 1px solid #eee;
        padding-right: 0;
        padding-top: 12px;
    }
}
/*- کانتینر محصولات 
/* ============================================
   تولبار محصولات (مرتب‌سازی + آیکون‌ها)
   ============================================ */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* ← فاصله بین راست و چپ */
    flex-wrap: nowrap; /* ← جلوگیری از رفتن به خط بعد */
    gap: 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 16px;
    margin-bottom: 16px;
    overflow-x: auto; /* در صورت کم بودن فضا، اسکرول افقی */
    -webkit-overflow-scrolling: touch;
}

/* بخش راست (مرتب‌سازی) */
.shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: space-between; /* ← مرتب‌سازی سمت راست، آیکون‌ها سمت چپ */
    white-space: nowrap;
}

/* گروه مرتب‌سازی */
.shop-sort-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-sort-label {
    font-size: 12px;
    color: #333;
    font-weight: 700;
}

.shop-sort-btn {
    background: transparent;
    border: none;
    padding: 4px 0;
    font-family: inherit;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
	text-decoration: none; /* پیش‌فرض بدون خط */
    text-underline-offset: 6px;
}

.shop-sort-btn:hover {
    color: var(--wd-primary-color, #d32f2f);
	text-decoration: underline; 
}

.shop-sort-btn.active {
    color: var(--wd-primary-color, #d32f2f);
    font-weight: 700;
	text-decoration: underline; 
}

/* آیکون‌های تغییر نمایش */
.wd-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 2px;
    background: #fff;
    flex-shrink: 0; /* ← جلوگیری از فشرده شدن آیکون‌ها */
}

.view-btn {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    color: #333;
}

.view-btn.active {
    background: #f3f4f6;
    color: var(--wd-primary-color, #d32f2f);
}

/* نوار بالایی (پیام و شبکه‌های اجتماعی) */
.whb-top-notice-bar {
    background-color: #1a1a1a; /* رنگ تیره مثل دیجی‌کالا */
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}
.whb-top-notice-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-social-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.top-social-icons a {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #000;
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.top-social-icons a:hover {
    opacity: 1;
	background-color: var(--wd-primary-color); /* تغییر رنگ در هاور */
}
/* استایل تصاویر و آیکون‌های داخل نوار بالایی */
#header-notice-text img {
    max-height: 40px; /* حداکثر ارتفاع تصویر */
    vertical-align: middle;
    display: inline-block;
    margin: 0 4px;
}
#header-notice-text {
    flex: 1; /* باعث می‌شود متن تمام فضای خالی را پر کند */
    text-align: center; /* وسط‌چین کردن محتوا */
    width: 100%;
}
/* استایل لینک‌های داخل نوار بالایی */
#header-notice-text a {
    color: inherit; /* رنگ لینک را از رنگ نوار می‌گیرد */
    text-decoration: underline;
    font-weight: bold;
}
/* آیکون‌ها (نمونه - می‌توانید از آیکون‌های SVG یا فونت استفاده کنید) */
.social-icon-instagram { mask-image: url('/images/instagram.svg'); -webkit-mask-image: url('/images/instagram.svg'); }
.social-icon-telegram { mask-image: url('/images/telegram.svg'); -webkit-mask-image: url('/images/telegram.svg'); }
.social-icon-twitter { mask-image: url('/images/x-twitter.svg'); -webkit-mask-image: url('/images/x-twitter.svg'); }
.social-icon-bale { mask-image: url('/images/bale.svg'); -webkit-mask-image: url('/images/bale.svg'); }
.social-icon-linkedin { mask-image: url('/images/linkedin.svg'); -webkit-mask-image: url('/images/linkedin.svg'); }
.social-icon-aparat { mask-image: url('/images/aparat.svg'); -webkit-mask-image: url('/images/aparat.svg'); }
.social-icon-cafebazar { mask-image: url('/images/cafebazar.svg'); -webkit-mask-image: url('/images/cafebazar.svg'); }
.social-icon-pinterest { mask-image: url('/images/pinterest.svg'); -webkit-mask-image: url('/images/pinterest.svg'); }
.social-icon-youtube { mask-image: url('/images/youtube.svg'); -webkit-mask-image: url('/images/youtube.svg');}
.social-icon-whatsapp { mask-image: url('/images/whatsapp.svg'); -webkit-mask-image: url('/images/whatsapp.svg');}

/* اصلاح منوی ناوبری پایین ->woodmart-theme.css*/


