/* ==========================================================================
   شاهنامه | refresh.css — بازطراحی بصری حرفه‌ای (نسخه ۱.۷)
   پالت پاستیلی آرام • فضای تنفس • افکت‌های ملایم • موبایل‌فرست
   این فایل آخر از همه لود می‌شود و استایل‌های پایه را ارتقا می‌دهد.
   ========================================================================== */

/* ---------- پایه و تایپوگرافی ---------- */
body {
    background: var(--sh-bg-soft);
    color: var(--sh-text);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
* { scroll-behavior: smooth; }

::selection { background: var(--sh-primary-light); color: var(--sh-primary-dark); }

/* اسکرول‌بار ظریف */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--sh-bg-mute); }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 999px; border: 3px solid var(--sh-bg-mute); }
::-webkit-scrollbar-thumb:hover { background: var(--sh-primary); }

h1, h2, h3, h4 { color: var(--sh-text); font-weight: 800; letter-spacing: -0.01em; }

/* ==========================================================================
   کانتینر تمام‌عرض
   ========================================================================== */
.shahnameh-container { max-width: var(--sh-container); padding-inline: 32px; }
.shahnameh-site-content { padding: 40px 0; }

/* ==========================================================================
   دکمه‌های سراسری با افکت درخشش (shine)
   ========================================================================== */
.sh-btn,
.shahnameh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--sh-radius-full);
    font-family: inherit;
    font-weight: 700;
    font-size: 14.5px;
    border: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--sh-transition);
    line-height: 1;
}
.sh-btn::before,
.shahnameh-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    right: -120%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: right 0.6s ease;
}
.sh-btn:hover::before,
.shahnameh-btn:hover::before { right: 120%; }

.sh-btn-primary {
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark));
    color: #fff;
    box-shadow: var(--sh-shadow-primary);
}
.sh-btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 12px 30px rgba(13,148,136,0.32); }

.sh-btn-accent {
    background: linear-gradient(135deg, var(--sh-accent), #f43f5e);
    color: #fff;
    box-shadow: var(--sh-shadow-accent);
}
.sh-btn-accent:hover { transform: translateY(-2px); color: #fff; }

.sh-btn-outline {
    background: #fff;
    color: var(--sh-primary-dark);
    border: 1.5px solid var(--sh-border);
}
.sh-btn-outline:hover { border-color: var(--sh-primary); color: var(--sh-primary); background: var(--sh-primary-soft); transform: translateY(-2px); }

/* ==========================================================================
   کارت کتاب — ظریف، تصویرمحور، افکت هاور دلنشین
   ========================================================================== */
.sh-book-item,
.shahnameh-book-card {
    background: var(--sh-bg);
    border: 1px solid var(--sh-border-soft);
    border-radius: var(--sh-radius-lg);
    overflow: hidden;
    transition: var(--sh-transition);
    position: relative;
    box-shadow: var(--sh-shadow-sm);
    display: flex;
    flex-direction: column;
}
.sh-book-item:hover,
.shahnameh-book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-shadow-lg);
    border-color: var(--sh-primary-light);
}
.sh-book-thumb {
    position: relative;
    padding: 22px 22px 6px;
    background: linear-gradient(160deg, var(--sh-bg-soft), var(--sh-bg));
    display: flex;
    justify-content: center;
}
.sh-book-thumb img {
    height: 240px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--sh-radius-sm);
    box-shadow: 0 10px 24px rgba(28,25,23,0.16);
    transition: var(--sh-transition);
}
.sh-book-item:hover .sh-book-thumb img { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 16px 32px rgba(28,25,23,0.22); }

