/* ==========================================================================
   Editorial — capa de diseño moderno para la tienda de la editorial
   Se carga después de main.css / custom.css y reutiliza el color base
   definido en Administración > Ajustes generales (--ed-accent).
   ========================================================================== */

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/editorial/fraunces-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/editorial/fraunces-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/editorial/fraunces-latin-wght-italic.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 100 1000;
    src: url('../fonts/editorial/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 100 1000;
    src: url('../fonts/editorial/dm-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-display: swap;
    font-weight: 100 1000;
    src: url('../fonts/editorial/dm-sans-latin-wght-italic.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ed-ink: #1d1a16;
    --ed-ink-soft: #4a443c;
    --ed-muted: #7a7166;
    --ed-paper: #f6f1e8;
    --ed-paper-2: #efe7da;
    --ed-cream: #fdfbf7;
    --ed-line: #e4d9c9;
    --ed-accent: #c4552d;
    --ed-accent-ink: #ffffff;
    --ed-accent-soft: rgba(196, 85, 45, .1);
    --ed-deep: #1f2a24;
    --ed-gold: #c9a45c;
    --ed-serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --ed-sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --ed-shadow-sm: 0 1px 2px rgba(29, 26, 22, .06), 0 2px 6px rgba(29, 26, 22, .05);
    --ed-shadow-md: 0 10px 30px -12px rgba(29, 26, 22, .25);
    --ed-shadow-book: 0 1px 1px rgba(0, 0, 0, .08), 0 12px 24px -8px rgba(29, 26, 22, .35), 0 30px 60px -20px rgba(29, 26, 22, .3);
    --ed-header-h: 76px;
}

/* ---------- Base ---------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ed-sans);
    background-color: var(--ed-paper);
    color: var(--ed-ink-soft);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
h1 > a, h2 > a, h3 > a, h4 > a, h5 > a, h6 > a {
    font-family: var(--ed-serif);
    color: var(--ed-ink);
    font-weight: 600;
    letter-spacing: -0.01em;
    font-variation-settings: 'opsz' 72;
}

p, li, span, a, label, input, textarea, select, button, td, th {
    font-family: var(--ed-sans);
}

a {
    color: var(--ed-ink);
}

a:hover {
    color: var(--ed-accent);
}

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

.text--base, .text--base:hover {
    color: var(--ed-accent) !important;
}

.bg--paper {
    background-color: var(--ed-paper) !important;
}

.bg--cream {
    background-color: var(--ed-cream) !important;
}

.preloader {
    background: var(--ed-paper) !important;
}

.scroll-to-top {
    background: var(--ed-ink) !important;
    border-radius: 50%;
}

/* ---------- Buttons ------------------------------------------------------- */

.btn--base, .btn.btn--base {
    background-color: var(--ed-accent) !important;
    color: var(--ed-accent-ink) !important;
    border: 1px solid var(--ed-accent) !important;
    font-weight: 600;
    border-radius: 999px;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.btn--base:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 20px -8px var(--ed-accent);
    transform: translateY(-1px);
}

.btn-outline--base {
    border: 1px solid var(--ed-ink) !important;
    color: var(--ed-ink) !important;
    background: transparent !important;
    border-radius: 999px;
    font-weight: 600;
}

.btn-outline--base:hover {
    background: var(--ed-ink) !important;
    color: var(--ed-cream) !important;
}

.cart-btn {
    background-color: var(--ed-accent) !important;
    box-shadow: none !important;
    border-radius: 999px;
}

.ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    border: 1px solid transparent;
    transition: all .2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.ed-btn i {
    font-size: 1.15em;
}

.ed-btn-primary {
    background: var(--ed-accent);
    color: var(--ed-accent-ink);
}

.ed-btn-primary:hover {
    color: var(--ed-accent-ink);
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -10px var(--ed-accent);
}

.ed-btn-dark {
    background: var(--ed-ink);
    color: var(--ed-cream);
}

.ed-btn-dark:hover {
    color: var(--ed-cream);
    background: #000;
}

.ed-btn-ghost {
    background: transparent;
    color: var(--ed-ink);
    border-color: rgba(29, 26, 22, .25);
}

.ed-btn-ghost:hover {
    border-color: var(--ed-ink);
    color: var(--ed-ink);
    background: rgba(29, 26, 22, .04);
}

.ed-btn-light {
    background: var(--ed-cream);
    color: var(--ed-ink);
}

.ed-btn-light:hover {
    background: #fff;
    color: var(--ed-accent);
}

.ed-btn-sm {
    padding: .6rem 1.1rem;
    font-size: .85rem;
}

.ed-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    color: var(--ed-ink);
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.ed-link:hover {
    color: var(--ed-accent);
}

/* ---------- Forms --------------------------------------------------------- */

.form--control, .form-control.form--control {
    border-radius: 10px !important;
    border-color: var(--ed-line) !important;
    background-color: var(--ed-cream);
}

.form--control:focus {
    border-color: var(--ed-accent) !important;
    box-shadow: 0 0 0 3px var(--ed-accent-soft) !important;
}

.form--check .form-check-input {
    width: 17px;
    height: 17px;
    border: 1.5px solid #b8ab98;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

.form--check .form-check-input:checked {
    background-color: var(--ed-accent);
    border-color: var(--ed-accent);
}

/* ---------- Header -------------------------------------------------------- */

.ed-topbar {
    background: var(--ed-ink);
    color: rgba(253, 251, 247, .8);
    font-size: .82rem;
    letter-spacing: .02em;
}

.ed-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 38px;
}

.ed-topbar a {
    color: rgba(253, 251, 247, .85);
}

.ed-topbar a:hover {
    color: #fff;
}

.ed-topbar__msg i {
    color: var(--ed-gold);
    margin-right: .35rem;
}

.ed-topbar__links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ed-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(246, 241, 232, .88);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.ed-header.is-scrolled {
    border-bottom-color: var(--ed-line);
    box-shadow: 0 6px 20px -16px rgba(29, 26, 22, .5);
}

.ed-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--ed-header-h);
}

