:root {
	--wd-text-font: "Vazirmatn-FD-NL-Regular", Arial, Helvetica, sans-serif;
	--wd-text-font-weight: 400;
	--wd-text-color: #777777;
	--wd-text-font-size: 14px;
	--wd-title-font: "Vazirmatn-FD-NL-Regular", Arial, Helvetica, sans-serif;
	--wd-title-font-weight: 400;
	--wd-title-color: #242424;
	--wd-entities-title-font: "Vazirmatn-FD-NL-Bold", Arial, Helvetica, sans-serif;
	--wd-entities-title-font-weight: 700;
	--wd-entities-title-color: #333333;
	--wd-entities-title-color-hover: rgb(51 51 51 / 65%);
	--wd-alternative-font: "Vazirmatn-FD-NL-Bold", Arial, Helvetica, sans-serif;
	--wd-widget-title-font: "Vazirmatn-FD-NL-Bold", Arial, Helvetica, sans-serif;
	--wd-widget-title-font-weight: 700;
	--wd-widget-title-transform: uppercase;
	--wd-widget-title-color: #333;
	--wd-widget-title-font-size: 16px;
	--wd-header-el-font: "Vazirmatn-FD-NL-Bold", Arial, Helvetica, sans-serif;
	--wd-header-el-font-weight: 700;
	--wd-header-el-transform: uppercase;
	--wd-header-el-font-size: 13px;
	--wd-otl-style: dotted;
	--wd-otl-width: 2px;
	--wd-primary-color: #363a91;
	--wd-alternative-color: #fbbc34;
	--btn-default-bgcolor: #363a91;
	--btn-default-bgcolor-hover: #777777;
	--btn-accented-bgcolor: #363a91;
	--btn-accented-bgcolor-hover: #777777;
	--wd-form-brd-width: 2px;
	--notices-success-bg: #459647;
	--notices-success-color: #fff;
	--notices-warning-bg: #E0B252;
	--notices-warning-color: #fff;
	--wd-link-color: #363a91;
	--wd-link-color-hover: #0c11f1;
}
.wd-age-verify-wrap {
	--wd-popup-width: 500px;
}
.wd-popup.wd-promo-popup {
	background-color: #111111;
	background-image: none;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: left center;
}
.wd-promo-popup-wrap {
	--wd-popup-width: 800px;
}
:is(.woodmart-woocommerce-layered-nav, .wd-product-category-filter) .wd-scroll-content {
	max-height: 280px;
}
.wd-page-title .wd-page-title-bg img {
	object-fit: cover;
	object-position: center center;
}
:is(.page, .search-no-results, .error404) :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.woodmart-archive-shop:not(.single-product) :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.single-product :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.woodmart-archive-blog :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.single-post :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.woodmart-archive-portfolio :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.single-portfolio :is(.wd-page-content, .whb-header) {
	background-color: rgb(255,255,255);
	background-image: none;
}
.mfp-wrap.wd-popup-quick-view-wrap {
	--wd-popup-width: 920px;
}
:root{
--wd-container-w: 1222px;
--wd-form-brd-radius: 35px;
--btn-default-color: #fff;
--btn-default-color-hover: #fff;
--btn-accented-color: #fff;
--btn-accented-color-hover: #fff;
--btn-default-brd-radius: 5px;
--btn-default-box-shadow: none;
--btn-default-box-shadow-hover: none;
--btn-accented-brd-radius: 5px;
--btn-accented-box-shadow: none;
--btn-accented-box-shadow-hover: none;
--wd-brd-radius: 12px;
}

@media (min-width: 1222px) {
section.elementor-section.wd-section-stretch > .elementor-container {
margin-left: auto;
margin-right: auto;
}
}


.wd-page-title {
background-color: #0a0a0a;
}

@font-face {
	font-family: "iransans";
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family: "iransansb";
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family: "iran";
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family: "Vazir";
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family: "Vazir Bold";
	font-weight: 700;
	font-style: normal;
}

