/* ========================================
   TRE PASTE — Brochure Gastronomía Mayorista
   Versión HTML del PDF institucional.
   Cada hoja mantiene la proporción A4 y todas las
   medidas internas están en `em`, calcadas de las
   coordenadas del PDF original (1em = 1/54.67 del ancho).
   ======================================== */

:root {
    --teal-900: #0A373C;
    --teal-800: #0E3B40;
    --teal-700: #1E423F;
    --cream: #F1E8D9;
    --cream-soft: #F7F1E6;
    --gold: #C8901A;
    --white: #FFFFFF;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #46514F;
    font-family: 'Poppins', 'Montserrat', system-ui, sans-serif;
    color: var(--teal-900);
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

/* IMPORTANTE: en CSS, un `em` usado en top/left/right/bottom se resuelve
   contra el font-size DEL PROPIO elemento. Por eso ningún elemento
   posicionado en absoluto declara font-size: la tipografía va siempre en
   un hijo. Así todas las coordenadas quedan en la misma escala de la hoja
   (1em = 1/54.667 del ancho A4). */

/* --- Shell ---------------------------------------------------------- */

.brochure {
    /* Contenedor de consulta: permite derivar el tamaño base de las hojas
       del ancho realmente disponible. */
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 24px 16px 56px;
}

.sheet {
    position: relative;
    width: 100%;
    max-width: 820px;
    aspect-ratio: 210 / 297;
    overflow: hidden;
    /* La hoja mide 54.667em de ancho, así que el tamaño base es
       anchoDeLaHoja / 54.667, con techo de 15px (820px / 54.667).
       Se deriva del contenedor y no del viewport: `vw` incluye el padding
       de .brochure y la barra de scroll, y sobredimensionaba el contenido
       hasta recortarlo en anchos intermedios. */
    font-size: min(15px, calc(1.8293vw - .6px));
    font-size: min(15px, 1.8293cqw);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.sheet__num {
    position: absolute;
    right: 2.2em;
    bottom: 3.9em;
    font-weight: 500;
    color: var(--cream);
    z-index: 8;
}

.sheet--cream .sheet__num {
    color: var(--teal-900);
}

/* Decorative pasta line-art watermark */
.deco {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.sheet--cream .deco {
    opacity: .38;
}

.sheet--teal .deco {
    opacity: .07;
}

/* ===================================================================
   HOJA 1 — PORTADA
   =================================================================== */

.cover {
    background: var(--teal-900);
}

.cover__photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 58.6em;
    object-fit: cover;
    object-position: center 45%;
    z-index: 1;
}

.cover__logo {
    position: absolute;
    top: 4.62em;
    left: 50%;
    transform: translateX(-50%);
    width: 15.8em;
    z-index: 3;
    filter: drop-shadow(0 .2em .5em rgba(0, 0, 0, .3));
}

.cover__wave {
    position: absolute;
    left: 0;
    top: 51.85em;
    width: 100%;
    height: 6.2em;
    z-index: 2;
    display: block;
}

.cover__wave path {
    fill: var(--teal-900);
}

.cover__band {
    position: absolute;
    left: 0;
    right: 0;
    top: 58em;
    bottom: 0;
    background: var(--teal-900);
    z-index: 2;
}

.cover__wordmark {
    position: absolute;
    top: 59em;
    left: 50%;
    transform: translateX(-50%);
    width: 24.6em;
    z-index: 3;
}

.cover__copy {
    position: absolute;
    top: 69.2em;
    left: 3em;
    right: 3em;
    z-index: 3;
    text-align: center;
}

.cover__tagline {
    margin: 0;
    font-size: 1.4em;
    font-weight: 400;
    letter-spacing: .005em;
    color: var(--cream);
    text-transform: uppercase;
    line-height: 1.1;
}

.cover__tagline b {
    font-weight: 700;
    font-style: italic;
    text-transform: none;
}

.cover__sub {
    margin: 1.54em 0 0;
    font-size: .95em;
    font-style: italic;
    font-weight: 400;
    letter-spacing: .035em;
    color: var(--cream);
    text-transform: uppercase;
    line-height: 1.2;
}

/* ===================================================================
   HOJA 2 — PROPUESTA
   =================================================================== */

.sheet--cream {
    background: var(--cream);
}

.p2__strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 13.5em;
    object-fit: cover;
    object-position: center 58%;
    z-index: 1;
}

.p2__fade {
    position: absolute;
    top: 9.6em;
    left: 0;
    right: 0;
    height: 4.2em;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(241, 232, 217, 0) 0%, rgba(241, 232, 217, .35) 55%, var(--cream) 100%);
}

