/* ===============================
   بدنه سایت و ساختار کلی
================================ */
@font-face {
  font-family: IRANSans;
  src: url('/fonts/IRANSans.woff2') format('woff2');
  font-display: swap;
}

body {
    background-color: #f9f9f9;
    font-family: IRANSans, sans-serif;
}
.book-hero-card,
.book-product-card {
    max-width: 1300px;
    margin-inline: auto;
}
/* حذف underline از تمام لینک‌ها */
.single-book a {
    text-decoration: none;
    color: #000;
}
/* hover فقط تغییر رنگ */
.single-book a:hover {
    color: #084298;
}
/* ===============================
   چکیده مطلب ابتدای صفحه
================================ */
.book-hero-card {
    background: #fff;
    border-radius: 0 0 18px 18px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 10px 34px rgba(0,0,0,.06);
}

.book-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.book-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}
/* ===============================
  عکس های صفحات داخل کتاب
================================ */
.view-inside-book-btn {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fafafa;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 5px 3px 1px rgba(90, 100, 171, .13);
}

.view-inside-book-btn:hover {
    background: #fff;
}
.view-inside-book-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.view-inside-book-btn .btn-icon {
    width: 18px;
    height: 18px;
}    

/* مودال */
/* مودال اصلی */
.book-gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden; /* جلوگیری از اسکرول داخل مودال */
}

/* تصویر */
.book-gallery-modal img {
    max-width: 90%;
    max-height: 70vh; /* فضای بیشتر برای نوارها */
    border-radius: 8px;
    transition: transform 0.3s ease; /* انیمیشن زوم */
    transform: scale(1); /* زوم اولیه */
}

/* نوار بالا */
.book-gallery-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.5); /* نیمه‌شفاف */
}

.book-gallery-close {
    font-size: 32px;
    color: #fff;
    cursor: pointer;
}

/* نوار پایین */
.book-gallery-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5); /* نیمه‌شفاف */
    gap: 20px; /* فاصله بین المان‌ها */
}

.book-gallery-nav {
    font-size: 30px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.book-gallery-zoom {
    font-size: 24px;
    background: none;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    cursor: pointer;
}

.book-gallery-counter {
    font-size: 18px;
    color: #fff;
}

/* برای موبایل: مطمئن شدن از responsive */
@media (max-width: 768px) {
    .book-gallery-modal img {
        max-height: 60vh;
    }
    .book-gallery-bottom-bar {
        gap: 10px;
    }
}

/* مخفی کردن دکمه جزئیات بیشتر در دسکتاپ */
  .mobile-details-btn {
    display: none !important;
  }

/* ===============================
   قسمت کارت های کتاب - ترجمه های زیر هم
================================ */

.book-product-card {
    display: grid;
    grid-template-columns: 210px 1fr 260px 220px;
    gap: 24px;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 18px; /* فاصله ترجمه‌ها */
    box-shadow: 0 10px 34px rgba(0,0,0,0.06);
    align-items: start;
}

/* روبان یشنهاد ما */

.book-image {
    position: relative;       /* خیلی مهم — روبان نسبت به این div定位 می‌شود */
    overflow: hidden;         /* برای اینکه قسمت‌های بیرون روبان بریده شود */
    border-radius: 8px;       /* اگر می‌خواهی گوشه‌های تصویر گرد باشد */
}

.featured-ribbon {
    position: absolute;
    top: 14px;
    right: -50px;
    z-index: 10;
    background: #e91e63;        /* رنگ اصلی — مثلاً صورتی/قرمز جذاب */
    color: white;
    font-weight: 400;
    font-size: 12px;
    padding: 2px 50px;
    transform: rotate(45deg);
    transform-origin: center;
}


/* ستون اطلاعات کتاب */
.book-identity p {
    font-size: 14px;
    margin: 4px 0;
    color: #444;
}
.book-subtitle {
    font-size: 13px;
    color: #777;
    font-style: italic;
    margin: 2px 0 8px;
}
/* امتیاز ستاره‌ای */
.book-rating {
    display: flex;
    gap: 4px;
    font-size: 18px;
    cursor: pointer;
}

.book-rating span {
    color: #ccc;
    transition: color .15s ease;
}

.book-rating span.active,
.book-rating span.hover {
    color: #f5a623;
}

.book-rating.rated {
    pointer-events: none;
    opacity: .9;
}

.book-rating-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-rating-number {
    font-size: 13px;
    color: #555;
}
/* ستون مشخصات */
.book-specs ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 14px;
}

.book-specs li {
    margin-bottom: 6px;
    color: #444;
}

