
/* =========================================================
   FICHA DE LIBRO — LAPIGAMES
   ========================================================= */

.book-detail-page {
    --book-navy: #101f32;
    --book-gold: #b67b19;
    --book-cream: #f5f0e5;
    --book-muted: #666b70;
    --book-line: rgba(16, 31, 50, 0.18);

    min-height: 70vh;
    padding: 28px 0 64px;
    background: var(--book-cream);
    color: var(--book-navy);
}

.book-detail-page *,
.book-detail-page *::before,
.book-detail-page *::after {
    box-sizing: border-box;
}

.book-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 1500px;
    margin: 0 auto 26px;
    letter-spacing: 0.025em;
    max-width: 1180px;
  
  color: #777;
  font-size: 10px;
  line-height: 1.4;
}

#breadcrumb-title {
    padding: 4px 8px;
  background: #ebe7de;
  border-radius: 3px;
  color: #555;
}

.book-breadcrumb a,
.book-text-link {
    text-decoration: none;
}

.book-breadcrumb a:hover,
.book-text-link:hover {
    text-decoration: underline;
}

.book-breadcrumb span:last-child {
    overflow-wrap: anywhere;
}

.book-message {
    max-width: 1500px;
    min-height: 200px;
    margin: 0 auto;
    padding: 48px 0;
}

.book-message[hidden] {
    display: none;
}

.book-product,
.book-about,
.book-back-link {
    max-width: 1500px;
    margin-right: auto;
    margin-left: auto;
}

/* Zona principal: galería + información */

.book-product {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(32px, 4vw, 64px);
}

.book-gallery {
    min-width: 0;
}

.book-gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    padding: 28px;
    background: rgba(226, 217, 197, 0.38);
}

.book-gallery-main img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 15px 17px rgba(0, 0, 0, 0.14));
    transition: opacity 0.2s ease;
}

.book-gallery-main img[hidden] {
    display: none;
}

.book-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.book-gallery-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 88px;
    padding: 5px;
    border: 1px solid var(--book-line);
    background: transparent;
    cursor: pointer;
}

.book-gallery-thumbnail.active {
    border: 2px solid var(--book-gold);
}

.book-gallery-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.book-gallery-thumbnail:focus-visible,
.book-edition-store:focus-visible,
.book-share-button:focus-visible {
    outline: 2px solid var(--book-gold);
    outline-offset: 3px;
}

/* Información del libro */

.book-product-info {
    min-width: 0;
    padding-top: 4px;
}

.book-eyebrow {
    margin: 0 0 12px;
    color: var(--book-gold);
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.book-product-info h1 {
    margin: 0;
    color: var(--book-navy);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.book-author {
    margin: 12px 0 0;
    font-size: 1rem;
}

.book-gold-rule {
    width: 38px;
    height: 3px;
    margin: 22px 0 16px;
    background: var(--book-gold);
}

.book-tagline {
    margin: 0 0 18px;
    color: #a96809;
    font-size: 1.08rem;
    line-height: 1.5;
}

.book-description {
    margin: 0;
    color: var(--book-navy);
    font-size: 0.97rem;
    line-height: 1.8;
    white-space: pre-line;
}

/* Datos rápidos */

.book-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 26px 0 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--book-line);
}

.book-highlight {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 82px;
}

.book-highlight-label {
    color: var(--book-muted);
    font-size: 0.7rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.book-highlight-value {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Ediciones */

.book-editions-section h2 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.035em;
}

.book-editions-intro {
    margin: 8px 0 16px;
    color: var(--book-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.book-editions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.book-edition {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 10px;
    border: 1px solid var(--book-line);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.16);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.book-edition:hover {
    transform: translateY(-3px);
    border-color: rgba(182, 123, 25, 0.65);
    box-shadow: 0 8px 18px rgba(16, 31, 50, 0.07);
}

.book-edition-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    margin-bottom: 14px;
}

.book-edition-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.12));
}

.book-edition-name {
    margin: 0 0 6px;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.4;
    text-transform: uppercase;
}

