/* Chile Psicólogos - Libros Woo Modernos */

body.chp-book-modern {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--chp-book-soft) 72%, transparent), transparent 34rem),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
    color: #172033;
}

body.chp-book-modern * {
    box-sizing: border-box;
}

/* Plantilla propia */
.chp-book-template {
    --chp-book-text: #172033;
    --chp-book-muted: #667085;
    --chp-book-border: rgba(32, 40, 79, .10);
    --chp-book-shadow: 0 24px 70px rgba(15, 23, 42, .12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--chp-book-text);
}

.chp-book-template a {
    color: var(--chp-book-primary);
    text-decoration: none;
}

.chp-book-shell {
    width: min(calc(100% - 32px), var(--chp-book-max-width));
    margin: 0 auto;
    padding: clamp(24px, 4vw, 58px) 0 clamp(54px, 7vw, 90px);
}

.chp-book-breadcrumb {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--chp-book-muted);
}

.chp-book-notices .woocommerce-message,
.chp-book-notices .woocommerce-info,
.chp-book-notices .woocommerce-error {
    border-radius: 18px;
    border-top: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.chp-book-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 58px);
    align-items: start;
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid var(--chp-book-border);
    border-radius: 34px;
    background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--chp-book-accent) 16%, transparent), transparent 22rem),
        radial-gradient(circle at 96% 6%, color-mix(in srgb, var(--chp-book-primary) 12%, transparent), transparent 18rem),
        rgba(255, 255, 255, .90);
    box-shadow: var(--chp-book-shadow);
    backdrop-filter: blur(18px);
}

.chp-book-hero::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    pointer-events: none;
}

.chp-book-media-col,
.chp-book-info-col {
    position: relative;
    z-index: 1;
}

.chp-book-cover-card {
    position: sticky;
    top: 28px;
}

.chp-book-cover-frame {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: clamp(18px, 3vw, 26px);
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .55)),
        linear-gradient(135deg, color-mix(in srgb, var(--chp-book-soft) 78%, #ffffff), #ffffff);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.88), 0 22px 44px rgba(17, 24, 39, .14);
}

.chp-book-cover-frame::after {
    content: "";
    position: absolute;
    inset: auto 18% 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .18);
    filter: blur(18px);
}

.chp-book-cover-img,
.chp-book-cover-frame img {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 310px);
    height: auto;
    max-height: 520px;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 22px 34px rgba(15, 23, 42, .24);
}

.chp-book-gallery-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 4px 2px;
    scrollbar-width: thin;
}