/* ===============================
   ستون افزودن به سبد خرید و اطلاع از موجودی
================================ */

/* ستون چهارم */
.book-col.book-buy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;

    padding: 0 10px;
    box-sizing: border-box;
}

/* باکس داخلی */
.book-buy .buy-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /*چسبیدن به انتهای ستون*/
    height: 100%;
}

/* بالای ستون: زودترین زمان ارسال */
.book-shipping-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    color: #000;
    margin-bottom: 12px;
}

.book-shipping-time img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

/* قیمت – دسکتاپ */
.price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 12px;
}

.old-price {
    font-size: 13px;
    color: #777;
    text-decoration: line-through;
}

.new-price {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.discount {
    background: #e53935;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}
/* ===== قیمت – دسکتاپ (فیکس قطعی) ===== */
@media (min-width: 769px) {

  .price-box {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "old old"
      "discount new";
    gap: 6px;
    justify-content: center;
    align-items: center;
  }

  .old-price {
    grid-area: old;
    text-align: center;
  }

  .discount {
    grid-area: discount;
    justify-self: end;
  }

  .new-price {
    grid-area: new;
    justify-self: start;
  }
}


/* دکمه‌های خرید و خبرم کن */
.action-box {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.action-box .buy-btn {
    margin-top: auto;
}

.book-buy .buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    transition: all .2s ease;
}

.out-of-stock-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #e53935;
    font-weight: 500;
}

/* دکمه افزودن به سبد */
.add_to_cart_button {
    background: #e53935;
    color: #fff !important;
}

.add_to_cart_button:hover {
    background: #d32f2f;
}

/* دکمه خبرم کن */
.notify-btn {
    background: #f7c948;
    color: #fff !important;
}

.notify-btn:hover {
    background: #f1b400;

}

.book-buy .buy-btn.added img {
    display: none;
}

.book-buy .buy-btn.added .btn-loading {
    display: none;
}

.book-buy .buy-btn.added .btn-success {
    display: inline-flex;
}

.book-buy .buy-btn.added .btn-text {
    display: inline;
}
.btn-success {
    display: none;
}

/* Loading  - تایید افزودن به سبد خرید */
.btn-loading {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.buy-btn.loading {
    pointer-events: none;
    opacity: .8;
}

.buy-btn.loading img,
.buy-btn.loading .btn-text,
.buy-btn.loading .btn-icon {
    display: none;
}

.buy-btn.loading .btn-loading {
    display: block;
}
/* آیکون داخل دکمه سبد خرید */
.book-buy .buy-btn img,
.book-buy .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);  /*سفید کردن آیکون دکه سبد خرید*/
}

.book-buy .btn-loading,
.book-buy .btn-success {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


.buy-btn.added {
    background: #2e7d32 !important;
    color: #fff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ستون خرید – Modal notify */

.notify-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.notify-box {
    background: #fff;
    width: 90%;
    max-width: 360px;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notify-box h3 {
    font-size: 16px;
    text-align: center;
}

.notify-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.notify-submit {
    background: #e53935;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

.notify-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
}
.added_to_cart.wc-forward {
    display: none !important;
}

/* ===============================
   توضیحات کتاب مرجع/ معرفی / نویسنده
================================ */
.book-description {
    display: grid;
    max-width: 1300px;
    gap: 15px;
    margin-top: 10px;
}

/* دو ستونه */
.book-description.columns-2 {
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

/* تک ستونه */

.book-description.columns-1 {
    grid-template-columns: 1fr;
}

/* ===============================
   تب های معرفی، نویسنده و غیره
================================ */

.book-section-tabs {
    display: flex;
    gap: 14px;
    margin: 28px 0 18px;
    flex-wrap: wrap;
}
.book-section-tabs a {
    font-size: 13px;
    padding: 6px 14px;
    background: #f3f3f3;
    border-radius: 20px;
    color: #444;
}
.book-section-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===============================
   نقد و بررسی و معرفی
================================ */
.book-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    color: #666;
}
.book-section-title img {
    width: 22px;
}
.book-section-title h2 {
    font-size: 18px;
}
/* دو ستونه فقط وقتی هر دو وجود دارن */
.book-description.columns-2 {
    grid-template-columns: 2fr 1fr;
}
.book-main-content,
.book-author-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.04);
    line-height: 2;
}

/* تیتر نویسنده */
.book-author-content h3 {
    margin-bottom: 12px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
    text-align: center;
}
.author-image {
    text-align: center;
    margin-bottom: 12px;
}

.author-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* ===============================
   قسمت کتای های مرتبط 5 ستونه
================================ */

.book-slider-container {
    position: relative;
}

.book-slider-wrapper {
    overflow: hidden;
}

.book-slider-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.book-slider-track::-webkit-scrollbar {
    display: none;
}

.book-card {
    flex: 0 0 calc(20% - 19.2px);
    scroll-snap-align: start;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    transition: .25s;
}

.book-card:hover {
    transform: translateY(-4px);
}

/* Image */
.book-card-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 15px 0;
    height: 200px;
}