.ed-logo img {
    max-height: 44px;
    width: auto;
}

.ed-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

.ed-nav > li {
    position: relative;
}

.ed-nav > li > a,
.ed-nav > li > button {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .55rem .85rem;
    font-weight: 500;
    font-size: .95rem;
    color: var(--ed-ink);
    border-radius: 999px;
    background: transparent;
    border: 0;
}

.ed-nav > li > a:hover,
.ed-nav > li > button:hover,
.ed-nav > li > a.active {
    background: rgba(29, 26, 22, .06);
    color: var(--ed-ink);
}

.ed-nav > li > a.active {
    font-weight: 600;
}

.ed-mega {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 8px);
    width: min(720px, 90vw);
    background: var(--ed-cream);
    border: 1px solid var(--ed-line);
    border-radius: 18px;
    box-shadow: var(--ed-shadow-md);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.ed-nav > li:hover .ed-mega,
.ed-nav > li:focus-within .ed-mega {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.ed-mega__col h6 {
    font-size: .95rem;
    margin-bottom: .5rem;
}

.ed-mega__col h6 a {
    font-family: var(--ed-serif);
}

.ed-mega__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ed-mega__col li a {
    display: block;
    padding: .2rem 0;
    font-size: .9rem;
    color: var(--ed-muted);
}

.ed-mega__col li a:hover {
    color: var(--ed-accent);
}

.ed-mega__all {
    grid-column: 1 / -1;
    border-top: 1px solid var(--ed-line);
    padding-top: 1rem;
}

.ed-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.ed-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--ed-ink);
    background: transparent;
    border: 0;
    font-size: 1.35rem;
    transition: background .2s ease;
}

.ed-icon-btn:hover {
    background: rgba(29, 26, 22, .07);
    color: var(--ed-ink);
}

.ed-icon-btn .ed-badge {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ed-accent);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ed-account .dropdown-menu {
    border: 1px solid var(--ed-line);
    border-radius: 14px;
    box-shadow: var(--ed-shadow-md);
    padding: .5rem;
    min-width: 230px;
    background: var(--ed-cream);
}

.ed-account .dropdown-item {
    border-radius: 8px;
    padding: .55rem .75rem;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.ed-account .dropdown-item i {
    font-size: 1.15rem;
    color: var(--ed-muted);
}

.ed-account .dropdown-item:hover {
    background: var(--ed-paper);
    color: var(--ed-ink);
}

.ed-account__head {
    padding: .5rem .75rem .75rem;
    border-bottom: 1px solid var(--ed-line);
    margin-bottom: .35rem;
}

.ed-account__head strong {
    display: block;
    color: var(--ed-ink);
}

.ed-account__head small {
    color: var(--ed-muted);
}

.ed-lang img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.ed-search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ed-cream);
    border-bottom: 1px solid var(--ed-line);
    padding: 1.25rem 0;
    display: none;
    box-shadow: var(--ed-shadow-md);
}

.ed-search-panel.is-open {
    display: block;
}

.ed-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    border: 1px solid var(--ed-line);
    border-radius: 999px;
    padding: .35rem .35rem .35rem 1.2rem;
    box-shadow: var(--ed-shadow-sm);
}

.ed-search i {
    color: var(--ed-muted);
    font-size: 1.2rem;
}

.ed-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: .55rem 0;
    font-size: 1rem;
    color: var(--ed-ink);
    min-width: 0;
}

.ed-menu-toggle {
    display: none;
}

.ed-offcanvas {
    background: var(--ed-cream) !important;
    max-width: 88vw;
}

.ed-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--ed-line);
}

.ed-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ed-mobile-nav > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
    border-bottom: 1px solid var(--ed-line);
    font-family: var(--ed-serif);
    font-size: 1.15rem;
    color: var(--ed-ink);
}

.ed-mobile-nav .ed-mobile-sub a {
    display: block;
    padding: .35rem 0 .35rem 1rem;
    color: var(--ed-muted);
    font-size: .95rem;
}

@media (max-width: 1199px) {
    .ed-nav > li > a, .ed-nav > li > button {
        padding: .5rem .6rem;
        font-size: .9rem;
    }
}

@media (max-width: 991px) {
    .ed-nav {
        display: none;
    }

    .ed-menu-toggle {
        display: inline-flex;
    }

    .ed-actions {
        margin-left: auto;
    }

    .ed-topbar__msg {
        display: none;
    }

    .ed-topbar__inner {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .ed-header__inner {
        gap: .5rem;
    }

    .ed-logo img {
        max-height: 36px;
    }

    .ed-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }

    .ed-hide-xs {
        display: none !important;
    }
}

/* ---------- Section scaffolding ------------------------------------------ */

.ed-section {
    padding: 88px 0;
    position: relative;
}

.ed-section--tight {
    padding: 56px 0;
}

.ed-section--cream {
    background: var(--ed-cream);
}

.ed-section--paper2 {
    background: var(--ed-paper-2);
}

.ed-section--dark {
    background: var(--ed-deep);
    color: rgba(253, 251, 247, .78);
}

.ed-section--dark h1, .ed-section--dark h2, .ed-section--dark h3,
.ed-section--dark h4, .ed-section--dark h5, .ed-section--dark h6 {
    color: var(--ed-cream);
}

.ed-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ed-accent);
    margin-bottom: .9rem;
}

.ed-eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: currentColor;
}

.ed-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.ed-section-head h2 {
    font-size: clamp(1.9rem, 1.2rem + 2vw, 2.8rem);
    line-height: 1.08;
    margin: 0;
    max-width: 18ch;
}

.ed-section-head p {
    margin: .75rem 0 0;
    max-width: 52ch;
    color: var(--ed-muted);
}

.ed-section--dark .ed-section-head p {
    color: rgba(253, 251, 247, .65);
}

.ed-rule {
    height: 1px;
    background: var(--ed-line);
    border: 0;
    margin: 0;
    opacity: 1;
}

/* ---------- Hero ---------------------------------------------------------- */