.chp-book-gallery-thumb {
    width: 64px;
    height: 74px;
    padding: 4px;
    border: 1px solid var(--chp-book-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.chp-book-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.chp-book-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.chp-book-eyebrow span,
.chp-book-eyebrow strong,
.chp-book-section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--chp-book-soft) 84%, #fff);
    color: var(--chp-book-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.chp-book-eyebrow strong {
    background: color-mix(in srgb, var(--chp-book-accent) 14%, #fff);
    color: var(--chp-book-accent);
}

.chp-book-title {
    max-width: 780px;
    margin: 0 0 10px;
    color: var(--chp-book-primary);
    font-size: clamp(31px, 4.5vw, 54px);
    line-height: 1.08;
    letter-spacing: -.028em;
    font-weight: 650;
}

.chp-book-author {
    margin: 0 0 18px;
    color: var(--chp-book-muted);
    font-size: clamp(16px, 2vw, 18px);
}

.chp-book-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    color: var(--chp-book-muted);
    font-weight: 500;
}

.chp-book-stars .star-rating,
body.chp-book-modern .star-rating {
    float: none;
    margin: 0;
}

.chp-book-stars .star-rating::before,
body.chp-book-modern .star-rating::before {
    color: #d6d6d6 !important;
}

.chp-book-stars .star-rating span::before,
body.chp-book-modern .star-rating span::before {
    color: #f4c21d !important;
}

.chp-book-muted {
    color: var(--chp-book-muted);
    font-weight: 500;
}

.chp-book-excerpt {
    max-width: 760px;
    margin: 0 0 24px;
    color: #344054;
    font-size: 17px;
    line-height: 1.72;
}

.chp-book-excerpt p,
.chp-book-content-body p {
    margin: 0 0 1em;
}

.chp-book-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.chp-book-trust-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    min-height: 86px;
    padding: 15px;
    border: 1px solid var(--chp-book-border);
    border-radius: 20px;
    background: rgba(255,255,255,.74);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.chp-book-trust-card span {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--chp-book-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
}

.chp-book-trust-card p {
    margin: 0;
    color: #465065;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
}

.chp-book-buy-card {
    display: grid;
    grid-template-columns: minmax(190px, auto) 1fr;
    gap: 16px;
    align-items: center;
    margin-top: 22px;
    padding: clamp(16px, 3vw, 24px);
    border: 1px solid color-mix(in srgb, var(--chp-book-accent) 18%, transparent);
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--chp-book-soft) 54%, #ffffff));
    box-shadow: 0 18px 44px rgba(15, 23, 42, .10);
}

.chp-book-price-label {
    display: block;
    margin-bottom: 4px;
    color: var(--chp-book-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.chp-book-price,
.chp-book-price .amount,
.chp-book-price ins .amount {
    color: var(--chp-book-primary);
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1;
    font-weight: 650;
    text-decoration: none;
}

.chp-book-price del,
.chp-book-related-price del {
    display: block;
    margin: 0 0 6px;
    opacity: .55;
    font-size: .58em;
    font-weight: 500;
}

.chp-book-price del .amount,
.chp-book-related-price del .amount {
    font-size: 1em;
    font-weight: 500;
}

.chp-book-price ins,
.chp-book-related-price ins {
    display: block;
    text-decoration: none;
}

.chp-book-price ins .amount,
.chp-book-related-price ins .amount {
    font-size: 1em;
    font-weight: 700;
}

.chp-book-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chp-book-action form.cart {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.chp-book-buy-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    text-align: center;
}

.chp-book-action .quantity input.qty {
    width: 86px;
    min-height: 54px;
    border: 1px solid var(--chp-book-border);
    border-radius: 16px;
    background: #fff;
    color: var(--chp-book-primary);
    font-weight: 560;
}

.chp-book-action .single_add_to_cart_button,
.chp-book-action .button,
.chp-book-template a.button,
body.chp-book-modern .button,
body.chp-book-modern button.button,
body.chp-book-modern input.button {
    min-height: 54px;
    padding: 15px 24px !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, var(--chp-book-accent), color-mix(in srgb, var(--chp-book-primary) 74%, var(--chp-book-accent))) !important;
    color: #fff !important;
    box-shadow: 0 14px 28px color-mix(in srgb, var(--chp-book-accent) 28%, transparent);
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: .01em;
    text-transform: none !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.chp-book-action .single_add_to_cart_button:hover,
.chp-book-action .button:hover,
.chp-book-template a.button:hover,
body.chp-book-modern .button:hover,
body.chp-book-modern button.button:hover,
body.chp-book-modern input.button:hover {
    transform: translateY(-2px);
    filter: saturate(1.06);
    box-shadow: 0 18px 34px color-mix(in srgb, var(--chp-book-accent) 38%, transparent);
}

.chp-book-stock {
    grid-column: 1 / -1;
    color: #256f46;
    font-size: 14px;
    font-weight: 600;
}

.chp-book-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 24px;
    margin-top: 26px;
}

.chp-book-panel {
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--chp-book-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.chp-book-panel h2,
.chp-book-related h2 {
    margin: 12px 0 18px;
    color: var(--chp-book-primary);
    font-size: clamp(24px, 2.8vw, 34px);
    line-height: 1.14;
    letter-spacing: -.02em;
    font-weight: 600;
}

.chp-book-content-body {
    color: #344054;
    font-size: 16.5px;
    line-height: 1.78;
}

.chp-book-content-body h1,
.chp-book-content-body h2,
.chp-book-content-body h3,
.chp-book-content-body h4 {
    margin: 1.25em 0 .55em;
    color: var(--chp-book-primary);
    font-weight: 700;
    letter-spacing: -.025em;
}

.chp-book-content-body h1 { font-size: clamp(28px, 3.5vw, 42px); }
.chp-book-content-body h2 { font-size: clamp(23px, 3vw, 32px); }
.chp-book-content-body h3 { font-size: clamp(20px, 2.5vw, 26px); }

.chp-book-content-body ul,
.chp-book-content-body ol {
    padding-left: 1.25em;
}

.chp-book-rating-breakdown {
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid var(--chp-book-border);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), color-mix(in srgb, var(--chp-book-soft) 42%, #fff));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 14px 28px rgba(15, 23, 42, .06);
}

.chp-book-rating-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.chp-book-rating-summary-score {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    color: var(--chp-book-primary);
    font-size: 29px;
    font-weight: 650;
    line-height: 1;
}

.chp-book-stars-large .star-rating {
    font-size: 1.08rem;
}

.chp-book-rating-summary-meta p {
    margin: 8px 0 0;
    color: var(--chp-book-muted);
    font-size: 14px;
    font-weight: 500;
}

.chp-book-rating-bars {
    display: grid;
    gap: 9px;
}

.chp-book-rating-bar-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) 82px;
    gap: 10px;
    align-items: center;
}

.chp-book-rating-bar-stars {
    display: flex;
    gap: 2px;
    font-size: 18px;
    line-height: 1;
}

.chp-book-rating-bar-stars span {
    color: #d6d6d6;
}

.chp-book-rating-bar-stars span.is-filled {
    color: #f4c21d;
}

.chp-book-rating-bar-track {
    position: relative;
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(244, 194, 29, .18);
}

.chp-book-rating-bar-track span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #f4c21d, #f59e0b);
}