.sh-book-badge {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    padding: 5px 12px;
    border-radius: var(--sh-radius-full);
    font-size: 11.5px;
    font-weight: 800;
    color: #fff;
    z-index: 2;
    box-shadow: var(--sh-shadow-sm);
}
.sh-badge-sale { background: linear-gradient(135deg, var(--sh-accent), #f43f5e); }
.sh-badge-out { background: #78716c; }

.sh-book-actions {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--sh-transition);
    z-index: 3;
}
.sh-book-item:hover .sh-book-actions { opacity: 1; transform: translateX(0); }
.sh-book-actions button,
.sh-book-actions a {
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    border: 0;
    border-radius: var(--sh-radius-full);
    color: var(--sh-text-soft);
    cursor: pointer;
    box-shadow: var(--sh-shadow-md);
    transition: var(--sh-transition);
}
.sh-book-actions button:hover,
.sh-book-actions a:hover { background: var(--sh-primary); color: #fff; transform: scale(1.1); }
.sh-book-actions .sh-in-wishlist { background: var(--sh-accent); color: #fff; }

.sh-book-body { padding: 8px 18px 18px; text-align: center; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sh-book-name a,
.sh-book-title a {
    font-size: 15px;
    font-weight: 700;
    color: var(--sh-text);
    line-height: 1.7;
    transition: var(--sh-transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sh-book-name a:hover,
.sh-book-title a:hover { color: var(--sh-primary); }
.sh-book-author { font-size: 12.5px; color: var(--sh-text-muted); }
.sh-book-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--sh-border-soft);
}
.sh-book-price { font-weight: 800; color: var(--sh-primary-dark); font-size: 15px; }
.sh-book-price del { color: var(--sh-text-muted); font-weight: 500; font-size: 12.5px; margin-inline-start: 6px; }
.sh-book-price ins { text-decoration: none; }
.sh-book-cart {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sh-primary-soft);
    color: var(--sh-primary-dark);
    border-radius: var(--sh-radius-full);
    transition: var(--sh-transition);
}
.sh-book-cart:hover { background: var(--sh-primary); color: #fff; transform: rotate(8deg) scale(1.08); }

/* ==========================================================================
   اصلاح قطعی صفحه‌ی محصول — تمام‌عرض و دو‌ستونه
   ========================================================================== */
.woocommerce div.product.shahnameh-single-product,
.woocommerce-page div.product.shahnameh-single-product {
    display: block !important;
    width: 100% !important;
    float: none !important;
}
.shahnameh-single-product .shahnameh-product-top {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 48px;
    background: var(--sh-bg);
    padding: 40px;
    border-radius: var(--sh-radius-xl);
    box-shadow: var(--sh-shadow);
    border: 1px solid var(--sh-border-soft);
    margin-bottom: 32px;
    align-items: start;
}
/* خنثی‌سازی فلوت/عرض پیش‌فرض ووکامرس */
.woocommerce div.product.shahnameh-single-product .images,
.woocommerce div.product.shahnameh-single-product .summary,
.woocommerce div.product.shahnameh-single-product .woocommerce-product-gallery,
.woocommerce div.product.shahnameh-single-product .shahnameh-product-gallery,
.woocommerce div.product.shahnameh-single-product .shahnameh-product-summary,
.woocommerce-page div.product.shahnameh-single-product .woocommerce-product-gallery,
.woocommerce-page div.product.shahnameh-single-product .shahnameh-product-gallery,
.woocommerce-page div.product.shahnameh-single-product .shahnameh-product-summary {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    max-width: 100% !important;
}
.shahnameh-product-gallery {
    position: sticky;
    top: 24px;
    align-self: start;
    min-width: 0;
    background: linear-gradient(160deg, var(--sh-bg-soft), var(--sh-primary-soft));
    padding: 28px;
    border-radius: var(--sh-radius-lg);
}
.shahnameh-product-gallery .woocommerce-product-gallery__image img,
.shahnameh-product-gallery img {
    border-radius: var(--sh-radius) !important;
    box-shadow: 0 20px 40px rgba(28,25,23,0.20);
    width: 100% !important;
    height: auto;
}
.shahnameh-product-gallery .onsale {
    position: absolute; top: 18px; inset-inline-end: 18px; left: auto;
    background: linear-gradient(135deg, var(--sh-accent), #f43f5e);
    color: #fff; border: 0; border-radius: var(--sh-radius-full);
    min-width: auto; min-height: auto; width: auto; height: auto;
    padding: 6px 14px; font-weight: 800; line-height: 1;
    box-shadow: var(--sh-shadow-md);
}
.shahnameh-product-summary { min-width: 0; }
.shahnameh-product-summary .product_title,
.shahnameh-product-summary h1.product_title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 14px;
}
.shahnameh-product-summary .price {
    font-size: 26px;
    font-weight: 800;
    color: var(--sh-primary-dark);
    margin: 18px 0;
}
.shahnameh-product-summary .price del { color: var(--sh-text-muted); font-size: 18px; font-weight: 500; }
.shahnameh-product-summary .price ins { text-decoration: none; }

/* دکمه افزودن به سبد در صفحه محصول */
.woocommerce div.product.shahnameh-single-product .single_add_to_cart_button,
.woocommerce div.product.shahnameh-single-product .button.alt {
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark)) !important;
    color: #fff !important;
    border-radius: var(--sh-radius-full) !important;
    padding: 15px 36px !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    box-shadow: var(--sh-shadow-primary) !important;
    transition: var(--sh-transition) !important;
    border: 0 !important;
}
.woocommerce div.product.shahnameh-single-product .single_add_to_cart_button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(13,148,136,0.34) !important;
}
.woocommerce div.product.shahnameh-single-product .quantity input {
    border-radius: var(--sh-radius-full) !important;
    border: 1.5px solid var(--sh-border) !important;
    padding: 12px !important;
}

/* متای کتاب در صفحه محصول (خلاصه) */
.shahnameh-summary-meta {
    display: grid;
    gap: 2px;
    margin: 22px 0;
    background: var(--sh-bg-soft);
    border-radius: var(--sh-radius-lg);
    padding: 10px 20px;
    border: 1px solid var(--sh-border-soft);
}
.shahnameh-summary-meta .sh-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--sh-border-soft);
    font-size: 14px;
}
.shahnameh-summary-meta .sh-meta-item:last-child { border-bottom: 0; }
.shahnameh-summary-meta .sh-meta-label { color: var(--sh-text-muted); min-width: 110px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.shahnameh-summary-meta .sh-meta-label i { color: var(--sh-primary); width: 18px; text-align: center; }
.shahnameh-summary-meta .sh-meta-value { color: var(--sh-text); font-weight: 700; }
.shahnameh-summary-meta .sh-meta-value a { color: var(--sh-primary); }
.shahnameh-summary-meta .sh-instock { color: var(--sh-success); }
.shahnameh-summary-meta .sh-outstock { color: var(--sh-danger); }

/* عنوان و قیمت محصول */
.shahnameh-product-summary .price {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    margin: 8px 0 18px;
    font-size: 30px; font-weight: 800; color: var(--sh-primary-dark);
}
.shahnameh-product-summary .price del { color: var(--sh-text-muted); font-size: 19px; font-weight: 500; opacity: 0.75; }
.shahnameh-product-summary .price ins { text-decoration: none; }

@media (max-width: 900px) {
    .shahnameh-single-product .shahnameh-product-top {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px;
    }
    .shahnameh-product-gallery {
        position: relative;
        top: 0;
        max-width: 320px;
        margin-inline: auto !important;
    }
}

/* ==========================================================================
   دکمه‌های دانلود دیجیتال — پاستیلی و ظریف‌تر
   ========================================================================== */
.shahnameh-downloads { gap: 10px; }
.shahnameh-dl-btn {
    padding: 13px 18px;
    border-radius: var(--sh-radius);
    font-size: 14px;
    box-shadow: var(--sh-shadow-sm);
}
.shahnameh-dl-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-shadow-md); }
.sh-dl-sample { background: linear-gradient(135deg, #5eead4, #14b8a6); color: #0f766e; }
.sh-dl-pdf    { background: linear-gradient(135deg, #fda4af, #fb7185); }
.sh-dl-epub   { background: linear-gradient(135deg, #fcd34d, #fbbf24); color: #78350f; }
.sh-dl-mobi   { background: linear-gradient(135deg, #6ee7b7, #34d399); color: #065f46; }

/* ==========================================================================
   دکمه‌های اکشن صفحه محصول (علاقه‌مندی/مقایسه)
   ========================================================================== */
.sh-single-actions { display: flex; gap: 12px; margin: 18px 0; }
.sh-single-actions .sh-wishlist-btn,
.sh-single-actions .sh-compare-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--sh-bg-soft);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    padding: 12px 18px;
    color: var(--sh-text-soft);
    font-size: 12.5px;
    cursor: pointer;
    transition: var(--sh-transition);
}
.sh-single-actions .sh-wishlist-btn:hover { border-color: var(--sh-accent); color: var(--sh-accent); background: var(--sh-accent-soft); }
.sh-single-actions .sh-compare-btn:hover { border-color: var(--sh-primary); color: var(--sh-primary); background: var(--sh-primary-soft); }
.sh-single-actions i { font-size: 18px; }

/* ==========================================================================
   تب‌های صفحه محصول
   ========================================================================== */
.shahnameh-tabs { margin-top: 8px; }
.shahnameh-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--sh-bg);
    padding: 8px;
    border-radius: var(--sh-radius-lg);
    box-shadow: var(--sh-shadow-sm);
    border: 1px solid var(--sh-border-soft);
    margin-bottom: 24px;
}
.shahnameh-tabs-nav button,
.shahnameh-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    background: transparent;
    border-radius: var(--sh-radius);
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    color: var(--sh-text-soft);
    cursor: pointer;
    transition: var(--sh-transition);
}
.shahnameh-tabs-nav button:hover { background: var(--sh-bg-soft); color: var(--sh-primary); }
.shahnameh-tabs-nav button.active,
.shahnameh-tab-btn.active {
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark));
    color: #fff;
    box-shadow: var(--sh-shadow-primary);
}
.sh-tab-panel { display: none; animation: shFadeUp 0.4s ease; }
.sh-tab-panel.active { display: block; }
@keyframes shFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.sh-specs-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--sh-radius); overflow: hidden; border: 1px solid var(--sh-border-soft); }
.sh-specs-table th, .sh-specs-table td { padding: 14px 18px; text-align: start; font-size: 14px; border-bottom: 1px solid var(--sh-border-soft); }
.sh-specs-table th { background: var(--sh-bg-soft); color: var(--sh-text-soft); font-weight: 700; width: 180px; }
.sh-specs-table tr:last-child th, .sh-specs-table tr:last-child td { border-bottom: 0; }
.sh-specs-table a { color: var(--sh-primary); font-weight: 600; }

