/**
 * Category Landing Page Styles
 * استایل صفحه فرود دسته‌بندی
 */

.category-landing-section {
    padding: 40px 0;
}

/* Category Header */
.category-header {
    text-align: center;
    margin-bottom: 40px;
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.category-description {
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Slider */
.category-slider-container {
    margin-bottom: 40px;
}

.category-slider {
    border-radius: 12px;
    overflow: hidden;
}

.category-slider .slider-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.category-slider .swiper-button-next,
.category-slider .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.category-slider .swiper-button-next:after,
.category-slider .swiper-button-prev:after {
    font-size: 20px;
}

.category-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}

.category-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Category Banners */
.category-banners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.banner-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.banner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

/* Product Sections */
.preorder-section,
.featured-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 5;
}

.product-image-link {
    display: block;
    padding: 20px;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.product-info {
    padding: 0 20px 20px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a {
    color: #333;
    text-decoration: none;
}

.product-name a:hover {
    color: #007bff;
}

.product-price {
    margin-bottom: 15px;
}

.old-price {
    display: block;
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.current-price {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
}

/* View All Button */
.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.view-all-container .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 16px;
}

/* Skeleton Loader */
.category-skeleton {
    max-width: 1200px;
    margin: 0 auto;
}

.skeleton-title {
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.skeleton-description {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.skeleton-banner {
    height: 400px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.error-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.error-state h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.error-state p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .category-title {
        font-size: 24px;
    }

    .category-slider .slider-image {
        height: 250px;
    }

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

    .product-image {
        height: 150px;
    }

    .product-name {
        font-size: 14px;
        min-height: auto;
    }

    .current-price {
        font-size: 16px;
    }

    .category-banners {
        grid-template-columns: 1fr;
    }
}
