/* ========================================
   Category Page Styles
   ======================================== */

.category-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    min-height: 100vh;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.category-header {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown 0.6s ease-out;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.category-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Category Card */
.category-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transform-origin: center;
}

.category-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.category-card:active {
    transform: translateY(-4px);
}

/* Category Image Container */
.category-image {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

/* Category Overlay */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.btn-view-category {
    background: white;
    color: #1a1a1a;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-view-category:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.btn-view-category:active {
    transform: scale(0.98);
}

/* Category Content */
.category-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.category-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Footer */
.category-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: auto;
}

.product-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.product-count i {
    color: #999;
}

/* Empty State */
.no-categories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-categories i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}

.no-categories p {
    font-size: 1.1rem;
    margin: 0;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (768px and above) */
@media (min-width: 768px) {
    .category-section {
        padding: 80px 40px;
    }

    .category-title {
        font-size: 3rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 35px;
    }

    .category-header {
        margin-bottom: 60px;
    }
}

/* Desktop (1024px and above) */
@media (min-width: 1024px) {
    .category-section {
        padding: 100px 0;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .category-title {
        font-size: 3.2rem;
    }

    .category-subtitle {
        font-size: 1.2rem;
    }

    .category-header {
        margin-bottom: 70px;
    }
}

/* Mobile (under 576px) */
@media (max-width: 575px) {
    .category-section {
        padding: 40px 15px;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-subtitle {
        font-size: 0.95rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-header {
        margin-bottom: 30px;
    }

    .category-image {
        aspect-ratio: 4 / 3;
    }

    .category-name {
        font-size: 1.1rem;
    }

    .category-description {
        font-size: 0.85rem;
    }

    .btn-view-category {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Extra Small (under 400px) */
@media (max-width: 399px) {
    .category-section {
        padding: 30px 10px;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .categories-grid {
        gap: 15px;
    }

    .category-content {
        padding: 15px;
    }
}