.ed-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 96px;
    background:
        radial-gradient(1200px 500px at 85% 20%, rgba(201, 164, 92, .18), transparent 60%),
        radial-gradient(900px 500px at 10% 100%, rgba(196, 85, 45, .08), transparent 60%),
        var(--ed-paper);
}

.ed-hero__bgimg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .08;
    pointer-events: none;
}

.ed-hero__title {
    font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5rem);
    line-height: .98;
    letter-spacing: -0.035em;
    font-weight: 500;
    margin-bottom: 1.4rem;
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
}

.ed-hero__title em {
    font-style: italic;
    color: var(--ed-accent);
    font-weight: 400;
}

.ed-hero__lead {
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 46ch;
    color: var(--ed-ink-soft);
    margin-bottom: 2rem;
}

.ed-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 2.25rem;
}

.ed-hero .ed-search {
    max-width: 520px;
}

.ed-hero__stats {
    display: flex;
    gap: 2.25rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--ed-line);
    max-width: 520px;
}

.ed-hero__stats strong {
    display: block;
    font-family: var(--ed-serif);
    font-size: 2rem;
    line-height: 1;
    color: var(--ed-ink);
    font-weight: 500;
}

.ed-hero__stats span {
    font-size: .85rem;
    color: var(--ed-muted);
}

.ed-shelf {
    position: relative;
    height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-shelf__book {
    position: absolute;
    width: 250px;
    aspect-ratio: 2 / 3;
    border-radius: 3px 8px 8px 3px;
    overflow: hidden;
    box-shadow: var(--ed-shadow-book);
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
    background: var(--ed-paper-2);
}

.ed-shelf__book::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 10px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .12) 45%, transparent);
}

.ed-shelf__book img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-shelf__book--1 {
    transform: translateX(-150px) rotate(-8deg);
    z-index: 1;
}

.ed-shelf__book--2 {
    transform: translateY(-20px);
    z-index: 3;
    width: 280px;
}

.ed-shelf__book--3 {
    transform: translateX(150px) rotate(7deg);
    z-index: 2;
}

.ed-shelf:hover .ed-shelf__book--1 {
    transform: translateX(-175px) rotate(-10deg);
}

.ed-shelf:hover .ed-shelf__book--3 {
    transform: translateX(175px) rotate(9deg);
}

.ed-shelf__chip {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1rem .7rem .7rem;
    background: rgba(253, 251, 247, .94);
    backdrop-filter: blur(8px);
    border: 1px solid var(--ed-line);
    border-radius: 16px;
    box-shadow: var(--ed-shadow-md);
    font-size: .85rem;
    color: var(--ed-ink);
    animation: ed-float 6s ease-in-out infinite;
}

.ed-shelf__chip small {
    display: block;
    color: var(--ed-muted);
    font-size: .75rem;
}

.ed-shelf__chip-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--ed-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ed-shelf__chip--audio {
    left: 0;
    bottom: 60px;
}

.ed-shelf__chip--read {
    right: -6px;
    bottom: 150px;
    animation-delay: -3s;
}

.ed-shelf__chip--read .ed-shelf__chip-icon {
    background: var(--ed-deep);
}

.ed-wave {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-left: .35rem;
}

.ed-wave i {
    width: 3px;
    background: var(--ed-accent);
    border-radius: 2px;
    animation: ed-wave 1.1s ease-in-out infinite;
}

.ed-wave i:nth-child(2) { animation-delay: -.2s; }
.ed-wave i:nth-child(3) { animation-delay: -.4s; }
.ed-wave i:nth-child(4) { animation-delay: -.6s; }

@keyframes ed-wave {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

@keyframes ed-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.ed-shelf__empty {
    width: 280px;
    aspect-ratio: 2 / 3;
    border-radius: 4px 10px 10px 4px;
    background: var(--ed-deep);
    color: var(--ed-cream);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    box-shadow: var(--ed-shadow-book);
    font-family: var(--ed-serif);
}

.ed-shelf__empty span:first-child {
    font-size: 2rem;
    line-height: 1.1;
}

@media (max-width: 991px) {
    .ed-hero {
        padding: 48px 0 64px;
    }

    .ed-shelf {
        height: 440px;
        margin-top: 2.5rem;
    }

    .ed-shelf__book {
        width: 190px;
    }

    .ed-shelf__book--2 {
        width: 215px;
    }

    .ed-shelf__book--1 {
        transform: translateX(-110px) rotate(-8deg);
    }

    .ed-shelf__book--3 {
        transform: translateX(110px) rotate(7deg);
    }
}

@media (max-width: 575px) {
    .ed-hero__stats {
        gap: 1.25rem;
    }

    .ed-hero__stats strong {
        font-size: 1.5rem;
    }

    .ed-shelf {
        height: 360px;
    }

    .ed-shelf__book {
        width: 150px;
    }

    .ed-shelf__book--2 {
        width: 170px;
    }

    .ed-shelf__book--1 {
        transform: translateX(-85px) rotate(-8deg);
    }

    .ed-shelf__book--3 {
        transform: translateX(85px) rotate(7deg);
    }

    .ed-shelf__chip {
        font-size: .75rem;
        padding: .5rem .7rem .5rem .5rem;
    }

    .ed-shelf__chip-icon {
        width: 30px;
        height: 30px;
    }

    .ed-shelf__chip--audio {
        bottom: 10px;
    }

    .ed-shelf__chip--read {
        bottom: 90px;
    }
}

/* ---------- Formats ------------------------------------------------------- */

.ed-formats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--ed-line);
    border: 1px solid var(--ed-line);
    border-radius: 22px;
    overflow: hidden;
}

.ed-format {
    background: var(--ed-cream);
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    transition: background .25s ease;
    color: var(--ed-ink-soft);
}

.ed-format:hover {
    background: #fff;
    color: var(--ed-ink-soft);
}

.ed-format__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: var(--ed-accent-soft);
    color: var(--ed-accent);
}

.ed-format h3 {
    font-size: 1.45rem;
    margin: .25rem 0 0;
}

.ed-format p {
    margin: 0;
    font-size: .95rem;
    color: var(--ed-muted);
}

