
/* ============================================
    استایل‌های اصلی صفحه اصلی
    ============================================ */
.home-wrapper {
    margin-top: 0;
    margin-bottom: 60px;
}

/* بخش‌های اصلی */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    flex-wrap: wrap;
    padding: 22px 26px 10px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.section-title i {
    color: #f60;
    font-size: 28px;
}

.view-all {
    color: #f60;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: #e55a00;
    transform: translateX(-3px);
}

/* بخش اسلایدر */
.product-slider-section {
    position: relative;
    margin-bottom: 50px;
    padding: 0 46px 28px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-top: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.swiper {
    position: relative;
    padding: 12px 5px 25px;
    overflow: hidden;
    direction: rtl;
}

.swiper-wrapper {
    align-items: stretch;
}

.swiper-slide {
    height: auto;
}

/* دکمه‌های چپ و راست اسلایدر */
.swiper-button-next-custom,
.swiper-button-prev-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: #fff;
    border: 2px solid #f60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
    color: #f60;
    opacity: 1;
    visibility: visible;
}

.swiper-button-next-custom:hover,
.swiper-button-prev-custom:hover {
    background: #f60;
    color: #fff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 30px rgba(255, 102, 0, 0.35);
}

.swiper-button-next-custom i,
.swiper-button-prev-custom i {
    font-size: 16px;
    line-height: 1;
}

/* در حالت RTL، دکمه next سمت چپ است تا اول صفحه فعال باشد */
.swiper-button-next-custom {
    left: 0;
}

.swiper-button-prev-custom {
    right: 0;
}

.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* کارت محصول */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    flex-shrink: 0;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.condition-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.condition-badge.new {
    background: #4caf50;
    color: white;
}

.condition-badge.used {
    background: #ff9800;
    color: white;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f60;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.add-to-cart-btn {
    background: #f60;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 40px;
}

.add-to-cart-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.product-info {
    padding: 15px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    min-height: 40px;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #f60;
}

.product-author {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    min-height: 30px;
}

.product-author a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-author a:hover {
    color: #f60;
}

.product-price {
    margin-top: auto;
}

.product-price .final-price {
    font-size: 16px;
    font-weight: 700;
    color: #f60;
}

.product-price .old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}


/* بنر بزرگ سراسری بالای تخفیف‌های شگفت‌انگیز */
.hero-banner-section {
    position: relative;
    margin-bottom: 36px;
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}

.hero-banner-swiper {
    padding: 0;
    overflow: hidden;
    border-radius: 26px;
}

.hero-banner-item {
    min-height: 330px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: stretch;
}

.hero-banner-overlay {
    width: 100%;
    min-height: 330px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 44px 58px;
    background: linear-gradient(90deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.68) 100%);
}

.hero-banner-content {
    max-width: 560px;
    color: #fff;
    text-align: right;
}

.hero-banner-content h2 {
    font-size: 34px;
    line-height: 1.5;
    font-weight: 900;
    margin: 0 0 12px;
    color: #fff;
}

.hero-banner-content p {
    font-size: 16px;
    line-height: 2;
    margin: 0 0 22px;
    color: rgba(255,255,255,0.92);
}

.hero-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    background: #f60;
    color: #fff;
    padding: 10px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(255,102,0,0.35);
}

.hero-banner-btn:hover {
    background: #e55a00;
    color: #fff;
    transform: translateY(-2px);
}

.hero-banner-section .swiper-button-next-custom,
.hero-banner-section .swiper-button-prev-custom {
    top: 50%;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.65);
    color: #f60;
}

.hero-banner-section .swiper-button-next-custom {
    left: 18px;
    right: auto;
}

.hero-banner-section .swiper-button-prev-custom {
    right: 18px;
    left: auto;
}

.hero-banner-pagination {
    position: absolute;
    bottom: 16px !important;
    left: 0;
    right: 0;
    z-index: 20;
}

.hero-banner-pagination .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    background: rgba(255,255,255,0.75);
    opacity: 1;
}

.hero-banner-pagination .swiper-pagination-bullet-active {
    width: 24px;
    border-radius: 99px;
    background: #f60;
}