.p2__frame {
    position: absolute;
    top: 1.1em;
    left: 1.32em;
    right: 1.32em;
    height: 9.9em;
    border: .09em solid rgba(255, 255, 255, .85);
    z-index: 3;
}

/* Tarjeta de apertura */
.intro-card {
    position: absolute;
    top: 6.4em;
    left: 6.38em;
    right: 5.8em;
    z-index: 4;
    background: var(--teal-700);
    border-radius: 1.5em;
    padding: 1.5em 2.1em 1.6em;
    text-align: center;
    color: var(--cream);
    box-shadow: 0 .8em 2em rgba(10, 55, 60, .3);
}

.intro-card__title {
    margin: 0 0 .95em;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.35;
}

.intro-card p {
    margin: 0 0 .85em;
    font-size: .95em;
    line-height: 1.5;
}

.intro-card p:last-child {
    margin-bottom: 0;
    font-style: italic;
}

.intro-card b {
    font-weight: 700;
}

/* Destellos */
.spark {
    position: absolute;
    z-index: 3;
    color: var(--gold);
}

.spark svg {
    display: block;
    width: 100%;
    height: auto;
    fill: currentColor;
}

.spark--a { top: 12.3em; left: 4.1em;  width: 1.5em; }
.spark--b { top: 14.6em; left: 1.1em;  width: 2.5em; }
.spark--c { top: 17.6em; left: 3.4em;  width: 1.1em; }
.spark--d { top: 12.1em; right: 4.2em; width: 1.7em; }
.spark--e { top: 15.4em; right: 1.2em; width: 2.3em; }
.spark--f { top: 18.4em; right: 4.4em; width: 1.2em; }

/* Píldora "Más que pastas" */
.exp {
    position: absolute;
    top: 21.1em;
    left: 3.3em;
    right: 3.3em;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 1.4em;
    background: var(--cream-soft);
    border: .085em solid var(--teal-700);
    border-radius: 999px;
    padding: .9em 2.2em .9em .55em;
    box-shadow: 0 .4em 1.4em rgba(10, 55, 60, .1);
}

.exp__photo {
    flex: 0 0 auto;
    width: 12.9em;
    height: 12.1em;
    border-radius: 50%;
    border: .12em solid var(--teal-700);
    object-fit: cover;
    object-position: center 32%;
}

.exp__body {
    text-align: center;
    color: var(--teal-800);
}

.exp__title {
    margin: 0 0 .55em;
    font-size: 1.42em;
    font-weight: 400;
    line-height: 1.2;
}

.exp__title b {
    font-weight: 700;
}

.exp__body p {
    margin: 0;
    font-size: .95em;
    line-height: 1.5;
}

.exp__body b {
    font-weight: 700;
}

/* --- Tabs y tarjetas de beneficios -------------------------------- */

.tab {
    display: inline-block;
    background: var(--gold);
    color: var(--cream);
    border-radius: 1em 1em 0 0;
    padding: .38em 1.05em .32em;
    font-size: 1.25em;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
}

.tab b {
    font-weight: 700;
}

.tab i {
    font-style: italic;
    font-weight: 300;
}

.feat-card {
    position: relative;
    background: var(--teal-800);
    color: var(--cream);
    border-radius: 1.4em;
    padding: 1em 1.6em 1em 3.3em;
}

.feat-card--cream {
    background: var(--cream-soft);
    color: var(--teal-800);
}

.feat-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feat-list li {
    position: relative;
    font-size: .96em;
    line-height: 1.47;
    font-weight: 400;
}

.feat-list li::before {
    content: "";
    position: absolute;
    left: -.95em;
    top: .66em;
    width: .32em;
    height: .32em;
    border-radius: 50%;
    background: currentColor;
}

/* Medallón dorado */
.chip {
    position: absolute;
    z-index: 6;
    width: 2.7em;
    height: 2.7em;
    border-radius: 50%;
    background: var(--gold);
    display: grid;
    place-items: center;
    box-shadow: 0 .25em .7em rgba(10, 55, 60, .25);
}