/* ==========================================================================
   هدر — تمیز، شناور، با فضای تنفس
   ========================================================================== */
.shahnameh-header { background: var(--sh-bg); box-shadow: var(--sh-shadow-sm); position: relative; z-index: 100; }
.shahnameh-header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.shahnameh-branding { flex-shrink: 0; }
.shahnameh-site-title { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--sh-text); }
.shahnameh-site-title i { color: var(--sh-primary); font-size: 26px; }
.shahnameh-search { flex: 1; max-width: 560px; }
.shahnameh-search-form {
    display: flex;
    background: var(--sh-bg-soft);
    border: 1.5px solid var(--sh-border);
    border-radius: var(--sh-radius-full);
    overflow: hidden;
    transition: var(--sh-transition);
}
.shahnameh-search-form:focus-within { border-color: var(--sh-primary); background: #fff; box-shadow: 0 0 0 4px var(--sh-primary-soft); }
.shahnameh-search-form input { flex: 1; border: 0; background: transparent; padding: 13px 20px; font-family: inherit; outline: none; font-size: 14px; }
.shahnameh-search-form button {
    border: 0;
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark));
    color: #fff; padding: 0 22px; cursor: pointer; transition: var(--sh-transition);
}
.shahnameh-search-form button:hover { padding-inline: 26px; }

