/* =========================================================
   Productos en maquila — page styles
   ========================================================= */

.maquila-page {
    background: #ffffff;
    color: var(--color-gray-900);
}

.maquila-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ─── Page hero ──────────────────────────────────────────────────── */
.maquila-hero {
    position: relative;
    overflow: hidden;
    padding: 160px 0 80px;
    text-align: center;
    background: #0f0f0f;
    color: #ffffff;
    isolation: isolate;
}

.maquila-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.maquila-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.55) 0%, rgba(15, 15, 15, 0.78) 100%);
    z-index: -1;
}

.maquila-hero__content {
    position: relative;
}

.maquila-hero__label {
    display: inline-block;
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 600;
    color: #7CD9A9;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.maquila-hero__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 auto 18px;
    max-width: 760px;
}

.maquila-hero__subtitle {
    font-family: var(--font-base);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    margin: 0 auto;
    max-width: 640px;
}

@media (min-width: 768px) {
    .maquila-hero { padding: 200px 0 96px; }
    .maquila-hero__title { font-size: 52px; }
    .maquila-hero__subtitle { font-size: 19px; }
}

/* ─── Company sections (apilado vertical) ───────────────────────── */
.maquila-company {
    padding: 72px 0;
    border-bottom: 1px solid #ececea;
}

.maquila-company:last-of-type {
    border-bottom: none;
}

.maquila-company__header {
    text-align: center;
    margin-bottom: 40px;
}

.maquila-company__name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    color: var(--color-gray-900);
    margin: 0;
    letter-spacing: -0.01em;
}

.maquila-company__note {
    margin-top: 12px;
    color: var(--color-gray-500);
    font-family: var(--font-base);
    font-size: 15px;
}

@media (min-width: 768px) {
    .maquila-company { padding: 112px 0; }
    .maquila-company__name { font-size: 40px; }
    .maquila-company__header { margin-bottom: 56px; }
}

/* ─── Sub-brand block (used by La Favorita) ─────────────────────── */
.maquila-sub {
    margin-top: 72px;
}

.maquila-sub:first-of-type {
    margin-top: 8px;
}

.maquila-sub__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--color-gray-700);
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.maquila-sub__caption {
    text-align: center;
    color: var(--color-gray-500);
    font-family: var(--font-base);
    font-size: 13px;
    margin: 0 0 24px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── Single image showcase (1-photo companies) ─────────────────── */
.maquila-single {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maquila-single img {
    max-width: 100%;
    max-height: 420px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ─── Featured grid (AKI: doypack + productos) ──────────────────── */
.maquila-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto 40px;
}

.maquila-featured__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.maquila-featured__item img {
    max-width: 100%;
    max-height: 380px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (min-width: 768px) {
    .maquila-featured { grid-template-columns: 1fr 1fr; gap: 32px; }
    .maquila-featured__item { min-height: 420px; }
    .maquila-featured__item img { max-height: 440px; }
}

/* ─── Marquee animation ─────────────────────────────────────────── */
.maquila-marquee {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.maquila-marquee__track {
    display: flex;
    width: max-content;
    animation: maquila-scroll var(--marquee-duration, 40s) linear infinite;
    will-change: transform;
}

.maquila-marquee:hover .maquila-marquee__track,
.maquila-marquee:focus-within .maquila-marquee__track {
    animation-play-state: paused;
}

.maquila-marquee__item {
    flex-shrink: 0;
    height: 260px;
    width: 220px;
    margin-right: 32px;          /* used instead of flex gap for seamless -50% loop */
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.maquila-marquee__item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (min-width: 768px) {
    .maquila-marquee__item {
        height: 320px;
        width: 270px;
        margin-right: 36px;
    }
}

@keyframes maquila-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .maquila-marquee {
        -webkit-mask-image: none;
                mask-image: none;
    }
    .maquila-marquee__track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .maquila-marquee__item {
        margin: 0 12px 12px 0;
    }
}