.chip img {
    width: 52%;
    opacity: .92;
}

/* Bloque "Por qué elegir" */
.blk-why {
    position: absolute;
    top: 38.38em;
    left: 3.89em;
    width: 28.4em;
    z-index: 4;
}

.blk-why .tab {
    margin-left: .81em;
}

.blk-why .chip {
    left: -2.17em;
    top: 3.7em;
}

.photo-why {
    position: absolute;
    top: 36.98em;
    right: 2.35em;
    width: 22.4em;
    height: 18.35em;
    object-fit: cover;
    border-radius: 1.5em;
    border: .13em solid var(--white);
    box-shadow: 0 .6em 1.6em rgba(10, 55, 60, .25);
    z-index: 5;
}

/* Bloque "Calidad del producto" */
.blk-quality {
    position: absolute;
    top: 58.41em;
    left: 25.9em;
    right: 3.1em;
    z-index: 4;
}

.blk-quality .tab {
    margin-left: 1.62em;
}

.blk-quality .chip {
    right: -2.2em;
    bottom: 1.9em;
}

.photo-quality {
    position: absolute;
    top: 55.69em;
    left: 2.86em;
    width: 24.2em;
    height: 18.35em;
    object-fit: cover;
    object-position: center 55%;
    border-radius: 1.5em;
    border: .13em solid var(--white);
    box-shadow: 0 .6em 1.6em rgba(10, 55, 60, .25);
    z-index: 5;
}

/* ===================================================================
   HOJA 3 — PRODUCTOS Y CONTACTO
   =================================================================== */

.sheet--teal {
    background: var(--teal-900);
    color: var(--cream);
}

.p3__watermark {
    position: absolute;
    top: 33em;
    left: 50%;
    transform: translateX(-50%);
    width: 32em;
    z-index: 0;
    opacity: .045;
}

/* Bloque "Rendimiento y operación" */
.blk-perf {
    position: absolute;
    top: 4.55em;
    left: 3.6em;
    width: 26.6em;
    z-index: 4;
}

.blk-perf .tab {
    margin-left: .07em;
}

.blk-perf .chip {
    left: -1.15em;
    top: 3.05em;
}

.photo-perf {
    position: absolute;
    top: 2.2em;
    right: 1.85em;
    width: 22.9em;
    height: 18.7em;
    object-fit: cover;
    border-radius: 1.5em;
    border: .13em solid var(--cream);
    box-shadow: 0 .6em 1.6em rgba(0, 0, 0, .35);
    z-index: 5;
}

.perf-note {
    margin: .95em 0 0 2.8em;
    font-size: 1.08em;
    font-weight: 400;
    color: var(--cream);
}

.perf-note b {
    font-weight: 700;
}

/* Píldora de sección centrada */
.pill {
    display: block;
    width: max-content;
    margin: 0 auto;
    background: var(--gold);
    color: var(--cream);
    border-radius: 999px;
    padding: .28em 1.15em .24em;
    font-size: 1.26em;
    font-weight: 400;
    line-height: 1.4;
}

.pill i {
    font-style: italic;
}

/* --- Productos ----------------------------------------------------- */

.products {
    position: absolute;
    top: 23.1em;
    left: 3.5em;
    right: 3.5em;
    z-index: 4;
}

.products__grid {
    margin-top: 1.35em;
}

.pgroup {
    display: grid;
    grid-template-columns: 6.9em 1fr;
    gap: 0 2.5em;
    align-items: center;
    padding: .3em 0;
    position: relative;
}

.pgroup + .pgroup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2.76em;
    right: var(--sep-right, 10em);
    height: .07em;
    background: rgba(241, 232, 217, .4);
}

.pgroup__tag {
    justify-self: stretch;
    text-align: center;
    background: var(--cream);
    color: var(--teal-900);
    border-radius: 999px;
    padding: .28em .3em .24em;
    font-size: .68em;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.pgroup__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pgroup__list li {
    position: relative;
    font-size: .78em;
    font-weight: 400;
    letter-spacing: .105em;
    line-height: 1.9;
    text-transform: uppercase;
    color: var(--cream);
}

.pgroup__list li::before {
    content: "";
    position: absolute;
    left: -.95em;
    top: .82em;
    width: .3em;
    height: .3em;
    border-radius: 50%;
    background: var(--cream);
}

/* Sello "Sabores únicos" */
.badge {
    position: absolute;
    top: 25.4em;
    right: 5.7em;
    width: 8.75em;
    height: 9em;
    z-index: 6;
}

.badge svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: var(--gold);
}

