* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', sans-serif;
}

body {
    direction: rtl;
    background-color: #f9f9f9;
}

.container {
    width: 80%;
    margin: 0 auto;
}

/* هدر */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: relative;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0bb0a0;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #0bb0a0;
    font-size: 16px;
}

nav ul li a:hover {
    color: #0bb0a0;
}

/* منوی همبرگری برای موبایل */
.nav-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #0bb0a0;
}

.nav-menu {
    display: flex;
}



/* بخش کتاب‌ها */
.books-section {
    padding: 40px 0;
}

.books-container {
    display: flex;
    gap: 20px;
}

.categories {
    width: 20%;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.categories h2 {
    margin-bottom: 20px;
    color: #0bb0a0;
}

.categories ul {
    list-style: none;
}

.categories ul li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.categories ul li:hover {
    background-color: #0bb0a0;
    color: #fff;
}

.categories ul li.active {
    background-color: #20303e;
    color: #fff;
}

.books-content {
    width: 80%;
}

.books-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #0bb0a0;
}

/* تب‌ها */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-button {
    background-color: #0bb0a0;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.tab-button:hover {
    background-color: #e69520;
}

.tab-button.active {
    background-color: #20303e;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.book {
    background-color: #fff;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.book img {
    width: 100%;
    
    object-fit: cover;
    cursor: pointer;
}

.book h3 {
    margin-top: 10px;
    font-size: 16px;
    color: #0bb0a0;
    cursor: pointer;
}

.book h3:hover {
    color: #0bb0a0;
}

