/* =========================================================
   Single product page (woocommerce/content-single-product.php
   and woocommerce/single-product/*). Loaded only on is_product().
   ========================================================= */

	/* =========================================
   PRODUCT PAGE
========================================= */

.product-page {
    padding: 24px 0 60px;
}

.product-page .rb-breadcrumbs {
    margin-bottom: 20px;
}

.product-page .rb-breadcrumbs__inner {
    font-size: 14px;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}


/* =========================================
   PRODUCT HERO
========================================= */

.product-hero {
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.25fr);
    gap: 28px;
}


/* =========================================
   PRODUCT GALLERY
========================================= */

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

.product-main-image {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
    background: #eef3f8;
    border: 1px solid var(--color-border);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;

    padding: 5px 10px;
    border-radius: 5px;

    background: var(--color-secondary);
    color: var(--color-primary);

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.image-preview-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 11px;

    border: 0;
    border-radius: 7px;

    background: rgba(255, 255, 255, 0.94);
    color: var(--color-text);

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: var(--transition);
}

.image-preview-btn:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.image-preview-btn svg {
    width: 17px;
    height: 17px;
}


/* =========================================
   THUMBNAILS
========================================= */

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.product-thumb {
    padding: 0;
    aspect-ratio: 1 / 0.72;

    overflow: hidden;

    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 7px;

    cursor: pointer;
    transition: var(--transition);
}

.product-thumb:hover,
.product-thumb.active {
    border-color: var(--color-primary);
}

.product-thumb.active {
    box-shadow: 0 0 0 1px var(--color-primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-main-image__img {
    transition: opacity 0.2s ease;
}

.product-thumb-more:hover {
    border-color: var(--color-primary);
}


/* =========================================
   GALLERY LIGHTBOX (assets/js/product-gallery.js)
========================================= */

body.rb-lightbox-open {
    overflow: hidden;
}

.rb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 70px;

    background: rgba(5, 14, 38, 0.92);
}

.rb-lightbox[hidden] {
    display: none;
}

.rb-lightbox__figure {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    margin: 0;
}

.rb-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.rb-lightbox__close,
.rb-lightbox__nav {
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: #fff;

    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.rb-lightbox__close:hover,
.rb-lightbox__nav:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.rb-lightbox__close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 26px;
}

.rb-lightbox__nav {
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    font-size: 30px;
}

.rb-lightbox__prev {
    left: 14px;
}

.rb-lightbox__next {
    right: 14px;
}

.rb-lightbox__count {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);

    color: rgba(255, 255, 255, 0.8);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
}

.rb-lightbox--single .rb-lightbox__nav,
.rb-lightbox--single .rb-lightbox__count {
    display: none;
}

@media (max-width: 600px) {

    .rb-lightbox {
        padding: 60px 12px;
    }

    .rb-lightbox__nav {
        top: auto;
        bottom: 10px;
        margin-top: 0;
        width: 40px;
        height: 40px;
    }

    .rb-lightbox__prev {
        left: 16px;
    }

    .rb-lightbox__next {
        right: 16px;
    }
}

.product-thumb-more {
    aspect-ratio: 1 / 0.72;

    border: 1px solid var(--color-border);
    border-radius: 7px;

    background: var(--color-light);
    color: var(--color-primary);

    font-family: 'Plus Jakarta Sans';
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}

/* =========================================
   PRODUCT INFO
========================================= */

.product-info {
    min-width: 0;
}

.product-meta-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 5px 10px;

    border-radius: 5px;

    background: #edf4ff;
    color: var(--color-primary);

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.product-tag.verified-tag {
    background: #edf9f1;
    color: #17803d;
}

.verified-tag svg {
    width: 15px;
    height: 15px;
}


.product-title {
    margin: 0 0 16px;

    font-family: 'Plus Jakarta Sans';
    font-size: clamp(28px, 2.5vw, 38px);
    line-height: 1.18;
    font-weight: 700;
    color: var(--color-heading);
}



/* =========================================
   SELLER
========================================= */

.product-seller {
    display: flex;
    align-items: center;
    gap: 10px;

    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.seller-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;

    overflow: hidden;
    border-radius: 50%;
    background: #eef2f7;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.seller-name {
    display: flex;
    align-items: center;
    gap: 4px;

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 700;
    color: var(--color-heading);
}

.seller-name a {
    color: inherit;
    text-decoration: none;
}

.seller-name a:hover {
    color: var(--color-primary);
}

.seller-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 15px;
    height: 15px;

    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
}

.seller-verified svg {
    width: 11px;
    height: 11px;
}

.seller-role {
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-light);
}


/* =========================================
   RATING
========================================= */

.product-rating-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;

    padding: 16px 0 18px;
}

.product-rating,
.product-sales {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 14px;
}

.product-rating strong {
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    color: var(--color-heading);
}

.product-rating span,
.product-sales {
    color: var(--color-text-light);
}

.rating-stars {
    color: #f5b900;
    font-size: 17px;
    letter-spacing: 1px;
    line-height: 1;
}

.product-sales svg {
    width: 17px;
    height: 17px;
}


/* =========================================
   DESCRIPTION
========================================= */

.product-description {
    margin: 0;

    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
}

/* Short description / main description are editor content, so they
   can hold paragraphs, lists and links. */
.product-info .product-description > *,
.overview-content .overview-description > * {
    margin: 0 0 10px;
}

.product-info .product-description > *:last-child,
.overview-content .overview-description > *:last-child {
    margin-bottom: 0;
}

.product-description ul,
.product-description ol,
.overview-description ul,
.overview-description ol {
    padding-left: 20px;
}

.overview-description li {
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-text);
}

.product-description a,
.overview-description a {
    color: var(--color-primary);
    text-decoration: underline;
}

.overview-description img {
    max-width: 100%;
    height: auto;
}

.overview-description h2,
.overview-description h3,
.overview-description h4,
.overview-description h5 {
    margin: 16px 0 6px;
    font-size: 15px;
}


/* =========================================
   ACTIONS
========================================= */

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 20px;
}

.wishlist-btn,
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 0;

    border: 0;
    background: transparent;

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 500;

    color: var(--color-text);

    cursor: pointer;
}

.wishlist-btn:hover,
.share-btn:hover {
    color: var(--color-primary);
}

.wishlist-btn svg,
.share-btn svg {
    width: 18px;
    height: 18px;
}


/* =========================================
   PRODUCT SPECS
========================================= */

.product-specs {
    display: grid;
    grid-template-columns: repeat(var(--spec-count, 7), minmax(0, 1fr));

    margin-top: 28px;

    border: 1px solid var(--color-border);
    border-radius: 10px;

    overflow: hidden;
    background: var(--color-white);
}

/* Dividers drawn with a shadow so they stay correct at any column
   count; the container's overflow clips the ones on the outer edge. */
.product-spec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    min-width: 0;
    min-height: 75px;
    padding: 15px;

    box-shadow: 1px 1px 0 var(--color-border);
}

.spec-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;

    color: #64748b;
}

.spec-icon svg {
    width: 100%;
    height: 100%;
}

.product-spec-item > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-spec-item span {
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-light);
}

.product-spec-item strong {
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    color: var(--color-heading);
}

/* =========================================
   PRODUCT CONTENT
========================================= */

.product-content {
    width: 100%;
}


/* =========================================
   SECTION NAVIGATION
========================================= */

.product-tabs {
    display: flex;
    align-items: center;

    border-bottom: 1px solid var(--color-border);

    background: var(--color-white);

    overflow-x: auto;
}

.product-tabs a {
    position: relative;

    display: flex;
    align-items: center;

    height: 50px;

    padding: 0 14px;

    white-space: nowrap;

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;

    color: #6b7280;

    transition: var(--transition);
}