.book-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* Discount */
.book-discount {
    position: absolute;
    bottom: -7px;
    background: #e60023;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 15px;
}

/* Content */
.book-card-content {
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

/* Title */
.book-card-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 22px;
}

/* Author */
.book-card-author {
    font-size: 12px;
    color: #777;
    margin-bottom: auto;
}

/* Price */
.book-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

/* Price */
.book-card-price {
    display: flex;
    font-size: 14px;
    font-weight: 700;
    color: #006600;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.book-card-price del {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
}

.book-card-price ins {
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #e60023;
}
.book-card-title a {
    color: inherit;
    text-decoration: none;
}

.book-card-title a:hover {
    color: #e60023;
}
.book-card-cart.disabled {
    background: #ddd;
    pointer-events: none;
    opacity: .5;
    cursor: not-allowed;
}
.book-card-unavailable {
    background: #f3f3f3;
    color: #888;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
}
/* Footer layout */
.book-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

/* Cart button */
.book-card-cart {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaeaea;
    color: #fff;
    font-size: 16px;
    border-radius: 10px;
    transition: .2s ease;
    flex-shrink: 0;
}
.book-card-cart:hover img {
    filter: invert(1);
}
.book-card-cart:hover {
    background: #009b7c;
}
/* Icon size control */
.book-card-cart img {
    width: 18px;
    height: 18px;
    display: block;
}

/* ===== Buttons ===== */

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    font-size: 22px;
}

.slider-arrow.prev {
    right: -20px;   /* چون RTL هستی */
}

.slider-arrow.next {
    left: -20px;
}

.slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.book-slider-track {
    display: flex;
    flex-wrap: nowrap;
}

.book-card {
    flex: 0 0 calc((100% - 96px) / 5);
}

.book-related {
    overflow: hidden;
}
.slider-arrow.prev {
    right: 10px;
}

.slider-arrow.next {
    left: 10px;
}

/* ===== سبد خرید ایجکس اسلایدر ===== */
.book-cart-notice {
    position: fixed;
    top: 50px;
    left: 30px;
    background: #01977a;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    opacity: 0;
    transition: .3s;
    z-index: 9999;
}

.book-cart-notice.show {
    opacity: 1;
}

/* ===============================
   دسته بندی/ برچسب
================================ */
.single-book {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.book-taxonomy-box {
    background: #fffa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0 40px;
    box-sizing: border-box;
}

.product-taxonomy-block {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.taxonomy-item {
    padding: 6px 14px;
    border-radius: 20px;
    background: #f5f5f5;
    font-size: 14px;
    text-decoration: none;
    transition: 0.25s ease;
}

.taxonomy-item:hover {
    background: #222;
    color: #fff;
}

.taxonomy-item.cat {
    border: 1px solid #ddd;
}

.taxonomy-item.tag {
    background: #e9f3ff;
}

/* ===============================
خط جداکننده بلوک ها (تاثیر روی همه بلوک ها)
================================ */
.book-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.book-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, #ddd, transparent);
    margin-right: 16px; /* چون RTL هست */
}

/* ===============================
   هدر سایت
================================ */
.site-header {
    width: 100%;
    background: #f9f9f9; /* رنگ ثابت بک‌گراند */
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    z-index: 1000;
    padding: 15px 0;
}

.header-bg {
    background: #f9f9f9;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 15px;
}

/* ستون‌ها */

.header-col {
    display: flex;
    align-items: center;
}

/* لوگو */
.header-logo img {
    max-height: 80px;
    margin: auto;
    width: auto;
    display: table-cell;
    vertical-align: middle;

}

/* جستجو */
.header-search {
    flex: 1;
    max-width: 500px;
    width: 100%;
}


.header-search form {
    width: 100%;
}

.header-search input[type="search"] {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    height: 46px;         /* ارتفاع ثابت */
    background: #ffffff;
    font-family: IRANSans, sans-serif;
}

.header-search button {
    display: none; /* چون دکمه داخل فرم سرچ هست، مخفی */
}

/* سبد خرید + حساب */
.header-actions {
    gap: 15px;
}

.cart-icon {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 15px;
    text-decoration: none;
}

.cart-icon img {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff0000;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

.login-button {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
}

.login-button:hover {
    background: #005177;
    color: #fff;
}

/* ===============================
   نظرات/ کامنت ها
================================ */
.book-comments-wrapper {
    margin-top: 40px;
}

.comments-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
}

.comment-list li {
    margin-bottom: 8px;
}

.comments-title {
    font-size: 20px;
    font-weight: bold;
}

.book-comments-section {
    width: 100%;
}

.book-comments-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;          /* این مهمه */
    padding: 0 16px;
    box-sizing: border-box;
}