.ed-format__foot {
    margin-top: auto;
    padding-top: .75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--ed-ink);
    font-size: .9rem;
}

.ed-format__foot i {
    transition: transform .2s ease;
}

.ed-format:hover .ed-format__foot i {
    transform: translateX(4px);
}

@media (max-width: 767px) {
    .ed-formats {
        grid-template-columns: 1fr;
    }
}

/* ---------- Book cards ---------------------------------------------------- */

.ed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2.25rem 1.5rem;
}

.ed-grid--5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1199px) {
    .ed-grid--5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .ed-grid--5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .ed-grid, .ed-grid--5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem 1rem;
    }
}

.ed-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 210px);
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .5rem .25rem 1.5rem;
    margin: 0 -.25rem;
    scrollbar-width: thin;
}

.ed-rail > * {
    scroll-snap-align: start;
}

.ed-book {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ed-book__media {
    position: relative;
}

.ed-book__cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 3px 7px 7px 3px;
    overflow: hidden;
    background: var(--ed-paper-2);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 10px 22px -12px rgba(29, 26, 22, .45);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}

.ed-book__cover::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .1) 50%, transparent);
    pointer-events: none;
}

.ed-book__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-book:hover .ed-book__cover {
    transform: translateY(-6px) rotate(-.6deg);
    box-shadow: var(--ed-shadow-book);
}

.ed-book__type {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .6rem;
    border-radius: 999px;
    background: rgba(253, 251, 247, .92);
    color: var(--ed-ink);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    backdrop-filter: blur(4px);
}

.ed-book__type i {
    font-size: .95rem;
    color: var(--ed-accent);
}

.ed-book__featured {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ed-gold);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

.ed-book__play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--ed-accent);
    color: #fff;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .5);
    transition: transform .2s ease;
}

.ed-book__play:hover {
    transform: scale(1.08);
}

.ed-book__play.is-playing {
    background: var(--ed-ink);
}

.ed-book__body {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    flex: 1;
}

.ed-book__title {
    font-family: var(--ed-serif);
    font-size: 1.08rem;
    line-height: 1.25;
    font-weight: 600;
    margin: 0;
    color: var(--ed-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ed-book__title a {
    color: inherit;
    font-family: inherit;
}

.ed-book__author {
    font-size: .88rem;
    color: var(--ed-muted);
}

.ed-book__author a {
    color: inherit;
}

.ed-book__author a:hover {
    color: var(--ed-accent);
}

.ed-book__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .45rem;
}

.ed-book__price {
    font-weight: 700;
    color: var(--ed-ink);
    font-size: 1rem;
}

.ed-book__rating {
    font-size: .8rem;
    color: var(--ed-muted);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.ed-book__rating i {
    color: var(--ed-gold);
}

.ed-book__extra {
    font-size: .78rem;
    color: var(--ed-muted);
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.ed-book__extra i {
    color: var(--ed-accent);
}

/* ---------- Ranking list (más vendidos) --------------------------------- */

.ed-ranking {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: rank;
}

.ed-ranking li {
    display: grid;
    grid-template-columns: 56px 64px 1fr auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--ed-line);
}

.ed-ranking li:first-child {
    border-top: 1px solid var(--ed-line);
}

.ed-ranking__n {
    font-family: var(--ed-serif);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--ed-accent);
    font-weight: 300;
    font-style: italic;
}

.ed-ranking__cover {
    width: 64px;
    aspect-ratio: 2 / 3;
    border-radius: 2px 5px 5px 2px;
    overflow: hidden;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5);
}

.ed-ranking__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-ranking h6 {
    font-size: 1.1rem;
    margin: 0 0 .15rem;
}

.ed-ranking small {
    color: var(--ed-muted);
}

.ed-ranking__price {
    font-weight: 700;
    color: var(--ed-ink);
}

@media (max-width: 575px) {
    .ed-ranking li {
        grid-template-columns: 36px 52px 1fr;
    }

    .ed-ranking__price {
        display: none;
    }

    .ed-ranking__n {
        font-size: 1.8rem;
    }
}

/* ---------- Featured author --------------------------------------------- */

.ed-spotlight {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 4rem;
    align-items: center;
}

.ed-spotlight__photo {
    position: relative;
}

.ed-spotlight__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 220px 220px 18px 18px;
}

.ed-spotlight__photo::before {
    content: '';
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid rgba(201, 164, 92, .6);
    border-radius: 220px 220px 18px 18px;
    z-index: 0;
}

.ed-spotlight__photo img {
    position: relative;
    z-index: 1;
}

.ed-spotlight__name {
    font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem);
    line-height: 1;
    font-weight: 500;
    margin-bottom: .75rem;
}

.ed-spotlight__tagline {
    font-family: var(--ed-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--ed-gold);
    margin-bottom: 1.25rem;
}

.ed-spotlight__bio {
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 60ch;
    white-space: pre-line;
}

.ed-spotlight__books {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.ed-spotlight__books a {
    width: 84px;
    aspect-ratio: 2 / 3;
    border-radius: 2px 5px 5px 2px;
    overflow: hidden;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .8);
    transition: transform .25s ease;
}

.ed-spotlight__books a:hover {
    transform: translateY(-4px);
}

.ed-spotlight__books img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 991px) {
    .ed-spotlight {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .ed-spotlight__photo {
        max-width: 340px;
    }
}

/* ---------- Authors ------------------------------------------------------- */

.ed-authors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.ed-author-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: .15rem;
    color: var(--ed-ink-soft);
}

.ed-author-card__photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: .9rem;
    background: var(--ed-paper-2);
}

.ed-author-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(.15);
    transition: transform .5s ease, filter .3s ease;
}

.ed-author-card:hover .ed-author-card__photo img {
    transform: scale(1.04);
    filter: grayscale(0);
}

.ed-author-card h5 {
    font-size: 1.2rem;
    margin: 0;
}