.product-tabs a:hover {
    color: var(--color-primary);
}

.product-tabs a.active {
    color: var(--color-primary);
}

.product-tabs a.active::after {
    content: "";

    position: absolute;

    left: 14px;
    right: 14px;
    bottom: -1px;

    height: 2px;

    background: var(--color-secondary);
}


/* =========================================
   OVERVIEW
========================================= */

.overview-content {
    padding: 25px 0 20px;
}

.overview-top {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 55px;

    padding-bottom: 25px;

    border-bottom: 1px solid var(--color-border);
}

.overview-left,
.overview-right {
    min-width: 0;
}

.overview-content h4 {
    margin: 0 0 8px;

    font-family: 'Plus Jakarta Sans';
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;

    color: var(--color-heading);
}

.overview-content p {
    margin: 0;

    font-size: 14px;
    line-height: 1.65;

    color: var(--color-text);
}

.overview-block {
    margin-top: 22px;
}


/* =========================================
   CHECK LIST
========================================= */

.check-list {
    display: flex;
    flex-direction: column;

    gap: 7px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.check-list li {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    font-size: 14px;
    line-height: 1.55;

    color: var(--color-text);
}

.check-list li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 17px;
    height: 17px;
    flex: 0 0 17px;

    margin-top: 1px;

    border-radius: 50%;

    background: #eaf8ef;

    color: #16a34a;

    font-family: 'Plus Jakarta Sans';
    font-size: 12px;
    font-weight: 700;
}


/* =========================================
   TECHNICAL INFORMATION
========================================= */

.technical-information {
    padding-top: 23px;
}

.technical-information h4 {
    margin-bottom: 10px;
}

.technical-table {
    width: 100%;

    border: 1px solid var(--color-border);
    border-radius: 6px;

    overflow: hidden;
}

.technical-row {
    display: grid;
    grid-template-columns: 34% 66%;

    min-height: 38px;

    border-bottom: 1px solid var(--color-border);
}

.technical-row:last-child {
    border-bottom: 0;
}

.technical-row > div {
    display: flex;
    align-items: center;

    padding: 8px 12px;

    font-size: 14px;
    line-height: 1.4;
}

.technical-row > div:first-child {
    background: #fafbfc;

    color: #6b7280;
}

.technical-row > div:last-child {
    color: var(--color-heading);
}


/* =========================================
   RELATED PUBLISHED PAPER
========================================= */

.published-paper {
    margin-top: 10px;

    padding: 18px 16px;

    border: 1px solid var(--color-border);
    border-radius: 8px;

    background: var(--color-white);
}

.published-paper-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 16px;
}

.published-paper-title h4 {
    margin: 0;

    font-family: 'Plus Jakarta Sans';
    font-size: 16px;
    font-weight: 700;
}

.published-paper-title h4 span {
    color: #64748b;

    font-size: 14px;
    font-weight: 500;
}

.linked-badge {
    display: inline-flex;
    align-items: center;

    padding: 3px 8px;

    border-radius: 5px;

    background: #eaf8ef;

    color: #17803d;

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
}

.paper-content {
    display: grid;
    grid-template-columns: 160px 1fr auto;

    align-items: center;

    gap: 20px;
}

.paper-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 160px;
    height: 160px;

    border: 1px solid var(--color-border);
    border-radius: 6px;

    background: #f8fafc;

    color: #64748b;
}

.paper-icon svg {
    width: 100px;
    height: 100px;
}

.paper-details h4 {
    margin: 0 0 13px;

    font-size: 16px;
}

.paper-meta {
    display: flex;	
    gap: 8px;
    flex-direction: column;
}

.paper-meta div {
        display: flex;
    flex-direction: row;
    gap: 20px;
}

.paper-meta span {
    font-size: 16px;
    color: var(--color-text-light);
}

.paper-meta strong {
    font-family: 'DM Sans 9pt';

    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;

    color: var(--color-heading);
}

.paper-button {
    display: flex;
    align-items: center;

    gap: 7px;

    padding: 10px 13px;

    white-space: nowrap;

    border: 1px solid var(--color-border);
    border-radius: 7px;

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;

    color: var(--color-primary);

    transition: var(--transition);
}

.paper-button:hover {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.paper-button svg {
    width: 17px;
    height: 17px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {

    .paper-content {
        grid-template-columns: 70px 1fr;
    }

    .paper-icon {
        width: 70px;
        height: 70px;
    }

    .paper-icon svg {
        width: 40px;
        height: 40px;
    }

    .paper-button {
        grid-column: 2;
        width: fit-content;
    }

    .paper-meta {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 768px) {

    .overview-top {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .paper-content {
        grid-template-columns: 60px 1fr;
        gap: 14px;
    }

    .paper-icon {
        width: 60px;
        height: 70px;
    }

    .paper-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .paper-button {
        grid-column: 1 / -1;
    }
}


@media (max-width: 480px) {

    .product-tabs a {
        padding: 0 10px;
    }

    .product-tabs a.active::after {
        left: 10px;
        right: 10px;
    }

    .technical-row {
        grid-template-columns: 40% 60%;
    }

    .technical-row > div {
        padding: 8px;
    }

    .published-paper-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================
   SIDEBAR - PURCHASE CARD
========================================= */

.sidebar-purchase {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 7px;
    padding: 18px 15px 17px;
    box-shadow: 0 2px 8px rgba(0, 27, 94, 0.03);
}


/* Price
----------------------------------------- */

.purchase-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 15px;
}

.purchase-amount {
    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
}

.purchase-type {
    color: var(--color-text);
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.5;
}


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

.purchase-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchase-btn {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 6px;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;

    transition: var(--transition);
}

.purchase-btn svg {
    flex-shrink: 0;
}

/* Sale price from get_price_html(): <del>old</del> <ins>new</ins> */
.purchase-amount del {
    margin-right: 6px;
    color: var(--color-text-light);
    font-size: 16px;
    font-weight: 500;
    opacity: 1;
}

.purchase-amount ins {
    text-decoration: none;
}

.purchase-btn-disabled {
    background: #eef0f4;
    border: 1px solid #e2e6ec;
    color: var(--color-text-light);
    cursor: not-allowed;
}



/* Add to Cart */

.purchase-btn-cart {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-white);
}

.purchase-btn-cart:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
}


/* Buy Now */

.purchase-btn-buy {
    background: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    color: var(--color-primary);
}

.purchase-btn-buy:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}


/* Benefits
----------------------------------------- */

.purchase-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.purchase-benefit {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--color-text);
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.45;
}

.purchase-benefit svg {
    flex: 0 0 18px;
    color: #657080;
}

/* =========================================
   SIDEBAR - LICENSE / USE
========================================= */

.sidebar-license {
    margin-top: 14px;
    padding: 17px 15px 18px;

    background: #f4fbf7;
    border: 1px solid #dceee4;
    border-radius: 7px;
}


/* Header / Icon Layout
----------------------------------------- */

.license-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.license-icon {
    width: 25px;
    height: 29px;

    flex: 0 0 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #3b9b68;
}

.license-icon svg {
    width: 25px;
    height: 29px;
}


/* Content
----------------------------------------- */

.license-content {
    flex: 1;
    min-width: 0;
}