.shahnameh-header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.shahnameh-icon-btn {
    position: relative;
    width: 46px; height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--sh-bg-soft);
    border-radius: var(--sh-radius-full);
    color: var(--sh-text-soft);
    font-size: 17px;
    cursor: pointer;
    transition: var(--sh-transition);
}
.shahnameh-icon-btn:hover { background: var(--sh-primary-soft); color: var(--sh-primary); transform: translateY(-2px); }
.shahnameh-cart-count,
.shahnameh-wishlist-count,
.shahnameh-compare-count {
    position: absolute;
    top: -2px; inset-inline-end: -2px;
    min-width: 20px; height: 20px;
    background: linear-gradient(135deg, var(--sh-accent), #f43f5e);
    color: #fff;
    border-radius: var(--sh-radius-full);
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

/* ==========================================================================
   منوی اصلی + مگامنو
   ========================================================================== */
.shahnameh-nav-wrap { background: var(--sh-bg); border-top: 1px solid var(--sh-border-soft); box-shadow: var(--sh-shadow-sm); position: relative; z-index: 90; }
.shahnameh-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.shahnameh-menu > li { position: static; }
.shahnameh-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 18px;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--sh-text-soft);
    position: relative;
    transition: var(--sh-transition);
}
.shahnameh-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 8px; right: 18px; left: 18px;
    height: 3px;
    background: var(--sh-primary);
    border-radius: 999px;
    transform: scaleX(0);
    transition: transform 0.28s ease;
}
.shahnameh-menu > li:hover > a { color: var(--sh-primary); }
.shahnameh-menu > li:hover > a::after { transform: scaleX(1); }