.badge__text {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: .02em;
    color: var(--cream);
    text-transform: uppercase;
}

/* --- Información comercial ----------------------------------------- */

.info {
    position: absolute;
    top: 53.35em;
    left: 3.5em;
    right: 3.5em;
    z-index: 4;
}

.info__box {
    position: relative;
    margin: -.1em 13.16em 0 11.47em;
    background: var(--cream);
    color: var(--teal-800);
    border-radius: 1.1em;
    padding: .85em 1.2em;
    text-align: center;
    line-height: 1.55;
}

.info__box .chip {
    right: -3em;
    top: 50%;
    transform: translateY(-50%);
}

/* --- Contacto ------------------------------------------------------ */

.contact {
    position: absolute;
    top: 63em;
    left: 2.4em;
    right: 2.4em;
    z-index: 4;
    text-align: center;
}

.contact__row {
    margin-top: 1.35em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.1em;
    flex-wrap: wrap;
}

.contact__item {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    font-size: 1.18em;
    color: var(--cream);
    text-decoration: none;
}

.contact__item span:last-child {
    text-decoration: underline;
    text-underline-offset: .18em;
    text-decoration-thickness: .05em;
}

.contact__ico {
    flex: 0 0 auto;
    width: 1.65em;
    height: 1.65em;
    border-radius: 50%;
    background: var(--gold);
    display: grid;
    place-items: center;
    text-decoration: none !important;
}

.contact__ico svg {
    width: 60%;
    height: 60%;
    fill: var(--cream);
}

/* --- Cita ---------------------------------------------------------- */

.quote {
    position: absolute;
    top: 70em;
    left: 5.5em;
    right: 5.5em;
    z-index: 4;
    margin: 0;
    text-align: center;
    color: var(--cream);
}

.quote__t {
    font-size: 1.25em;
    font-weight: 400;
    line-height: 1.45;
}

.quote i {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.12em;
}

.quote .mark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 0;
    vertical-align: -.14em;
}

/* --- Acciones ------------------------------------------------------ */

.brochure__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-ghost {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid rgba(241, 232, 217, .5);
    border-radius: 999px;
    color: var(--cream);
    background: rgba(10, 55, 60, .35);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
}

/* ===================================================================
   MÓVIL — mismos bloques, apilados y legibles
   =================================================================== */