.book p {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* بخش جزئیات کتاب */
.book-details-section {
    padding: 40px 0;
}

.book-details {
    display: flex;
    gap: 20px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.book-details img {
    width: 300px;
    height: 400px;
    object-fit: cover;
}

.book-info {
    flex: 1;
}

.book-info h2 {
    font-size: 24px;
    color: #0bb0a0;
    margin-bottom: 10px;
}

.book-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.book-info a {
    color: #0bb0a0;
    text-decoration: none;
}

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

/* بخش نویسندگان و اخبار */
.authors-news-section {
    padding: 40px 0;
    background-color: #fff;
}

.authors-news-section .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.authors, .news {
    width: 48%;
}

.authors h2, .news h2 {
    margin-bottom: 20px;
    color: #0bb0a0;
}

.authors-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.author {
    text-align: center;
    margin-bottom: 20px;
}

.author img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author h3 {
    margin-top: 10px;
    font-size: 14px;
    color: #0bb0a0;
}

.news {
    background-color: #e9ecef;
    padding: 20px;
}

/* بخش تماس با ما */
.contact-section {
    padding: 40px 0;
    background-color: #2c3e50;
    color: #fff;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.contact-section input, .contact-section textarea {
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.contact-section textarea {
    resize: none;
    height: 100px;
}

.contact-section button {
    padding: 10px;
    background-color: #0bb0a0;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.contact-section button:hover {
    background-color: #e69520;
}

/* فرم افزودن کتاب */
.add-book-section {
    padding: 40px 0;
}

.add-book-section form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.add-book-section input, .add-book-section textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* فوتر */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0bb0a0;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: #0bb0a0;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #0bb0a0;
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
}

.social-icon:hover {
    background-color: #e69520;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
}

/* بخش مدیریت محتوا */
.manage-content-section {
    padding: 40px 0;
}

.manage-item {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.manage-item p {
    margin: 0;
    flex: 1;
}

.manage-item button {
    padding: 5px 10px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.manage-item button:first-of-type {
    background-color: #0bb0a0;
    color: #fff;
}

.manage-item button:first-of-type:hover {
    background-color: #e69520;
}

.manage-item button:last-of-type {
    background-color: #e74c3c;
    color: #fff;
}

.manage-item button:last-of-type:hover {
    background-color: #c0392b;
}

/* فرم ویرایش */
.edit-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.edit-form h3 {
    margin-bottom: 15px;
}

.edit-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edit-form input,
.edit-form textarea,
.edit-form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.edit-form button {
    padding: 10px;
    background-color: #0bb0a0;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.edit-form button:hover {
    background-color: #e69520;
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    /* هدر */
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        top: 15px;
        left: 15px;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: #fff;
        padding: 10px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    nav ul li a {
        font-size: 14px;
    }

 

    .prev, .next {
        padding: 5px;
        font-size: 14px;
    }

    /* بخش کتاب‌ها */
    .books-container {
        flex-direction: column;
    }

    .categories {
        width: 100%;
    }

    .books-content {
        width: 100%;
    }

    .tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        max-width: 200px;
        margin: 5px 0;
    }

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

    .book img {
        height: 150px;
    }

    .book h3 {
        font-size: 14px;
    }

    .book p {
        font-size: 12px;
    }

    /* بخش جزئیات کتاب */
    .book-details {
        flex-direction: column;
        align-items: center;
    }

    .book-details img {
        width: 100%;
        max-width: 200px;
        height: auto;
    }

    .book-info h2 {
        font-size: 20px;
    }

    .book-info p {
        font-size: 14px;
    }

    /* بخش نویسندگان و اخبار */
    .authors-news-section .container {
        flex-direction: column;
    }

    .authors, .news {
        width: 100%;
    }

    .authors-grid {
        justify-content: center;
        gap: 20px;
    }

    .author img {
        width: 80px;
        height: 80px;
    }

    .author h3 {
        font-size: 12px;
    }

    .news {
        padding: 15px;
    }

    /* بخش تماس با ما */
    .contact-section form {
        max-width: 100%;
    }

    .contact-section input,
    .contact-section textarea {
        font-size: 14px;
    }

    .contact-section button {
        font-size: 14px;
    }

    /* فرم افزودن کتاب */
    .add-book-section form {
        max-width: 100%;
    }

    .add-book-section input,
    .add-book-section textarea {
        font-size: 14px;
    }

    /* فوتر */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .social-links {
        justify-content: center;
    }

    /* بخش مدیریت محتوا */
    .manage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .manage-item button {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }

    .edit-form {
        width: 95%;
        padding: 15px;
    }
}

/* رسپانسیو برای تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        width: 85%;
    }

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

    .book img {
        height: 180px;
    }

    .book h3 {
        font-size: 15px;
    }

    .book p {
        font-size: 13px;
    }

    .authors-news-section .container {
        flex-direction: column;
    }

    .authors, .news {
        width: 100%;
    }
}
/* استایل‌های اختصاصی برای صفحه مدیریت محتوا */
.manage-content-section {
    padding: 30px 0;
    background-color: #f5f7fa;
}

.manage-content-section .container {
    max-width: 1200px;
}

.manage-content-section h2 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0bb0a0;
    font-weight: bold;
}

.manage-item {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.manage-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.manage-item p {
    flex: 1;
    margin: 0;
    color: #34495e;
    font-size: 15px;
}

.manage-item button {
    padding: 8px 15px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.manage-item button:first-of-type {
    background-color: #3498db;
    color: white;
}

.manage-item button:first-of-type:hover {
    background-color: #2980b9;
}

.manage-item button:last-of-type {
    background-color: #e74c3c;
    color: white;
}

.manage-item button:last-of-type:hover {
    background-color: #c0392b;
}

.manage-item button i {
    margin-left: 5px;
}

/* استایل فرم‌های ویرایش */
.edit-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-form h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.edit-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-form input,
.edit-form textarea,
.edit-form select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.edit-form textarea {
    min-height: 120px;
    resize: vertical;
}

.edit-form button[type="submit"] {
    background-color: #27ae60;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.edit-form button[type="submit"]:hover {
    background-color: #219653;
}

/* استایل برای دسته‌بندی‌های تو در تو */
.manage-item .nested-category {
    padding-right: 20px;
    position: relative;
}

.manage-item .nested-category:before {
    content: "—";
    position: absolute;
    right: 5px;
    color: #7f8c8d;
}

/* دکمه‌های عملیاتی */
.action-buttons {
    display: flex;
    gap: 10px;
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .manage-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .manage-item p {
        margin-bottom: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .edit-form {
        width: 95%;
        padding: 15px;
    }
}
/* استایل هدر و منوی ثابت */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* حالت جمع شده منو هنگام اسکرول */
header.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header.scrolled .logo {
    font-size: 20px;
}

header.scrolled nav ul li a {
    font-size: 14px;
}

/* استایل منوی فعال */
nav ul li a.active {
    color: #0bb0a0;
    font-weight: bold;
}

/* انیمیشن برای لینک‌های منو */
nav ul li a {
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #0bb0a0;
    bottom: -5px;
    right: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}
/* استایل‌های صفحه افزودن محتوا */
.add-book-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.add-book-section .container {
    max-width: 800px;
    margin: 0 auto;
}

.add-book-section h2 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0bb0a0;
    text-align: center;
}

.form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
    font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #0bb0a0;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* استایل‌های چک‌باکس‌ها و رادیو باتن‌ها */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-group h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #34495e;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input {
    width: auto;
    margin-left: 8px;
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
}

/* استایل دکمه‌ها */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-submit {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:hover {
    background-color: #219653;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-submit i {
    margin-left: 8px;
}

/* استایل بخش‌های مختلف فرم */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

/* استایل آپلود فایل */
.file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #0bb0a0;
    background-color: #fff;
}

.file-upload i {
    font-size: 40px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.file-upload p {
    margin: 10px 0;
    color: #7f8c8d;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background-color: #2980b9;
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-submit {
        width: 100%;
    }
}
/* استایل‌های جدید برای صفحه کتاب‌ها */
.books-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.categories {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    position: sticky;
    top: 20px;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.categories-header h2 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.btn-reset {
    background: #f8f9fa;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #7f8c8d;
}

.btn-reset:hover {
    background: #e9ecef;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 8px 15px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

#category-list {
    list-style: none;
    max-height: 70vh;
    overflow-y: auto;
}

.category-item {
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.category-item:last-child {
    border-bottom: none;
}

.category-name {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.category-name i:first-child {
    margin-left: 8px;
    color: #0bb0a0;
}

.toggle-icon {
    margin-right: auto;
    font-size: 12px;
    color: #7f8c8d;
    transition: transform 0.2s;
}

.category-item.active .category-name {
    color: #0bb0a0;
    font-weight: bold;
}

.subcategories {
    list-style: none;
    padding-right: 15px;
}

.books-content {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
}

.books-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

#current-category-title {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
}

.sort-options select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.book {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: clip;
    transition: all 0.3s ease;
}

.book:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.book-image {
    position: relative;
    height: 200px;
    overflow: clip;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.book:hover .book-image img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(245, 166, 35, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.book-info {
    padding: 15px;
}

.book-info h3 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #2c3e50;
    cursor: pointer;
}

.book-info h3:hover {
    color: #0bb0a0;
}

.book-author, .book-price {
    font-size: 14px;
    color: #7f8c8d;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.book-author i, .book-price i {
    margin-left: 5px;
}

.btn-view {
    width: 100%;
    padding: 8px;
    background: #0bb0a0;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-view:hover {
    background: #e69520;
}

.no-books {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: #7f8c8d;
}

.no-books i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #ddd;
}

.no-books p {
    font-size: 16px;
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.pagination button {
    padding: 5px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background: #0bb0a0;
    color: white;
    border-color: #0bb0a0;
}

.pagination button:hover:not(.active) {
    background: #f8f9fa;
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .books-container {
        flex-direction: column;
    }
    
    .categories {
        width: 100%;
        position: static;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
}
/* اضافه کردن این استایل‌ها */
.category-item.active {
    background-color: #f8f9fa;
    border-right: 3px solid #0bb0a0;
}

.subcategories {
    padding-right: 15px;
    margin-top: 5px;
    border-right: 2px solid #eee;
}

.category-item.has-children > .category-name {
    font-weight: bold;
}
.slider {
  position: relative;
  width: 100%;
  height: 400px; /* ارتفاع ثابت */
  overflow: clip;
  border-radius: 8px;
}

.slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img {
  height: 100%;
  object-fit: contain;
  display: block; /* مهم: حذف فضای خالی زیر تصاویر */
}
.slides {
  display: flex !important;
}
.slider {
  position: relative;
  width: 100%;
  height: 500px; /* ارتفاع دلخواه */
  overflow: clip;
  background: #f5f5f5; /* رنگ پس‌زمینه برای فضاهای خالی */
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  justify-content: center; /* وسط چین افقی */
  align-items: center; /* وسط چین عمودی */
  padding: 20px; /* فاصله از لبه‌ها */
  box-sizing: border-box;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto; /* برای مرورگرهای قدیمی */
}
/* استایل‌های جدید برای فیلدهای داینامیک */
.dynamic-field {
    position: relative;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}

.btn-remove-field {
    position: absolute;
    left: 15px;
    top: 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove-field:hover {
    background-color: #c0392b;
}

.dynamic-field .form-group {
    margin-bottom: 10px;
}

/* نمایش فیلدهای داینامیک در صفحه جزئیات */
.dynamic-fields-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dynamic-fields-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.dynamic-fields-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.dynamic-field-item {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0bb0a0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dynamic-field-item strong {
    color: #2c3e50;
}

/* استایل بخش ویرایش فیلدهای داینامیک */
.dynamic-fields-edit-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dynamic-fields-edit-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.dynamic-field-edit {
    position: relative;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.btn-add-field {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

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

.dynamic-field-edit .btn-remove-field {
    position: static;
    margin-top: 10px;
    width: 100%;
}

/* استایل‌های رسپانسیو */
@media (max-width: 768px) {
    .dynamic-fields-list {
        grid-template-columns: 1fr;
    }
    
    .dynamic-field {
        padding: 10px;
    }
    
    .btn-remove-field {
        left: 10px;
        top: 10px;
    }
}
.edit-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-form h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.edit-form .form-group {
    margin-bottom: 15px;
}

.edit-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.edit-form input[type="text"],
.edit-form input[type="number"],
.edit-form input[type="url"],
.edit-form select,
.edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-form textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    padding: 8px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-submit {
    padding: 8px 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
/* استایل بخش اشتراک‌گذاری */
.share-section {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.share-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.whatsapp {
    background: #25D366;
    color: white;
}

.telegram {
    background: #0088cc;
    color: white;
}

.copy-link {
    background: #3498db;
    color: white;
}

.share-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.share-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.share-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.checkbox-item input {
    margin-left: 5px;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}
.edit-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.edit-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}
.edit-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
/* استایل‌های صفحه خرید */
.checkout-section {
    padding: 40px 0;
}

.checkout-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.order-summary {
    flex: 1;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.checkout-form {
    flex: 2;
}

#book-info {
    text-align: center;
    margin-bottom: 20px;
}

#book-info img {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
}

.price-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.total-price {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
    margin-top: 10px;
}

/* استایل‌های صفحه پرداخت */
.payment-section {
    padding: 40px 0;
}

.payment-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.payment-methods {
    flex: 1;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.payment-option {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.payment-option input {
    margin-left: 10px;
}

.payment-option label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.payment-option i {
    margin-left: 10px;
    font-size: 1.2em;
}

.customer-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* استایل‌های صفحه موفقیت */
.success-section {
    padding: 60px 0;
    text-align: center;
}

.success-message {
    max-width: 600px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.success-icon {
    font-size: 60px;
    color: #27ae60;
    margin-bottom: 20px;
}

.receipt {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    text-align: right;
}

.receipt h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-back, .btn-home {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-back {
    background: #3498db;
    color: white;
}

.btn-home {
    background: #2ecc71;
    color: white;
}

.error-message {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.error-message i {
    font-size: 50px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .checkout-container, .payment-container {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
/* استایل‌های صفحه سفارشات کاربر */
.orders-section {
    padding: 40px 0;
}

.orders-filter {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    cursor: pointer;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.order-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    overflow: clip;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.order-id {
    font-weight: bold;
}

.order-date {
    color: #777;
    font-size: 0.9em;
    margin-right: 10px;
}

.order-status {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.order-status.pending {
    background: #f39c12;
    color: white;
}

.order-status.completed {
    background: #2ecc71;
    color: white;
}

.order-status.cancelled {
    background: #e74c3c;
    color: white;
}

.order-body {
    display: flex;
    padding: 15px;
}

.order-book {
    flex: 2;
}

.order-price {
    flex: 1;
    text-align: left;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-top: 1px solid #eee;
}

.btn-details, .btn-cancel {
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-details {
    background: #3498db;
    color: white;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.no-orders {
    text-align: center;
    padding: 30px;
    color: #777;
}

.no-orders i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
}

/* استایل‌های صفحه مدیریت سفارشات */
.admin-orders-section {
    padding: 40px 0;
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    position: relative;
    flex: 2;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.filter-options {
    flex: 1;
}

.filter-options select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.orders-table {
    overflow-x: auto;
}

.orders-table table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th, .orders-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.orders-table th {
    background: #f9f9f9;
    font-weight: bold;
}

.orders-table tr:hover {
    background: #f5f5f5;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.status-badge.pending {
    background: #f39c12;
    color: white;
}

.status-badge.completed {
    background: #2ecc71;
    color: white;
}

.status-badge.cancelled {
    background: #e74c3c;
    color: white;
}

.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    margin: 0 3px;
    color: white;
}

.btn-action.view {
    background: #3498db;
}

.btn-action.complete {
    background: #2ecc71;
}

.btn-action.cancel {
    background: #e74c3c;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination button {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    cursor: pointer;
}

.pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .order-body {
        flex-direction: column;
    }
    
    .order-price {
        margin-top: 15px;
        text-align: right;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .search-box, .filter-options {
        flex: 1 0 100%;
    }
}
/* استایل دکمه خرید */
.btn-buy {
    display: inline-block;
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
}

.btn-buy:hover {
    background: #219653;
}

.btn-buy i {
    margin-left: 8px;
}

/* در صفحه کتاب */
.book-details .btn-buy {
    padding: 12px 25px;
    font-size: 1.1em;
}

/* در لیست کتاب‌ها */
.books-grid .btn-buy {
    width: 100%;
    text-align: center;
}
/* استایل‌های صفحات نتیجه پرداخت */
.payment-result {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-icon.success {
    color: #2ecc71;
}

.result-icon.error {
    color: #e74c3c;
}

#error-message {
    margin: 20px 0;
    padding: 15px;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    color: #721c24;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-retry, .btn-back {
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-retry {
    background: #3498db;
    color: white;
}

.btn-back {
    background: #95a5a6;
    color: white;
}
/* استایل‌های سبد خرید */
.cart-section {
    padding: 40px 0;
}

.cart-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.cart-items {
    flex: 2;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 0;
}

.empty-cart i {
    font-size: 50px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-cart p {
    font-size: 18px;
    color: #777;
    margin-bottom: 20px;
}

.btn-continue {
    display: inline-block;
    padding: 10px 20px;
    background: #0bb0a0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.cart-item img {
    width: 80px;
    height: 100px;
    object-fit: contain;
}

.item-info {
    flex: 1;
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.item-price {
    color: #0bb0a0;
    font-weight: bold;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-summary {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    position: sticky;
    top: 20px;
}

.summary-details {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.summary-details p {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.total-price {
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-checkout {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

.btn-checkout:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* استایل‌های صفحه پرداخت */
.checkout-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.payment-methods {
    margin-top: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
}

.payment-option input {
    margin-left: 10px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.order-item img {
    width: 60px;
    height: 80px;
    object-fit: contain;
}

/* استایل‌های صفحه موفقیت */
.success-message {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.result-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.result-icon.success {
    color: #2ecc71;
}

.receipt {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    text-align: right;
}

.receipt h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-continue, .btn-home {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-continue {
    background: #0bb0a0;
    color: white;
}

.btn-home {
    background: #3498db;
    color: white;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .cart-container, .checkout-container {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    gap: 15px;
    margin-bottom: 10px;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: auto;
}

.btn-remove:hover {
    background: #c0392b;
}
/* استایل‌های مربوط به تخفیف */
.book {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    background: white;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f44336;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    z-index: 2;
}

.price-container {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
}

.current-price {
    font-size: 1.1em;
    color: #0bb0a0;
    font-weight: bold;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
}

.book button {
    background: #0bb0a0;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.book button:hover {
    background: #45a049;
}

    /* استایل‌های جدید برای نمایش تخفیف */
    .book {
        position: relative;
    }
    
    .discount-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        background: #f44336;
        color: white;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 0.8em;
        z-index: 2;
    }
    
    .price-container {
        display: flex;
        flex-direction: column;
    }
    
    .current-price {
        font-size: 1.1em;
        color: #0bb0a0;
    }
    
    .old-price {
        text-decoration: line-through;
        color: #999;
        font-size: 0.9em;
    }
/* استایل‌های جدید برای نمایش کتاب‌ها */
.book {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: clip;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.book:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-image-container {
    position: relative;
    height: 200px;
    overflow: clip;
}

.book-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book:hover .book-image-container img {
    transform: scale(1.05);
}

.discount-ribbon {
    position: absolute;
    top: 10px;
    left: -25px;
    background: #f44336;
    color: white;
    padding: 5px 30px;
    transform: rotate(-45deg);
    font-size: 12px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
    z-index: 1;
}

.book-info {
    padding: 15px;
}

.book-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    height: 40px;
    overflow: clip;
    line-height: 1.4;
}

.book-author {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.price-container {
    margin: 10px 0;
}

.current-price {
    font-weight: bold;
    color: #0bb0a0;
    font-size: 18px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #0bb0a0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
    transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #45a049;
}
/* استایل بخش فیلتر دسته‌بندی در صفحه اصلی */
.category-filter-section {
    padding: 15px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.category-filter-section .container {
    display: flex;
    justify-content: flex-end;
}

.category-filter-section select {
    width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Vazir, sans-serif;
    background-color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-filter-section select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}
/* استایل dropdown دسته‌بندی */
#category-select {
  font-family: Vazir, sans-serif;
  padding: 8px 12px;
  width: 100%;
  max-width: 300px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

/* نمایش سلسله مراتب در dropdown */
#category-select option {
  padding: 8px 12px;
  font-size: 14px;
}

#category-select option[value=""] {
  font-weight: bold;
  color: #0bb0a0;
}
.btn-continue-shopping {
    display: inline-block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #f0f0f0;
    color: #0bb0a0;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-family: Vazir, sans-serif;
    transition: background-color 0.3s;
}

.btn-continue-shopping:hover {
    background-color: #e0e0e0;
}
/* استایل جدول اطلاعات کتاب */
.book-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: clip;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-info-table th, 
.book-info-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.book-info-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #0bb0a0;
    width: 30%;
}

.book-info-table tr:last-child td {
    border-bottom: none;
}

/* برای نمایش بهتر در حالت موبایل */
@media (max-width: 768px) {
    .book-info-table th, 
    .book-info-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}
.quantity-controls button {
    background-color: #20303e;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}
.quantity-controls button:hover {
    background-color: #0056b3;
}
.quantity-controls input {
    width: 50px;
    text-align: center;
    font-family: 'Vazir', sans-serif;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
}
.cart-item {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.cart-item img {
    width: 100px;
    height: auto;
}
.cart-item-info {
    flex-grow: 1;
}
.cart-item-info button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}
.cart-item-info button:hover {
    background-color: #c820bb0a0;
}
/* استایل برای دکمه‌های غیرفعال (موجود نیست) */
button:disabled,
.add-to-cart-btn:disabled {
    background: #ccc; /* رنگ پس‌زمینه خاکستری */
    color: #666; /* رنگ متن خاکستری تیره */
    border: 1px solid #ccc; /* حاشیه هماهنگ با پس‌زمینه */
    cursor: not-allowed; /* اشاره‌گر غیرفعال */
    opacity: 0.7; /* کمی شفافیت برای نشان دادن غیرفعال بودن */
    border-radius: 6px; /* گوشه‌های گرد مشابه orders.html */
    padding: 10px 20px; /* فاصله‌گذاری داخلی مشابه دکمه‌های فعال */
    font-family: 'Vazir', sans-serif; /* فونت هماهنگ با پروژه */
    font-size: 1em; /* اندازه فونت مشابه پروژه */
    transition: none; /* حذف انیمیشن‌ها برای دکمه غیرفعال */
}

/* اطمینان از اینکه هاور روی دکمه غیرفعال تأثیری ندارد */
button:disabled:hover,
.add-to-cart-btn:disabled:hover {
    background: #ccc; /* حفظ رنگ خاکستری */
    color: #666; /* حفظ رنگ متن */
}
/* Container for sidebar and main content */
.main-content-wrapper {
    display: flex;
    flex-direction: row-reverse; /* For RTL layout */
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar styles */
.sidebar {
    flex: 0 0 250px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    align-self: flex-start; /* Aligns the sidebar to the top */
    position: sticky; /* Makes the sidebar sticky */
    top: 100px; /* Adjust based on header height */
    max-height: calc(100vh - 120px); /* Ensures it doesn't overflow the viewport */
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1.5rem;
    color: #0bb0a0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.category-tree {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.category-tree li {
    font-size: 1rem;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    padding-right: 25px;
    color: #555;
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: clip;
    text-overflow: ellipsis; /* Adds an ellipsis for overflow */
}

.category-tree li:hover {
    color: #0056b3;
    transform: translateX(-5px);
}

.category-tree li.active {
    font-weight: bold;
    color: #20303e;
}

/* Icons for the tree structure (optional, requires a font icon library like Font Awesome) */
/* .category-tree li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: #20303e;
    font-size: 1.2em;
    line-height: 1;
} */

/* Main content styles */
.main-books-content {
    flex: 1;
    min-width: 0; /* Allows content to shrink */
}

.books-section {
    padding: 20px 0;
}

/* Responsive design */
@media (max-width: 992px) {
    .main-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        flex: 1;
        position: static;
        top: auto;
        max-height: none;
    }
}
/* استایل برای زیردسته‌ها */
.subcategory-tree {
    display: none; /* به صورت پیش‌فرض مخفی هستند */
    padding-right: 20px; /* برای ایجاد تورفتگی */
    list-style: none; /* حذف نشانگر لیست */
}

/* استایل برای آیتم‌هایی که زیردسته دارند */
.category-tree li {
    position: relative;
    cursor: pointer;
}

/* استایل برای علامت مثبت/منفی */
.category-tree li::before {
    content: '+'; /* علامت مثبت به صورت پیش‌فرض */
    position: absolute;
    right: 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
    transition: transform 0.2s ease;
}

/* چرخش علامت به منفی برای آیتم‌های باز شده */
.category-tree li.expanded::before {
    content: '−'; /* علامت منفی هنگام باز شدن */
}
/* Container for sidebar and main content */
.main-content-wrapper {
    display: flex;
    flex-direction: row-reverse; /* For RTL layout - This is the key change */
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar styles */
.sidebar {
    flex: 0 0 250px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Style for the 'All Categories' button */
#all-categories-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #20303e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    transition: background-color 0.3s;
}

#all-categories-btn:hover {
    background-color: #0056b3;
}

.category-tree {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* استایل برای زیردسته‌ها */
.subcategory-tree {
    display: none;
    padding-right: 20px;
    list-style: none;
}

/* استایل برای آیتم‌هایی که زیردسته دارند */
.category-tree li {
    position: relative;
    cursor: pointer;
}

/* استایل برای علامت مثبت/منفی */
.category-tree li::before {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
    transition: transform 0.2s ease;
}

/* چرخش علامت به منفی برای آیتم‌های باز شده */
.category-tree li.expanded::before {
    content: '−';
}

/* Main content styles */
.main-books-content {
    flex: 1;
    min-width: 0;
}

.books-section {
    padding: 20px 0;
}

/* Responsive design */
@media (max-width: 992px) {
    .main-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        flex: 1;
        position: static;
        top: auto;
        max-height: none;
    }
}
.books-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    direction: rtl; /* برای نمایش از راست به چپ */
}

/* برای موبایل و تبلت، نمایش را به تعداد کمتر در هر ردیف تغییر می‌دهیم */
@media (max-width: 1200px) {
    .books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.book-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.book-info h3 {
    font-size: 1rem;
    margin: 10px 0 5px;
    color: #0bb0a0;
}

.book-info p {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
}

.book-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #20303e;
    margin-top: 10px;
}

.slides {
    display: flex; /* این کلید اصلی است، اسلایدها را در یک خط قرار می‌دهد */
    transition: transform 0.5s ease-in-out; /* انیمیشن نرم برای حرکت */
}

.slide {
    flex-shrink: 0; /* از کوچک شدن اسلایدها جلوگیری می‌کند */
    width: 100%; /* عرض هر اسلاید را تنظیم می‌کند */
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}
/* کاهش حاشیه‌های کلی صفحه */
.container {
    max-width: 1400px; /* افزایش عرض حداکثر */
    padding: 0 15px; /* کاهش حاشیه داخلی */
    margin: 0 auto;
}

/* کاهش حاشیه‌های بخش‌های اصلی */
.books-section, .authors-news-section, .contact-section {
    padding: 30px 10px; /* کاهش حاشیه عمودی و افقی */
}

/* افزایش عرض محتوای اصلی و سایدبار */
.main-content-wrapper {
    display: flex;
    gap: 20px; /* کاهش فاصله بین محتوا و سایدبار */
    padding: 0 10px; /* کاهش حاشیه افقی */
}

.main-books-content {
    flex: 3; /* افزایش سهم محتوای اصلی از فضای موجود */
}

.sidebar {
    flex: 1; /* افزایش سهم سایدبار از فضای موجود */
    padding: 15px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های هدر و فوتر */
header .container, .footer-content {
    padding: 0 15px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های اسلایدر */
.slider-section {
    padding: 0 5px; /* کاهش حاشیه افقی */
}

/* کاهش حاشیه‌های کارت کتاب‌ها */
.book-card {
    margin: 10px; /* کاهش حاشیه خارجی */
    padding: 12px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های فرم تماس */
.contact-section form {
    padding: 20px 15px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های تب‌ها */
.tabs {
    margin: 15px 0; /* کاهش حاشیه خارجی */
}

.tab-button {
    padding: 8px 15px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های لیست دسته‌بندی‌ها */
.category-tree {
    padding: 10px 15px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های نویسندگان و اخبار */
.authors-grid, #news-content {
    gap: 15px; /* کاهش فاصله بین آیتم‌ها */
    padding: 15px 10px; /* کاهش حاشیه داخلی */
}

/* کاهش حاشیه‌های فوتر */
.footer-section {
    padding: 15px; /* کاهش حاشیه داخلی */
}
.book {
    position: relative;
    padding: 0px;
}
.book-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.main-content-wrapper {
    display: flex
;
    gap: 0px;
    padding: 0 0px;
}
.sidebar {
    flex: 1;
    padding: 0px;
}
.books-section, .authors-news-section, .contact-section {
    padding: 30px 0px;
}
section.books-section {
    margin-right: -75px;
}

.books-grid {
    display: grid
;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    direction: rtl;
}
.book-info {
    padding: 10px;
}
.book-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    height: 125px;
    overflow: clip;
    line-height: 1.4;
}
aside.sidebar {
    margin-right: -80px;
}
.book button {
    background: #0bb0a0;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: max-content;
    margin-top: 10px;
}
.news-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.news-item h3 {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #0bb0a0;
}

.news-item p {
    font-size: 1em;
    color: #555;
    line-height: 1.6;
}

.view-all-news {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #20303e;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s;
}

.view-all-news:hover {
    background-color: #0056b3;
}
.authors-list {
    margin-top: 20px;
}
.author-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.author-item img {
    object-fit: cover;
}
.author-item a {
    color: #3498db;
    text-decoration: none;
}
.author-item a:hover {
    text-decoration: underline;
}
.contact-info {
    display: flex;
    align-items: center;
    gap: 15px; /* فاصله بین شماره‌ها */
    margin-right: 15px; /* فاصله از سمت راست */
    font-family: 'Vazir', sans-serif;
    font-size: 13px;
    color: #333; /* رنگ متن هماهنگ با سایت */
    transition: opacity 0.4s ease, transform 0.4s ease; /* انیمیشن نرم */
}

.contact-info.hidden {
    opacity: 0;
    transform: translateY(-20px); /* حرکت ملایم به بالا هنگام مخفی شدن */
    pointer-events: none; /* جلوگیری از کلیک هنگام مخفی بودن */
}

.contact-info p {
    margin: 0;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: #f8f9fa; /* پس‌زمینه روشن و مینیمال */
    border-radius: 5px; /* گوشه‌های گرد */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* سایه ملایم */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info p:hover {
    transform: translateY(-2px); /* بالا آمدن ملایم هنگام هاور */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* سایه قوی‌تر */
}

.contact-info i {
    margin-left: 8px;
    font-size: 14px;
    color: #007bff; /* آبی ملایم برای آیکون‌ها */
    transition: transform 0.3s ease;
}

.contact-info p:hover i {
    transform: scale(1.15); /* بزرگ شدن آیکون هنگام هاور */
}

.contact-info a {
    color: #007bff; /* رنگ آبی لینک‌ها هماهنگ با تم سایت */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #0056b3; /* رنگ تیره‌تر هنگام هاور */
}

/* اطمینان از چیدمان صحیح در هدر */
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* برای پاسخگویی بهتر در موبایل */
}
/* استایل برای نماد اعتماد الکترونیکی */
.trust-seal {
    margin-top: 10px;
    text-align: center;
}

.trust-seal img {
    max-width: 100px; /* تنظیم اندازه تصویر */
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.trust-seal img:hover {
    transform: scale(1.1); /* بزرگ‌نمایی هنگام هاور */
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .trust-seal img {
        max-width: 80px; /* کاهش اندازه در موبایل */
    }
}