/* زیرمنوی معمولی */
.shahnameh-menu .sub-menu {
    position: absolute;
    top: 100%; right: auto;
    min-width: 240px;
    background: #fff;
    border-radius: var(--sh-radius-lg);
    box-shadow: var(--sh-shadow-lg);
    border: 1px solid var(--sh-border-soft);
    padding: 10px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--sh-transition);
    z-index: 200;
}
.shahnameh-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.shahnameh-menu .sub-menu li a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--sh-radius-sm);
    color: var(--sh-text-soft);
    font-size: 14px;
    transition: var(--sh-transition);
}
.shahnameh-menu .sub-menu li a:hover { background: var(--sh-primary-soft); color: var(--sh-primary); padding-inline-start: 20px; }

/* مگامنو — کلاس sh-megamenu روی آیتم منو */
.shahnameh-menu li.sh-megamenu { position: static; }
.shahnameh-menu li.sh-megamenu > .sub-menu {
    right: 32px; left: 32px;
    min-width: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 24px;
    padding: 28px 32px;
}
.shahnameh-menu li.sh-megamenu > .sub-menu > li { break-inside: avoid; }
.shahnameh-menu li.sh-megamenu > .sub-menu > li > a { font-weight: 800; color: var(--sh-text); border-bottom: 2px solid var(--sh-primary-soft); border-radius: 0; margin-bottom: 6px; }
.shahnameh-menu li.sh-megamenu > .sub-menu > li > a:hover { padding-inline-start: 14px; }

/* ==========================================================================
   نوار بالای هدر (Topbar)
   ========================================================================== */
.shahnameh-topbar { background: var(--sh-primary-soft); border-bottom: 1px solid var(--sh-border-soft); }
.shahnameh-topbar-inner { padding: 9px 0; gap: 24px; }
.shahnameh-phone a { color: var(--sh-primary-dark); }
.shahnameh-topbar-social { gap: 6px; }
.shahnameh-topbar-social a {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.7);
    border: 0;
    color: var(--sh-primary-dark);
}
.shahnameh-topbar-social a:hover { background: var(--sh-primary); color: #fff; transform: translateY(-2px); }

/* ==========================================================================
   فوتر — گرم و تمیز
   ========================================================================== */
.shahnameh-footer { background: #1c1917; color: #d6d3d1; margin-top: 60px; }
.shahnameh-footer .shahnameh-container { padding-top: 56px; padding-bottom: 0; }
.shahnameh-footer-social a { background: rgba(255,255,255,0.06); border-radius: var(--sh-radius-full); }
.shahnameh-footer-social a:hover { background: var(--sh-primary); transform: translateY(-3px); }
.shahnameh-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 0; text-align: center; color: #a8a29e; font-size: 13.5px; }
.shahnameh-footer-bottom a { color: var(--sh-primary-light); }

/* ==========================================================================
   عنوان بخش‌ها
   ========================================================================== */
.sh-section-heading,
.shahnameh-section-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 16px;
}
.sh-section-heading::after,
.shahnameh-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; right: 50%;
    transform: translateX(50%);
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--sh-primary), var(--sh-accent));
    border-radius: 999px;
}

/* ==========================================================================
   موبایل‌فرست — واکنش‌گرایی کامل
   ========================================================================== */
