/* Category Grid Redesign - Component Scoped */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
    width: 100%;
}

.category-card {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.category-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.category-card:hover .category-card-bg {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
    transition: background 0.4s ease;
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.5) 60%,
            rgba(0, 0, 0, 0.3) 100%);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 3;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.category-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.category-card-tagline {
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 20px;
}

.category-card-cta {
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card:hover .category-card-cta {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .category-card {
        height: 300px;
    }

    .category-card-cta {
        transform: translateY(0);
        opacity: 1;
        padding: 8px 20px;
    }
}

/* Admin Specific Overrides */
.category-card .delete-category-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.category-card:hover .delete-category-btn {
    opacity: 1;
    transform: scale(1);
}

.category-card .delete-category-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}