.ed-author-card p {
    font-size: .88rem;
    color: var(--ed-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ed-author-card small {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ed-accent);
    margin-top: .35rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

@media (max-width: 991px) {
    .ed-authors {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .ed-authors {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ---------- Categories ---------------------------------------------------- */

.ed-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.ed-cat {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 1.15rem .55rem .55rem;
    border-radius: 999px;
    background: var(--ed-cream);
    border: 1px solid var(--ed-line);
    color: var(--ed-ink);
    font-weight: 500;
    transition: all .2s ease;
}

.ed-cat img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.ed-cat span {
    color: var(--ed-muted);
    font-size: .8rem;
}

.ed-cat--plain {
    padding: .55rem 1.1rem;
}

.ed-cat:hover {
    border-color: var(--ed-ink);
    color: var(--ed-ink);
    transform: translateY(-2px);
}

/* ---------- Testimonials -------------------------------------------------- */

.ed-quotes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.ed-quote {
    background: var(--ed-cream);
    border: 1px solid var(--ed-line);
    border-radius: 18px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ed-quote blockquote {
    font-family: var(--ed-serif);
    font-size: 1.12rem;
    line-height: 1.55;
    color: var(--ed-ink);
    margin: 0;
    position: relative;
}

.ed-quote blockquote::before {
    content: '\201C';
    font-size: 3.5rem;
    line-height: 0;
    color: var(--ed-accent);
    display: block;
    margin: 1.2rem 0 .6rem;
}

.ed-quote__who {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: auto;
}

.ed-quote__who img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.ed-quote__who strong {
    display: block;
    color: var(--ed-ink);
    font-size: .95rem;
}

.ed-quote__who small {
    color: var(--ed-muted);
}

@media (max-width: 991px) {
    .ed-quotes {
        grid-template-columns: 1fr;
    }
}

/* ---------- Blog cards ---------------------------------------------------- */

.ed-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.ed-post__img {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ed-post__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.ed-post:hover .ed-post__img img {
    transform: scale(1.04);
}

.ed-post small {
    color: var(--ed-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ed-post h5 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: .35rem 0 0;
}

@media (max-width: 991px) {
    .ed-posts {
        grid-template-columns: 1fr;
    }
}

/* ---------- Newsletter ---------------------------------------------------- */

.ed-newsletter {
    background: var(--ed-accent);
    color: rgba(255, 255, 255, .9);
    border-radius: 28px;
    padding: clamp(2rem, 4vw, 3.5rem);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ed-newsletter::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .04), 0 0 0 80px rgba(255, 255, 255, .03);
}

.ed-newsletter h2 {
    color: #fff;
    font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
    line-height: 1.1;
    margin: 0 0 .5rem;
}

.ed-newsletter form {
    display: flex;
    gap: .5rem;
    background: #fff;
    border-radius: 999px;
    padding: .35rem;
    position: relative;
    z-index: 1;
}

.ed-newsletter input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 1rem;
    background: transparent;
    min-width: 0;
    color: var(--ed-ink);
}

@media (max-width: 767px) {
    .ed-newsletter {
        grid-template-columns: 1fr;
    }
}

/* ---------- Footer -------------------------------------------------------- */

.ed-footer {
    background: var(--ed-ink);
    color: rgba(253, 251, 247, .62);
    padding-top: 80px;
    font-size: .93rem;
}

.ed-footer h6 {
    color: var(--ed-cream);
    font-family: var(--ed-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.ed-footer a {
    color: rgba(253, 251, 247, .72);
}

.ed-footer a:hover {
    color: #fff;
}

.ed-footer__brand img {
    max-height: 46px;
    margin-bottom: 1.25rem;
}

.ed-footer__brand p {
    max-width: 34ch;
    line-height: 1.7;
}

.ed-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ed-footer li + li {
    margin-top: .55rem;
}

.ed-footer__stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.ed-footer__stats strong {
    display: block;
    font-family: var(--ed-serif);
    color: var(--ed-cream);
    font-size: 1.6rem;
    font-weight: 500;
}

.ed-social {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.ed-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(253, 251, 247, .2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: all .2s ease;
}

.ed-social a:hover {
    background: var(--ed-cream);
    color: var(--ed-ink);
}

.ed-footer__bottom {
    margin-top: 64px;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(253, 251, 247, .12);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
}

.ed-footer__word {
    font-family: var(--ed-serif);
    font-size: clamp(3rem, 12vw, 10rem);
    line-height: .8;
    color: rgba(253, 251, 247, .05);
    letter-spacing: -0.04em;
    white-space: nowrap;
    overflow: hidden;
    user-select: none;
    margin-top: 40px;
    text-align: center;
}

/* ---------- Inner page hero (breadcrumb) ------------------------------- */

.ed-page-hero {
    padding: 56px 0 44px;
    background:
        radial-gradient(800px 300px at 90% 0%, rgba(201, 164, 92, .16), transparent 60%),
        var(--ed-paper-2);
    border-bottom: 1px solid var(--ed-line);
}

.ed-page-hero--compact {
    padding: 18px 0;
    background: var(--ed-paper-2);
}

.ed-page-hero h1 {
    font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 500;
    margin: 0;
}

.ed-crumbs {
    display: flex;
    gap: .5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 .9rem;
    font-size: .85rem;
    color: var(--ed-muted);
}

.ed-crumbs li + li::before {
    content: '/';
    margin-right: .5rem;
    opacity: .6;
}

.ed-crumbs a {
    color: var(--ed-muted);
}

/* ---------- Sample mini player (home / detail) ------------------------- */

.ed-mini-player {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translate(-50%, 140%);
    z-index: 1000;
    width: min(560px, calc(100vw - 24px));
    background: var(--ed-ink);
    color: var(--ed-cream);
    border-radius: 18px;
    padding: .75rem .9rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .6);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.ed-mini-player:not(.is-visible) {
    visibility: hidden;
}

.ed-mini-player.is-visible {
    transform: translate(-50%, 0);
}

.ed-mini-player img {
    width: 44px;
    height: 66px;
    object-fit: cover;
    border-radius: 2px 5px 5px 2px;
}

.ed-mini-player__info {
    flex: 1;
    min-width: 0;
}

.ed-mini-player__info strong {
    display: block;
    font-family: var(--ed-serif);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ed-cream);
}

.ed-mini-player__info small {
    color: rgba(253, 251, 247, .6);
    font-size: .78rem;
}

.ed-mini-player__bar {
    height: 3px;
    background: rgba(253, 251, 247, .15);
    border-radius: 3px;
    margin-top: .45rem;
    overflow: hidden;
}

.ed-mini-player__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--ed-accent);
}

.ed-mini-player button {
    border: 0;
    background: rgba(253, 251, 247, .1);
    color: var(--ed-cream);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ed-mini-player button.is-main {
    background: var(--ed-accent);
}

/* ---------- Product detail additions ----------------------------------- */

.ed-type-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: var(--ed-accent-soft);
    color: var(--ed-accent);
    font-weight: 700;
    font-size: .8rem;
}

.ed-chapters {
    border: 1px solid var(--ed-line);
    border-radius: 16px;
    background: var(--ed-cream);
    overflow: hidden;
}

.ed-chapters__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--ed-line);
    flex-wrap: wrap;
}

.ed-chapters__head h5 {
    margin: 0;
    font-size: 1.2rem;
}

.ed-chapter {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: .9rem;
    align-items: center;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--ed-line);
}

.ed-chapter:last-child {
    border-bottom: 0;
}

.ed-chapter__n {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ed-paper);
    color: var(--ed-muted);
    font-weight: 700;
    font-size: .85rem;
    border: 0;
}

button.ed-chapter__n {
    background: var(--ed-accent);
    color: #fff;
    font-size: 1.1rem;
}

.ed-chapter__title {
    color: var(--ed-ink);
    font-weight: 500;
    line-height: 1.3;
}

.ed-chapter__title small {
    display: block;
    color: var(--ed-muted);
    font-weight: 400;
}

.ed-chapter__time {
    font-size: .85rem;
    color: var(--ed-muted);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.ed-library-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: var(--ed-deep);
    color: var(--ed-cream);
    margin-bottom: 1rem;
}

.ed-library-cta i {
    font-size: 1.8rem;
    color: var(--ed-gold);
}

.ed-library-cta strong {
    display: block;
    color: var(--ed-cream);
}

.ed-library-cta small {
    color: rgba(253, 251, 247, .65);
}

/* ---------- Author profile -------------------------------------------- */

.ed-author-hero {
    padding: 64px 0;
    background: var(--ed-paper-2);
    border-bottom: 1px solid var(--ed-line);
}

.ed-author-hero__grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3.5rem;
    align-items: center;
}

.ed-author-hero__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 180px 180px 16px 16px;
    box-shadow: var(--ed-shadow-md);
}

