/**
 * Yallego Core responsive base.
 *
 * Estas clases sirven como base para bloques publicos de Yallego en WordPress.
 * El tema final puede ampliarlas, pero no deberia romper su comportamiento movil.
 */

.yallego-wrap {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.yallego-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.yallego-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e9e6;
    border-radius: 8px;
}

.yallego-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.yallego-actions,
.yallego-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.yallego-button {
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #13a765;
    color: #fff;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.yallego-cart-panel {
    width: min(430px, 100%);
    max-width: 100%;
}

.yallego-menu-panel {
    width: min(1080px, 100%);
    max-height: 92vh;
    overflow: auto;
}

.yallego-menu-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
    gap: 18px;
}

.yallego-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.yallego-form-row input,
.yallego-form-row select,
.yallego-form-row textarea {
    width: 100%;
    min-height: 44px;
}

@media (max-width: 768px) {
    .yallego-wrap {
        width: min(100% - 24px, 1180px);
    }

    .yallego-grid,
    .yallego-menu-layout,
    .yallego-form-row {
        grid-template-columns: 1fr;
    }

    .yallego-actions,
    .yallego-filters {
        align-items: stretch;
    }

    .yallego-actions > *,
    .yallego-filters > *,
    .yallego-button {
        width: 100%;
    }

    .yallego-cart-panel {
        width: 100%;
        height: 100dvh;
    }
}

@media (max-width: 420px) {
    .yallego-wrap {
        width: min(100% - 18px, 1180px);
    }

    .yallego-card {
        border-radius: 6px;
    }
}
