/* Resource detail layout: portrait cover + information panel */
.product-page {
    padding-top: 28px;
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin-bottom: 18px;
    color: #8a93a3;
    font-size: 13px;
}

.product-breadcrumb a:hover {
    color: var(--brand);
}

.product-breadcrumb em {
    overflow: hidden;
    color: #6b7280;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-overview {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    margin-bottom: 26px;
    padding: 26px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(32, 45, 77, .07);
}

.product-poster-wrap {
    width: 100%;
}

.product-poster {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #eef1f6;
    border-radius: 11px;
    box-shadow: 0 10px 26px rgba(23, 32, 61, .16);
}

.product-poster-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #263b83, #7456df);
}

.product-poster-placeholder span {
    font-size: 52px;
    font-weight: 800;
    opacity: .86;
}

.product-poster-placeholder small {
    margin-top: 8px;
    letter-spacing: 3px;
    opacity: .7;
}

.product-overview-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 4px 2px;
}

.product-tags {
    min-height: 27px;
}

.product-heading {
    margin: 10px 0 12px;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.38;
    letter-spacing: -.4px;
}

.product-lead {
    margin: 0;
    color: #667085;
    font-size: 15px;
    line-height: 1.9;
}

.product-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    margin: 18px 0;
    padding: 12px 0;
    color: #8a93a3;
    font-size: 13px;
    border-top: 1px solid #eff1f5;
    border-bottom: 1px solid #eff1f5;
}

.product-stats b {
    color: #4b5563;
    font-weight: 600;
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 26px;
    width: 100%;
    margin: 0 0 22px;
}

.product-facts div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #e9ecf2;
}

.product-facts dt {
    color: #98a0ad;
}

.product-facts dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #374151;
    font-weight: 600;
}

.product-contact-btn {
    min-width: 260px;
    margin-top: auto;
    padding: 13px 24px;
    text-align: center;
}

.product-contact-note {
    margin: 8px 0 0;
    color: #9aa2af;
    font-size: 12px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
    padding: 13px 16px;
    color: #8a93a3;
    background: #fff6f2;
    border-radius: 9px;
}

.product-price strong {
    color: #ef4444;
    font-size: 29px;
    line-height: 1;
}

.product-content-layout {
    align-items: start;
}

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

.product-side-card {
    position: sticky;
    top: 88px;
}

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

.product-gallery img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}

@media (max-width: 900px) {
    .product-overview {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 25px;
        padding: 22px;
    }

    .product-heading {
        font-size: 26px;
    }

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

    .product-content-layout .sidebar {
        display: grid;
    }

    .product-side-card {
        position: static;
    }
}

@media (max-width: 680px) {
    .product-page {
        padding-top: 18px;
    }

    .product-breadcrumb {
        margin-bottom: 12px;
    }

    .product-overview {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 16px;
        border-radius: 12px;
    }

    .product-poster-wrap {
        width: min(100%, 360px);
        margin: 0 auto;
    }

    .product-overview-body {
        padding: 0 2px 4px;
    }

    .product-heading {
        margin-top: 8px;
        font-size: 23px;
    }

    .product-lead {
        font-size: 14px;
        line-height: 1.8;
    }

    .product-stats {
        gap: 14px;
        margin: 14px 0;
    }

    .product-facts {
        margin-bottom: 18px;
    }

    .product-contact-btn {
        width: 100%;
        min-width: 0;
    }

    .product-contact-note {
        width: 100%;
        text-align: center;
    }

    .product-content-layout .sidebar {
        display: block;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .product-gallery img {
        aspect-ratio: auto;
    }
}

/* Shared portrait cards used by home, category, search and related lists */
.resource-card > a {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.resource-card .resource-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    flex: none;
    object-fit: cover;
}

.resource-cover-placeholder {
    align-items: flex-end;
}

.resource-card .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.resource-card .summary {
    display: -webkit-box;
    flex: 1;
    height: auto;
    min-height: calc(13px * 1.65 * 3);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    text-overflow: ellipsis;
}

.resource-price {
    margin-top: 11px;
    color: #ef4444;
    font-size: 18px;
    font-weight: 800;
}

.resource-card .meta {
    gap: 8px;
}

.resource-card .meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-search {
    width: min(620px, 100%);
    margin: 22px 0 0;
}

@media (max-width: 600px) {
    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .resource-card {
        border-radius: 10px;
    }

    .resource-card .card-body {
        padding: 11px;
    }

    .resource-card .card-title {
        height: 42px;
        margin-bottom: 5px;
        font-size: 14px;
        line-height: 1.5;
    }

    .resource-card .summary {
        display: -webkit-box;
        min-height: calc(12px * 1.65 * 3);
        font-size: 12px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .resource-card .meta {
        margin-top: 8px;
        padding-top: 8px;
        font-size: 11px;
    }

    .page-search {
        margin-top: 17px;
    }
}

@media (max-width: 360px) {
    .resource-grid {
        gap: 8px;
    }

    .resource-card .card-body {
        padding: 9px;
    }

    .resource-card .meta span:last-child {
        display: none;
    }
}