.license-title {
    margin: 1px 0 12px;

    color: #174b32;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}


/* Text
----------------------------------------- */

.license-text {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.license-text p {
    margin: 0;

    color: var(--color-text);
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.55;
}

/* =========================================
   SIDEBAR - SELLER INFORMATION
========================================= */

.sidebar-seller {
    margin-top: 14px;
    padding: 16px 14px 14px;

    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 7px;

    box-shadow: 0 2px 8px rgba(0, 27, 94, 0.03);
}


/* Heading
----------------------------------------- */

.seller-title {
    margin: 0 0 14px;

    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}


/* Seller Profile
----------------------------------------- */

.seller-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seller-avatar {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    overflow: hidden;
    border-radius: 50%;
    background: #eef1f5;
}

.seller-avatar img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.seller-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seller-name {
    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.verified-seller {
    display: flex;
    align-items: center;
    gap: 5px;

    color: #39a267;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.verified-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;
    background: #22a45d;
}


/* View Profile
----------------------------------------- */

.seller-profile-btn {
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 13px;

    background: var(--color-white);
    border: 1px solid #dce2e9;
    border-radius: 5px;

    color: #31528b;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;

    transition: var(--transition);
}

.seller-profile-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}


/* Statistics
----------------------------------------- */

.seller-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    margin-top: 13px;
    padding-top: 12px;

    border-top: 1px solid #edf0f3;
}

.seller-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 0;
    text-align: center;
}

.seller-stat + .seller-stat {
    border-left: 1px solid #edf0f3;
}

.seller-stat strong {
    display: block;

    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.seller-stat span {
    display: block;

    margin-top: 2px;

    color: var(--color-text-light);
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.4;
}

/* =========================================
   SIDEBAR - NEED HELP
========================================= */

.sidebar-help {
    margin-top: 14px;
    padding: 16px 13px 14px;

    background: #f7f8fc;
    border: 1px solid #eef0f5;
    border-radius: 7px;
}


/* Heading
----------------------------------------- */

.help-title {
    margin: 0 0 5px;

    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}


/* Description
----------------------------------------- */

.help-description {
    margin: 0;

    color: var(--color-text);
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.5;
}


/* Divider
----------------------------------------- */

.help-divider {
    width: 100%;
    height: 1px;

    margin: 12px 0 11px;

    background: #e5e8ee;
}


/* Actions
----------------------------------------- */

.help-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}


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

.help-btn {
    min-height: 32px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px 7px;

    background: transparent;
    border: 1px solid #dce2eb;
    border-radius: 5px;

    color: #31528b;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;

    text-align: center;

    transition: var(--transition);
}

.help-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* =========================================
   Author + Reviews Section
========================================= */

.author-reviews {
    padding-top: 0;
    padding-bottom: 30px;
}

.author-reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
}


/* =========================================
   Shared Card
========================================= */

.author-card,
.reviews-card {
    border: 1px solid #e9edf2;
    border-radius: 10px;
    background: var(--color-white);
    padding: 18px 22px;
}

.card-section-title {
    margin: 0 0 15px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-heading);
}


/* =========================================
   Author
========================================= */

.author-intro {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.author-image {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f3f7;
}

.author-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 3px;
}

.author-name-row h5 {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.verified-seller {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #22a05a;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.verified-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #22a05a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

.author-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
}


/* =========================================
   Author Bottom / Stats
========================================= */

.author-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.author-stats {
    display: flex;
    align-items: center;
}

.author-stat {
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    border-right: 1px solid #e5e7eb;
}

.author-stat:first-child {
    padding-left: 0;
}

.author-stat:last-child {
    border-right: 0;
}

.author-stat strong {
    font-family: 'Plus Jakarta Sans';
    font-size: 18px;
    line-height: 1.3;
    color: var(--color-primary);
    font-weight: 700;
}

.author-stat span {
    margin-top: 2px;
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-light);
}

.author-profile-btn {
    flex-shrink: 0;
    padding: 9px 17px;
    font-size: 14px;
    line-height: 22px;
}


/* =========================================
   Reviews
========================================= */

.reviews-content {
    display: grid;
    grid-template-columns: 355px minmax(0, 1fr);
    gap: 25px;
}


/* Rating Summary */

.rating-summary {
    display: flex;
    gap: 25px;
	align-items: center;
}

.overall-rating {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.overall-rating strong {
    font-family: 'Plus Jakarta Sans';
    font-size: 38px;
    line-height: 1;
    color: var(--color-primary);
    font-weight: 700;
}

.rating-stars {
    display: flex;
    gap: 2px;
    margin-top: 7px;
    color: var(--color-secondary);
    font-size: 17px;
    line-height: 1;
}

.rating-count {
    margin-top: 7px;
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}


/* Rating Bars */

.rating-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.rating-row {
    display: grid;
    grid-template-columns: 45px minmax(60px, 1fr) 20px;
    align-items: center;
    gap: 8px;
}

.rating-row > span {
    font-size: 14px;
    line-height: 1.3;
    color: var(--color-text);
    white-space: nowrap;
}

.rating-row strong {
    font-family: 'DM Sans 9pt';
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    color: var(--color-text-light);
    text-align: right;
}

.rating-bar {
    height: 5px;
    overflow: hidden;
    border-radius: 10px;
    background: #edf0f4;
}

.rating-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #f6bd00;
}


/* =========================================
   Recent Reviews
========================================= */

.recent-reviews {
    border-left: 1px solid #edf0f4;
    padding-left: 20px;
}

.review-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

.review-avatar {
    width: 30px;
    min-width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    background: #f1f3f6;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.review-details {
    flex: 1;
    min-width: 0;
}

.review-top {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.review-top strong {
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.3;
    color: var(--color-heading);
    font-weight: 600;
}

.review-stars {
    color: var(--color-secondary);
    font-size: 14px;
    line-height: 1;
    letter-spacing: -1px;
}

.review-top time {
    margin-left: auto;
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.3;
}

.review-details p {
    margin: 3px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text);
}

.view-all-reviews {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0;
    color: var(--color-primary);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.view-all-reviews span {
    font-size: 17px;
    transition: var(--transition);
}

.view-all-reviews:hover {
    color: var(--color-secondary);
}

.view-all-reviews:hover span {
    transform: translateX(3px);
}

@media (max-width: 1100px) {

    .author-reviews-grid {
        grid-template-columns: 1fr;
    }

    .reviews-content {
        grid-template-columns: 1fr;
    }

    .recent-reviews {
        border-left: 0;
        border-top: 1px solid #edf0f4;
        padding-left: 0;
        padding-top: 18px;
    }
}


@media (max-width: 768px) {

    .author-card,
    .reviews-card {
        padding: 18px;
    }

    .author-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .author-stats {
        width: 100%;
        justify-content: space-between;
    }

    .author-stat {
        padding: 0 15px;
    }

    .author-profile-btn {
        width: fit-content;
    }
}


@media (max-width: 540px) {

    .author-intro {
        gap: 12px;
    }

    .author-image {
        width: 46px;
        min-width: 46px;
        height: 46px;
    }

    .author-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .author-stat {
        padding: 0 10px;
    }

    .author-stat strong {
        font-size: 16px;
    }

    .reviews-content {
        gap: 20px;
    }

    .rating-summary {
        gap: 15px;
    }

    .overall-rating strong {
        font-size: 34px;
    }

    .review-top time {
        margin-left: 0;
        width: 100%;
    }
}

/* =========================================
   Related Products
========================================= */

.related-products {
    padding-top: 0;
    padding-bottom: 30px;
}

.related-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.related-products-header h6 {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}


/* =========================================
   Navigation Arrows
========================================= */

.related-products-arrows {
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-arrow {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #e4e8ee;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.related-arrow:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.related-arrow svg {
    width: 17px;
    height: 17px;
}


/* =========================================
   Product Slider
========================================= */

/* One scrollable row; arrows scroll it (assets/js/single-product.js). */
.related-products-slider {
    --related-visible: 5;
    --related-gap: 14px;

    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--related-visible) - 1) * var(--related-gap)) / var(--related-visible));
    gap: var(--related-gap);

    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.related-products-slider::-webkit-scrollbar {
    display: none;
}