.chp-book-rating-bar-values {
    color: var(--chp-book-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.chp-book-data-panel {
    position: relative;
    overflow: hidden;
}

.chp-book-data-panel::before {
    content: '';
    position: absolute;
    top: -44px;
    right: -52px;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--chp-book-accent) 18%, #fff) 0%, transparent 68%);
    pointer-events: none;
}

.chp-book-data-list {
    position: relative;
    z-index: 1;
}

.chp-book-data-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.chp-book-data-list > div {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 14px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--chp-book-border);
    border-radius: 16px;
}

.chp-book-data-list > div:nth-child(odd) {
    background: rgba(248, 250, 252, .92);
}

.chp-book-data-list > div:last-child {
    border-bottom: 0;
}

.chp-book-data-list dt {
    margin: 0;
    color: var(--chp-book-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.chp-book-data-list dd {
    margin: 0;
    color: var(--chp-book-primary);
    font-size: 14.5px;
    font-weight: 600;
}

.chp-book-attributes {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--chp-book-border);
}

.chp-book-attributes h3 {
    margin: 0 0 12px;
    color: var(--chp-book-primary);
    font-size: 18px;
}

.chp-book-attributes table,
.chp-book-content-body table {
    width: 100%;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--chp-book-border);
    border-radius: 18px;
    background: #fff;
}

.chp-book-attributes th,
.chp-book-attributes td,
.chp-book-content-body th,
.chp-book-content-body td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--chp-book-border);
    text-align: left;
    vertical-align: top;
}

.chp-book-attributes tr:last-child th,
.chp-book-attributes tr:last-child td,
.chp-book-content-body tr:last-child th,
.chp-book-content-body tr:last-child td {
    border-bottom: 0;
}

.chp-book-related {
    margin-top: clamp(32px, 5vw, 58px);
}

.chp-book-related-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.chp-book-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.chp-book-related-card {
    overflow: hidden;
    border: 1px solid var(--chp-book-border);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.chp-book-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, .13);
}

.chp-book-related-img {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--chp-book-soft) 52%, #fff), #fff);
}

.chp-book-related-img img {
    width: auto;
    max-width: 100%;
    max-height: 225px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 14px 25px rgba(15,23,42,.16);
}

.chp-book-related-body {
    padding: 16px;
}

.chp-book-related-body h3 {
    min-height: 48px;
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 500;
    color: var(--chp-book-primary);
}

.chp-book-related-body h3 a {
    color: inherit;
}

.chp-book-related-price {
    min-height: 28px;
    margin-bottom: 12px;
    color: var(--chp-book-primary);
    font-weight: 700;
}

.chp-book-mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--chp-book-primary) 9%, #fff);
    color: var(--chp-book-primary) !important;
    font-size: 14px;
    font-weight: 700;
}

