/* book-details-layout.css */
/* چیدمان سه‌ستونی صفحه جزئیات کتاب - کاملاً مستقل از style.css */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');

:root {
    --primary-color: #0bb0a0;
    --secondary-color: #f0f4f8;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text-color: #777;
    --border-color: #e1e8ed;
    --bg-white: #fff;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.7;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* هدر ثابت */
header {
    background: var(--bg-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* چیدمان سه‌ستونی اصلی */
.book-details-grid {
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 15px;
}

/* ستون اول: تصویر + خرید + اشتراک */
.book-media-column {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.book-image {
    width: 100%;
    max-width: 260px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.book-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* دکمه دانلود چکیده */
.summary-download {
    width: 100%;
    text-align: center;
}

.summary-download a {
    display: inline-block;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.summary-download a:hover {
    background: var(--primary-color);
    color: white;
}

/* گزینه‌های خرید */
.purchase-options {
    width: 100%;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.purchase-options h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.option {
    background: var(--secondary-color);
    padding: 18px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 15px;
}

.option p {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#book-price {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
    margin: 8px 0;
}

.quantity-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.quantity-controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.quantity-controls button:hover {
    background: #008f80;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

#add-to-cart-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#add-to-cart-btn:hover {
    background: #008f80;
    transform: translateY(-2px);
}

#add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* نسخه الکترونیک */
#ebook-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ebook-btn {
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.ebook-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* اشتراک‌گذاری */
.share-options {
    width: 100%;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.share-options h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.share-options a {
    color: var(--light-text-color);
    margin: 0 8px;
    font-size: 1.4rem;
    transition: all 0.2s;
}

.share-options a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ستون دوم: توضیحات */
.book-description-column {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

#book-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.book-meta {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--light-text-color);
}

.book-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

.book-meta a:hover {
    text-decoration: underline;
}

#book-description {
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 20px 0;
    text-align: justify;
}

/* ستون سوم: فیلدهای سفارشی */
.book-fields-column {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-lg);
}

.book-fields-column h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.dynamic-fields p {
    margin: 12px 0;
    font-size: 0.98rem;
}

.dynamic-fields strong {
    color: var(--text-color);
    font-weight: 700;
    min-width: 100px;
    display: inline-block;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .book-details-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .book-media-column,
    .book-description-column,
    .book-fields-column {
        padding: 20px;
    }

    #book-title {
        font-size: 1.9rem;
        text-align: center;
    }

    .book-image {
        max-width: 220px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }

    .book-details-grid {
        padding: 0 10px;
    }

    #book-title {
        font-size: 1.7rem;
    }

    .quantity-controls button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .quantity-controls input {
        width: 50px;
        font-size: 0.9rem;
    }
}
/* ============== کتاب‌های مرتبط - استایل جدید ============== */
.related-books {
    margin-top: 60px;
    padding: 40px 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.related-books h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
}

.related-books h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.related-books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 0 20px;
}

.related-book {
    background: var(--secondary-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-book:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.related-book img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.related-book-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-book-info h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-book-info p {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin: 4px 0;
}

.related-book-info .price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 8px;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .related-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .related-books-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 15px;
    }

    .related-book img {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .related-books {
        margin-top: 40px;
        padding: 30px 0;
    }

    .related-books h2 {
        font-size: 1.5rem;
    }

    .related-book img {
        height: 140px;
    }
}
/* book-details-layout.css - فقط برای صفحه جزئیات کتاب */

/* حذف حاشیه‌های پیش‌فرض */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', sans-serif;
    direction: rtl;
    background-color: #f9f9f9;
}

/* چیدمان اصلی: سه ستون با عرض دلخواه */
.book-details-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1.5fr; /* ستون اول: 1، ستون دوم: 2.5، ستون سوم: 1.5 */
    gap: 25px;
    padding: 30px 20px;
    max    max-width: 100vw;
    margin: 0 auto;
    align-items: start;
}

/* ستون اول: تصویر، خرید، اشتراک‌گذاری */
.book-media-column {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.book-image img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}

.purchase-options, .share-options {
    margin-top: 20px;
}

.purchase-options h3, .share-options h3 {
    font-size: 1.1rem;
    color: #0bb0a0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.option {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.option p:first-child {
    font-weight: bold;
    color: #20303e;
    margin-bottom: 8px;
}

#book-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin: 10px 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
}

.quantity-controls button {
    width: 36px;
    height: 36px;
    background-color: #0bb0a0;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quantity-controls button:hover {
    background-color: #098a7e;
}

.quantity-controls input {
    width: 50px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

#add-to-cart-btn {
    width: 100%;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

#add-to-cart-btn:hover {
    background-color: #219653;
    transform: translateY(-1px);
}

#add-to-cart-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#ebook-links {
    margin-top: 15px;
}

.ebook-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.ebook-btn:hover {
    background-color: #2980b9;
}

.summary-download {
    margin: 15px 0;
    text-align: center;
}

.summary-download a {
    color: #0bb0a0;
    text-decoration: none;
    font-weight: 500;
}

.summary-download a:hover {
    text-decoration: underline;
}

.share-options a {
    display: block;
    padding: 10px;
    background-color: #f1f1f1;
    margin: 8px 0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.share-options a:hover {
    background-color: #0bb0a0;
    color: white;
}

.share-options i {
    margin-left: 8px;
}

/* ستون دوم: توضیحات کتاب (عریض‌ترین) */
.book-description-column {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.book-description-column h1 {
    font-size: 1.8rem;
    color: #20303e;
    margin-bottom: 15px;
    line-height: 1.4;
}

.book-categories, .book-keywords {
    margin: 12px 0;
    font-size: 0.95rem;
}

.book-categories a, .book-keywords a {
    color: #0bb0a0;
    text-decoration: none;
    margin-left: 5px;
}

.book-categories a:hover, .book-keywords a:hover {
    text-decoration: underline;
}

.book-description-column p {
    margin: 12px 0;
    line-height: 1.8;
    color: #444;
    font-size: 1rem;
}

.book-description-column p strong {
    color: #20303e;
}

/* ستون سوم: مشخصات کتاب */
.book-fields-column {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.book-fields-column h3 {
    font-size: 1.1rem;
    color: #0bb0a0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.dynamic-fields p {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.95rem;
}

.dynamic-fields p:last-child {
    border-bottom: none;
}

.dynamic-fields strong {
    color: #20303e;
}

/* بخش کتاب‌های مرتبط */
.related-books {
    margin-top: 50px;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.related-books h2 {
    text-align: center;
    color: #0bb0a0;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.related-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.related-book {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.related-book:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.related-book img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #fff;
}

.related-book-info {
    padding: 12px;
    text-align: center;
}

.related-book-info h3 {
    font-size: 0.95rem;
    color: #20303e;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-book-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 3px 0;
}

.related-book-info .price {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1rem;
}

/* پاسخگویی (Responsive) */
@media (max-width: 1200px) {
    .book-details-grid {
        grid-template-columns: 1fr 2fr 1.3fr;
        gap: 20px;
        padding: 25px 15px;
    }
}

@media (max-width: 992px) {
    .book-details-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .book-media-column,
    .book-description-column,
    .book-fields-column {
        position: static;
    }

    .related-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .book-details-grid {
        padding: 20px 10px;
    }

    .book-description-column h1 {
        font-size: 1.5rem;
    }

    .related-books {
        padding: 20px 10px;
    }

    .related-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .book-details-grid {
        padding: 15px 8px;
    }

    .book-media-column,
    .book-description-column,
    .book-fields-column {
        padding: 15px;
    }

    .related-books-grid {
        grid-template-columns: 1fr;
    }
}