.ed-author-hero h1 {
    font-size: clamp(2.3rem, 1.5rem + 2.8vw, 3.8rem);
    font-weight: 500;
    line-height: 1;
    margin: 0 0 .75rem;
}

.ed-author-hero__tagline {
    font-family: var(--ed-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--ed-accent);
    margin-bottom: 1.25rem;
}

.ed-author-hero__stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    padding: 1.25rem 0;
    border-top: 1px solid var(--ed-line);
    border-bottom: 1px solid var(--ed-line);
}

.ed-author-hero__stats strong {
    display: block;
    font-family: var(--ed-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--ed-ink);
    line-height: 1.1;
}

.ed-author-hero__stats span {
    font-size: .82rem;
    color: var(--ed-muted);
}

.ed-bio {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ed-ink-soft);
    white-space: pre-line;
}

.ed-bio::first-letter {
    font-family: var(--ed-serif);
    float: left;
    font-size: 3.6rem;
    line-height: .9;
    padding: .3rem .6rem 0 0;
    color: var(--ed-accent);
}

.ed-panel {
    background: var(--ed-cream);
    border: 1px solid var(--ed-line);
    border-radius: 18px;
    padding: 1.5rem;
}

.ed-panel + .ed-panel {
    margin-top: 1.25rem;
}

.ed-panel h5 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

@media (max-width: 991px) {
    .ed-author-hero__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ed-author-hero__photo {
        max-width: 280px;
    }
}

/* ---------- Existing template harmonisation ------------------------------ */

.product-card {
    border-radius: 16px !important;
    border: 1px solid var(--ed-line) !important;
    background: var(--ed-cream) !important;
    box-shadow: none !important;
    overflow: hidden;
}

.product-card__thumb img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    height: auto !important;
}

.product-card .product-title a {
    font-family: var(--ed-serif);
}

.product-widget,
.custom--card,
.card.custom--card {
    border-radius: 16px !important;
    border: 1px solid var(--ed-line) !important;
    background: var(--ed-cream) !important;
    box-shadow: none !important;
}

.custom--card .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--ed-line) !important;
}

.custom--table thead th {
    background: var(--ed-ink) !important;
    color: var(--ed-cream) !important;
    font-weight: 600;
}

.user-area {
    background: var(--ed-deep) !important;
}

.user-area .user-wrapper .name,
.user-area .user-header-status h4 {
    color: var(--ed-cream) !important;
}

.user-nav-tabs {
    border: 0 !important;
    gap: .35rem;
    flex-wrap: wrap;
}

.user-nav-tabs .nav-link {
    border-radius: 999px !important;
    border: 1px solid rgba(253, 251, 247, .18) !important;
    color: rgba(253, 251, 247, .8) !important;
    padding: .45rem 1rem !important;
    font-size: .9rem;
    background: transparent !important;
}

.user-nav-tabs .nav-link.active,
.user-nav-tabs .nav-link:hover {
    background: var(--ed-cream) !important;
    color: var(--ed-ink) !important;
    border-color: var(--ed-cream) !important;
}

.user-nav-tabs .nav-link.ed-tab-library {
    border-color: var(--ed-gold) !important;
    color: var(--ed-gold) !important;
}

.user-nav-tabs .nav-link.ed-tab-library.active,
.user-nav-tabs .nav-link.ed-tab-library:hover {
    background: var(--ed-gold) !important;
    color: var(--ed-ink) !important;
}

.dashboard-area {
    background: var(--ed-paper);
}