/* Modo CSS sobre Elementor / WooCommerce existente */
body.chp-book-modern-css-mode .elementor-location-single,
body.chp-book-modern-css-mode main.site-main,
body.chp-book-modern-css-mode .site-main,
body.chp-book-modern-css-mode .content-area {
    background:
        radial-gradient(circle at 7% 10%, color-mix(in srgb, var(--chp-book-soft) 78%, transparent), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
}

body.chp-book-modern-css-mode.woocommerce div.product,
body.chp-book-modern-css-mode .woocommerce div.product,
body.chp-book-modern-css-mode .elementor-widget-woocommerce-product-content,
body.chp-book-modern-css-mode .elementor-widget-woocommerce-product-short-description {
    color: #344054;
}

body.chp-book-modern-css-mode.woocommerce div.product,
body.chp-book-modern-css-mode .woocommerce div.product {
    width: min(calc(100% - 32px), var(--chp-book-max-width));
    margin: clamp(24px, 5vw, 54px) auto;
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid rgba(32, 40, 79, .10);
    border-radius: 34px;
    background:
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--chp-book-primary) 11%, transparent), transparent 18rem),
        rgba(255,255,255,.92);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

body.chp-book-modern-css-mode .elementor-widget-theme-post-featured-image img,
body.chp-book-modern-css-mode .woocommerce-product-gallery img,
body.chp-book-modern-css-mode img.wp-post-image {
    border-radius: 22px !important;
    box-shadow: 0 22px 44px rgba(15, 23, 42, .18) !important;
}

body.chp-book-modern-css-mode .product_title,
body.chp-book-modern-css-mode .elementor-heading-title,
body.chp-book-modern-css-mode .elementor-widget-woocommerce-product-title .elementor-heading-title {
    color: var(--chp-book-primary) !important;
    font-size: clamp(31px, 4.5vw, 54px) !important;
    line-height: 1.08 !important;
    letter-spacing: -.028em !important;
    font-weight: 600 !important;
}

body.chp-book-modern-css-mode .price,
body.chp-book-modern-css-mode .woocommerce-Price-amount {
    color: var(--chp-book-primary) !important;
    font-weight: 650 !important;
}

body.chp-book-modern-css-mode .price del {
    display: block;
    margin-bottom: 6px;
    font-size: .62em;
    opacity: .55;
}

body.chp-book-modern-css-mode .price ins {
    display: block;
    text-decoration: none !important;
    font-size: 1.24em;
}

body.chp-book-modern-css-mode .price ins .woocommerce-Price-amount {
    font-weight: 700 !important;
}

body.chp-book-modern-css-mode .star-rating::before {
    color: #d6d6d6 !important;
}

body.chp-book-modern-css-mode .star-rating span::before {
    color: #f4c21d !important;
}

body.chp-book-modern-css-mode .elementor-widget-woocommerce-product-add-to-cart,
body.chp-book-modern-css-mode form.cart {
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--chp-book-accent) 18%, transparent);
    border-radius: 22px;
    background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--chp-book-soft) 48%, #fff));
    box-shadow: 0 16px 38px rgba(15, 23, 42, .09);
}

body.chp-book-modern-css-mode .woocommerce-tabs,
body.chp-book-modern-css-mode .related.products,
body.chp-book-modern-css-mode .upsells.products,
body.chp-book-modern-css-mode .elementor-widget-woocommerce-product-data-tabs,
body.chp-book-modern-css-mode .elementor-widget-woocommerce-products {
    width: min(calc(100% - 32px), var(--chp-book-max-width));
    margin-inline: auto;
}

body.chp-book-modern-css-mode .related.products > h2,
body.chp-book-modern-css-mode .upsells.products > h2,
body.chp-book-modern-css-mode .elementor-widget-woocommerce-products h2,
body.chp-book-modern-css-mode .elementor-widget-heading h2 {
    color: var(--chp-book-primary) !important;
    font-weight: 700 !important;
    letter-spacing: -.02em !important;
}

body.chp-book-modern-css-mode ul.products li.product,
body.chp-book-modern-css-mode .elementor-grid .product {
    overflow: hidden;
    border: 1px solid rgba(32,40,79,.10) !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 16px 38px rgba(15,23,42,.08) !important;
    transition: transform .18s ease, box-shadow .18s ease;
}

body.chp-book-modern-css-mode ul.products li.product:hover,
body.chp-book-modern-css-mode .elementor-grid .product:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 54px rgba(15,23,42,.13) !important;
}

