/* Shop by Category Section - Exact Ridhi Mehra Design */
.shop-by-category {
    padding: 80px 0;
    background-color: #f8f8f5;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-header {
    text-align: center;
    margin-bottom: 60px;
}

.category-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #333;
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
}

/* Category Grid - 2 columns, 3 rows */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Individual Category Cards */
.category-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #fff;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

/* Image Wrapper */
.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

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

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

/* Overlay for subtle darkening */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 0.7;
}

/* Category Label - Positioned at bottom with white background */
.category-label {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 12px 24px;
    text-align: center;
    border-radius: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    min-width: 140px;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #333;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    display: block;
    line-height: 1.2;
}

/* Desktop and larger - horizontal grid layout */
@media (min-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        max-width: 1200px;
    }
    
    .category-card {
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .category-image-wrapper {
        height: 400px;
    }
}

/* Large tablets - 3 columns */
@media (min-width: 769px) and (max-width: 991px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        max-width: 900px;
    }
    
    .category-image-wrapper {
        height: 380px;
    }
    
    .category-title {
        font-size: 0.9rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .shop-by-category {
        padding: 60px 0;
    }
    
    .category-container {
        padding: 0 15px;
    }
    
    .category-main-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .category-grid {
        gap: 15px;
        max-width: 100%;
    }
    
    .category-image-wrapper {
        height: 400px;
    }
    
    .category-title {
        font-size: 0.9rem;
        letter-spacing: 0.8px;
    }
    
    .category-label {
        padding: 10px 20px;
        bottom: 20px;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .shop-by-category {
        padding: 40px 0;
    }
    
    .category-container {
        padding: 0 10px;
    }
    
    .category-main-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .category-grid {
        gap: 12px;
    }
    
    .category-image-wrapper {
        height: 350px;
    }
    
    .category-title {
        font-size: 0.85rem;
        letter-spacing: 0.6px;
    }
    
    .category-label {
        padding: 8px 16px;
        bottom: 15px;
        min-width: 100px;
    }
}

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

.category-card {
    animation: fadeInUp 0.6s ease-out;
}

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