/*
 * Shop section
 *
 * Phone: 1 producto por fila.
 * Tablet + desktop: 3 productos por fila.
 *
 * La Tienda mantiene siempre alineación centrada.
 */

.shop-section .container {
    display: block;
}

/* Intro */

.shop-section .section-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-tight);

    width: 100%;
    max-width: 52rem;
    margin: 0 auto var(--space-group);

    text-align: center;
}

.shop-section .section-heading > * {
    margin: 0;
}

.shop-section .section-heading h2 {
    color: var(--foreground);

    font-family: var(--font-heading);
    font-size: var(--text-title);
    line-height: var(--text-title-line);
    font-weight: 600;
    letter-spacing: -.015em;

    text-align: center;
    text-wrap: balance;
}

.shop-section .section-heading > p:last-child {
    max-width: 40rem;

    color: var(--muted-foreground);

    font-size: var(--text-lg);
    line-height: var(--text-lg-line);

    text-align: center;
}

/* Grid */

.shop-section .path-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-element);
    align-items: stretch;
}

/* Product card */

.shop-section .path-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-tight);

    min-width: 0;
    height: 100%;
    padding: var(--space-element);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: color-mix(
        in oklch,
        var(--card) 84%,
        transparent
    );

    text-align: center;
    overflow: hidden;
}

.shop-section .path-card > * {
    margin: 0;
}

/* Product image */

.shop-section .path-card > img {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    margin-bottom: var(--space-tight);

    object-fit: cover;

    border-radius: calc(var(--radius) * .8);
}

/* Eyebrow */

.shop-section .path-card > .eyebrow {
    width: 100%;

    color: var(--primary-emphasis);

    text-align: center;
}

/* Product title */

.shop-section .path-card > h3 {
    width: 100%;

    color: var(--foreground);

    font-family: var(--font-heading);
    font-size: var(--text-xl);
    line-height: var(--text-xl-line);
    font-weight: 600;
    letter-spacing: -.01em;

    text-align: center;
    text-wrap: balance;
}

/* Description */

.shop-section .path-card > p:not(.eyebrow):not(.offer-meta) {
    width: 100%;

    color: var(--muted-foreground);

    font-size: var(--text-base);
    line-height: var(--text-base-line);

    text-align: center;
    text-wrap: pretty;
}

/*
 * Meta starts the bottom area.
 * margin-top:auto keeps the three product footers aligned
 * even when titles/descriptions have different heights.
 */

.shop-section .path-card > .offer-meta {
    width: 100%;
    margin-top: auto;
    padding-top: var(--space-element);

    color: var(--muted-foreground);

    font-size: var(--text-sm);
    line-height: var(--text-sm-line);

    text-align: center;
}

/* CTA */

.shop-section .path-card > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-height: 2rem;
    margin-top: var(--space-tight);
    padding-inline: .625rem;

    border: 1px solid var(--primary-emphasis);
    border-radius: var(--radius);

    color: var(--primary-emphasis);
    background: transparent;

    font-size: var(--text-sm);
    line-height: var(--text-sm-line);
    font-weight: 500;

    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

/* Tablet + desktop.
   Antes eran SIEMPRE 3 columnas; al agregar el cuarto producto quedaba una
   tarjeta huérfana en la segunda fila. Ahora: 2x2 en tablet y 4 en una fila
   en desktop. Si la tienda sigue creciendo, volver a revisar. */

@media (min-width: 48rem) {
    .shop-section .path-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .shop-section .path-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}