/* Cards are template-parts/product-card.php, the Digital Materials card.
   Vertical padding keeps its hover lift and shadow from being clipped. */
.related-products-slider {
    padding: 4px 0 12px;
}

.related-products-slider > * {
    min-width: 0;
    scroll-snap-align: start;
}

/* Woo appends a "View cart" link after AJAX add to cart. */
.related-products-slider .added_to_cart {
    display: none;
}

.related-arrow:disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.related-products-arrows[hidden] {
    display: none;
}



/* Laptops */
@media (max-width: 1500px) {

    .related-products-slider {
        --related-visible: 4;
    }
}


/* Small laptops / tablets landscape */
@media (max-width: 1100px) {

    .related-products-slider {
        --related-visible: 3;
    }
}


@media (max-width: 768px) {

    .related-products-slider {
        --related-visible: 2;
    }
}


@media (max-width: 480px) {

    /* One card plus a peek of the next */
    .related-products-slider {
        --related-visible: 1.25;
    }
}

/* =========================================
   Trust Features
========================================= */

.trust-features {
    padding-top: 0;
    padding-bottom: 30px;
}

.trust-features-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);

    border: 1px solid #e8edf2;
    border-radius: 10px;

    background: var(--color-white);
    overflow: hidden;
}


/* =========================================
   Individual Feature
========================================= */

.trust-feature {
    display: flex;
    align-items: center;
    gap: 13px;

    min-width: 0;
    padding: 16px 20px;

    border-right: 1px solid #edf0f4;
}

.trust-feature:last-child {
    border-right: 0;
}


/* =========================================
   Icon
========================================= */

.trust-feature-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #71819a;
}

.trust-feature-icon svg {
    width: 29px;
    height: 29px;
}


/* =========================================
   Content
========================================= */

.trust-feature-content {
    min-width: 0;
}

.trust-feature-content h6 {
    margin: 0;

    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;

    color: var(--color-heading);
}

.trust-feature-content p {
    margin: 2px 0 0;

    font-size: 14px;
    line-height: 1.4;

    color: var(--color-text-light);
}

@media (max-width: 1100px) {

    .trust-features-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }

    .trust-feature:nth-child(3) {
        border-right: 0;
    }

    .trust-feature:nth-child(-n+3) {
        border-bottom: 1px solid #edf0f4;
    }

    .trust-feature:nth-child(4) {
        border-bottom: 0;
    }

    .trust-feature:nth-child(5) {
        border-right: 0;
        border-bottom: 0;
    }
}


@media (max-width: 768px) {

    .trust-features-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-feature {
        border-right: 1px solid #edf0f4;
        border-bottom: 1px solid #edf0f4;
    }

    .trust-feature:nth-child(3) {
        border-right: 1px solid #edf0f4;
    }

    .trust-feature:nth-child(even) {
        border-right: 0;
    }

    .trust-feature:nth-child(4),
    .trust-feature:nth-child(5) {
        border-bottom: 0;
    }
}


@media (max-width: 480px) {

    .trust-features-wrapper {
        grid-template-columns: 1fr;
    }

    .trust-feature,
    .trust-feature:nth-child(3),
    .trust-feature:nth-child(even) {
        border-right: 0;
        border-bottom: 1px solid #edf0f4;
    }

    .trust-feature:last-child {
        border-bottom: 0;
    }

    .trust-feature {
        padding: 15px 18px;
    }
}

/* =========================================
   PAGE LAYOUT - RESPONSIVE
========================================= */

@media (max-width: 1300px) {

    .product-specs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Single column. Flatten main + sidebar so the purchase card
   sits right after the hero instead of below all the content. */
@media (max-width: 1100px) {

    .product-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .product-main,
    .product-sidebar {
        display: contents;
    }

    .product-hero        { order: 1; }
    .sidebar-purchase    { order: 2; }
    .sidebar-documentation { order: 6; } /* same order as seller: stays after it */
    .product-specs       { order: 3; }
    .product-content     { order: 4; }
    .sidebar-license     { order: 5; }
    .sidebar-seller      { order: 6; }
    .sidebar-help        { order: 7; }

    .product-specs,
    .sidebar-license,
    .sidebar-seller,
    .sidebar-help {
        margin-top: 0;
    }

    .purchase-actions {
        flex-direction: row;
    }

    .purchase-benefits {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 22px;
    }
}

@media (max-width: 991px) {

    .product-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    /* Full width: same shape as the thumbnails, capped at the desktop
       height so tablets don't get a taller image than desktop. */
    .product-main-image {
        height: auto;
        aspect-ratio: 1 / 0.72;
        max-height: 400px;
    }

}

@media (max-width: 768px) {

    .product-page {
        padding: 16px 0 40px;
    }

    .product-page .rb-breadcrumbs {
        margin-bottom: 14px;
    }

    .product-page .rb-breadcrumbs__inner {
        gap: 6px;
        font-size: 13px;
    }

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

}

@media (max-width: 600px) {

    .product-title {
        font-size: 24px;
    }

    .product-thumbnails {
        gap: 6px;
    }

    .product-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-spec-item {
        min-height: 0;
        padding: 12px;
    }

    .purchase-actions {
        flex-direction: column;
    }

    .purchase-benefits {
        flex-direction: column;
    }

    .paper-meta div {
        flex-direction: column;
        gap: 0;
    }

    .paper-meta span {
        font-size: 14px;
    }

}

@media (max-width: 400px) {

    .product-specs {
        grid-template-columns: minmax(0, 1fr);
    }

    .help-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   WOOCOMMERCE MARKUP
   Styles for elements WooCommerce itself outputs inside the
   theme templates (notices, breadcrumb, price, form, stars,
   attributes, reviews, related add to cart).
   ========================================================= */

/* Breadcrumb (woocommerce_breadcrumb, see researchback_product_breadcrumb_defaults) */

.product-page .rb-breadcrumbs__item:last-child {
    font-weight: 500;
}

.product-page .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 18px;
}

/* Notices (Woo: added to cart / errors; Dokan: own-product notice) */
.product-page .woocommerce-message,
.product-page .woocommerce-info,
.product-page .woocommerce-error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;

    margin: 0 0 18px;
    padding: 12px 16px;

    list-style: none;

    border: 1px solid #d6e4fb;
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;

    background: #f3f7fe;
    color: var(--color-heading);

    font-size: 14px;
    line-height: 1.5;
}

.product-page .woocommerce-message {
    border-color: #cfeadb;
    border-left-color: #17803d;
    background: #f2faf5;
}

.product-page .woocommerce-error {
    border-color: #f6d3d3;
    border-left-color: var(--color-danger);
    background: #fdf4f4;
}

.product-page .woocommerce-error li {
    width: 100%;
}

.product-page .woocommerce-message .button,
.product-page .woocommerce-info .button {
    order: 2;
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--color-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.product-page .woocommerce-message .button:hover,
.product-page .woocommerce-info .button:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}


/* Price (single-product/price.php) */

.purchase-price .price {
    margin: 0;
}


/* Add to cart form (single-product/add-to-cart/simple.php) */

button.purchase-btn {
    width: 100%;
    cursor: pointer;
}

.sidebar-purchase form.cart {
    margin: 0;
}

/* Sold-individually products get a hidden quantity input */
.sidebar-purchase .quantity.hidden {
    display: none;
}

.sidebar-purchase .quantity .qty {
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
}

