/* ============================================
   PAGE - Home (index.php / is_home)
   ============================================ */

/* ── Hero ── */
.mm-hero {
    position: relative;
    height: 716px;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Negar padding-top del body para que el hero empiece en el borde superior */
    margin-top: calc(-1 * var(--mm-header-height));
}

.mm-hero__background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mm-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-hero__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4d5e8b 0%, #41527f 100%);
}

.mm-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(48, 50, 59, 0.7) 0%, rgba(48, 50, 59, 0) 100%);
}

.mm-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--mm-container-max-width);
    margin: 0 auto;
    padding: var(--mm-header-height) var(--mm-container-padding) 0;
}

/* !important necesario: texto blanco sobre imagen de fondo */
.mm-hero__badge {
    display: inline-block;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.mm-hero__title {
    color: #fff !important;
    max-width: 800px;
}

.mm-hero__subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.25rem !important;
    max-width: 600px;
    margin-bottom: 2rem !important;
}

.mm-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ── Section header (cabecera de sección reutilizable) ── */
.mm-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--mm-spacing-lg);
    margin-bottom: var(--mm-spacing-2xl);
}

@media (min-width: 768px) {
    .mm-section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.mm-section-header__text { max-width: 500px; }

.mm-section-title {
    font-family: var(--mm-font-headline);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--mm-on-surface);
    margin-bottom: 12px;
}

.mm-section-desc {
    color: var(--mm-on-surface-variant);
    font-size: 1rem;
    margin: 0;
}

.mm-section-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mm-font-headline);
    font-weight: 600;
    color: var(--mm-primary);
    text-decoration: none;
    white-space: nowrap;
}

/* ── Categorías ── */
.mm-categories { background-color: var(--mm-surface-container-low); }

.mm-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.mm-categories-grid > * {
    flex: 0 0 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .mm-categories-grid > * { flex: 0 0 calc(33.333% - 16px); }
}

.mm-category-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--mm-radius-xl);
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.mm-category-card__image {
    position: absolute;
    inset: 0;
}

.mm-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.mm-category-card:hover .mm-category-card__image img { transform: scale(1.1); }

.mm-category-card__placeholder {
    width: 100%;
    height: 100%;
    background: var(--mm-surface-container-low);
}

.mm-category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
}

.mm-category-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    z-index: 2;
}

.mm-category-card__title {
    font-family: var(--mm-font-headline) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 8px 0 !important;
}

.mm-category-card__count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0;
}

/* ── Editorial (cat cards) ── */
.mm-editorial__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.mm-editorial__grid > * {
    flex: 0 0 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .mm-editorial__grid > * { flex: 0 0 calc(33.333% - 16px); }
}

.mm-cat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--mm-radius-lg);
    aspect-ratio: 16 / 9;
    display: block;
    text-decoration: none;
}

.mm-cat-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s;
}

.mm-cat-card:hover .mm-cat-card__bg { transform: scale(1.05); }

.mm-cat-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    width: 100%;
    box-sizing: border-box;
}

.mm-cat-card__content h3 {
    font-family: var(--mm-font-headline) !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #fff !important;
    margin: 0 0 4px 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mm-cat-card__content p {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Productos destacados ── */
.mm-featured { background-color: var(--mm-surface-container-low); }

.mm-featured .mm-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.mm-featured .mm-products-grid li.product {
    flex: 0 0 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .mm-featured .mm-products-grid li.product {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

@media (min-width: 1024px) {
    .mm-featured .mm-products-grid li.product {
        flex: 0 0 calc(25% - 12px);
        max-width: calc(25% - 12px);
    }
}

/* ── Sección highlight ── */
.mm-highlight { padding: var(--mm-spacing-2xl) 0; }

.mm-highlight__wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--mm-primary);
    border-radius: var(--mm-radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 86, 210, 0.2);
}

.mm-highlight__watermark {
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-family: var(--mm-font-headline);
    font-size: 180px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.06);
    line-height: 0.8;
    pointer-events: none;
    z-index: 1;
}

@media (min-width: 992px) {
    .mm-highlight__wrapper {
        flex-direction: row;
        align-items: stretch;
    }
}

.mm-highlight__image {
    width: 100%;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

@media (min-width: 992px) {
    .mm-highlight__image {
        width: 45%;
        padding: 50px;
    }
}

.mm-highlight__image-inner {
    background: #fff;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 10%;
}

.mm-highlight__image-inner img,
.mm-highlight__placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mm-highlight__placeholder { background: var(--mm-surface-container-high); }

.mm-highlight__content {
    padding: 0 30px 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    color: #fff;
}

@media (min-width: 992px) {
    .mm-highlight__content {
        width: 55%;
        padding: 60px 80px 60px 20px;
    }
}

.mm-highlight__label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 24px;
    align-self: flex-start;
}

.mm-highlight__content h2 {
    font-family: var(--mm-font-headline) !important;
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin-bottom: 20px !important;
    line-height: 1.1 !important;
}

@media (min-width: 992px) {
    .mm-highlight__content h2 { font-size: 3.5rem !important; }
}

.mm-highlight__content p {
    font-size: 1.1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: var(--mm-spacing-xl) !important;
    line-height: 1.6 !important;
    max-width: 600px;
}

.mm-highlight__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.mm-highlight__guarantee {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 600;
}

.mm-highlight__guarantee i {
    font-size: 1.3rem;
    color: #fff;
}

/* ── Blog / Noticias ── */
.mm-home-blog {
    padding: var(--mm-spacing-3xl) 0;
    background: var(--mm-surface-container-lowest);
}

.mm-blog__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--mm-spacing-xl);
}

.mm-blog__grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mm-spacing-lg);
}

.mm-blog__grid > * {
    flex: 0 0 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .mm-blog__grid > * { flex: 0 0 calc(33.333% - var(--mm-spacing-lg) * 2 / 3); }
}

/* Variante de sección tonal */
.mm-section--tonal { background-color: var(--mm-surface-container-low); }