@media (max-width: 1024px) {
    .shahnameh-menu li.sh-megamenu > .sub-menu { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .shahnameh-container { padding-inline: 18px; }
    .shahnameh-header-inner { flex-wrap: wrap; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
    .shahnameh-search { order: 3; flex-basis: 100%; max-width: 100%; }
    .shahnameh-header-actions { margin-inline-start: auto; }
    .shahnameh-site-title { font-size: 19px; }
    .shahnameh-icon-btn { width: 42px; height: 42px; font-size: 16px; }
    .sh-section-heading, .shahnameh-section-title { font-size: 22px; }

    /* دکمه‌ی همبرگری نمایان می‌شود */
    .sh-mobile-menu-btn { display: inline-flex !important; }

    /* نوار منو به کشوی کناری تبدیل می‌شود */
    .shahnameh-nav-wrap {
        position: fixed;
        top: 0; right: -320px; bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: #fff;
        box-shadow: -12px 0 40px rgba(28,25,23,0.18);
        z-index: 1000;
        overflow-y: auto;
        transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 0;
        padding: 70px 0 30px;
    }
    body.sh-nav-open .shahnameh-nav-wrap { right: 0; }
    .shahnameh-nav-wrap .shahnameh-nav-inner { padding: 0; max-width: none; }

    .shahnameh-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .shahnameh-menu > li { border-bottom: 1px solid var(--sh-border-soft); }
    .shahnameh-menu > li > a { padding: 15px 24px; font-size: 15px; justify-content: space-between; }
    .shahnameh-menu > li > a::after { display: none; }
    .shahnameh-menu .sh-menu-arrow { transition: transform 0.28s ease; }
    .shahnameh-menu > li.sh-open > a .sh-menu-arrow { transform: rotate(180deg); }

    /* زیرمنوها در موبایل: آکاردئونی، بدون هاور */
    .shahnameh-menu .sub-menu,
    .shahnameh-menu li.sh-megamenu > .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        background: var(--sh-bg-soft);
        padding: 0;
        display: none;
        grid-template-columns: 1fr;
        min-width: auto;
        inset: auto;
    }
    .shahnameh-menu > li.sh-open > .sub-menu { display: block; }
    .shahnameh-menu .sub-menu li a { padding: 12px 34px; }
    .shahnameh-menu li.sh-megamenu > .sub-menu > li > a { border-bottom: 0; }

    /* پوشش تیره پشت کشو */
    .shahnameh-nav-overlay {
        position: fixed; inset: 0;
        background: rgba(28,25,23,0.5);
        opacity: 0; visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 999;
    }
    body.sh-nav-open .shahnameh-nav-overlay { opacity: 1; visibility: visible; }
    body.sh-nav-open { overflow: hidden; }

    .shahnameh-topbar-inner { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
    .shahnameh-container { padding-inline: 14px; }
    .sh-book-thumb img { height: 200px; }
    .shahnameh-single-product .shahnameh-product-top { padding: 18px; }
    .shahnameh-product-summary .product_title { font-size: 24px; }
}

/* حرکت کمتر برای کاربرانی که ترجیح می‌دهند */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   دکمه‌ی همبرگری موبایل
   ========================================================================== */
.sh-mobile-menu-btn,
.shahnameh-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 0 10px;
    background: var(--sh-primary-soft);
    border: 1px solid var(--sh-border-soft);
    border-radius: var(--sh-radius-sm);
    cursor: pointer;
    transition: var(--sh-transition);
}
.sh-mobile-menu-btn span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: var(--sh-primary-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.sh-mobile-menu-btn.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.sh-mobile-menu-btn.is-active span:nth-child(2) { opacity: 0; }
.sh-mobile-menu-btn.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* در دسکتاپ پوشش و کشو غیرفعال است */
.shahnameh-nav-overlay { display: none; }
@media (max-width: 992px) {
    .shahnameh-nav-overlay { display: block; }
}

/* ==========================================================================
   مسیر راهنما (Breadcrumb)
   ========================================================================== */
.shahnameh-breadcrumb {
    background: var(--sh-bg-soft);
    border-bottom: 1px solid var(--sh-border-soft);
    font-size: 13.5px;
}
.shahnameh-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0; padding: 12px 0;
}
.shahnameh-breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--sh-text-muted); }
.shahnameh-breadcrumb li:not(:last-child)::after {
    content: '\f104'; /* fa chevron-left (RTL) */
    font-family: 'Font Awesome 6 Free'; font-weight: 900;
    font-size: 10px; color: var(--sh-text-muted); margin-inline-start: 4px;
}
.shahnameh-breadcrumb a { color: var(--sh-text-soft); transition: var(--sh-transition); }
.shahnameh-breadcrumb a:hover { color: var(--sh-primary); }
.shahnameh-breadcrumb .sh-crumb-current span { color: var(--sh-primary-dark); font-weight: 700; }

