/* AudioSpace Book Profiles – frontend */

.asbp-profile-complete .product_meta .posted_in,
.asbp-profile-complete .product_meta .tagged_as {
    display: none !important;
}

.asbp-linked-meta a,
.asbp-facts a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(246, 93, 78, .45);
    transition: color .2s ease, text-decoration-color .2s ease;
}

.asbp-linked-meta a:hover,
.asbp-facts a:hover {
    color: var(--primary, #F65D4E);
    text-decoration-color: currentColor;
}

/* Main editorial area */
.asbp-book-profile {
    margin: 34px 0 44px;
    padding: 30px 0 6px;
    border-top: 1px solid rgba(0, 0, 0, .075);
    color: var(--text, #444);
}

.asbp-book-profile__inner {
    max-width: 940px;
    margin: 0 auto;
}

/* Keep a clear hierarchy below the 36px product H1 from Bookory. */
.asbp-book-profile h2 {
    margin: 0 0 16px;
    color: var(--accent, #000);
    font-size: clamp(23px, 2vw, 28px);
    line-height: 1.24;
    font-weight: 650;
    letter-spacing: -.02em;
}

.asbp-book-profile__inner > section:not(.asbp-facts) > h2::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    margin-top: 10px;
    border-radius: 999px;
    background: var(--primary, #F65D4E);
}

.asbp-book-profile section + section {
    margin-top: 38px;
}

.asbp-book-profile section > p,
.asbp-book-profile section > div > p {
    font-size: 15px;
    line-height: 1.78;
}

.asbp-book-profile section > p:last-child,
.asbp-book-profile section > div > p:last-child {
    margin-bottom: 0;
}

/* Short AudioSpace lead – visually distinct from the publisher annotation. */
.asbp-intro {
    max-width: 860px;
    margin: 0 0 26px;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--primary, #F65D4E);
    font-size: 16px;
    line-height: 1.72;
    color: #373737;
}

.asbp-intro p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* Curated bibliographic facts */
.asbp-facts {
    margin: 24px 0 38px;
    padding: 24px 26px 22px;
    border: 1px solid rgba(0, 0, 0, .075);
    border-radius: 14px;
    background: #fafafa;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .035);
}

.asbp-facts h2 {
    margin: 0 0 18px;
    font-size: clamp(22px, 1.7vw, 26px);
}

.asbp-facts dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 22px;
    margin: 0;
}

.asbp-facts dl > div {
    min-width: 0;
    padding: 12px 0 13px;
    border-top: 1px solid rgba(0, 0, 0, .065);
}

.asbp-facts dl > div:nth-child(-n+4) {
    border-top: 0;
    padding-top: 2px;
}

.asbp-facts .asbp-fact-wide {
    grid-column: 1 / -1;
}

.asbp-facts dt {
    margin: 0 0 4px;
    color: #888;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.asbp-facts dd {
    margin: 0;
    color: #222;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Themes, characters, awards and adaptations */
.asbp-list {
    display: grid;
    gap: 12px;
}

.asbp-list-themes,
.asbp-list-characters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asbp-list-item {
    position: relative;
    padding: 15px 17px 15px 19px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .075);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .022);
}

.asbp-list-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: rgba(246, 93, 78, .72);
}

.asbp-list-item strong {
    display: block;
    color: #242424;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 650;
}

.asbp-list-item p {
    margin: 5px 0 0;
    color: #666;
    font-size: 13px !important;
    line-height: 1.62 !important;
}

/* Series */
.asbp-series-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.asbp-series-list li {
    padding: 13px 15px;
    border: 1px solid rgba(0, 0, 0, .075);
    border-radius: 9px;
    background: #fff;
}

/* FAQ */
.asbp-faq details {
    margin: 0 0 9px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 9px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.asbp-faq details:last-child {
    margin-bottom: 0;
}

.asbp-faq details[open] {
    border-color: rgba(246, 93, 78, .28);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .03);
}

.asbp-faq summary {
    position: relative;
    padding: 13px 44px 13px 15px;
    cursor: pointer;
    color: #282828;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    list-style: none;
    transition: color .2s ease, background .2s ease;
}

.asbp-faq summary::-webkit-details-marker {
    display: none;
}

.asbp-faq summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border-radius: 50%;
    background: rgba(246, 93, 78, .09);
    color: var(--primary, #F65D4E);
    font-size: 17px;
    line-height: 21px;
    text-align: center;
    font-weight: 500;
}

.asbp-faq details[open] summary::after {
    content: "−";
}