body.chp-book-modern-css-mode table,
body.chp-book-modern-css-mode .woocommerce-product-attributes {
    overflow: hidden;
    border: 1px solid rgba(32,40,79,.10) !important;
    border-radius: 18px !important;
    background: #fff !important;
}

body.chp-book-modern-css-mode .chp-book-js-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--chp-book-soft) 86%, #fff);
    color: var(--chp-book-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

@media (max-width: 1024px) {
    .chp-book-hero,
    .chp-book-content-grid {
        grid-template-columns: 1fr;
    }

    .chp-book-cover-card {
        position: relative;
        top: auto;
    }

    .chp-book-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .chp-book-shell {
        width: min(calc(100% - 22px), var(--chp-book-max-width));
        padding-top: 18px;
    }

    .chp-book-hero {
        padding: 16px;
        border-radius: 26px;
    }

    .chp-book-hero::before {
        display: none;
    }

    .chp-book-cover-frame {
        min-height: 300px;
        border-radius: 22px;
    }

    .chp-book-trust-grid,
    .chp-book-buy-card,
    .chp-book-related-grid {
        grid-template-columns: 1fr;
    }

    .chp-book-action form.cart {
        justify-content: stretch;
    }

    .chp-book-action .single_add_to_cart_button,
    .chp-book-action .button,
    .chp-book-template a.button {
        width: 100%;
    }

    .chp-book-panel {
        border-radius: 22px;
    }

    .chp-book-data-list > div {
        grid-template-columns: 1fr;
        gap: 5px;
        padding-inline: 12px;
    }

    .chp-book-rating-summary,
    .chp-book-rating-bar-row {
        grid-template-columns: 1fr;
    }

    .chp-book-rating-bar-values {
        text-align: left;
    }
}


/* Ajuste fino: tipografía más liviana y legible */
body.chp-book-modern,
.chp-book-template {
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.chp-book-template strong,
body.chp-book-modern strong {
    font-weight: 600;
}

.chp-book-section-kicker,
.chp-book-eyebrow span,
.chp-book-eyebrow strong,
.chp-book-price-label,
.chp-book-data-list dt,
body.chp-book-modern-css-mode .chp-book-js-badge {
    font-weight: 600 !important;
}

.chp-book-trust-card p,
.chp-book-data-list dd,
.chp-book-related-body h3,
.chp-book-mini-button {
    font-weight: 500 !important;
}

.chp-book-buy-button,
.chp-book-action .single_add_to_cart_button,
.chp-book-action .button,
.chp-book-template a.button,
body.chp-book-modern .button,
body.chp-book-modern button.button,
body.chp-book-modern input.button {
    font-weight: 700 !important;
}


/* Ajustes v1.0.3 */
.chp-book-title,
.chp-book-panel h2,
.chp-book-content-body h1,
.chp-book-content-body h2,
.chp-book-content-body h3,
.chp-book-attributes h3 {
    font-weight: 600;
}

.chp-book-buy-button,
.chp-book-action .single_add_to_cart_button,
.chp-book-action .button,
.chp-book-template a.button,
body.chp-book-modern .button,
body.chp-book-modern button.button,
body.chp-book-modern input.button {
    font-weight: 600 !important;
}

/* Ajustes v1.0.4: datos enriquecidos Buscalibre */
.chp-book-logistics-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.chp-book-logistics-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid var(--chp-book-border);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #465065;
    font-size: 13px;
    font-weight: 500;
}

.chp-book-logistics-pill.is-available {
    border-color: rgba(37, 111, 70, .18);
    background: rgba(236, 253, 245, .76);
    color: #256f46;
}

.chp-book-spec-group-title {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 20px 0 10px;
    color: var(--chp-book-primary);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.01em;
}

.chp-book-spec-group-title::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chp-book-accent), #f4c21d);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--chp-book-accent) 10%, transparent);
}

.chp-book-data-list dd a {
    color: var(--chp-book-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.chp-book-data-list.is-secondary {
    margin-top: 0;
}

.chp-book-source-note {
    position: relative;
    z-index: 1;
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--chp-book-soft) 56%, #fff);
    color: var(--chp-book-muted);
    font-size: 13px;
    line-height: 1.45;
}

.chp-book-author-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid var(--chp-book-border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--chp-book-accent) 12%, transparent), transparent 12rem),
        linear-gradient(135deg, #fff, color-mix(in srgb, var(--chp-book-soft) 42%, #fff));
    box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}

