/* =============================================
   CATEGORIES INDEX PAGE
   ============================================= */

.categories-index-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 2rem 0 0.5rem;
    color: #343a40;
    font-weight: 700;
}

.categories-index-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.categories-index-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.categories-index-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.category-index-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-index-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.category-index-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.category-index-card:hover .category-index-image img {
    transform: scale(1.05);
}

.category-index-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 154, 61, 0.85), rgba(255, 111, 97, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-index-card:hover .category-index-overlay {
    opacity: 1;
}

.category-index-overlay .category-index-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.category-index-content {
    padding: 1.75rem;
    text-align: right;
    direction: rtl;
}

.category-index-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #333;
    line-height: 1.3;
}

.category-index-content p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 1rem;
    height: 3em;
    overflow: hidden;
}

.category-index-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.category-product-count {
    background: linear-gradient(135deg, #ff9a3d, #ff6f61);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-index-cta {
    color: #ff6f61;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.category-index-card:hover .category-index-cta {
    color: #ff9a3d;
}

/* =============================================
   SINGLE CATEGORY PAGE
   ============================================= */

.category-hero {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.category-hero-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.category-hero h1 {
    font-size: 2.5rem;
    color: #343a40;
    margin: 0 0 1rem;
    font-weight: 700;
}

.category-hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Related categories */
.related-categories {
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.related-categories h2 {
    margin-bottom: 2rem;
    color: #343a40;
    font-size: 1.5rem;
    font-weight: 700;
}

.related-categories-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.related-category-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #343a40;
    font-weight: 600;
    transition: all 0.3s ease;
}

.related-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    color: #ff6f61;
}

.related-category-icon {
    font-size: 1.5rem;
}

/* No products message for category page */
.category-empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

.category-empty-state h3 {
    font-size: 1.5rem;
    color: #343a40;
    margin-bottom: 1rem;
}

.category-empty-state p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.category-empty-state a {
    color: #ff6f61;
    font-weight: 600;
}

/* =============================================
   BREADCRUMB
   ============================================= */

.breadcrumb {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    color: #999;
    direction: rtl;
}

.breadcrumb a {
    color: #ff6f61;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .categories-index-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .categories-index-title {
        font-size: 2rem;
    }

    .categories-index-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .categories-index-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-index-image {
        height: 150px;
    }

    .category-index-content {
        padding: 1rem;
    }

    .category-index-content h2 {
        font-size: 1.1rem;
    }

    .category-index-content p {
        font-size: 0.9rem;
        height: auto;
        min-height: 2.5em;
    }

    .category-hero h1 {
        font-size: 2rem;
    }

    .category-hero p {
        font-size: 1rem;
    }

    .related-categories h2 {
        font-size: 1.3rem;
    }

    .related-category-card {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .categories-index-grid {
        grid-template-columns: 1fr;
    }

    .category-index-image {
        height: 180px;
    }

    .category-index-content p {
        height: auto;
    }

    .category-hero {
        padding: 2rem 1rem;
    }

    .category-hero h1 {
        font-size: 1.8rem;
    }

    .related-categories-grid {
        gap: 0.75rem;
    }
}