/* ==========================================================================
   پنل کاربری مدرن (My Account ووکامرس)
   ========================================================================== */
.woocommerce-account .shahnameh-shop,
.woocommerce-account .woocommerce {
    max-width: var(--sh-container);
    margin-inline: auto;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 28px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0; padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--sh-bg);
    border: 1.5px solid var(--sh-border);
    border-radius: var(--sh-radius-full);
    color: var(--sh-text-soft);
    font-weight: 700;
    font-size: 14px;
    transition: var(--sh-transition);
}
.woocommerce-account .woocommerce-MyAccount-navigation li a::before {
    font-family: 'Font Awesome 6 Free'; font-weight: 900;
    font-size: 13px;
}
.woocommerce-account .woocommerce-MyAccount-navigation li--dashboard a::before { content: '\f0e4'; }
.woocommerce-account .woocommerce-MyAccount-navigation li--orders a::before { content: '\f291'; }
.woocommerce-account .woocommerce-MyAccount-navigation li--downloads a::before { content: '\f019'; }
.woocommerce-account .woocommerce-MyAccount-navigation li--edit-address a::before { content: '\f3c5'; }
.woocommerce-account .woocommerce-MyAccount-navigation li--edit-account a::before { content: '\f007'; }
.woocommerce-account .woocommerce-MyAccount-navigation li--customer-logout a::before { content: '\f2f5'; }
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    border-color: var(--sh-primary);
    color: var(--sh-primary);
    background: var(--sh-primary-soft);
    transform: translateY(-2px);
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--sh-shadow-primary);
}
.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    background: var(--sh-bg);
    border: 1px solid var(--sh-border-soft);
    border-radius: var(--sh-radius-lg);
    padding: 32px;
    box-shadow: var(--sh-shadow);
}
.woocommerce-account .woocommerce-MyAccount-content a { color: var(--sh-primary); }

/* داشبورد: کارت‌های آمار زیبا */
.sh-account-dash { }
.sh-account-welcome {
    background: linear-gradient(135deg, var(--sh-primary-soft), var(--sh-accent-soft));
    border-radius: var(--sh-radius-lg);
    padding: 26px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.sh-account-welcome .sh-avatar img { border-radius: 50%; border: 3px solid #fff; box-shadow: var(--sh-shadow-md); }
.sh-account-welcome h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.sh-account-welcome p { margin: 0; color: var(--sh-text-soft); font-size: 14px; }
.sh-account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}
.sh-account-stat {
    background: var(--sh-bg-soft);
    border: 1px solid var(--sh-border-soft);
    border-radius: var(--sh-radius);
    padding: 20px;
    text-align: center;
    transition: var(--sh-transition);
}
.sh-account-stat:hover { transform: translateY(-3px); box-shadow: var(--sh-shadow-md); border-color: var(--sh-primary-light); }
.sh-account-stat .sh-stat-icon {
    width: 48px; height: 48px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--sh-primary-soft); color: var(--sh-primary);
    border-radius: 50%; font-size: 20px;
}
.sh-account-stat .sh-stat-num { font-size: 24px; font-weight: 800; color: var(--sh-text); }
.sh-account-stat .sh-stat-label { font-size: 13px; color: var(--sh-text-soft); margin-top: 2px; }

/* دکمه‌های ووکامرس داخل حساب */
.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .button {
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark)) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: var(--sh-radius-sm) !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    box-shadow: var(--sh-shadow-primary);
    transition: var(--sh-transition) !important;
}
.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .button:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* جدول سفارش‌ها */
.woocommerce-account .woocommerce-orders-table,
.woocommerce-account table.shop_table {
    border: 1px solid var(--sh-border-soft);
    border-radius: var(--sh-radius);
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}
.woocommerce-account table.shop_table thead th {
    background: var(--sh-primary-soft);
    color: var(--sh-primary-dark);
    font-weight: 800;
    padding: 14px;
}
.woocommerce-account table.shop_table td { padding: 14px; border-top: 1px solid var(--sh-border-soft); }

@media (max-width: 992px) {
    .woocommerce-account .woocommerce-MyAccount-navigation ul { gap: 8px; }
    .woocommerce-account .woocommerce-MyAccount-content { padding: 22px; }
}