.chp-book-author-card img {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 12px 24px rgba(15,23,42,.13);
}

.chp-book-author-card h3 {
    margin: 10px 0 8px;
    color: var(--chp-book-primary);
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.15;
    font-weight: 600;
}

.chp-book-author-card p {
    margin: 0 0 10px;
    color: #344054;
    font-size: 15px;
    line-height: 1.65;
}

.chp-book-author-card a {
    display: inline-flex;
    align-items: center;
    margin-top: 2px;
    color: var(--chp-book-accent);
    font-size: 14px;
    font-weight: 600;
}

.chp-book-review-section {
    margin-top: 26px;
}

.chp-book-review-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.chp-book-review-head h2 {
    margin: 12px 0 8px;
    color: var(--chp-book-primary);
    font-size: clamp(24px, 2.8vw, 34px);
    line-height: 1.14;
    letter-spacing: -.02em;
    font-weight: 600;
}

.chp-book-review-head p {
    max-width: 720px;
    margin: 0;
    color: var(--chp-book-muted);
    font-size: 15.5px;
    line-height: 1.6;
}

.chp-book-review-score-card {
    display: grid;
    place-items: center;
    min-width: 94px;
    padding: 14px 16px;
    border: 1px solid rgba(244, 194, 29, .34);
    border-radius: 20px;
    background: rgba(255, 251, 235, .78);
    color: var(--chp-book-primary);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .06);
}

.chp-book-review-score-card strong {
    font-size: 30px;
    line-height: 1;
    font-weight: 650;
}

.chp-book-review-score-card span {
    margin-top: 4px;
    color: var(--chp-book-muted);
    font-size: 13px;
    font-weight: 500;
}

.chp-book-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.chp-book-review-card {
    min-height: 190px;
    padding: 18px;
    border: 1px solid var(--chp-book-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15,23,42,.07);
}

.chp-book-review-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1;
}

.chp-book-review-stars span {
    color: #d6d6d6;
}

.chp-book-review-stars span.is-filled {
    color: #f4c21d;
}

.chp-book-review-card p {
    margin: 0 0 16px;
    color: #344054;
    font-size: 15px;
    line-height: 1.62;
}

.chp-book-review-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    color: var(--chp-book-muted);
    font-size: 13px;
}

.chp-book-review-card footer strong {
    color: var(--chp-book-primary);
    font-weight: 600;
}

.chp-book-review-more {
    margin: 16px 0 0;
    color: var(--chp-book-muted);
    font-size: 14px;
}

@media (max-width: 1024px) {
    .chp-book-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .chp-book-author-card,
    .chp-book-review-grid,
    .chp-book-review-head {
        grid-template-columns: 1fr;
    }

    .chp-book-review-head {
        display: grid;
    }

    .chp-book-review-score-card {
        place-items: start;
        min-width: 0;
        width: 100%;
    }

    .chp-book-author-card img {
        width: 78px;
        height: 78px;
        border-radius: 20px;
    }
}

.chp-book-data-list dt,
.chp-book-data-list dd,
.chp-book-related-price,
.chp-book-mini-button {
    font-weight: 500;
}

.chp-book-data-list dd a,
.chp-book-price ins .amount,
.chp-book-related-price ins .amount {
    font-weight: 600;
}


/* v1.0.5 - Opiniones de usuarios: fallback y estados sin comentarios textuales */
.chp-book-review-fallback-body {
    padding: 18px;
    border: 1px solid var(--chp-book-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .78);
    color: #344054;
    font-size: 15.5px;
    line-height: 1.72;
}

.chp-book-review-fallback-body h2,
.chp-book-review-fallback-body h3 {
    margin: 0 0 12px;
    color: var(--chp-book-primary);
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.18;
    font-weight: 600;
}

.chp-book-review-fallback-body blockquote,
.chp-book-review-empty {
    margin: 14px 0 0;
    padding: 16px 18px;
    border-left: 4px solid #f4c21d;
    border-radius: 16px;
    background: #fffaf0;
    color: #344054;
}

.chp-book-review-empty p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.65;
}