.asbp-faq summary:hover {
    color: var(--primary, #F65D4E);
    background: rgba(246, 93, 78, .025);
}

.asbp-faq details > div {
    padding: 0 15px 14px;
    color: #666;
}

.asbp-faq details > div p {
    margin: 0;
    font-size: 13px !important;
    line-height: 1.65 !important;
}

/* Keep the publisher annotation visually secondary to the AudioSpace profile. */
.asbp-profile-complete .woocommerce-tabs {
    margin-top: 34px;
}

.asbp-profile-complete .woocommerce-tabs ul.tabs li a {
    font-size: 13px;
}

.asbp-profile-complete .woocommerce-tabs .woocommerce-Tabs-panel {
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 991px) {
    .asbp-book-profile__inner {
        max-width: 100%;
    }

    .asbp-facts dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asbp-facts dl > div:nth-child(-n+4) {
        border-top: 1px solid rgba(0, 0, 0, .065);
        padding-top: 12px;
    }

    .asbp-facts dl > div:nth-child(-n+2) {
        border-top: 0;
        padding-top: 2px;
    }
}

@media (max-width: 767px) {
    .asbp-book-profile {
        margin-top: 26px;
        padding-top: 24px;
    }

    .asbp-book-profile h2 {
        margin-bottom: 13px;
        font-size: 23px;
        line-height: 1.3;
    }

    .asbp-book-profile__inner > section:not(.asbp-facts) > h2::after {
        margin-top: 8px;
    }

    .asbp-book-profile section + section {
        margin-top: 31px;
    }

    .asbp-intro {
        margin-bottom: 22px;
        padding-left: 14px;
        font-size: 15px;
        line-height: 1.68;
    }

    .asbp-facts {
        margin-bottom: 30px;
        padding: 19px 18px 17px;
        border-radius: 12px;
    }

    .asbp-facts h2 {
        font-size: 22px;
    }

    .asbp-facts dl {
        grid-template-columns: 1fr;
    }

    .asbp-facts dl > div,
    .asbp-facts dl > div:nth-child(-n+4),
    .asbp-facts dl > div:nth-child(-n+2) {
        padding: 10px 0 11px;
        border-top: 1px solid rgba(0, 0, 0, .065);
    }

    .asbp-facts dl > div:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .asbp-list-themes,
    .asbp-list-characters {
        grid-template-columns: 1fr;
    }

    .asbp-list-item {
        padding: 14px 15px 14px 17px;
    }

    .asbp-faq summary {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}


/* Review UX -------------------------------------------------------------- */
/* Bookory renders an empty star container + numeric zero on product cards.
   reviews.js adds this class for static and AJAX-loaded widgets/carousels. */
.count-review.asbp-empty-rating {
    display: none !important;
}

.asbp-product-no-reviews .review-title > sup.count {
    display: none !important;
}

.asbp-product-no-reviews .woocommerce-tabs #reviews,
.asbp-product-no-reviews .single-product-reviews-wrap {
    --asbp-review-accent: var(--primary, #F65D4E);
}

.asbp-product-no-reviews #reviews .woocommerce-noreviews,
.asbp-product-no-reviews #reviews .comment-notes {
    color: #6c6c6c;
}

.asbp-partner-rating__card {
    display: grid;
    grid-template-columns: auto minmax(150px, 220px) auto;
    align-items: center;
    gap: 12px 18px;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, .075);
    border-radius: 12px;
    background: #fafafa;
}

.asbp-partner-rating__score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.asbp-partner-rating__score strong {
    color: #222;
    font-size: 28px;
    line-height: 1;
}

.asbp-partner-rating__score span,
.asbp-partner-rating__count {
    color: #777;
    font-size: 13px;
}

.asbp-partner-rating__stars {
    position: relative;
    width: 108px;
    height: 20px;
    overflow: hidden;
}

.asbp-partner-rating__stars::before,
.asbp-partner-rating__stars > span::before {
    content: "★★★★★";
    position: absolute;
    inset: 0;
    font-size: 19px;
    line-height: 20px;
    letter-spacing: 2px;
    white-space: nowrap;
}

.asbp-partner-rating__stars::before {
    color: #ddd;
}

.asbp-partner-rating__stars > span {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
}

.asbp-partner-rating__stars > span::before {
    color: #f1b500;
}

.asbp-partner-rating__card > p {
    grid-column: 1 / -1;
    margin: 0;
    color: #777;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

@media (max-width: 767px) {
    .asbp-partner-rating__card {
        grid-template-columns: auto 1fr;
        gap: 10px 14px;
    }

    .asbp-partner-rating__count {
        grid-column: 1 / -1;
    }
}