/* بنرها */
.banner-box {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.banner-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.banner-content {
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    padding: 30px 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.banner-content h3 {
    color: white;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.banner-content p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-bottom: 15px;
}

.banner-btn {
    background: #f60;
    color: white;
    padding: 8px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    background: #e55a00;
    color: white;
    transform: translateY(-2px);
}

/* ناشرین */
.publisher-section {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-top: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 24px 22px 28px;
    margin-bottom: 50px;
}

.publisher-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    text-decoration: none;
    display: block;
    border: 1px solid #f3f3f3;
}

.publisher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: rgba(255, 102, 0, 0.25);
}

.publisher-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    overflow: hidden;
}

.publisher-logo img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    display: block;
}

.publisher-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.publisher-books-count {
    font-size: 11px;
    color: #888;
}

.row.g-4.mb-5 {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .section-header {
        padding: 18px 18px 8px;
        border-radius: 18px 18px 0 0;
    }

    .section-title {
        font-size: 18px;
    }

    .section-title i {
        font-size: 22px;
    }

    .product-slider-section {
        padding: 0 36px 22px;
        margin-bottom: 42px;
        border-radius: 0 0 18px 18px;
    }

    .swiper {
        padding: 8px 4px 22px;
    }

    .swiper-button-next-custom,
    .swiper-button-prev-custom {
        width: 36px;
        height: 36px;
    }

    .swiper-button-next-custom i,
    .swiper-button-prev-custom i {
        font-size: 13px;
    }

    .banner-box {
        height: 150px;
    }

    .banner-content h3 {
        font-size: 18px;
    }

    .product-title {
        font-size: 12px;
        min-height: 35px;
    }

    .product-author {
        font-size: 10px;
        min-height: 25px;
    }

    .product-price .final-price {
        font-size: 14px;
    }

    .publisher-section {
        padding: 20px 16px 24px;
        border-radius: 0 0 18px 18px;
    }

    .hero-banner-section {
        border-radius: 20px;
        margin-bottom: 30px;
    }

    .hero-banner-swiper {
        border-radius: 20px;
    }

    .hero-banner-item,
    .hero-banner-overlay {
        min-height: 230px;
    }

    .hero-banner-overlay {
        padding: 28px 30px;
    }

    .hero-banner-content h2 {
        font-size: 23px;
    }

    .hero-banner-content p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .add-to-cart-btn {
        font-size: 11px;
        padding: 9px 4px;
        gap: 4px;
        letter-spacing: -0.2px;
    }

    .add-to-cart-btn i {
        font-size: 11px;
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .section-header {
        padding: 16px 14px 8px;
        gap: 10px;
    }

    .product-slider-section {
        padding: 0 30px 20px;
    }

    .swiper-button-next-custom,
    .swiper-button-prev-custom {
        width: 32px;
        height: 32px;
        border-width: 1px;
    }

    .swiper-button-next-custom i,
    .swiper-button-prev-custom i {
        font-size: 12px;
    }

    .banner-content {
        padding: 15px;
    }

    .banner-content h3 {
        font-size: 16px;
    }

    .banner-content p {
        font-size: 11px;
    }

    .banner-btn {
        padding: 5px 15px;
        font-size: 11px;
    }

    .publisher-card {
        padding: 16px 10px;
    }

    .publisher-logo {
        width: 64px;
        height: 64px;
    }

    .hero-banner-item,
    .hero-banner-overlay {
        min-height: 190px;
    }

    .hero-banner-overlay {
        padding: 22px 22px;
        background: linear-gradient(90deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.72) 100%);
    }

    .hero-banner-content h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .hero-banner-content p {
        font-size: 11px;
        line-height: 1.9;
        margin-bottom: 12px;
    }

    .hero-banner-btn {
        min-width: 104px;
        padding: 7px 18px;
        font-size: 11px;
    }

    .hero-banner-section .swiper-button-next-custom,
    .hero-banner-section .swiper-button-prev-custom {
        width: 30px;
        height: 30px;
    }

    .hero-banner-section .swiper-button-next-custom {
        left: 10px;
    }

    .hero-banner-section .swiper-button-prev-custom {
        right: 10px;
    }
}