.sidebar-purchase .stock {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-purchase .stock.in-stock {
    color: #17803d;
}

.sidebar-purchase .stock.out-of-stock {
    color: var(--color-danger);
}


/* Star ratings (wc_get_rating_html): theme colours */

.product-page .star-rating::before {
    color: #d8dde5;
    opacity: 1;
}

.product-page .star-rating span::before {
    color: #f5b900;
}

.product-rating .star-rating {
    height: 1.2em;
    line-height: 1.2;
    font-size: 15px;
}

.product-rating .woocommerce-review-link {
    color: var(--color-text-light);
}

.overall-rating .star-rating {
    margin-top: 8px;
    font-size: 16px;
}


/* Technical Information (single-product/product-attributes.php) */

.technical-row > div p {
    margin: 0;
}


/* Reviews (single-product-reviews.php, single-product/review.php) */

.author-reviews-grid--single {
    grid-template-columns: 1fr;
}

.reviews-content--no-summary {
    grid-template-columns: 1fr;
}

.reviews-content--no-summary .recent-reviews {
    border-left: 0;
    padding-left: 0;
}

.recent-reviews .commentlist {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* First 3 reviews until "View All Reviews" (assets/js/single-product.js) */
.recent-reviews.is-collapsed .commentlist > li:nth-child(n+4) {
    display: none;
}

.reviews-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
}

button.view-all-reviews {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

button.view-all-reviews[hidden] {
    display: none;
}

.review-form-area[hidden] {
    display: none;
}

.review-form-area .woocommerce-verification-required {
    margin-top: 16px;
}

.review-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.review-top .star-rating {
    height: 1.3em;
    line-height: 1.3;
    font-size: 12px;
}

.review-top .meta {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    margin: 0;
}

.review-top .woocommerce-review__author {
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
    color: var(--color-heading);
}

.review-top .woocommerce-review__verified {
    font-size: 13px;
    font-style: normal;
    color: #17803d;
}

.review-details .description p {
    margin: 3px 0 0;
}

.woocommerce-noreviews,
.woocommerce-verification-required {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-light);
}

.woocommerce-verification-required {
    margin-top: 16px;
}

.reviews-card .woocommerce-pagination ul {
    display: flex;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.reviews-card .woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-primary);
}

.reviews-card .woocommerce-pagination .current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}


/* Review form (Woo's comment_form) */

#review_form_wrapper {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf0f4;
}

#review_form .comment-reply-title {
    display: block;
    margin-bottom: 10px;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 700;
    color: var(--color-heading);
}

#review_form .comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

#review_form .comment-form > * {
    grid-column: 1 / -1;
    margin: 0;
}

#review_form .comment-form-author,
#review_form .comment-form-email {
    grid-column: auto;
}

#review_form label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-heading);
}

#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea,
#review_form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
}

#review_form textarea {
    min-height: 100px;
    resize: vertical;
}

#review_form .stars {
    margin: 0;
}

#review_form .stars a {
    color: #f5b900;
}

#review_form .form-submit input[type="submit"] {
    padding: 9px 20px;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    background: var(--color-primary);
    color: #fff;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

#review_form .form-submit input[type="submit"]:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
}

@media (max-width: 540px) {
    #review_form .comment-form {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   SIDEBAR TYPOGRAPHY
   Card headings 20px, content 16px on desktop; scaled down
   on smaller screens. Scoped to .product-sidebar because
   .seller-name / .verified-seller are also used elsewhere.
   ========================================================= */

.product-sidebar .license-title,
.product-sidebar .seller-title,
.product-sidebar .help-title {
    font-size: 20px;
    line-height: 1.3;
}

.product-sidebar .license-title {
    margin-bottom: 10px;
}

.product-sidebar .seller-title {
    margin-bottom: 14px;
}

.product-sidebar .help-title {
    margin-bottom: 6px;
}

.product-sidebar .purchase-type,
.product-sidebar .purchase-benefit,
.product-sidebar .license-text p,
.product-sidebar .seller-name,
.product-sidebar .verified-seller,
.product-sidebar .help-description,
.product-sidebar .purchase-btn,
.product-sidebar .seller-profile-btn,
.product-sidebar .help-btn {
    font-size: 16px;
}

.product-sidebar .seller-stat strong {
    font-size: 18px;
}

/* Stat labels sit 3-across in a narrow card; 16px would wrap. */
.product-sidebar .seller-stat span {
    font-size: 14px;
}

.product-sidebar .purchase-amount {
    font-size: 26px;
}

@media (max-width: 768px) {

    .product-sidebar .license-title,
    .product-sidebar .seller-title,
    .product-sidebar .help-title {
        font-size: 18px;
    }

    .product-sidebar .purchase-type,
    .product-sidebar .purchase-benefit,
    .product-sidebar .license-text p,
    .product-sidebar .seller-name,
    .product-sidebar .verified-seller,
    .product-sidebar .help-description,
    .product-sidebar .purchase-btn,
    .product-sidebar .seller-profile-btn,
    .product-sidebar .help-btn {
        font-size: 15px;
    }

    .product-sidebar .purchase-amount {
        font-size: 24px;
    }
}

@media (max-width: 480px) {

    .product-sidebar .license-title,
    .product-sidebar .seller-title,
    .product-sidebar .help-title {
        font-size: 17px;
    }

    .product-sidebar .purchase-type,
    .product-sidebar .purchase-benefit,
    .product-sidebar .license-text p,
    .product-sidebar .seller-name,
    .product-sidebar .verified-seller,
    .product-sidebar .help-description,
    .product-sidebar .purchase-btn,
    .product-sidebar .seller-profile-btn,
    .product-sidebar .help-btn {
        font-size: 14px;
    }

    .product-sidebar .seller-stat strong {
        font-size: 16px;
    }

    .product-sidebar .seller-stat span {
        font-size: 13px;
    }

    .product-sidebar .purchase-amount {
        font-size: 22px;
    }
}

/* =========================================================
   BODY TEXT
   Main paragraphs 16px on desktop. Small/compact sections
   (specs strip, tags, rating row, technical table, paper
   meta, rating breakdown, related cards, trust strip) keep
   their own smaller sizes.
   ========================================================= */

.product-page .product-description,
.product-page .overview-content p,
.product-page .overview-description li,
.product-page .check-list li,
.product-page .author-info p,
.product-page .review-details .description p {
    font-size: 16px;
    line-height: 1.65;
}

@media (max-width: 768px) {

    .product-page .product-description,
    .product-page .overview-content p,
    .product-page .overview-description li,
    .product-page .check-list li,
    .product-page .author-info p,
    .product-page .review-details .description p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {

    .product-page .product-description,
    .product-page .overview-content p,
    .product-page .overview-description li,
    .product-page .check-list li,
    .product-page .author-info p,
    .product-page .review-details .description p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Keep the ✓ circle centred on the first line of the larger text. */
.product-page .check-list li span {
    margin-top: 4px;
}

@media (max-width: 480px) {
    .product-page .check-list li span {
        margin-top: 3px;
    }
}

/* =========================================================
   WISHLIST BUTTON (TI Wishlist inside single-product/share.php)
   "♡ Add to Wishlist" -> "♥ Saved to Wishlist" (.tinvwl-product-in-list)
   ========================================================= */

.product-actions .tinv-wishlist {
    margin: 0;
}

.product-actions .tinv-wishlist .tinvwl_add_to_wishlist_button {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;

    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.product-actions .tinv-wishlist .tinvwl_add_to_wishlist_button:hover {
    color: var(--color-primary);
}

.product-actions .tinv-wishlist .tinvwl_add_to_wishlist_button::before {
    margin-right: 0;
    font-size: 18px;
    vertical-align: middle;
}

.product-actions .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-product-in-list {
    color: var(--color-primary);
    font-weight: 600;
}

.product-actions .tinv-wishlist .tinvwl-tooltip,
.product-actions .tinv-wishlist .tinv-wishlist-clear {
    display: none;
}

/* =========================================================
   PUBLISHED PAPER LINE (single-product/paper-line.php)
   "Published Paper: <title>" under the product title
   ========================================================= */

.product-paper-line {
    margin: -6px 0 16px;

    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text);
}

.product-paper-line__label {
    margin-right: 4px;
    font-weight: 600;
    color: var(--color-heading);
}

.product-paper-line a {
    color: #2f6fd1;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(47, 111, 209, 0.35);
    text-underline-offset: 3px;
    transition: var(--transition);
}

.product-paper-line a:hover {
    color: var(--color-primary);
    text-decoration-color: currentColor;
}

.product-paper-line a svg {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 2px;
    vertical-align: -1px;
}

/* DOI in the Related Published Paper card */
.paper-meta strong a {
    color: #2f6fd1;
    overflow-wrap: anywhere;
}

.paper-meta strong a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .product-paper-line {
        font-size: 14px;
    }
}

/* =========================================================
   SECTION HEADINGS
   One size for every section title on the page (same as the
   sidebar card headings): 20px desktop, 18px tablet, 17px mobile.
   ========================================================= */

.product-page .overview-content h4,
.product-page .technical-information h4,
.product-page .published-paper-title h4,
.product-page .card-section-title,
.product-page .related-products-header h6 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.product-page .overview-content h4 {
    margin-bottom: 10px;
}

.product-page .card-section-title {
    margin-bottom: 18px;
}

.product-page .related-products-header {
    margin-bottom: 16px;
}

/* "(Linked by Seller)" stays small next to the title */
.product-page .published-paper-title h4 span {
    font-size: 14px;
}

/* Titles inside cards (paper name, trust items) one step down */
.product-page .paper-details h4 {
    font-size: 18px;
    line-height: 1.4;
}

.product-page .trust-feature-content h6 {
    font-size: 16px;
}

@media (max-width: 768px) {

    .product-page .overview-content h4,
    .product-page .technical-information h4,
    .product-page .published-paper-title h4,
    .product-page .card-section-title,
    .product-page .related-products-header h6 {
        font-size: 18px;
    }

    .product-page .paper-details h4 {
        font-size: 17px;
    }
}

@media (max-width: 480px) {

    .product-page .overview-content h4,
    .product-page .technical-information h4,
    .product-page .published-paper-title h4,
    .product-page .card-section-title,
    .product-page .related-products-header h6 {
        font-size: 17px;
    }

    .product-page .paper-details h4,
    .product-page .trust-feature-content h6 {
        font-size: 15px;
    }
}

/* About the Author: professional title under the name (inc/seller-fields.php) */
.author-info .author-title {
    display: block;
    margin: -2px 0 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-light);
}

/* Customer Reviews: empty state (single-product-reviews.php) */

.reviews-card {
    display: flex;
    flex-direction: column;
}

.reviews-card .reviews-content--no-summary {
    flex: 1;
    display: flex;
}

.reviews-content--no-summary .recent-reviews {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.reviews-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 20px;
    border: 1px dashed #dbe2ec;
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
}

.reviews-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: #fef3c7;
    color: var(--color-secondary);
}

