/* ===== variables.css ===== */
:root {
    /* Fase 15 — identidad visual real de Barquito de Papel */
    --color-bg: #0c1014;
    --color-bg-soft: #11161b;
    --color-surface: #151b20;
    --color-surface-2: #1b2228;
    --color-line: #30373e;
    --color-line-soft: #22292f;

    --color-paper: #f3f1eb;
    --color-paper-2: #e7e4dc;
    --color-ink: #0c1014;
    --color-text: #f5f2eb;
    --color-muted: #aab0b5;
    --color-muted-dark: #656c72;
    --color-accent: #f0ede4;

    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --space-10: 8rem;

    --radius-sm: 0.55rem;
    --radius-md: 0.9rem;
    --radius-lg: 1.4rem;
    --radius-round: 999px;

    --container: 74rem;
    --header-height: 4.8rem;

    --transition-fast: 160ms ease;
    --transition-normal: 260ms ease;
}

/* ===== base.css ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--color-bg);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 2px solid var(--color-paper);
    outline-offset: 4px;
}

::selection {
    background: var(--color-paper);
    color: var(--color-ink);
}

.shell {
    width: min(calc(100% - 2rem), var(--container));
    margin-inline: auto;
}

.section {
    padding-block: clamp(4.75rem, 9vw, 8rem);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: -0.035em;
    line-height: 1.06;
}

h1 {
    margin-bottom: var(--space-5);
    font-size: clamp(2.55rem, 10vw, 5.75rem);
    font-weight: 650;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(2rem, 6.5vw, 3.9rem);
    font-weight: 630;
}

h3 {
    font-size: 1.15rem;
    font-weight: 650;
}

p {
    max-width: 66ch;
}

.eyebrow {
    margin-bottom: 1rem;
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.skip-link {
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 2000;
    transform: translateY(-160%);
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--color-paper);
    color: var(--color-ink);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== store.css ===== */
:root {
    --store-bg: #f4f3f0;
    --store-surface: #ffffff;
    --store-ink: #111518;
    --store-muted: #70767a;
    --store-line: #dfe1df;
    --store-dark: #0d1114;
    --store-shell: 80rem;
}

* { box-sizing: border-box; }

body.store-page {
    margin: 0;
    min-width: 320px;
    background: var(--store-bg);
    color: var(--store-ink);
    font-family: "Helvetica Neue", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.store-shell {
    width: min(calc(100% - 2.5rem), var(--store-shell));
    margin-inline: auto;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.store-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(13,17,20,.97);
    color: #fff;
    backdrop-filter: blur(18px);
}

.store-header__inner {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.store-brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    color: #fff;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 650;
}

.store-brand img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
}

.store-nav { display: flex; align-items: center; gap: 1.5rem; }
.store-nav a {
    color: #aeb4b8;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
}
.store-nav a:hover,
.store-nav a[aria-current="page"] { color: #fff; }

.store-kicker {
    margin: 0 0 1rem;
    color: #7b8083;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.store-hero,
.store-category-hero {
    padding-block: clamp(5.5rem, 10vw, 9rem);
    background: var(--store-bg);
}

.store-hero__grid {
    display: grid;
    gap: 2.75rem;
    align-items: end;
}

.store-hero h1,
.store-category-hero h1,
.store-status-page h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(3.2rem, 8vw, 6.8rem);
    font-weight: 500;
    line-height: .94;
    letter-spacing: -.055em;
}

.store-hero__side { max-width: 34rem; }
.store-hero__side > p,
.store-category-hero > .store-shell > p:last-child {
    margin: 0 0 1.75rem;
    color: var(--store-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.store-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .55rem;
    padding: .35rem;
    border: 1px solid #d5d7d6;
    border-radius: 999px;
    background: #fff;
}

.store-search input {
    min-width: 0;
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--store-ink);
    font: inherit;
}

.store-search button,
.store-button {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .7rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: var(--store-dark);
    color: #fff;
    font: inherit;
    font-size: .82rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.store-search button:hover,
.store-button:hover { background: #272d31; }

.store-categories,
.store-products {
    padding-block: clamp(5rem, 8vw, 8.5rem);
    background: #fff;
}

.store-products--related { background: var(--store-bg); }

.store-section-heading {
    margin-bottom: clamp(3rem, 5vw, 4.75rem);
}
.store-section-heading--row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}
.store-section-heading h2 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.05em;
}
.store-clear-link {
    color: var(--store-ink);
    font-size: .8rem;
    font-weight: 650;
}

.store-category-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--store-line);
}
.store-category {
    min-height: 6.5rem;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--store-line);
    color: var(--store-ink);
    text-decoration: none;
}
.store-category:hover { padding-inline: .5rem; }
.store-category__name { font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; }
.store-category__count { color: var(--store-muted); font-size: .78rem; }

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem 1rem;
}