.book-edition-format {
    margin: 0 0 5px;
    color: var(--book-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.book-edition-price {
    margin: auto 0 5px;
    padding-top: 4px;
    font-size: 0.92rem;
    font-weight: 800;
}

.book-edition-store {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 10px 8px;
    border: 1px solid var(--book-gold);
    border-radius: 3px;
    background: var(--book-gold);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.book-edition-store:hover {
    background: transparent;
    color: var(--book-navy);
}

.book-edition-unavailable {
    margin: auto 0 0;
    padding-top: 8px;
    color: var(--book-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.book-edition-infome {
    margin: auto 0 0;
    text-align: center;
    padding-top: 8px;
    color: var(--book-gold);
    font-size: 0.75rem;
    line-height: 1.5;
}

/* Parte inferior */

.book-about {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(30px, 5vw, 70px);
    margin-top: 38px;
    padding-top: 32px;
    border-top: 1px solid var(--book-gold);
}

.book-about-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.book-long-description p {
    margin: 0 0 17px;
    color: #27374a;
    font-size: 0.94rem;
    line-height: 1.85;
}

.book-details-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 24px;
    align-items: start;
    padding: 26px;
    background: rgba(226, 217, 197, 0.35);
    border-radius: 3px;
}

.book-details-data dl {
    margin: 0;
}

.book-details-data dl div {
    margin-bottom: 16px;
}

.book-details-data dt {
    margin-bottom: 4px;
    font-size: 0.83rem;
    font-weight: 800;
}

.book-details-data dd {
    margin: 0;
    color: #334154;
    font-size: 0.87rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.book-interior-figure {
    min-width: 0;
    margin: 0;
}

.book-interior-figure img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 3px;
}

.book-interior-figure figcaption {
    margin-top: 8px;
    color: var(--book-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.book-interior-figure[hidden],
.book-quote[hidden] {
    display: none;
}

.book-quote {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid var(--book-line);
}

.book-quote p {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
}

.book-quote cite {
    color: var(--book-muted);
    font-size: 0.83rem;
    font-style: normal;
}

.book-share {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--book-line);
}

.book-share-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--book-navy);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.book-copy-feedback {
    display: block;
    margin-top: 8px;
    color: var(--book-muted);
    font-size: 0.8rem;
}

.book-back-link {
    margin-top: 38px;
    font-size: 0.83rem;
    font-weight: 700;
    text-transform: uppercase;
}

.book-back-link .book-text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */

@media (max-width: 1100px) {
    .book-product {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 30px;
    }

    .book-gallery-main {
        min-height: 420px;
    }

    .book-gallery-main img {
        height: 400px;
    }

    .book-editions {
        grid-template-columns: 1fr;
    }

    .book-edition {
        display: grid;
        grid-template-columns: 85px minmax(0, 1fr);
        column-gap: 14px;
        align-items: center;
    }

    .book-edition-cover {
        grid-row: 1 / span 5;
        height: 120px;
        margin: 0;
    }

    .book-edition-name,
    .book-edition-format,
    .book-edition-price {
        margin-bottom: 5px;
    }

    .book-edition-price {
        margin-top: 0;
    }

    .book-edition-store,
    .book-edition-unavailable {
        grid-column: 2;
        margin-top: 6px;
    }
}

@media (max-width: 760px) {
    .book-detail-page {
        padding: 22px 0 46px;
    }

    .book-product,
    .book-about {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .book-gallery-main {
        min-height: 0;
        height: min(110vw, 520px);
        padding: 20px;
    }

    .book-gallery-main img {
        height: 100%;
    }

    .book-product-info h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .book-editions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .book-edition {
        display: flex;
        padding: 10px 8px;
    }

    .book-edition-cover {
        height: 120px;
        margin-bottom: 12px;
    }

    .book-edition-store,
    .book-edition-unavailable {
        grid-column: auto;
    }

    .book-details-panel {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .book-quote {
        grid-column: auto;
    }
}

@media (max-width: 460px) {
    .book-editions {
        grid-template-columns: 1fr;
    }

    .book-edition {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        column-gap: 14px;
    }

    .book-edition-cover {
        grid-row: 1 / span 5;
        height: 125px;
        margin: 0;
    }

    .book-edition-name {
        margin-bottom: 4px;
    }

    .book-edition-store,
    .book-edition-unavailable {
        grid-column: 2;
    }

    .book-highlights {
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-gallery-main img,
    .book-edition,
    .book-edition-store {
        transition: none;
    }
}


/* Frase editorial bajo la galería */

.book-editorial-quote {
    margin-top: 30px;
    padding: 22px 24px 20px;
    border-top: 1px solid var(--book-gold);
    border-bottom: 1px solid var(--book-line);
}

.book-editorial-quote[hidden] {
    display: none;
}

.book-editorial-label {
    margin: 0 0 12px;
    color: var(--book-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.book-editorial-quote blockquote {
    margin: 0;
    color: var(--book-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 1.7vw, 1.5rem);
    font-style: italic;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .book-editorial-quote {
        margin-top: 22px;
        padding: 18px 16px;
    }
}