.reviews-empty__icon svg {
    width: 28px;
    height: 28px;
}

.reviews-empty__title {
    font-family: 'Plus Jakarta Sans';
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-heading);
}

.reviews-empty__text {
    max-width: 380px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-light);
}

.reviews-empty__btn {
    cursor: pointer;
}

.reviews-empty__btn[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .reviews-empty {
        padding: 22px 16px;
    }

    .reviews-empty__title {
        font-size: 17px;
    }

    .reviews-empty__text {
        font-size: 15px;
    }
}

/* About the Author + Customer Reviews: the grid gives both cards the same
   height, so each card's bottom row (author stats / review actions) is
   pinned to the bottom. Spare space stays inside the card and the two
   bottom rows line up, with or without reviews. */

.author-card {
    display: flex;
    flex-direction: column;
}

.author-card .author-intro {
    margin-bottom: 20px;
}

.author-card .author-bottom {
    margin-top: auto;
}

.reviews-card .reviews-content {
    flex: 1;
}

.reviews-card .rating-summary {
    align-self: center;
}

.reviews-card .recent-reviews {
    display: flex;
    flex-direction: column;
}

.reviews-card .reviews-actions {
    margin-top: auto;
    padding-top: 12px;
}

.reviews-empty__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Side by side with the author card: compact row (icon · text · button)
   so the empty state isn't taller than the author card. */
@media (min-width: 1101px) {

    .reviews-empty {
        flex-direction: row;
        justify-content: flex-start;
        gap: 18px;
        padding: 22px 24px;
        text-align: left;
    }

    .reviews-empty__icon {
        flex-shrink: 0;
        width: 52px;
        height: 52px;
        margin-bottom: 0;
    }

    .reviews-empty__body {
        flex: 1;
        min-width: 0;
        align-items: flex-start;
    }

    .reviews-empty__text {
        max-width: none;
        margin: 0;
    }

    .reviews-empty__btn {
        flex-shrink: 0;
    }
}

/* =========================================================
   SIDEBAR: Seller Information + Need Help (refresh)
   sidebar-seller.php / sidebar-help.php. Font sizes stay as
   set in SIDEBAR TYPOGRAPHY above; only layout and colour here.
   ========================================================= */

/* Seller: photo with verified badge */
.product-sidebar .seller-avatar-wrap {
    position: relative;
    flex: 0 0 56px;
}

.product-sidebar .seller-avatar-wrap .seller-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    box-shadow: 0 0 0 3px #eef3fb;
}

.product-sidebar .seller-avatar-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-white);
    border-radius: 50%;
    background: #22a45d;
    color: var(--color-white);
}

.product-sidebar .seller-avatar-badge svg {
    width: 11px;
    height: 11px;
}

.product-sidebar .seller-name {
    font-weight: 700;
}

.product-sidebar .seller-subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-light);
}

/* Seller: stats block */
.product-sidebar .seller-stats {
    margin-top: 16px;
    padding: 12px 6px;
    border-top: 0;
    border-radius: 8px;
    background: #f3f6fb;
}

.product-sidebar .seller-stat + .seller-stat {
    border-left-color: #dfe6f1;
}

.product-sidebar .seller-stat strong {
    color: var(--color-primary);
}

/* Seller: main action */
.product-sidebar .seller-profile-btn {
    gap: 8px;
    min-height: 42px;
    margin-top: 14px;
    border-color: var(--color-primary);
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
}

.product-sidebar .seller-profile-btn svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.product-sidebar .seller-profile-btn:hover {
    border-color: var(--color-secondary);
    background: var(--color-secondary);
    color: var(--color-primary);
}

.product-sidebar .seller-profile-btn:hover svg {
    transform: translateX(3px);
}

/* Need Help */
.product-sidebar .sidebar-help {
    padding: 16px 14px;
    border-color: #dfe6f3;
    background: linear-gradient(135deg, #eef3fb 0%, #f8fafd 100%);
}

.product-sidebar .help-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.product-sidebar .help-icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-secondary);
    color: var(--color-primary);
}

.product-sidebar .help-icon svg {
    width: 22px;
    height: 22px;
}

.product-sidebar .help-title {
    margin-bottom: 2px;
}

.product-sidebar .help-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.product-sidebar .help-btn--contact {
    gap: 8px;
    width: 100%;
    min-height: 42px;
    border-color: var(--color-primary);
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
}

.product-sidebar .help-btn--contact:hover {
    border-color: var(--color-secondary);
    background: var(--color-secondary);
    color: var(--color-primary);
}

.product-sidebar .help-btn--contact svg,
.product-sidebar .help-report svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.product-sidebar .help-report {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-light);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.product-sidebar .help-report:hover {
    color: #d14343;
}


/* =========================================================
   SPACING FIXES (full page pass)
   ========================================================= */