.store-card { min-width: 0; }
.store-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: .5rem;
    background: #efefec;
    color: inherit;
    text-decoration: none;
}
.store-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.store-card:hover .store-card__media img { transform: scale(1.015); }
.store-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: end start;
    padding: 1rem;
    color: #a0a4a5;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.store-card__badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    padding: .45rem .65rem;
    border-radius: 999px;
    background: rgba(13,17,20,.9);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
}
.store-card__body { padding-top: 1.15rem; }
.store-card__category {
    display: block;
    margin-bottom: .5rem;
    color: #858a8c;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.store-card h3 { margin: 0 0 .6rem; font-size: 1.08rem; line-height: 1.2; letter-spacing: -.025em; }
.store-card h3 a { color: inherit; text-decoration: none; }
.store-card__price { display: flex; align-items: baseline; gap: .7rem; margin-bottom: .85rem; }
.store-card__price strong { font-size: .98rem; }
.store-card__price del { color: #969a9c; font-size: .8rem; }
.store-card__consult { display: block; margin-bottom: .85rem; color: #666b6e; font-size: .86rem; }
.store-card__link { color: var(--store-ink); font-size: .78rem; font-weight: 650; text-decoration: none; }
.store-card__link:hover { text-decoration: underline; }

.store-empty {
    max-width: 42rem;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--store-line);
    border-radius: .75rem;
    background: var(--store-bg);
}
.store-empty h2,
.store-empty h3 { margin-top: 0; font-size: 1.5rem; letter-spacing: -.03em; }
.store-empty p { color: var(--store-muted); }

.store-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: 3.5rem;
    color: #858a8d;
    font-size: .72rem;
}
.store-breadcrumbs a { color: inherit; }

.product-page { padding-block: 2.25rem clamp(6rem, 9vw, 9rem); background: #fff; }
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
.product-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .75rem;
}
.product-gallery__item {
    margin: 0;
    overflow: hidden;
    border-radius: .5rem;
    background: #efefec;
    aspect-ratio: 1 / 1;
}
.product-gallery__item--primary { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
.product-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__placeholder {
    min-height: 32rem;
    display: grid;
    place-items: end start;
    padding: 1.25rem;
    border-radius: .5rem;
    background: #efefec;
    color: #9ca0a2;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.product-info { align-self: start; }
.product-info__category { color: #858a8d; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.product-info h1 { margin: .8rem 0 1.5rem; font-size: clamp(2.6rem, 5vw, 4.8rem); font-weight: 500; line-height: .98; letter-spacing: -.055em; }
.product-info__price { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1rem; }
.product-info__price strong { font-size: 1.45rem; }
.product-info__price del { color: #999d9f; }
.product-status { display: inline-flex; margin: 0 0 2rem; padding: .45rem .7rem; border-radius: 999px; background: #eff2ee; color: #516052; font-size: .7rem; font-weight: 700; }
.product-status--out { background: #f3eeee; color: #705a5a; }
.product-info__lead { max-width: 36rem; margin: 0 0 2rem; color: #666c6f; font-size: 1.02rem; line-height: 1.75; }
.product-whatsapp {
    display: grid;
    grid-template-columns: auto 5rem minmax(0,1fr);
    align-items: end;
    gap: .7rem;
    margin-block: 2rem;
    padding-block: 2rem;
    border-top: 1px solid var(--store-line);
    border-bottom: 1px solid var(--store-line);
}
.product-whatsapp label { grid-column: 1 / 3; color: #797e81; font-size: .7rem; font-weight: 700; }
.product-whatsapp input {
    width: 5rem;
    min-height: 3rem;
    padding: .65rem;
    border: 1px solid #d4d6d5;
    border-radius: .5rem;
    font: inherit;
}
.store-button--whatsapp { min-height: 3rem; }
.product-whatsapp--pending { display: block; background: #f5f4f1; padding: 1.25rem; border-radius: .5rem; }
.product-whatsapp--pending p { margin-bottom: 0; color: #74797c; }
.product-info__description { margin-top: 2rem; }
.product-info__description h2 { margin: 0 0 1rem; font-size: 1.05rem; }
.product-info__description div { max-width: 38rem; color: #62686b; line-height: 1.8; }
.product-info__sku { margin-top: 2rem; color: #929698; font-size: .72rem; }

.store-status-page { min-height: 65vh; display: grid; align-items: center; padding-block: 6rem; }
.store-status-page p { max-width: 38rem; color: var(--store-muted); }

.store-footer { padding-top: 5rem; background: var(--store-dark); color: #fff; }
.store-footer__grid { display: grid; gap: 2.5rem; padding-bottom: 4rem; }
.store-footer__grid strong { font-size: 1.05rem; }
.store-footer__grid p { max-width: 28rem; color: #8e969b; }
.store-footer nav { display: flex; flex-direction: column; gap: .8rem; }
.store-footer nav a { color: #a6adb1; text-decoration: none; font-size: .8rem; }
.store-footer nav a:hover { color: #fff; }
.store-footer__bottom { min-height: 4.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid #242a2e; color: #737b80; font-size: .7rem; }

@media (min-width: 46rem) {
    .store-shell { width: min(calc(100% - 4rem), var(--store-shell)); }
    .store-hero__grid { grid-template-columns: minmax(0,1.25fr) minmax(20rem,.65fr); gap: clamp(4rem,8vw,8rem); }
    .store-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 2rem; }
    .store-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4.25rem 1.25rem; }
    .store-footer__grid { grid-template-columns: 1fr auto; }
}

@media (min-width: 64rem) {
    .store-shell { width: min(calc(100% - 5rem), var(--store-shell)); }
    .store-product-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5rem 1.5rem; }
    .store-product-grid--four { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .product-detail { grid-template-columns: minmax(0,1.25fr) minmax(22rem,.75fr); gap: clamp(4rem,8vw,8rem); }
    .product-info { position: sticky; top: 7rem; }
}

@media (max-width: 39.999rem) {
    .store-brand span { display: none; }
    .store-nav { gap: 1rem; }
    .store-category { grid-template-columns: minmax(0,1fr) auto; }
    .store-category__count { display: none; }

    /* Fase 41: catálogo mobile en dos columnas. */
    .store-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem .7rem;
    }

    .store-card__media {
        aspect-ratio: 4 / 5;
        border-radius: .38rem;
    }

    .store-card__body {
        padding-top: .72rem;
    }

    .store-card__category {
        margin-bottom: .3rem;
        font-size: .52rem;
        line-height: 1.25;
        letter-spacing: .075em;
    }

    .store-card h3 {
        margin-bottom: .42rem;
        font-size: .88rem;
        line-height: 1.16;
        letter-spacing: -.02em;
    }

    .store-card__price {
        gap: .4rem;
        margin-bottom: .55rem;
    }

    .store-card__price strong {
        font-size: .82rem;
    }

    .store-card__price del {
        font-size: .68rem;
    }

    .store-card__consult {
        margin-bottom: .52rem;
        font-size: .74rem;
        line-height: 1.25;
    }

    .store-card__link {
        font-size: .68rem;
        line-height: 1.25;
    }

    .store-card__badge {
        top: .45rem;
        left: .45rem;
        padding: .34rem .48rem;
        font-size: .54rem;
    }

    .store-card__placeholder {
        padding: .65rem;
        font-size: .54rem;
    }

    .store-section-heading--row { align-items: flex-start; flex-direction: column; }
    .product-whatsapp { grid-template-columns: 5rem minmax(0,1fr); }
    .product-whatsapp label { grid-column: 1 / -1; }
    .store-footer__bottom { padding-block: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.store-category-hero__grid { display: grid; gap: 2.5rem; align-items: end; }
.store-category-hero__grid > div > p:last-child { max-width: 38rem; margin: 1.5rem 0 0; color: var(--store-muted); line-height: 1.7; }
.store-category-hero__image { margin: 0; overflow: hidden; border-radius: .5rem; background: #e9e9e6; aspect-ratio: 16/10; }
.store-category-hero__image img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 52rem) { .store-category-hero__grid:has(.store-category-hero__image) { grid-template-columns: minmax(0,.8fr) minmax(24rem,1.2fr); gap: clamp(4rem,8vw,7rem); } }


/* Fase 33 — landings SEO locales */
.local-page-hero {
    padding-block: clamp(4rem, 8vw, 8rem);
    background: var(--store-bg);
}
.local-page-hero__grid {
    display: grid;
    gap: 3rem;
    align-items: end;
}
.local-page-hero h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.4rem);
    font-weight: 500;
    line-height: .95;
    letter-spacing: -.055em;
}
.local-page-hero__side { max-width: 34rem; }
.local-page-hero__side p {
    margin: 0 0 1.6rem;
    color: var(--store-muted);
    font-size: 1.02rem;
    line-height: 1.72;
}
.local-page-body {
    padding-block: clamp(5rem, 8vw, 8rem);
    background: #fff;
}
.local-page-body__grid {
    display: grid;
    gap: 4rem;
}
.local-page-body h2 {
    max-width: 14ch;
    margin: 0 0 1.35rem;
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.05em;
}
.local-page-body p { max-width: 34rem; color: var(--store-muted); line-height: 1.75; }
.local-page-points { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--store-line); }
.local-page-points li { min-height: 4.4rem; display:flex; align-items:center; border-bottom:1px solid var(--store-line); font-weight:600; }
@media (min-width: 52rem) {
    .local-page-hero__grid { grid-template-columns: minmax(0,1.25fr) minmax(22rem,.65fr); gap: clamp(4rem,8vw,8rem); }
    .local-page-body__grid { grid-template-columns: minmax(0,.85fr) minmax(22rem,.75fr); gap: clamp(5rem,10vw,10rem); }
}


/* ==========================================================================
   FASE 37 — LIBRERÍA Y PAPELERÍA
   Landing útil aun antes de completar el inventario real.
   ========================================================================== */

.library-guide {
    padding-block: clamp(5rem, 8vw, 8rem);
    border-top: 1px solid var(--store-line);
    background: #fff;
    color: var(--store-ink);
}

.library-guide__heading {
    display: grid;
    gap: 1.5rem;
    margin-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.library-guide__heading h2 {
    max-width: 13ch;
    margin: 0;
    font-size: clamp(2.35rem, 4.9vw, 4.35rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.052em;
}

.library-guide__heading > p {
    max-width: 33rem;
    margin: 0;
    color: var(--store-muted);
    line-height: 1.75;
}

.library-guide__grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--store-line);
}

.library-guide-card {
    position: relative;
    display: grid;
    align-content: start;
    min-height: 17rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--store-line);
    color: inherit;
    text-decoration: none;
    transition: padding 180ms ease, background 180ms ease;
}

.library-guide-card:hover {
    padding-inline: .8rem;
    background: #f7f6f3;
}

.library-guide-card__number {
    margin-bottom: 2.5rem;
    color: #a0a4a5;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.library-guide-card strong {
    display: block;
    margin-bottom: .8rem;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 600;
    letter-spacing: -.035em;
}

.library-guide-card p {
    max-width: 27rem;
    margin: 0 0 1.4rem;
    color: #73787b;
    font-size: .91rem;
    line-height: 1.7;
}

.library-guide-card__link {
    margin-top: auto;
    color: #202427;
    font-size: .76rem;
    font-weight: 700;
}

.library-guide__cta {
    display: grid;
    gap: 1.5rem;
    margin-top: clamp(3rem, 6vw, 5rem);
    padding: clamp(1.8rem, 4vw, 3rem);
    border-radius: .8rem;
    background: var(--store-dark);
    color: #fff;
}

.library-guide__cta .store-kicker {
    color: #7f888d;
}

.library-guide__cta strong {
    display: block;
    max-width: 18ch;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.04em;
}

.library-guide__cta .store-button {
    align-self: center;
    justify-self: start;
    background: #fff;
    color: var(--store-dark);
}

.library-guide__cta .store-button:hover {
    background: #e9e9e5;
}

.store-products--library {
    padding-top: clamp(4.5rem, 7vw, 7rem);
    background: var(--store-bg);
}

.store-empty--library {
    max-width: 52rem;
    background: #fff;
}

.store-empty--library h2 {
    max-width: 19ch;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 500;
    line-height: 1.05;
}

@media (min-width: 46rem) {
    .library-guide__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .library-guide-card:nth-child(odd) {
        padding-right: 1.5rem;
    }

    .library-guide-card:nth-child(even) {
        padding-left: 1.5rem;
        border-left: 1px solid var(--store-line);
    }
}

@media (min-width: 52rem) {
    .library-guide__heading {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, .45fr);
        gap: clamp(4rem, 8vw, 7rem);
        align-items: end;
    }

    .library-guide__cta {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

@media (min-width: 64rem) {
    .library-guide__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .library-guide-card {
        min-height: 19rem;
        padding: 1.55rem 1.5rem;
        border-left: 1px solid var(--store-line);
    }

    .library-guide-card:nth-child(3n + 1) {
        border-left: 0;
        padding-left: 0;
    }

    .library-guide-card:nth-child(3n) {
        padding-right: 0;
    }
}

@media (max-width: 45.999rem) {
    .library-guide-card {
        min-height: 14rem;
    }
}


/* ==========================================================================
   FASE 38.1 — FIX VISUAL LIBRERÍA / PAPELERÍA
   Incluido completo en el parche para no depender de haber aplicado F37.
   ========================================================================== */

.library-hero {
    padding-block: clamp(2rem, 4vw, 3rem) clamp(5rem, 8vw, 8rem);
    overflow: hidden;
    background: #f4f1eb;
    color: var(--store-ink);
}

.library-hero__breadcrumbs {
    margin-bottom: clamp(2rem, 4vw, 4rem);
}

.library-hero__grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.library-hero__content {
    position: relative;
    z-index: 1;
}

.library-hero h1 {
    max-width: 11.5ch;
    margin: 0;
    font-size: clamp(3.25rem, 7.2vw, 6.5rem);
    font-weight: 500;
    line-height: .93;
    letter-spacing: -.06em;
    text-wrap: balance;
}

.library-hero__lead {
    max-width: 37rem;
    margin: 1.8rem 0 0;
    color: #5e6569;
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.75;
}

.library-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.35rem;
    margin-top: 2rem;
}

.library-hero__link {
    color: var(--store-ink);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.library-hero__link:hover {
    text-decoration: underline;
}

.library-hero__image {
    position: relative;
    min-height: 25rem;
    margin: 0;
    overflow: hidden;
    border-radius: .7rem;
    background: #e7e2d9;
    box-shadow: 0 26px 70px rgba(17, 21, 24, .12);
}

.library-hero__image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(17,21,24,.06);
}

.library-hero__image img {
    width: 100%;
    height: 100%;
    min-height: 25rem;
    display: block;
    object-fit: cover;
    object-position: center;
}

.library-guide {
    padding-block: clamp(5rem, 8vw, 8rem);
    border-top: 1px solid var(--store-line);
    background: #fff;
    color: var(--store-ink);
}

.library-guide__heading {
    display: grid;
    gap: 1.5rem;
    margin-bottom: clamp(3rem, 5vw, 5rem);
}

.library-guide__heading h2 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(2.25rem, 4.8vw, 4.15rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.052em;
}

.library-guide__heading > p {
    max-width: 33rem;
    margin: 0;
    color: var(--store-muted);
    font-size: .95rem;
    line-height: 1.75;
}

.library-guide__grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--store-line);
}

.library-guide-card {
    position: relative;
    min-width: 0;
    min-height: 15rem;
    display: flex;
    flex-direction: column;
    padding: 1.45rem 0;
    border-bottom: 1px solid var(--store-line);
    color: var(--store-ink);
    text-decoration: none;
    transition: background 180ms ease, padding 180ms ease;
}

.library-guide-card:hover {
    padding-inline: .8rem;
    background: #f7f6f3;
}

.library-guide-card__number {
    margin-bottom: 2rem;
    color: #93999c;
    font-size: .64rem;
    font-weight: 750;
    letter-spacing: .14em;
}

.library-guide-card strong {
    display: block;
    max-width: 18rem;
    margin-bottom: .7rem;
    color: var(--store-ink);
    font-size: clamp(1.28rem, 2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.035em;
    text-decoration: none;
}

.library-guide-card p {
    max-width: 26rem;
    margin: 0 0 1.3rem;
    color: #6e7477;
    font-size: .9rem;
    line-height: 1.65;
    text-decoration: none;
}

.library-guide-card__link {
    margin-top: auto;
    color: #202629;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
}

.store-products--library {
    scroll-margin-top: 6rem;
    padding-top: clamp(4.5rem, 7vw, 7rem);
    background: var(--store-bg);
}

.store-products--library::before {
    content: "Productos";
    width: min(calc(100% - 2.5rem), var(--store-shell));
    display: block;
    margin: 0 auto clamp(2.5rem, 4vw, 4rem);
    color: #777d80;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

@media (min-width: 46rem) {
    .library-guide__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .library-guide-card:nth-child(even) {
        padding-left: 1.5rem;
        border-left: 1px solid var(--store-line);
    }

    .library-guide-card:nth-child(odd) {
        padding-right: 1.5rem;
    }
}

@media (min-width: 52rem) {
    .library-hero__grid {
        grid-template-columns: minmax(0, .92fr) minmax(25rem, 1.08fr);
    }

    .library-guide__heading {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, .45fr);
        gap: clamp(4rem, 8vw, 7rem);
        align-items: end;
    }
}

@media (min-width: 64rem) {
    .library-guide__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .library-guide-card {
        min-height: 18rem;
        padding: 1.55rem 1.5rem;
        border-left: 1px solid var(--store-line);
    }

    .library-guide-card:nth-child(3n + 1) {
        padding-left: 0;
        border-left: 0;
    }

    .library-guide-card:nth-child(3n) {
        padding-right: 0;
    }

    .library-guide-card:hover {
        padding-inline: 1.5rem;
    }

    .library-guide-card:nth-child(3n + 1):hover {
        padding-left: .8rem;
    }

    .library-guide-card:nth-child(3n):hover {
        padding-right: .8rem;
    }
}

@media (max-width: 51.999rem) {
    .library-hero {
        padding-top: 1.4rem;
    }

    .library-hero__image {
        min-height: 21rem;
    }

    .library-hero__image img {
        min-height: 21rem;
    }
}

@media (max-width: 45.999rem) {
    .library-hero h1 {
        font-size: clamp(3rem, 15vw, 4.6rem);
    }

    .library-guide-card {
        min-height: 13rem;
    }
}

