/* Categories Explorer - صفحه دسته‌بندی محصولات */

.categories-explorer {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

/* Header Section */
.categories-header {
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.categories-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.header-icon {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: white;
    animation: headerIconFloat 3s ease-in-out infinite;
}

@keyframes headerIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.header-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.95);
    font-weight: 400;
}

/* Breadcrumb Section */
.breadcrumb-section {
    background: white;
    padding: 0.6rem 0;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.category-breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumb-item a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: #f7fafc;
    border-radius: 12px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
    color: white;
    transform: translateY(-1px);
}

.breadcrumb-item i.fa-home {
    font-size: 0.75rem;
}

.breadcrumb-item i.fa-chevron-left {
    color: #cbd5e0;
    font-size: 0.65rem;
}

/* Categories Grid */
.categories-content {
    padding: 3rem 0 5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Card */
.category-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: cardAppear 0.5s ease-out backwards;
}

.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.1s; }
.category-card:nth-child(3) { animation-delay: 0.15s; }
.category-card:nth-child(4) { animation-delay: 0.2s; }
.category-card:nth-child(5) { animation-delay: 0.25s; }
.category-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102,126,234,0.2);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Category Image */
.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-image {
    transform: scale(1.15) rotate(2deg);
}

/* SVG Icon Placeholder */
.category-icon-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
}

.category-icon-placeholder svg {
    width: 120px;
    height: 120px;
    color: rgba(255,255,255,0.9);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    color: #003d82;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    z-index: 2;
    transition: all 0.3s ease;
}

.category-badge.products {
    background: rgba(76,175,80,0.95);
    color: white;
}

.category-card:hover .category-badge {
    transform: scale(1.1);
}

/* Category Info */
.category-info {
    padding: 1.8rem;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.category-description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: #f7fafc;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 600;
}

.meta-item i {
    color: #003d82;
}

/* Category Arrow */
.category-arrow {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.category-card:hover .category-arrow {
    transform: scale(1.15) translateX(-5px);
    box-shadow: 0 10px 25px rgba(102,126,234,0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    font-size: 6rem;
    color: #cbd5e0;
    margin-bottom: 2rem;
    animation: emptyIconFloat 3s ease-in-out infinite;
}

@keyframes emptyIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.empty-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.empty-text {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 2rem;
}

.btn-back-home {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-back-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102,126,234,0.3);
    color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .header-title {
        font-size: 2.2rem;
    }

    .header-subtitle {
        font-size: 1.1rem;
    }

    .category-image-wrapper {
        height: 200px;
    }

    .category-icon-placeholder svg {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 767.98px) {
    .categories-header {
        padding: 3rem 0 2rem;
    }

    .header-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .header-title {
        font-size: 1.8rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .categories-content {
        padding: 2rem 0 3rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .category-icon-placeholder svg {
        width: 80px;
        height: 80px;
    }

    .category-name {
        font-size: 1.3rem;
    }

    .breadcrumb-section {
        padding: 1rem 0;
    }

    .category-breadcrumb {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .header-title {
        font-size: 1.5rem;
    }

    .category-info {
        padding: 1.5rem;
    }

    .category-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 5rem 2rem;
}

.loading-spinner {
    font-size: 4rem;
    color: #003d82;
    margin-bottom: 1.5rem;
    animation: spinRotate 1s linear infinite;
}

@keyframes spinRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-state p {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 500;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 5rem 2rem;
}

.error-state i {
    font-size: 5rem;
    color: #f56565;
    margin-bottom: 1.5rem;
}

.error-state h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 2rem;
}

.btn-retry {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102,126,234,0.3);
}

.category-card.loading {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