/* Gap between the two-column layout and the About the Author row
   (the last main-column card was touching it). */
.author-reviews {
    padding-top: 24px;
}

/* Overview: Technical Information heading level with Abstract. */
.technical-information {
    padding-top: 0;
}

/* Check lists written in the description as "✓Item" (no icon span):
   align with the heading and space the tick like the icon version. */
.overview-description ul.check-list {
    padding-left: 0;
}

.overview-description .check-list li:not(:has(> span)) {
    display: block;
}

.overview-description .check-list li:not(:has(> span))::first-letter {
    margin-right: 8px;
    color: #16a34a;
    font-weight: 700;
}

/* Related Published Paper: labels in one column so values line up. */
.paper-meta div {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: baseline;
    gap: 16px;
}

/* Specs strip: two columns down to small phones. */
@media (max-width: 400px) {
    .product-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 359px) {
    .product-specs {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1100px) {
    .author-reviews {
        padding-top: 14px;
    }
}

@media (max-width: 768px) {
    /* Paper icon at the top of the card, not floating mid-way. */
    .paper-content {
        align-items: start;
    }
}

@media (max-width: 600px) {
    .paper-meta div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}

/* =========================================================
   SIDEBAR: Documentation (sidebar-documentation.php)
   After the Seller card. Status colour drives the shield, the
   pill and the card tint: well = green, basic = blue,
   minimal = amber, pending = grey.
   ========================================================= */

.sidebar-documentation {
    --doc-color: #6b7280;
    --doc-soft: #f1f3f6;

    margin-top: 14px;
    padding: 16px 15px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-white);
}

