/* =========================================
   Homepage Categories (Millesima Style) - Refined
   ========================================= */

.m-categories {
    padding: 6rem 0;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    background: #fff;
    position: relative;
    z-index: 1;
}

.m-categories__title {
    font-family: 'Georgia', 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 3.5rem;
    text-align: center;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.m-categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 30px;
    width: 100%;
}

/* Card Styling */
.m-category-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1/1.25; /* Elegant Portrait Ratio */
    overflow: hidden;
    text-decoration: none;
    background: #000;
}

/* Visual (Image & Overlay) */
.m-category-card__visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.m-category-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Darker Overlay for better text readability */
.m-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.2) 40%, rgba(0,0,0,0) 100%);
    opacity: 0.8;
    transition: opacity 0.4s;
    pointer-events: none;
}

.m-category-card:hover .m-category-card__overlay {
    opacity: 1;
}

/* Content (Title & Chevron) */
.m-category-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    z-index: 2;
}

.m-category-card__label {
    margin: 0;
    font-family: 'Pretendard', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.m-category-card__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
}

.m-category-card__chevron svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2px;
}

.m-category-card:hover .m-category-card__chevron {
    background: #fff;
    transform: translateX(8px);
}

.m-category-card:hover .m-category-card__chevron svg {
    stroke: #000;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .m-categories {
        padding-left: 20px;
        padding-right: 20px;
    }
    .m-categories__grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Col on Tablets */
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .m-categories {
        padding: 4rem 20px;
    }
    
    .m-categories__title {
        font-size: 1.8rem;
        margin-bottom: 2.5rem;
    }

    .m-categories__grid {
        grid-template-columns: 1fr; /* 1 Column on Mobile */
        gap: 15px;
    }

    .m-category-card {
        aspect-ratio: 16/9; /* Wider cards on mobile */
    }

    .m-category-card__content {
        padding: 25px;
    }

    .m-category-card__label {
        font-size: 1.3rem;
    }
    
    .m-category-card__chevron {
        width: 36px;
        height: 36px;
    }
}