@font-face {
	font-family: "Vazirmatn-FD-NL-Regular";
	src: url("//ketabtaha.com/wp-content/uploads/2024/07/Vazirmatn-FD-NL-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family: "Vazirmatn-FD-NL-Bold";
	src: url("//ketabtaha.com/wp-content/uploads/2024/07/Vazirmatn-FD-NL-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
}

/* ============================================================
   KETAB TAHA - ULTIMATE PRODUCT PAGE FIX (2025 FINAL)
   Clean Design + Hidden Share Buttons + Fix Layout
   ============================================================ */

/* 1. حذف دکمه‌های اشتراک‌گذاری و لینک‌های اضافی (فقط در صفحه محصول) */
.single-product-content .product-share,
.single-product-content .wd-social-icons,
.single-product-content .wd-action-btn.wd-style-text,
.single-product-content a[href*="shortlink"],
.single-product-content .product-share-btn {
    display: none !important;
}

/* حذف متن "همخوان کنید" */
.single-product-content .share-title {
    display: none !important;
}

/* 2. اصلاح ساختار گرید (ستون عکس و متن) */
.product-image-summary.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px;
    margin-left: -15px;
    align-items: flex-start;
}

/* ستون عکس */
.product-image-summary .col-lg-6.product-images {
    width: 45% !important; 
    padding: 0 15px !important;
    flex: 0 0 45% !important;
    max-width: 45% !important;
}

/* ستون توضیحات */
.product-image-summary .col-lg-6.entry-summary {
    width: 55% !important; 
    padding: 0 20px 0 50px !important;
    flex: 0 0 55% !important;
    max-width: 55% !important;
}

/* 3. عنوان محصول - بولد و مشکی */
h1.product_title {
    font-size: 24px !important;
    font-weight: 900 !important; 
    color: #212121 !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
}

/* 4. قیمت - مدرن و تمیز */
p.price {
    font-size: 26px !important;
    color: #333 !important;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 25px !important;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

p.price ins {
    text-decoration: none;
    color: #d32f2f; 
}

p.price del {
    font-size: 16px !important;
    color: #9e9e9e !important;
    opacity: 0.8;
}

/* 5. دکمه افزودن به سبد خرید */
form.cart {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px !important;
    background: #fff;
    padding: 10px 0;
}

button.single_add_to_cart_button {
    background-color: #ef394e !important; 
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 0 45px !important;
    height: 52px !important;
    font-size: 16px !important;
    box-shadow: 0 8px 20px rgba(239, 57, 78, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none !important;
    flex-grow: 1;
}

button.single_add_to_cart_button:hover {
    background-color: #d32f2f !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(239, 57, 78, 0.35);
}

/* فیلد تعداد */
.quantity input.qty {
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    height: 52px !important;
    width: 60px !important;
    font-weight: 600;
    font-size: 18px !important;
    color: #333;
}

/* 7. جدول مشخصات - مینیمال */
.shop_attributes {
    margin-top: 25px !important;
    border: 1px solid #f5f5f5 !important;
    border-radius: 10px;
    padding: 15px !important;
    background: #fafafa; 
}

.shop_attributes th, 
.shop_attributes td {
    padding: 8px 15px !important;
    border-bottom: 1px solid #eee !important;
    background: transparent !important;
}

.shop_attributes tr:last-child th,
.shop_attributes tr:last-child td {
    border-bottom: none !important;
}

/* 8. اصلاح ویجت پرداخت اقساطی */
.summary-inner > div[style*="border"], 
.summary-inner .wc-block-components-product-price { 
    background: #fff !important;
    border: 1px dashed #bdbdbd !important; 
    border-radius: 8px !important;
    padding: 15px !important;
    margin: 20px 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 9. ریسپانسیو موبایل */
@media (max-width: 1024px) {
    .product-image-summary .col-lg-6.product-images,
    .product-image-summary .col-lg-6.entry-summary {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .product-image-summary .col-lg-6.entry-summary {
        padding-top: 30px !important;
    }

    button.single_add_to_cart_button {
        width: 100% !important;
    }
}


/* ============================================================
   بخش لیبل‌های هوشمند و دکمه‌های کارت
   ============================================================ */

/* 1. تنظیمات مخصوص صفحه داخلی محصول */
body.single-product .product-image-summary .product-labels {
    top: 25px !important;
    left: 25px !important;
    right: auto !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 20 !important;
    max-width: none !important;
    align-items: flex-start !important; 
}

body.single-product .product-image-summary .product-label {
    width: max-content !important; 
    height: auto !important;
    min-width: max-content !important;
    min-height: unset !important;
    padding: 8px 20px !important; 
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50px !important; 
    line-height: normal !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    animation: smooth-badge-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
}

body.single-product .product-image-summary .product-label.onsale {
    background: linear-gradient(135deg, #ef394e 0%, #ff5252 100%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    width: max-content !important;
    border-radius: 50px !important;
}

body.single-product .product-image-summary .product-label.attribute-label:not(.onsale),
body.single-product .product-image-summary .product-label.-second-hand-quality {
    background: linear-gradient(135deg, #4b6584 0%, #34495e 100%) !important; 
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important; 
}

body.single-product .product-image-summary .product-label.out-of-stock {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%) !important; 
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important; 
}


/* -------------------------------------------------------------
   2. اصلاح لیبل‌ها در کارت‌های محصول (Product Grid) - فرم کپسولی یکپارچه
   ------------------------------------------------------------- */
.product-grid-item .product-labels {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important; /* فیکس شدن لیبل‌ها سمت راست */
    left: auto !important; 
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; 
    align-items: flex-start !important; /* چینش از سمت راست برای متون فارسی */
    z-index: 30 !important; 
    pointer-events: none !important; 
}

/* استایل پایه تمام لیبل‌های گرید (کپسول‌های کاملاً یکسان) */
.product-grid-item .product-label {
    width: max-content !important; 
    min-width: max-content !important; 
    height: auto !important;
    min-height: unset !important;
    padding: 6px 14px !important; /* پدینگ استاندارد برای کپسولی شدن */
    border-radius: 30px !important; /* فرم کپسولی */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.12) !important; 
    border: 1px solid rgba(255, 255, 255, 0.25) !important; 
    white-space: nowrap !important; 
    letter-spacing: -0.2px !important; 
    
    animation: smooth-badge-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
}

/* لیبل تخفیف (دیگر دایره نیست، کپسولی شبیه بقیه است) */
.product-grid-item .product-label.onsale {
    background: linear-gradient(135deg, #ef394e 0%, #ff5252 100%) !important;
    color: white !important;
}

/* لیبل‌های متنی (دست دوم و ...) */
.product-grid-item .product-label.attribute-label,
.product-grid-item .product-label.-second-hand-quality {
    background: linear-gradient(135deg, #546e7a 0%, #34495e 100%) !important;
    color: white !important;
}

/* لیبل ناموجود */
.product-grid-item .product-label.out-of-stock {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%) !important;
    color: white !important;
}

.product-label::before,
.product-label::after {
    display: none !important;
}

@keyframes smooth-badge-pop {
    0% { opacity: 0; transform: scale(0.8) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* -------------------------------------------------------------
   3. اصلاح دکمه ذره‌بین (انتقال به سمت چپ برای جلوگیری از تداخل)
   ------------------------------------------------------------- */
.product-grid-item .wd-buttons,
.product-grid-item .wd-buttons.wd-pos-r-t {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important; /* فیکس شدن دکمه هاور سمت چپ */
    right: auto !important; 
    bottom: auto !important;
    z-index: 40 !important; /* بالاتر از همه چیز */
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.product-grid-item .wd-buttons .wd-action-btn > a {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
    transition: all 0.3s ease !important;
}

.product-grid-item .wd-buttons .wd-action-btn > a:hover {
    background: #fff !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
}


/* ============================================================
   WOODMART MODERN GLASS CARD (EQUAL HEIGHT FLEXBOX ARCHITECTURE)
   ============================================================ */

.product-grid-item .product-wrapper {
    background: rgba(255, 255, 255, 0.95) !important; 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255, 255, 255, 0.4); 
    border-radius: 16px; 
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07); 
    transition: all 0.4s ease;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.product-grid-item:hover .product-wrapper {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: #fff;
}

/* 4.5 بازگردانی استایل قاب و سایه اختصاصی تصاویر (Passe-partout Effect) */
.product-grid-item .product-element-top {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 200px !important; 
    aspect-ratio: 2/3 !important; /* فریم مستطیلی استاندارد */
    overflow: hidden !important;
    background: #f4f6f8 !important; /* رنگ قاب پشت تصویر */
    border-radius: 16px 16px 0 0 !important;
    flex-shrink: 0 !important; 
}

.product-grid-item .product-image-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    padding: 20px !important; /* فضای خالی (تنفس) اطراف عکس */
    z-index: 1 !important;
}

.product-grid-item .woocommerce-loop-product__image-wrapper,
.product-grid-item .product-image-wrapper,
.product-grid-item .hover-img {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 20px !important; 
    z-index: 2 !important;
}

.product-grid-item .hover-img {
    opacity: 0;
    transition: opacity 0.4s ease;
    background: #f4f6f8 !important; 
    pointer-events: none; 
}

.product-grid-item:hover .hover-img {
    opacity: 1;
}

.product-grid-item .product-element-top img,
.product-grid-item .product-image-link img,
.product-grid-item .woocommerce-loop-product__image,
.product-grid-item img.attachment-woocommerce_thumbnail,
.product-grid-item .hover-img img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important; 
    height: auto !important; 
    object-fit: contain !important; 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12) !important; /* سایه طبیعی کتاب */
    border-radius: 2px 6px 6px 2px !important; /* گردی ملایم لبه‌های کتاب */
    transform: none !important;
    position: relative !important;
    background: #fff !important; 
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.product-grid-item:hover .product-image-link img,
.product-grid-item:hover .hover-img img {
    transform: scale(1.04) !important; /* زوم ملایم روی خود کتاب هنگام هاور */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18) !important;
}

.product-grid-item .wd-add-btn {
    display: none !important;
}


/* ============================================================
   تایپوگرافی و ساختار بخش پایین کارت
   ============================================================ */

.product-grid-item .product-element-bottom {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; 
    position: relative !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding: 12px 15px !important;
    width: 100% !important;
    overflow: visible !important;
    gap: 6px !important;
}

.product-grid-item .product-element-bottom > * {
    position: relative !important;
    transform: none !important; 
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    max-height: none !important;
}

.product-grid-item .wrap-price {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff; 
    padding: 10px 0;
    margin-top: auto !important; 
    margin: auto 0 0 0 !important;
    border-radius: 10px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    border: 1px solid #f5f5f5;
    position: relative !important;
    z-index: 5;
    width: auto !important;
    padding-top: 15px !important;
}

.product-grid-item .wrap-price .price {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #333 !important;
    display: flex !important;
    flex-direction: column-reverse; 
    align-items: center;
    line-height: 1.2;
    position: relative !important;
}


/* عنوان محصول */
.product-grid-item .wd-entities-title,
.product-element-bottom .wd-entities-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #2d3436 !important;
    margin: 0 !important;
    margin-bottom: 12px !important; 
    padding: 0 !important;
    text-align: center;
    line-height: 1.35 !important;
    width: 100% !important;
    position: relative !important;
    flex-shrink: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important; 
    -webkit-line-clamp: 2 !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important;
    white-space: normal !important;
}

.product-element-bottom .wd-entities-title a {
    color: #2d3436 !important;
    text-decoration: none;
    display: block !important;
}

.product-grid-item .woocommerce-loop-product__title.-kowsarsync-subtitle,
.product-element-bottom .woocommerce-loop-product__title.-kowsarsync-subtitle {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #666 !important;
    margin: 0 !important;
    margin-bottom: 12px !important; 
    padding: 0 !important;
    line-height: 1.3 !important;
    width: 100% !important;
    position: relative !important;
    flex-shrink: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important; 
    -webkit-line-clamp: 2 !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important;
    white-space: normal !important;
}


/* ============================================================
   FIX: Card Size & Price Layout (Forced)
   ============================================================ */

@media (min-width: 1025px) {
    .wd-products-element .wd-col-lg-5 {
        flex: 0 0 25% !important; 
        max-width: 25% !important;
    }
    
    .wd-carousel-item {
        width: 300px !important; 
    }
}

.product-grid-item .price {
    display: flex !important;
    flex-direction: column !important; 
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: auto !important; 
    margin: auto 0 0 0 !important;
    padding-top: 15px !important;
    position: relative !important;
    transform: none !important;
}

.product-grid-item .price > ins,
.product-grid-item .price > span:not(del) {
    font-size: 18px !important;
    color: #d63031 !important;
    font-weight: 800 !important;
    position: relative !important;
}

.product-grid-item .price del {
    font-size: 13px !important;
    color: #b2bec3 !important;
    text-decoration: line-through !important;
    opacity: 0.8 !important;
    position: relative !important;
}

.custom-price-label {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 12px !important;
    color: #7f8c8d !important;
    margin-bottom: 5px !important;
    font-weight: normal !important;
    position: relative !important;
}