.sidebar-documentation--well    { --doc-color: #16a34a; --doc-soft: #ecfdf3; }
.sidebar-documentation--basic   { --doc-color: #2f6fd1; --doc-soft: #eaf2fc; }
.sidebar-documentation--minimal { --doc-color: #d9761f; --doc-soft: #fdf1e4; }

.documentation-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.documentation-icon {
    display: flex;
    flex: 0 0 26px;
    color: var(--doc-color);
}

.documentation-icon svg {
    width: 26px;
    height: 26px;
}

.product-sidebar .documentation-title {
    margin: 0;
    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.documentation-status {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--doc-soft);
    color: var(--doc-color);
    font-family: 'Plus Jakarta Sans';
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    white-space: nowrap;
}

.product-sidebar .documentation-text {
    margin: 10px 0 0;
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.55;
}

.documentation-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.documentation-chips li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f3f6fa;
    color: #334155;
    font-family: 'Plus Jakarta Sans';
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
}

.documentation-chips li > span[aria-hidden] {
    color: #16a34a;
    font-weight: 700;
}

/* Checklist items the seller didn't tick */
.documentation-chips li.is-missing {
    color: #9aa3b2;
    background: #f7f8fa;
}

.documentation-chips li.is-missing > span[aria-hidden] {
    color: #b4bcc8;
}

@media (max-width: 1100px) {
    .sidebar-documentation {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .product-sidebar .documentation-title {
        font-size: 18px;
    }

    .product-sidebar .documentation-text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .product-sidebar .documentation-title {
        font-size: 17px;
    }

    .product-sidebar .documentation-text {
        font-size: 14px;
    }
}

/* =========================================================
   PAPER LAYOUT (Submission Type "Paper")
   paper-header.php, meta.php access tag, cite-paper.php
   ========================================================= */

/* Header: subtitle + journal line under the title */
.paper-header {
    margin: -8px 0 16px;
}

.paper-header__subtitle {
    margin: 0 0 8px;
    color: #33415f;
    font-family: 'Plus Jakarta Sans';
    font-size: 18px;
    line-height: 1.45;
    font-weight: 500;
}

.paper-header__journal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.paper-header__journal-name {
    color: #2f6fd1;
    font-weight: 600;
}

.paper-header__issue {
    color: var(--color-text-light);
}

/* Badges: Open / Paid Access */
.product-tag.access-tag--open {
    background: #edf9f1;
    color: #17803d;
}

.product-tag.access-tag--paid {
    background: #fdf6e0;
    color: #b7791f;
}

/* Cite this Paper */
.cite-paper {
    margin-top: 26px;
}

.cite-paper h4 {
    margin: 0 0 12px;
}

.cite-paper__tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--color-border);
    border-radius: 7px 7px 0 0;
    overflow: hidden;
}

.cite-paper__tab {
    padding: 9px 6px;
    border: 0;
    background: var(--color-white);
    color: var(--color-text);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cite-paper__tab + .cite-paper__tab {
    border-left: 1px solid var(--color-border);
}

.cite-paper__tab.is-active {
    background: var(--color-primary);
    color: var(--color-white);
}

.cite-paper__box {
    position: relative;
    padding: 14px 14px 60px;
    border: 1px solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 7px 7px;
    background: #f8fafc;
}

.cite-paper__text {
    margin: 0;
    max-height: 220px;
    overflow: auto;
    color: var(--color-text);
    font-family: 'DM Sans 9pt', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.cite-paper__text[hidden] {
    display: none;
}

/* Code-like formats in a monospace font */
.cite-paper__text--bibtex,
.cite-paper__text--endnote,
.cite-paper__text--ris {
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
}

.cite-paper__copy {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-white);
    color: var(--color-primary);
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cite-paper__copy svg {
    width: 16px;
    height: 16px;
}

.cite-paper__copy:hover {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
}

/* Publication Details: DOI link */
.technical-information .woocommerce-product-attributes-item__value a {
    color: #2f6fd1;
}

@media (max-width: 768px) {
    .paper-header__subtitle {
        font-size: 16px;
    }

    .paper-header__journal {
        font-size: 15px;
    }
}

/* Papers: long academic titles, one step smaller (design). */
.rb-type-paper .product-title {
    margin-bottom: 12px;
    font-size: clamp(24px, 2vw, 30px);
    line-height: 1.25;
}

/* =========================================================
   PAPER LAYOUT: static design sections (single-product/paper/*)
   ========================================================= */

/* Initials avatar (until authors link to ResearchBack accounts) */
.paper-author__avatar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5edfa;
    color: var(--color-primary);
    font-family: 'Plus Jakarta Sans';
    font-size: 15px;
    font-weight: 700;
}

.paper-author__avatar--2 { background: #fdf1e4; color: #b45309; }
.paper-author__avatar--3 { background: #eafaf1; color: #15803d; }

.paper-author__role {
    color: var(--color-text-light);
    font-size: 13px;
    line-height: 1.4;
}

.paper-author__role--corresponding {
    color: #2f6fd1;
    font-weight: 600;
}

/* Authors row under the title */
.paper-authors-row {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.paper-authors-row__list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
}

.paper-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.paper-author__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.paper-author__info strong {
    color: var(--color-heading);
    font-family: 'Plus Jakarta Sans';
    font-size: 15px;
    line-height: 1.35;
}

.paper-author__info strong sup {
    color: var(--color-text-light);
    font-size: 11px;
}

.paper-author__info > span:not(.paper-author__role) {
    color: var(--color-text-light);
    font-size: 13px;
    line-height: 1.4;
}

.paper-authors-row__more {
    display: inline-block;
    margin-top: 10px;
    color: #2f6fd1;
    font-size: 14px;
    font-weight: 600;
}

/* Corresponding Author card: initials avatar in the seller avatar spot */
.product-sidebar .paper-corresponding .seller-avatar.paper-author__avatar {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

/* Sections below the layout */
.paper-section {
    margin-bottom: 24px;
    padding: 22px 24px;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    background: var(--color-white);
}

.paper-section.sections-padding {
    padding-top: 22px;
    padding-bottom: 22px;
}

.paper-section__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 20px;
    margin-bottom: 18px;
}

.product-page .paper-section .card-section-title {
    margin-bottom: 0;
}

.paper-section .card-section-title span {
    color: var(--color-text-light);
    font-weight: 500;
}

.paper-section__intro {
    margin: 6px 0 0;
    color: var(--color-text-light);
    font-size: 15px;
    line-height: 1.5;
}

.paper-section__link {
    color: #2f6fd1;
    font-family: 'Plus Jakarta Sans';
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Authors & Contributors */
.paper-authors__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.paper-author-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.paper-author-card .paper-author__avatar {
    width: 72px;
    height: 72px;
    font-size: 22px;
}

.paper-author-card__info {
    min-width: 0;
}

.paper-author-card__info h5 {
    margin: 0 0 2px;
    color: var(--color-heading);
    font-size: 16px;
}

.paper-author-card__info p {
    margin: 8px 0;
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.5;
}

.paper-author-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--color-text-light);
    font-size: 13px;
}

/* References & Citations */
.paper-references__counts {
    display: flex;
    gap: 22px;
    color: var(--color-text-light);
    font-size: 14px;
}

.paper-references__counts strong {
    color: var(--color-primary);
    font-size: 16px;
}

.paper-references__list {
    margin: 0 0 14px;
    padding-left: 22px;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.6;
}

.paper-references__list li + li {
    margin-top: 8px;
}

/* Related Digital Materials */
.paper-materials__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.paper-material-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.paper-material-card__image {
    display: flex;
    flex: 0 0 110px;
    align-items: flex-end;
    height: 110px;
    padding: 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dce6f5, #eef2f9);
}

.paper-material-card__image span {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
}

.paper-material-card__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.paper-material-card__info h5 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.35;
}

.paper-material-card__info h5 a {
    color: var(--color-heading);
}

.paper-material-card__info p {
    margin: 0 0 6px;
    color: var(--color-text-light);
    font-size: 13px;
    line-height: 1.45;
}

.paper-material-card__rating {
    color: var(--color-text-light);
    font-size: 13px;
}

.paper-material-card__rating span {
    color: var(--color-secondary);
}

.paper-material-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.paper-material-card__footer strong {
    color: var(--color-heading);
    font-size: 17px;
}

.paper-material-card__btn {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.paper-material-card__btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
}

/* License card link */
.license-link {
    display: inline-block;
    margin-top: 12px;
    color: #2f6fd1;
    font-size: 15px;
    font-weight: 600;
}

/* Peer Reviewed tag: icon before the text */
.product-tag.peer-tag svg {
    order: -1;
}

@media (max-width: 1100px) {
    .paper-authors__grid,
    .paper-materials__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .paper-section {
        padding: 18px 16px;
    }

    .paper-authors__grid,
    .paper-materials__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .paper-author-card .paper-author__avatar {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }
}

/* Authors row: up to three authors side by side on desktop (design). */
@media (min-width: 769px) {
    .paper-authors-row__list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .paper-author .paper-author__avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Related Digital Materials: product image behind the type badge */
.paper-material-card__image {
    background-color: #eef2f9;
    background-position: center;
    background-size: cover;
}

.paper-material-card__footer .price del {
    margin-right: 4px;
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: 500;
}

.paper-material-card__footer .price ins {
    text-decoration: none;
}

/* Paper authors: photo avatars (linked accounts), collapse, View All */
img.paper-author__avatar {
    object-fit: cover;
}

.paper-authors.is-collapsed .paper-author-card:nth-child(n+4) {
    display: none;
}

button.paper-authors__expand {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

button.paper-authors__expand[hidden] {
    display: none;
}

.paper-author-card__info h5 a,
.paper-author__info strong a {
    color: inherit;
}

.paper-author-card__info h5 a:hover,
.paper-author__info strong a:hover {
    color: #2f6fd1;
}

.paper-author-card__verified {
    color: #16a34a;
    font-weight: 600;
}

/* Authors & Contributors cards (design): large round photo, role with icon,
   affiliation + department, bold stats with a divider. */
.paper-author-card {
    align-items: center;
    gap: 22px;
    padding: 16px 20px;
}

.paper-author-card .paper-author__avatar {
    width: 104px;
    height: 104px;
    font-size: 30px;
}

.paper-author-card__info h5 {
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 700;
}

.paper-author-card .paper-author__role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
}

.paper-author-card .paper-author__role svg {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    color: #2f6fd1;
}

.paper-author-card .paper-author__role--corresponding,
.paper-author-card .paper-author__role--corresponding svg {
    color: #16a34a;
}

.paper-author-card__place {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 8px 0 0;
}

.paper-author-card__place span {
    color: var(--color-text-light);
    font-size: 15px;
    line-height: 1.45;
}

.paper-author-card__stats {
    gap: 0;
    margin-top: 10px;
    font-size: 15px;
}

.paper-author-card__stats span + span {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #d8dee8;
}

.paper-author-card__stats strong {
    color: var(--color-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .paper-author-card .paper-author__avatar {
        width: 72px;
        height: 72px;
        font-size: 22px;
    }

    .paper-author-card__place span,
    .paper-author-card__stats,
    .paper-author-card .paper-author__role {
        font-size: 14px;
    }
}

/* Authors & Contributors: final match to the design */
.paper-authors .card-section-title,
.paper-authors .card-section-title span {
    color: var(--color-primary);
    font-weight: 700;
}

.paper-authors .paper-section__header {
    align-items: center;
    margin-bottom: 20px;
}

.paper-authors .paper-section__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.paper-authors .paper-section__link span {
    font-size: 20px;
    line-height: 1;
}

.paper-authors__grid {
    gap: 22px;
}

.paper-author-card {
    gap: 28px;
    padding: 14px 22px 14px 16px;
    border-color: #e6eaf0;
}

.paper-author-card__info h5,
.paper-author-card__info h5 a {
    color: var(--color-primary);
}

.paper-author-card .paper-author__role svg {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
}

.paper-author-card__stats span {
    color: #64748b;
}

/* References & Citations: five shown until "View all references" */
.paper-references.is-collapsed .paper-references__list li:nth-child(n+6) {
    display: none;
}

.paper-references__list a {
    color: var(--color-heading);
}

.paper-references__list a:hover {
    color: #2f6fd1;
}

.paper-references__badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #eaf2fc;
    color: #2f6fd1;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

button.paper-references__expand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

button.paper-references__expand[hidden] {
    display: none;
}

/* Papers not peer reviewed (yet): neutral badge, not the green check */
.product-tag.peer-tag--pending {
    background: #f1f3f6;
    color: #526078;
}

.paper-references__open {
    margin-left: 6px;
    color: #2f6fd1 !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Main gallery image opens the fullscreen gallery on click */
.product-main-image__img {
    cursor: zoom-in;
}

/* Lightbox controls: centred SVG icons, even spacing from the edges, and
   above the WordPress admin bar (z-index 99999). */
.rb-lightbox {
    z-index: 100000;
    padding: 72px 96px;
}

.rb-lightbox__close svg,
.rb-lightbox__nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rb-lightbox__close {
    top: 20px;
    right: 24px;
    width: 46px;
    height: 46px;
}

.rb-lightbox__nav {
    width: 52px;
    height: 52px;
    margin-top: -26px;
}

.rb-lightbox__prev {
    left: 24px;
}

.rb-lightbox__next {
    right: 24px;
}

@media (max-width: 600px) {
    .rb-lightbox {
        padding: 72px 12px 84px;
    }

    .rb-lightbox__close {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
    }

    .rb-lightbox__nav {
        bottom: 18px;
        width: 44px;
        height: 44px;
        margin-top: 0;
    }

    .rb-lightbox__prev {
        left: 16px;
    }

    .rb-lightbox__next {
        right: 16px;
    }
}
