/* Shop by Category Section */
.shop-by-category {
    padding: 80px 0;
    background: #fafafa;
}

.shop-by-category h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #222;
    font-weight: 300;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.main-categories {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 3rem;
}

.category-btn {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    padding: 40px 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 250px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.category-btn[data-category="women"] {
    background-image: url('../images/women-cat.png');
}

.category-btn[data-category="men"] {
    background-image: url('../images/men-cat.jpg');
}

.category-btn:hover {
    border-color: #C27BA0;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(194, 123, 160, 0.2);
}

.category-btn.active {
    border-color: #C27BA0;
    background: rgba(194, 123, 160, 0.8);
    color: white;
}

.category-overlay {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.category-btn.active .category-overlay {
    color: #C27BA0;
    text-shadow: none;
}

.category-btn h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.category-btn p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.subcategories {
    margin-top: 2rem;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.subcategory-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #C27BA0;
}

.subcategory-image {
    position: relative;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.subcategory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subcategory-card h4 {
    position: absolute;
    bottom: 50px;
    left: 10px;
    right: 10px;
    font-size: 1.2rem;
    margin: 0;
    color: white;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.subcategory-card p {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    font-size: 0.9rem;
    color: white;
    margin: 0;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.subcategory-card:hover h4,
.subcategory-card:hover p {
    opacity: 0;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .shop-by-category {
        padding: 60px 0;
    }
    
    .shop-by-category h2 {
        font-size: 2rem;
    }
    
    .main-categories {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .category-btn {
        padding: 30px 40px;
        min-width: 200px;
    }

    .category-overlay {
        /* No padding needed */
    }
    
    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .subcategory-card {
        padding: 15px;
    }

    .subcategory-image {
        height: 100px;
    }

    .subcategory-card h4 {
        font-size: 1rem;
        bottom: 40px;
        left: 8px;
        right: 8px;
        padding: 4px 8px;
    }

    .subcategory-card p {
        font-size: 0.8rem;
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 4px 8px;
    }
}

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

    .category-btn {
        padding: 25px 30px;
        min-width: 180px;
    }

    .subcategory-image {
        height: 80px;
    }

    .subcategory-card h4 {
        font-size: 0.9rem;
        bottom: 30px;
        left: 6px;
        right: 6px;
        padding: 3px 6px;
    }

    .subcategory-card p {
        font-size: 0.7rem;
        bottom: 6px;
        left: 6px;
        right: 6px;
        padding: 3px 6px;
    }
}