.book-comments-box {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 10px 16px;
    margin-top: 20px;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-icon {
    width: 22px;
    height: 22px;
}

.comments-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.comments-count {
    margin: 10px 0 20px;
    color: #777;
    font-size: 14px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-parent {
    padding: 6px 0;
}

.comment-child {
    background: #e9e9e9;
    padding: 2px 6px;
    margin: 8px 0 0 8px;
    border-radius: 8px;
}

.comment-content {
    font-size: 15px;
    text-align: justify;
    line-height: 1;
}

.comment-meta {
    margin-top: 12px;
    font-size: 13px;
    color: #777;
}

.comment-reply {
    margin-top: 8px;
}

.comment-separator {
    margin-top: 8px;
    border: none;
    border-bottom: 1px dashed #b3b3b3;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
}

.comment-form textarea {
    min-height: 120px;
}

.comment-form .submit {
    background: #1e73be;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
}
.comment-list {
    margin-bottom: 40px;
}

.comment-form-wrapper {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.comment-admin-badge {
    background: #1e73be;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 4px;
}

.comment-like {
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
    margin-top: 10px;
}

.comment-like.liked {
    color: #1e73be;
}
.comment-toast {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    background: #333;
    color: #fff;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    transition: all .2s ease;
    z-index: 10;
}

.comment-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.comment-like {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.comment-like {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-like.liked {
    opacity: 0.5;
    pointer-events: none;
}

.like-toast {
    position: absolute;
    top: -28px;
    right: 0;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    transform: translateY(5px);
    white-space: nowrap;
}

.like-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 13px;
    color: #777;
    gap: 12px;
}

.comment-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-like {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
}

.comment-like.liked {
    opacity: 0.5;
    pointer-events: none;
}

.comment-reply a {
    font-size: 13px;
    color: #1e73be;
    text-decoration: none;
}

.comment-reply a:hover {
    text-decoration: underline;
}
/* ===== بردکرامب ===== */
.kb-breadcrumb {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #ededed;
}

.kb-breadcrumb a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.kb-breadcrumb a:hover {
    color: #7b4dff;
}

.kb-breadcrumb .sep {
    color: #bbb;
    font-size: 14px;
}

.kb-breadcrumb .current {
    color: #222;
    font-weight: 500;
}


/* ===============================
   فوتر سایت
================================ */

.site-footer {
    font-size: 14px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Top */

.footer-top {
    background: #999;
    color: #fff;
    border-bottom: 1px solid #ddd;
}

.footer-top .footer-container {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 30px;
}

.footer-col h4 {
    margin-bottom: 22px;
    font-size: 17px;
}

/* ===== Footer Top Menus ===== */

.site-footer .footer-top .footer-menu {
    list-style: none;      /* حذف بولت */
    padding: 0;
    margin: 0;
}

.site-footer .footer-top .footer-menu li {
    margin-bottom: 8px;
}

.site-footer .footer-top .footer-menu li a {
    color: #fff;           /* متن سفید */
    text-decoration: none; /* بدون underline */
    font-size: 14px;       /* سایز متناسب */
    transition: color 0.2s ease;
}

.site-footer .footer-top .footer-menu li a:hover {
    color: #0073aa;        /* هاور آبی */
}


/* Social */

.footer-social {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-social img {
    width: 28px;
}

/* Bottom */
.footer-bottom {
    background: #f8f8f8;
    color: #444;
}
.footer-bottom-inner {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-about {
    flex: 3;
}

.footer-enamad {
    flex: 1;
    text-align: center;
}

.footer-copy {
    text-align: center;
    padding: 15px;
    background: #eee;
    font-size: 13px;
}

/* Footer Menus */

.site-footer .footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-menu li {
    margin-bottom: 8px;
}

.site-footer .footer-menu li a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.site-footer .footer-menu li a:hover {
    color: #ef394e; 
    padding-right: 5px;
}

/* ===== Footer Discount AJAX Form ===== */

.footer-discount-form {
    background: rgba(255,255,255,0.08);
    padding: 18px;
    border-radius: 14px;
}

.footer-discount-form .form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-discount-form input {
    flex: 1;
    padding: 11px 14px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
}

.footer-discount-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.4);
}

.footer-discount-form button {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg,#0073aa,#005177);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.footer-discount-form .success-msg {
    margin-top: 10px;
    background: #2ecc71;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
}

.footer-discount-form .error-msg {
    margin-top: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
}

/* ====================== مودال جزئیات کتاب در موبایل ====================== */
.book-mobile-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.book-mobile-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-height: 90vh;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}

.book-mobile-modal.active .modal-sheet {
    transform: translateY(0);
}

/* ─── Header ─────────────────────────────────────────────── */
.modal-header {
    padding: 12px 20px;
    background: #f2f2f2;
    color: #686868;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: #ff0000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Scrollable Content ─────────────────────────────────── */
.modal-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

/* ─── Fixed Bottom Section ───────────────────────────────── */
.modal-fixed-bottom {
    padding: 10px 16px 22px;
    background: white;
    box-shadow: 0px -3px 5px 0px rgba(0, 0, 0, .06);
    flex-shrink: 0;
}

/* ─── Content Styling (identity + specs) ─────────────────── */
.modal-scrollable .book-identity,
.modal-scrollable .book-specs {
    margin: 0;
    padding: 0;
}

.modal-scrollable .book-identity .product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.9em;
    color: #111;
}

.modal-scrollable .book-identity p,
.modal-scrollable .book-specs li {
    margin: 0.65em 0;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    border: none !important;
    list-style: none;
}

.modal-scrollable .book-identity strong,
.modal-scrollable .book-specs strong {
    font-weight: 600;
    color: #222;
    margin-left: 0.4em;
    display: inline;
}

.modal-scrollable .book-identity a,
.modal-scrollable .book-identity span:not(.book-rating-wrap),
.modal-scrollable .book-specs li:not(:has(strong)) {
    color: #444;
    font-weight: 400;
}

.modal-scrollable .book-specs {
    margin-top: 1.1em;           /* فاصله ملایم از بخش هویت */
}

.modal-scrollable .book-specs ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.modal-scrollable .book-specs li {
    border: 0 !important;
    padding-bottom: 0.1em;
}

/* ─── Price / Out of stock message ───────────────────────── */
.modal-price .out-of-stock-msg {
    padding: 16px 0;
    font-size: 1.1rem;
    color: #d32f2f;
    text-align: center;
    font-weight: 500;
}

/* ─── Action Buttons (Add to cart / Notify) ──────────────── */
.modal-actions .buy-btn,
.modal-actions .notify-btn,
.modal-actions .full-width-action {
    width: 100% !important;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    padding: 0 20px;
    border-radius: 12px;
    box-sizing: border-box;
    white-space: nowrap;
}

.modal-actions .buy-btn img,
.modal-actions .notify-btn img {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    object-fit: contain;
    flex-shrink: 0;
}

.modal-actions img {
    max-width: 28px;
    max-height: 28px;
}

/* رنگ‌های پیشنهادی دکمه‌ها */
.modal-actions .buy-btn {
    background-color: #4CAF50;     /* سبز برای موجود */
    color: white;
    font-weight: 600;
}

.modal-actions .notify-btn {
    background: #f7c948;           /* زرد برای خبرم‌کن */
    color: white;
}
.modal-price {
    margin: 0.3em 0.3em 0.3em 0.3em;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #000; 
    border-top: dashed;
}

.modal-price .new-price {
    color: #e91e63;
    font-size: 0.95rem;
}

.modal-price .old-price {
    color: #999;
    text-decoration: line-through;
    margin-left: 0.6em;
    font-size: 0.75rem;
}

.modal-price .discount {
    background: #ff5252;
    color: white;
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 0.6em;
}

.modal-price .out-of-stock-msg {
    padding: 16px 0;
    font-size: 1.1rem;
    color: #d32f2f;
    text-align: center;
    font-weight: 500;
}
/* مهم: نمایش اجباری مشخصات داخل مودال */
.book-mobile-modal .book-specs {
    display: block !important;
}
.book-mobile-modal .book-shipping-time {
    display: flex !important;
}
/* انتهای مودال جزئیات کتاب */
/* ترجمه از نظر کاربران */
.best-translation-box {
    background: #fff;
    border: 1px solid #fbce37;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2.5rem 0;
}

.best-translation-box h2 {
    margin-top: 0;
    color: #2c5282;
}

/*----عدم نمایش متن آیکون در اسلایدر محصول---*/
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

