/* ── Mateo Featured — Public CSS ── */

.mf-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
    margin-bottom: 40px;
}
.mf-section *,
.mf-section *::before,
.mf-section *::after {
    box-sizing: border-box;
}

/* ── Section title ── */
.mf-section__title {
    font-size: 18px;
    font-weight: 400;
    color: #111;
    letter-spacing: .5px;
    margin: 0 0 20px;
}

/* ══════════════════════
   GRID LAYOUT
══════════════════════ */

.mf-grid {
    display: grid;
    gap: 40px 24px;
}

.mf-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.mf-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.mf-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ══════════════════════
   SLIDER LAYOUT (desktop: horizontal scroll row)
══════════════════════ */

.mf-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mf-slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    flex: 1;
    padding-bottom: 4px; /* room for focus ring */
}
.mf-slider-track::-webkit-scrollbar { display: none; }

.mf-slider-track .mf-card {
    flex: 0 0 calc(25% - 15px);
    scroll-snap-align: start;
}

/* Arrow buttons — minimal */
.mf-slider-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    opacity: .4;
    transition: opacity .2s;
    padding: 0;
    box-shadow: none;
    z-index: 2;
}
.mf-slider-btn:hover  { opacity: 1; }
.mf-slider-btn:active { opacity: .6; }

/* ══════════════════════
   PRODUCT CARD
══════════════════════ */

.mf-card {
    display: flex;
    flex-direction: column;
}

.mf-card__image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #f7f7f7;
    text-decoration: none;
    margin-bottom: 14px;
}

/* Hover images — same as main shop */
.mf-card__img-primary,
.mf-card__img-hover {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .4s ease;
}
.mf-card__img-hover { opacity: 0; }
.mf-card__image-wrap:hover .mf-card__img-primary { opacity: 0; }
.mf-card__image-wrap:hover .mf-card__img-hover   { opacity: 1; }

/* Badge — reuse ms-badge styles */
.mf-card__image-wrap .ms-badge {
    position: absolute;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 2px;
    z-index: 2;
    line-height: 1;
}
.mf-card__image-wrap .ms-badge--sale {
    top: 12px;
    right: 12px;
    background: #111;
    color: #fff;
}
.mf-card__image-wrap .ms-badge--season {
    top: 12px;
    left: 12px;
    background: rgba(240,240,240,.92);
    color: #111;
    font-size: 9px;
    letter-spacing: .8px;
    backdrop-filter: blur(4px);
    max-width: calc(100% - 70px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
/* Mobile tag inside info block — hidden on desktop */
.mf-card__info .ms-badge--season {
    display: none;
}

/* Product info */
.mf-card__info { text-align: center; }

.mf-card__title {
    margin: 0 0 5px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #111;
    letter-spacing: .2px;
}
.mf-card__title a {
    color: inherit;
    text-decoration: none;
}
.mf-card__title a:hover { opacity: .6; }

.mf-card__price {
    font-size: 12px;
    color: #555;
    letter-spacing: .2px;
}
.mf-card__price del { color: #bbb; font-size: 11px; margin-right: 4px; }
.mf-card__price ins  { text-decoration: none; }

/* ══════════════════════
   CTA BUTTON
══════════════════════ */

.mf-cta {
    margin-top: 28px;
    display: flex;
}
.mf-cta--left   { justify-content: flex-start; }
.mf-cta--center { justify-content: center; }
.mf-cta--right  { justify-content: flex-end; }

.mf-cta__btn {
    display: inline-block;
    background: transparent;
    color: #111 !important;
    border: 1.5px solid #111;
    border-radius: 2px;
    padding: 11px 32px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background .2s, color .2s;
}
.mf-cta__btn:hover {
    background: #111;
    color: #fff !important;
}

/* ══════════════════════
   MOBILE — double-height carousel
   On mobile the slider becomes a 2-row carousel:
   products are arranged in pairs (top + bottom), user swipes horizontally
══════════════════════ */

@media (max-width: 768px) {

    /* Grid collapses to 2 cols */
    .mf-grid--cols-2,
    .mf-grid--cols-3,
    .mf-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 12px;
    }

    /* Season badge: hide over-image version, show tag in info block */
    .mf-card__image-wrap .ms-badge--season {
        display: none;
    }
    .mf-card__info .ms-badge--season {
        display: inline-block;
        position: static;
        max-width: 100%;
        margin: 4px auto 6px;
        background: #f3f4f6;
        color: #6b7280;
        font-size: 9px;
        letter-spacing: 1px;
        padding: 3px 8px;
        border-radius: 2px;
        backdrop-filter: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Slider on mobile: 2-row grid inside horizontal scroll */
    .mf-slider-btn { width: 24px; height: 24px; opacity: .3; } /* smaller on touch, still visible */

    .mf-slider-track {
        display: grid;
        grid-template-rows: repeat(2, 1fr);
        grid-auto-flow: column;
        grid-auto-columns: calc(50% - 6px); /* 2 cards visible at once */
        gap: 16px 12px;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
    }

    .mf-slider-track .mf-card {
        flex: unset;
        width: 100%;
        scroll-snap-align: start;
    }

    /* Each column of 2 cards snaps together */
    .mf-slider-track .mf-card:nth-child(odd) {
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    .mf-grid--cols-2,
    .mf-grid--cols-3,
    .mf-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
    }

    .mf-slider-track {
        grid-auto-columns: calc(50% - 6px);
    }
}