.pagination .page-item .page-link {
    border-radius: 50% !important;
    border-color: var(--ed-line) !important;
    color: var(--ed-ink) !important;
}

.pagination .page-item.active .page-link {
    background: var(--ed-accent) !important;
    border-color: var(--ed-accent) !important;
    color: #fff !important;
}

.ed-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    border: 1px dashed var(--ed-line);
    border-radius: 18px;
    background: var(--ed-cream);
}

.ed-empty i {
    font-size: 2.6rem;
    color: var(--ed-accent);
}

.ed-empty h5 {
    margin: .75rem 0 .25rem;
}

.ed-empty p {
    color: var(--ed-muted);
    margin-bottom: 1.25rem;
}

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

/* ---------- Cookie card ------------------------------------------------- */

.cookies-card {
    background: var(--ed-cream) !important;
    border: 1px solid var(--ed-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--ed-shadow-md) !important;
    max-width: 380px !important;
    padding: 1.5rem !important;
}

.cookies-card__icon {
    background: var(--ed-accent) !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 1.6rem !important;
}

.cookies-card__content {
    font-size: .9rem !important;
    line-height: 1.6 !important;
    color: var(--ed-ink-soft) !important;
    margin-top: 1rem !important;
}

/* ---------- FAQ ----------------------------------------------------------- */

.ed-faq .accordion-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ed-line);
    border-radius: 0 !important;
}

.ed-faq .accordion-item:first-child {
    border-top: 1px solid var(--ed-line);
}

.ed-faq .accordion-button {
    background: transparent !important;
    box-shadow: none !important;
    padding: 1.25rem 0;
    font-family: var(--ed-serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ed-ink) !important;
}

.ed-faq .accordion-button::after {
    background-image: none;
    content: '+';
    font-family: var(--ed-sans);
    font-size: 1.5rem;
    line-height: 1;
    width: auto;
    height: auto;
    transform: none;
    color: var(--ed-accent);
}

.ed-faq .accordion-button:not(.collapsed)::after {
    content: '−';
    transform: none;
}

.ed-faq .accordion-body {
    padding: 0 0 1.25rem;
    color: var(--ed-ink-soft);
    line-height: 1.7;
}

/* ---------- Acceso: iniciar sesión / registro ------------------------------ */

.ed-auth {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    min-height: 100vh;
    background: var(--ed-paper);
}

.ed-auth__aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 48px clamp(28px, 4vw, 64px);
    background:
        radial-gradient(700px 380px at 110% -10%, rgba(201, 164, 92, .22), transparent 60%),
        radial-gradient(520px 420px at -20% 110%, rgba(196, 85, 45, .28), transparent 60%),
        var(--ed-ink);
    color: rgba(253, 251, 247, .86);
}

.ed-auth__logo img {
    max-height: 42px;
    width: auto;
}

.ed-auth__logo--mobile {
    display: none;
}

.ed-auth__intro {
    max-width: 30rem;
    position: relative;
    z-index: 2;
}

.ed-auth__intro .ed-eyebrow {
    color: var(--ed-gold);
}

.ed-auth__intro .ed-eyebrow::before {
    background: var(--ed-gold);
}

.ed-auth__intro h1 {
    color: var(--ed-cream);
    font-size: clamp(2rem, 1.2rem + 2.2vw, 3.1rem);
    line-height: 1.06;
    font-weight: 500;
    margin: .9rem 0 1.6rem;
}

.ed-auth__perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .75rem;
}

.ed-auth__perks li {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .98rem;
}

.ed-auth__perks i {
    flex: 0 0 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(253, 251, 247, .08);
    color: var(--ed-gold);
    font-size: 1.15rem;
}

.ed-auth__covers {
    position: relative;
    flex: 1 1 auto;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
}

.ed-auth__covers img {
    width: 22%;
    max-width: 140px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 4px 8px 8px 4px;
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7), inset 3px 0 0 rgba(255, 255, 255, .12);
    margin: 0 -2%;
    transform-origin: 50% 120%;
}

.ed-auth__covers img:nth-child(1) { transform: rotate(-14deg) translateY(18px); }
.ed-auth__covers img:nth-child(2) { transform: rotate(-7deg) translateY(4px); }
.ed-auth__covers img:nth-child(3) { transform: translateY(-6px); z-index: 2; width: 25%; max-width: 160px; }
.ed-auth__covers img:nth-child(4) { transform: rotate(7deg) translateY(4px); }
.ed-auth__covers img:nth-child(5) { transform: rotate(14deg) translateY(18px); }

.ed-auth__authors {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .88rem;
    color: rgba(253, 251, 247, .7);
    border-top: 1px solid rgba(253, 251, 247, .12);
    padding-top: 1.4rem;
}

.ed-auth__avatars {
    display: flex;
}

.ed-auth__avatars a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--ed-ink);
    margin-left: -10px;
    transition: transform .2s ease;
}

.ed-auth__avatars a:first-child {
    margin-left: 0;
}

.ed-auth__avatars a:hover {
    transform: translateY(-3px);
}

.ed-auth__avatars img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-auth__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(20px, 5vw, 72px);
}

.ed-auth__card {
    width: 100%;
    max-width: 440px;
}

.ed-auth__card--wide {
    max-width: 560px;
}

.ed-auth__back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    color: var(--ed-muted);
    margin-bottom: 2.2rem;
}

.ed-auth__back:hover {
    color: var(--ed-accent);
}

.ed-auth__title {
    font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.5rem);
    font-weight: 500;
    margin: 0 0 .5rem;
}

.ed-auth__lead {
    color: var(--ed-muted);
    margin-bottom: 1.8rem;
}

.ed-auth .form-group {
    margin-bottom: 1.1rem;
}

.ed-auth .form-label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--ed-ink);
    margin-bottom: .4rem;
}

.ed-auth__small-link {
    font-size: .84rem;
    color: var(--ed-accent);
    margin-bottom: .4rem;
}

.ed-input-icon {
    position: relative;
}

.ed-input-icon > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ed-muted);
    font-size: 1.15rem;
    pointer-events: none;
    z-index: 2;
}

