/*
 * Shelving Store PDF Library — front-end styles
 * ---------------------------------------------------------------
 * Loaded on every front-end page (product pages, the PDF Downloads
 * page, and anywhere a [pdf_download] shortcode is used).
 * Edit freely — this file contains no plugin logic.
 */

/* ── Product page: bordered horizontal PDF table ── */
.product-pdfs-wrap {
    margin: 16px 0;
}
.product-pdfs-wrap h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #999;
    margin: 0 0 10px;
    font-weight: 600;
}
.product-pdfs-grid {
    display: inline-flex;
    flex-wrap: wrap;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
}
.product-pdf-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s;
}
.product-pdf-cell:hover {
    background: #fafafa;
    color: #e74c3c;
}
.product-pdf-cell svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.product-pdf-name {
    font-size: 12px;
    font-weight: 400;
    color: #777;
    margin-left: 2px;
}
.product-pdf-cell:hover .product-pdf-name {
    color: #c0392b;
}
/* Icon stroke colour on hover */
.product-pdf-cell:hover .pdf-icon-outline { stroke: #c0392b; }
.product-pdf-cell:hover .pdf-banner-bg    { fill:   #c0392b; }

/* ── [pdf_library_downloads] shortcode ── */
.pdf-library-container {
    /* max-width: 1300px; */
    margin: 0 auto;
    padding: 0px 20px;
}
.pdf-category-nav {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pdf-category-nav a {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    color: #333;
}
.pdf-category-nav a:hover {
    background: #33cc33;
    color: #fff;
}
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.pdf-item {
    text-align: center;
}
.pdf-thumb-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.pdf-thumb-wrapper img {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
    display: block;
}
.pdf-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 180px;
    margin: 0 auto;
}
.pdf-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}
.pdf-thumb-wrapper:hover .pdf-overlay {
    opacity: 1;
}
.pdf-title {
    margin-top: 8px;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}
.pdf-category-heading {
    margin: 30px 0 16px;
    font-size: 18px;
    border-bottom: 2px solid #33cc33;
    padding-bottom: 6px;
    scroll-margin-top: 100px; /* adjust to match your sticky header's height */
}
@media (max-width: 1024px) { .pdf-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .pdf-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .pdf-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Shortcode button (manual use outside product page) ── */
.pdf-download-button {
    display: inline-block;
    padding: 8px 12px;
    margin: 4px 6px 4px 0;
    background: #2c7be5;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}
.pdf-download-button:hover {
    background: #1a5bb8;
    color: #fff;
}