@media (max-width: 640px) {
    .brochure {
        padding: 0 0 32px;
        gap: 0;
    }

    .sheet {
        aspect-ratio: auto;
        font-size: 14px;
        box-shadow: none;
    }

    /* La portada también pasa a flujo: a 390px el póster A4 completo
       obligaría a un font-size de ~7px. */
    .sheet--cover {
        aspect-ratio: auto;
        font-size: 14px;
        background: var(--teal-900);
        padding-bottom: 2.4em;
    }

    .cover__photo {
        position: static;
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .cover__logo {
        top: 3.2em;
        width: 13.5em;
    }

    .cover__wave {
        position: static;
        top: auto;
        height: 2.6em;
        margin-top: -2.5em;
    }

    .cover__band {
        display: none;
    }

    .cover__wordmark {
        position: static;
        transform: none;
        width: 68%;
        margin: .5em auto 0;
    }

    .cover__copy {
        margin-top: .8em;
    }

    .cover__tagline {
        font-size: 1.15em;
    }

    .cover__sub {
        margin-top: .9em;
        font-size: .82em;
    }

    .sheet--cream,
    .sheet--teal {
        padding-bottom: 2.6em;
    }

    /* Todo lo posicionado pasa a flujo normal */
    .intro-card,
    .exp,
    .blk-why,
    .blk-quality,
    .blk-perf,
    .cover__copy,
    .photo-why,
    .photo-quality,
    .photo-perf,
    .products,
    .badge,
    .info,
    .contact,
    .quote {
        position: static;
        inset: auto;
        width: auto;
        transform: none;
        margin-left: 1.1em;
        margin-right: 1.1em;
    }

    .spark,
    .deco,
    .p2__frame,
    .p2__fade,
    .p3__watermark,
    .chip,
    .sheet__num {
        display: none;
    }

    .p2__strip {
        position: static;
        height: 11em;
    }

    .intro-card {
        margin-top: 1.3em;
        padding: 1.4em 1.3em;
    }

    .exp {
        margin-top: 1.3em;
        flex-direction: column;
        border-radius: 1.5em;
        padding: 1.4em;
        gap: 1.1em;
    }

    .exp__photo {
        width: 9.5em;
        height: 9.5em;
    }

    .blk-why,
    .blk-quality,
    .blk-perf {
        margin-top: 1.6em;
    }

    .blk-why .tab,
    .blk-quality .tab,
    .blk-perf .tab {
        margin-left: .8em;
        white-space: normal;
    }

    .feat-card {
        border-radius: 1.2em;
        padding: 1.1em 1.3em 1.1em 2.4em;
    }

    .photo-why,
    .photo-quality,
    .photo-perf {
        margin-top: 1em;
        width: calc(100% - 2.2em);
        height: 13em;
    }

    .products,
    .info,
    .contact {
        margin-top: 1.8em;
    }

    .pgroup {
        grid-template-columns: 1fr;
        gap: .45em;
        padding: .7em 0;
    }

    .pgroup + .pgroup::before {
        left: 0;
        right: 0;
    }

    .pgroup__tag {
        justify-self: start;
        padding-left: .9em;
        padding-right: .9em;
        font-size: .78em;
    }

    .pgroup__list {
        padding-left: 1.2em;
    }

    .pgroup__list li {
        font-size: .85em;
        line-height: 1.7;
    }

    .badge {
        position: relative;
        width: 8.5em;
        height: 8.7em;
        margin: 1.6em auto 0;
    }

    .info__box {
        margin: .7em 0 0;
    }

    .quote {
        margin-top: 2.2em;
    }

    .perf-note {
        margin-left: 0;
    }

    .brochure__actions {
        margin-top: 24px;
    }
}

/* ===================================================================
   IMPRESIÓN — vuelve a A4
   =================================================================== */

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body {
        background: none;
    }

    .brochure {
        padding: 0;
        gap: 0;
    }

    .brochure__actions {
        display: none;
    }

    .sheet {
        width: 210mm;
        max-width: none;
        height: 297mm;
        aspect-ratio: auto;
        font-size: 14.52px;
        box-shadow: none;
        break-after: page;
        page-break-after: always;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sheet:last-of-type {
        break-after: auto;
        page-break-after: auto;
    }
}

/* ===================================================================
   VARIANTE — LOCAL MAYORISTA
   Misma retícula que la presentación de gastronomía; solo difieren el
   ancho de los tabs, el tamaño del sello y el alto de la caja de info,
   porque el contenido de ese PDF es más extenso.
   =================================================================== */

.brochure--local .p2__strip {
    height: 14em;
    object-position: center 45%;
}

.brochure--local .p2__fade {
    top: 9.5em;
}

/* Tab "Fácil de vender": arranca más adentro que el borde de la tarjeta. */
.brochure--local .blk-perf .tab {
    margin-left: 1.39em;
}

/* La nota va centrada bajo la tarjeta, en dos líneas. */
.brochure--local .perf-note {
    margin: .85em 3.2em 0 1.2em;
    text-align: center;
}

/* Sello "+70% de ganancia": más grande que el de gastronomía. */
.brochure--local .badge {
    top: 25.46em;
    right: 6.6em;
    width: 10.05em;
    height: 10.13em;
}

.brochure--local .badge__text {
    font-size: 1.32em;
    line-height: 1.08;
}

.brochure--local .info {
    top: 53.05em;
}

.brochure--local .contact {
    top: 64.5em;
}

.brochure--local .quote {
    top: 71.3em;
    left: 3em;
    right: 3em;
}

.brochure--local .quote__t {
    font-size: 1.16em;
}

@media (max-width: 640px) {
    .brochure--local .p2__strip {
        height: 11em;
    }

    .brochure--local .perf-note {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }

    /* En móvil el sello queda en flujo pero conserva position:relative
       (lo necesita .badge__text), así que hay que anular el desplazamiento
       que fija la variante para desktop. */
    .brochure--local .badge {
        top: auto;
        right: auto;
        width: 9.4em;
        height: 9.5em;
    }

    .brochure--local .badge__text {
        font-size: 1.15em;
    }
}