.ed-input-icon .form--control {
    padding-left: 44px !important;
    height: 50px;
}

.ed-auth .form--check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
}

.ed-auth .form--check .form-check-input {
    margin: .2rem 0 0;
    flex-shrink: 0;
}

.ed-auth .form--check .form-check-label {
    font-size: .9rem;
    font-weight: 400;
    color: var(--ed-ink-soft);
    padding-left: 0;
    flex: 1;
}

.ed-auth .form--check .form-check-label a {
    color: var(--ed-accent);
}

.ed-auth .form-check-input:checked {
    background-color: var(--ed-accent);
    border-color: var(--ed-accent);
}

.ed-auth__switch {
    margin-top: 1.8rem;
    text-align: center;
    color: var(--ed-muted);
    font-size: .92rem;
}

.ed-auth__switch a {
    color: var(--ed-accent);
    font-weight: 600;
}

@media (max-width: 991px) {
    .ed-auth {
        grid-template-columns: 1fr;
    }

    .ed-auth__aside {
        display: none;
    }

    .ed-auth__logo--mobile {
        display: block;
        margin-bottom: 1.6rem;
    }

    .ed-auth__back {
        margin-bottom: 1.2rem;
    }

    .ed-auth__main {
        align-items: flex-start;
        padding-top: 32px;
    }
}

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

.ed-contact__title {
    font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.7rem);
    line-height: 1.12;
    font-weight: 500;
    margin: .8rem 0 2rem;
}

.ed-contact__list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    gap: 1.2rem;
}

.ed-contact__list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.ed-contact__icon {
    flex: 0 0 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ed-accent-soft);
    color: var(--ed-accent);
    font-size: 1.35rem;
}

.ed-contact__list small {
    display: block;
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ed-muted);
    margin-bottom: .15rem;
}

.ed-contact__list p,
.ed-contact__list a {
    margin: 0;
    color: var(--ed-ink);
    font-weight: 500;
    word-break: break-word;
}

.ed-contact__list a:hover {
    color: var(--ed-accent);
}

.ed-contact__note {
    display: flex;
    gap: 1rem;
    padding: 1.3rem 1.4rem;
    border-radius: 16px;
    background: var(--ed-paper-2);
    border: 1px solid var(--ed-line);
    color: var(--ed-ink-soft);
    font-size: .93rem;
    line-height: 1.6;
}

.ed-contact__note i {
    font-size: 1.6rem;
    color: var(--ed-accent);
}

.ed-contact__note strong {
    display: block;
    color: var(--ed-ink);
    margin-bottom: .25rem;
}

.ed-contact__card {
    background: var(--ed-cream);
    border: 1px solid var(--ed-line);
    border-radius: 22px;
    padding: clamp(24px, 3vw, 40px);
    box-shadow: var(--ed-shadow-md);
}

.ed-contact__card h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 1.4rem;
}

.ed-contact__card .form-label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--ed-ink);
}

.ed-contact__card .form--control {
    background-color: #fff;
}

.ed-contact__card input.form--control {
    height: 50px;
}

.ed-contact__map {
    margin-top: 4rem;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--ed-line);
    background: var(--ed-paper-2);
    height: 380px;
}

.ed-contact__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(.35) sepia(.12);
}

/* ---------- Texto largo (políticas, cookies) ------------------------------ */

.ed-prose {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--ed-ink-soft);
}

.ed-prose > :first-child {
    margin-top: 0;
}

.ed-prose h1,
.ed-prose h2,
.ed-prose h3,
.ed-prose h4,
.ed-prose h5 {
    color: var(--ed-ink);
    font-weight: 500;
    line-height: 1.2;
    margin: 2.4rem 0 .8rem;
}

.ed-prose h2 { font-size: 1.7rem; }
.ed-prose h3 { font-size: 1.4rem; }
.ed-prose h4, .ed-prose h5 { font-size: 1.2rem; }

.ed-prose p,
.ed-prose ul,
.ed-prose ol {
    margin: 0 0 1.1rem;
}

.ed-prose ul,
.ed-prose ol {
    padding-left: 1.3rem;
}

.ed-prose ul li {
    list-style: disc;
    margin-bottom: .35rem;
}

.ed-prose ol li {
    list-style: decimal;
    margin-bottom: .35rem;
}

.ed-prose a {
    color: var(--ed-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ed-prose em:first-child {
    display: inline-block;
    color: var(--ed-muted);
    font-size: .95rem;
}

.ed-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ---------- Paleta de botones del panel (armonizada con la editorial) ------ */

.btn--primary { background-color: #2f4858 !important; color: #fff !important; }
.btn--primary:hover { background-color: #253a47 !important; }
.btn--info { background-color: #45627a !important; color: #fff !important; }
.btn--info:hover { background-color: #3a5468 !important; }
.btn--success { background-color: #3d6b4f !important; color: #fff !important; }
.btn--success:hover { background-color: #325a42 !important; }
.btn--warning { background-color: #b0762f !important; color: #fff !important; }
.btn--warning:hover { background-color: #9a6628 !important; }
.btn--danger { background-color: #a8322d !important; color: #fff !important; }
.btn--danger:hover { background-color: #922b27 !important; }
.btn--dark { background-color: var(--ed-ink) !important; color: #fff !important; }
.btn--dark:hover { background-color: #000 !important; }

.btn.btn--sm {
    border-radius: 999px;
    padding: .38rem .85rem;
    font-size: .8rem;
}

.ed-cover-empty {
    background:
        repeating-linear-gradient(135deg, rgba(29, 26, 22, .035) 0 12px, transparent 12px 24px),
        var(--ed-paper-2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ed-cover-empty__hint {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--ed-muted);
    font-size: .92rem;
    padding: 0 1rem;
    text-align: center;
}

.ed-cover-empty__hint i {
    font-size: 1.4rem;
}

.user-area .user-wrapper .content p,
.user-area .user-header-status span,
.user-area .user-header-status .ratings {
    color: rgba(253, 251, 247, .7) !important;
}
