/*
Theme Name: PinPress
Description: Ultimate Premium Pinterest Platform. Ultra-fast, Dark Mode, Zero-JS Navigation.
Version: 3.0
Author: PinPress
*/

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --accent: #ff723b;
    /* Pinterest Red */
    --accent-soft: #ffeeef;
    --recipe-red: #ffdb3b;
    --gray: #666666;
    --light-gray: #f8f8f8;
    --border: #efefef;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --nav-height: 70px;
}

[data-theme="dark"] {
    --bg: #111111;
    --text: #eeeeee;
    --gray: #aaaaaa;
    --light-gray: #1a1a1a;
    --border: #2a2a2a;
    --card-bg: #1e1e1e;
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --accent-soft: rgba(230, 0, 35, 0.18);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Dark/light mode toggle: suppress every transition in the document for the
   instant the theme swaps, so every element using --bg/--text/etc. changes
   at once instead of some elements fading (via a stray `transition: all`
   somewhere else in this file) while everything else snaps immediately —
   scoped to *the whole page*, not a hand-picked selector list, on purpose. */
.pp-theme-switching,
.pp-theme-switching * {
    transition: none !important;
}

body {
    font-family: var(--font-stack);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
}

/* Header & Navigation */
.main-header {
    height: var(--nav-height);
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1000;
}

/* Breadcrumb Styling */
.breadcrumb,
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--gray);
    /* Separator color */
}

.breadcrumb a,
.breadcrumbs a {
    text-decoration: none !important;
    color: var(--gray) !important;
    transition: color 0.2s ease;
    border: none !important;
}

@media (hover: hover) {
    .breadcrumb a:hover,
    .breadcrumbs a:hover {
        color: var(--recipe-red) !important;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container {
    flex: 0 0 auto !important;
    max-width: none !important;
    overflow: visible;
}

.svg-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Space between red bars and text */
    height: 40px;
    width: auto;
}

.logo-icon {
    height: 30px;
    /* Red bars height */
    width: auto;
    flex-shrink: 0;
}

.site-title-text {
    font-size: 1.5rem;
    /* Adjust to match your preference */
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    /* Prevents text from wrapping/cutting */
    line-height: 1;
    font-family: var(--font-stack);
    text-decoration: none !important;
}

.logo-link,
.logo-link:hover,
.logo-link:visited,
.logo-link:focus,
.logo-link:active {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text) !important;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Visually hidden rather than display:none, so it stays keyboard-focusable
   and Space-operable — this is the ONLY way to open the mobile menu with a
   keyboard, since it drives the CSS-only .nav-toggle:checked ~ .main-navigation
   toggle below. */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-toggle:focus-visible ~ .hamburger {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.header-menu {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.header-menu>li {
    position: relative;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.header-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (hover: hover) {
    .header-menu a:hover {
        color: var(--accent);
    }
}

.arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.is-open .arrow {
    transform: rotate(180deg);
}

/* Dropdowns */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

@media (hover: hover) {
    .has-dropdown:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown li a {
    padding: 10px 20px;
    display: block;
    font-weight: 500;
}

@media (hover: hover) {
    .dropdown li a:hover {
        background: var(--light-gray);
    }
}

/* Theme Toggle */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    color: var(--text);
}

.theme-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.sun {
    display: block;
}

.moon {
    display: none;
}

[data-theme="dark"] .sun {
    display: none;
}

[data-theme="dark"] .moon {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-field {
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 20px;
    background: var(--light-gray);
    color: var(--text);
    font-size: 0.85rem;
}

/* Homepage Grid — side padding so full-bleed cards (newsletter, about,
   testimonials, shop promo) get real gutters at every viewport width. On
   desktop this was masked by .site-wrapper's max-width leaving empty space
   outside it on wide screens; on mobile, where the viewport IS the wrapper
   width, sections had no inset at all without this. */
.homepage-sections {
    margin-top: 40px;
    padding: 0 20px;
}

.pin-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

@media (min-width: 768px) {
    .pin-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .pin-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .pin-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

.archive-container {
    padding: 40px 20px;
}

.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

/* Pagination (search results, /latest-articles/, /popular-articles/) */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 50px 0 20px;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 100px;
    background: var(--light-gray);
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.pagination .page-numbers.current {
    background: var(--accent);
    color: #fff;
}

.pagination .page-numbers.dots {
    background: transparent;
}

@media (hover: hover) {
    .pagination .page-numbers:not(.current):not(.dots):hover {
        background: var(--accent-soft);
        color: var(--accent);
    }
}

.category-section {
    margin-bottom: 40px;
}

.view-all-categories-wrap {
    text-align: center;
    margin: 20px 0 50px;
}

.view-all-categories-cta {
    display: inline-block;
    background: var(--light-gray);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
}

@media (hover: hover) {
    .view-all-categories-cta:hover {
        border-color: var(--accent);
        color: var(--accent);
    }
}

/* /categories/ index page */
.categories-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.category-index-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .category-index-card:hover {
        transform: translateY(-3px);
        border-color: var(--accent);
    }
}

.category-index-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.category-index-count {
    font-size: 0.85rem;
    color: var(--gray);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 20px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.section-title a {
    text-decoration: none;
    color: inherit;
}

.view-all {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Pin Card Styling */
.pin-card {
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (hover: hover) {
    .pin-card:hover {
        transform: translateY(-4px);
    }
}

.pin-image {
    width: 100%;
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.pin-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0 !important;
    margin: 0 !important;
}

.pin-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pin-title {
    font-size: 1rem;
    margin: 0 0 15px;
    line-height: 1.3;
    font-weight: 700;
}

.pin-title a {
    text-decoration: none;
    color: inherit;
}

.pin-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.action-btn {
    background: var(--light-gray);
    border: none;
    padding: 6px 4px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
    min-width: 0;
    white-space: nowrap;
}

.action-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    margin-right: 3px;
    flex-shrink: 0;
}

/* Heart Icon via Mask (Robust for translation) */
.heart-btn::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 3px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    flex-shrink: 0;
}

/* Hide Heart SVG to use Mask */
.heart-btn svg {
    display: none !important;
}

.heart-btn[data-saved="true"] {
    color: var(--accent);
    background: var(--accent-soft);
}

.heart-btn[data-saved="true"]::before {
    background-color: var(--accent);
}

@media (hover: hover) {
    .heart-btn:hover {
        color: var(--accent);
        background: var(--accent-soft);
    }
}

.heart-btn {
    flex: 1;
}

.pin-btn {
    background: var(--accent);
    color: #fff;
    flex: 0 0 auto;
    padding: 6px 12px;
}

@media (hover: hover) {
    .pin-btn:hover {
        filter: brightness(1.1);
    }
}

/* Single Post Specifics */
.single-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.entry-meta {
    margin-top: 10px;
    margin-bottom: 20px;
    color: var(--gray);
    font-size: 0.9em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.entry-meta .author a {
    color: inherit;
    text-decoration: underline;
}

/* Headings Anchor Offset for Sticky Navigation */
.entry-content h2[id],
.entry-content h3[id] {
    scroll-margin-top: calc(var(--nav-height, 70px) + 20px);
}

/* Table of Contents */
.toc-box {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 0 0 35px;
}

.toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.toc-arrow {
    transition: transform 0.2s ease;
}

.toc-box.is-collapsed .toc-arrow {
    transform: rotate(-90deg);
}

.toc-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.toc-box.is-collapsed .toc-list {
    display: none;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list li.toc-sub {
    margin-left: 20px;
    font-size: 0.92rem;
}

.toc-list a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

@media (hover: hover) {
    .toc-list a:hover {
        color: var(--recipe-red);
        text-decoration: underline;
    }
}

/* Newsletter section — shared between the homepage and single-post variants,
   which is why both carry the .pinpress-newsletter-section class. */
.pinpress-newsletter-section {
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--nl-bg-start, #E60023) 0%, var(--nl-bg-end, #B8001C) 100%);
    padding: 40px 20px;
    border-radius: 12px;
    color: #000000;
    text-align: center;
    box-shadow: 0 10px 30px rgba(230, 0, 35, 0.2);
}

.single-newsletter-section {
    margin-top: 50px;
}

.pinpress-newsletter-section h2 {
    margin-top: 0;
    font-size: 28px;
    margin-bottom: 10px;
    color: #000000;
}

.pinpress-newsletter-section > p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pinpress-newsletter-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 450px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.pinpress-newsletter-form .nl_email {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #111;
}

.pinpress-newsletter-form .nl_submit {
    background: var(--nl-btn-bg, #111);
    color: var(--nl-btn-text, #fff);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

@media (hover: hover) {
    .pinpress-newsletter-form .nl_submit:hover {
        filter: brightness(1.1);
    }
}

.nl_message {
    margin-top: 15px;
    font-size: 14px;
    display: none;
}

/* Homepage "About" section */
.home-about-section {
    margin-bottom: 50px;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.home-about-section .section-title {
    margin-bottom: 15px;
    font-size: 28px;
}

.home-about-text {
    max-width: 700px;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 30px;
}

.home-about-avatars {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.home-about-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

/* Shown instead of .home-about-avatar's <img> when an author has no photo
   (portrait generation is opt-in during setup, off by default). */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--accent) 0%, var(--recipe-red) 100%);
}

.avatar-placeholder span {
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.avatar-placeholder.home-about-avatar span {
    font-size: 1.5rem;
}

.home-about-cta {
    background: var(--accent);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
}

@media (hover: hover) {
    .home-about-cta:hover {
        filter: brightness(1.1);
    }
}

/* Homepage "Testimonials" section */
.home-testimonials-section {
    margin-bottom: 50px;
    text-align: center;
}

.home-testimonials-header {
    justify-content: center;
    margin-bottom: 30px;
}

.home-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.testimonial-stars {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 20px;
}

.testimonial-text {
    font-style: italic;
    color: var(--gray);
    margin-bottom: 15px;
}

.testimonial-author {
    font-size: 14px;
}

.featured-image-wrapper {
    position: relative;
    width: 100%;
    display: block;
    margin: 20px 0;
    height: auto !important;
    max-height: none !important;
}

.featured-image-wrapper img.featured-main-img {
    width: 100% !important;
    height: auto !important;
    display: block;
    max-height: none !important;
    object-fit: contain !important;
}

/* Container Logic - Sprint 18.18 */
.featured-image-wrapper {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 20px auto !important;
}

.body-pin-wrapper {
    position: relative !important;
    display: block !important;
    width: fit-content !important;
    margin: 20px auto !important;
}

/* The Master Button Design - Sprint 18.16 */
.pin-save-btn {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 100 !important;
    background-color: #d32f2f !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 100px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Pushpin Icon via CSS (Sprint 18.17) */
.pin-save-btn::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    background-color: white;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Hide fallback SVGs to prevent double icons */
.pin-save-btn svg {
    display: none !important;
}

/* Hover Logic for Desktop */
@media (min-width: 1024px) {
    .pin-save-btn {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .featured-image-wrapper:hover .pin-save-btn,
    .body-pin-wrapper:hover .pin-save-btn {
        opacity: 1;
        visibility: visible;
    }
}

/* Always Show for Mobile */
@media (max-width: 1023px) {
    .pin-save-btn {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* In-content Pinterest Save Button (Hover) */
.save-on-hover {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 25px;
}

/* Body Content Pin Wrapper Safety - Sprint 18.16 */
.body-pin-wrapper p,
.body-pin-wrapper br {
    display: none !important;
}

.body-pin-wrapper::before,
.body-pin-wrapper::after,
.pin-save-btn::after {
    display: none !important;
    content: none !important;
}

/* Content Area - Sprint 18.10 */
.entry-content {
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.entry-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.entry-content figure {
    margin: 30px auto !important;
    width: fit-content !important;
    max-width: 100% !important;
}

/* Each About-page author's heading, photo (or placeholder avatar), and bio
   are wrapped server-side (pp_about_wrap_author_card()) into one flex card —
   photo on one side, name+bio grouped together on the other — so they can
   never visually drift apart from each other regardless of bio length. This
   replaced an earlier float-based layout where a short/tall portrait's
   height didn't line up with its own bio text, causing the NEXT author's
   name to render beside the CURRENT author's photo. */
.entry-content .author-card {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin: 30px 0;
}

.entry-content .author-card-photo {
    flex: 0 0 170px;
    width: 170px;
}

.entry-content .author-card-photo figure.author-portrait-inline {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.entry-content .author-card-photo figure.author-portrait-inline img {
    border-radius: 20px;
    margin: 0 !important;
    display: block;
    width: 100%;
    height: auto;
}

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

.entry-content .author-card-info h2,
.entry-content .author-card-info h3 {
    margin-top: 0 !important;
}

/* Placeholder avatar shown when an author has no AI-generated portrait
   (photo generation is opt-in, and off by default) — a styled initials
   badge instead of a broken/empty image. */
.author-placeholder-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--accent) 0%, var(--recipe-red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-placeholder-avatar span {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 1px;
}

@media (max-width: 560px) {
    .entry-content .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .entry-content .author-card-photo {
        flex: 0 0 auto;
        width: 190px;
    }
}

/* Zero-Blue Standard for In-Content Links (Sprint 30.1) */
.entry-content a {
    color: var(--text);
    text-decoration: none !important;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: none !important;
}

@media (hover: hover) {
    .entry-content a:hover {
        color: var(--recipe-red);
    }
}

/* Protect Recipe Pin Button (Sprint 32) */
.entry-content a.action-btn.pin-btn {
    color: #fff !important;
}

.entry-content a.action-btn.pin-btn:hover {
    color: #fff !important;
}

/* Removed .pin-save-overlay to fix ghost buttons - Sprint 18.13 */

/* Responsive Modern HTML Tables in Post Content */
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 35px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card-bg, #ffffff);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.entry-content th {
    background-color: var(--light-gray, #f8f8f8);
    color: var(--text);
    font-weight: 700;
    text-align: left;
    padding: 14px 20px;
    border-bottom: 2px solid var(--border);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.entry-content td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
}

.entry-content tr:last-child td {
    border-bottom: none;
}

.entry-content tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .entry-content tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.025);
}

.entry-content tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.035);
    transition: background-color 0.15s ease;
}

[data-theme="dark"] .entry-content tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.88rem;
        margin: 25px 0;
    }
    
    .entry-content th,
    .entry-content td {
        padding: 10px 14px;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .pin-save-overlay {
        opacity: 1;
        top: 15px;
        left: 15px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .featured-image-full-width {
        margin-bottom: 30px;
    }
}

/* Ultimate Recipe Card - Premium Overhaul */
.pinpress-recipe {
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 50px;
    background: var(--bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin: 60px 0;
}

.recipe-grid-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    align-items: stretch;
    /* Aligns columns horizontally */
}

.recipe-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recipe-hero-image-container {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.recipe-card-img {
    width: 100%;
    height: auto !important;
    /* Allow natural height for sharpness */
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.recipe-title {
    font-size: 2.8rem;
    line-height: 1.1;
    margin: 0 0 20px 0;
    /* Adjusted for inside-info-column placement */
    color: var(--text);
    font-weight: 900;
}

.recipe-summary {
    font-size: 1.1rem;
    color: var(--text);
    /* Matches post content color */
    margin-bottom: 25px;
    line-height: 1.6;
}

.recipe-author {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 15px;
    /* Sits under description now */
    font-size: 0.9rem;
}

.author-label {
    color: var(--text);
    /* Matches description text color */
}

.recipe-author a {
    color: var(--recipe-red) !important;
    text-decoration: none !important;
    border: none !important;
}

.recipe-image-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: stretch;
}

.recipe-image-actions .action-btn {
    border-radius: 100px;
    /* Pill shape */
    padding: 10px 20px;
    font-size: 0.9rem;
    flex: 1;
}

.recipe-header-sep {
    border: none;
    border-top: 2px solid var(--recipe-red);
    margin: 40px 0;
    opacity: 1;
}

.recipe-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 30px 0 40px;
    width: 100%;
    box-sizing: border-box;
}

.detail-item {
    background: var(--card-bg);
    padding: 12px 10px;
    border-radius: 20px;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    min-width: 0;
    box-sizing: border-box;
}

@media (hover: hover) {
    .detail-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        border-color: var(--recipe-red);
    }
}

.detail-icon {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--recipe-red);
}

.detail-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.detail-item strong {
    display: block;
    color: var(--gray);
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    line-height: 1.1;
}

.detail-item span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    display: block;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    line-height: 1.2;
}

.detail-item a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    line-height: 1.2;
    display: block;
}

@media (hover: hover) {
    .detail-item a:hover {
        opacity: 0.8;
        text-decoration: underline;
    }
}

.red-sep {
    border: none;
    border-top: 2px solid var(--recipe-red);
    margin: 40px 0;
    opacity: 1;
}

.recipe-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text);
}

/* Recipe Controls & Lists - Sprint 21 & 21.1 & 21.2 */
.recipe-controls-premium {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    align-items: flex-end;
    flex-wrap: nowrap !important; /* Force one line */
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.control-item-premium {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
}

.control-item-premium label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 0.8px;
}

.select-wrapper {
    position: relative;
    min-width: 80px; /* Ensure enough room for text + arrow */
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--light-gray);
    border: 1px solid var(--border);
    padding: 8px 28px 8px 12px; /* Consistent padding */
    border-radius: 12px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    outline: none;
    width: 100%; /* Fill the wrapper */
    text-align: left;
    display: block;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    pointer-events: none;
    color: var(--gray);
}

.premium-cook-btn {
    background: var(--light-gray);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 36.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.premium-cook-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--gray);
    transition: fill 0.3s;
}

@media (hover: hover) {
    .premium-cook-btn:hover {
        background: var(--card-bg);
        border-color: var(--recipe-red);
    }
}

/* Cook Mode Active State - White text on Red */
.premium-cook-btn.is-active {
    background: var(--recipe-red) !important;
    color: #ffffff !important;
    border-color: var(--recipe-red) !important;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.premium-cook-btn.is-active svg {
    fill: #ffffff !important;
}

.recipe-ingredients-list, .recipe-instructions-list {
    margin-top: 20px;
}

.premium-row {
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.premium-checklist-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 15px;
    background: transparent;
    transition: all 0.2s ease;
    user-select: none;
    width: 100%;
}

@media (hover: hover) {
    .premium-checklist-label:hover {
        background: var(--light-gray);
    }
}

.premium-checkbox {
    display: none;
}

.premium-check-visual {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s;
    background: var(--card-bg);
}

.premium-checkbox:checked + .premium-check-visual {
    background: var(--recipe-red);
    border-color: var(--recipe-red);
}

.premium-checkbox:checked + .premium-check-visual::after {
    content: "✓";
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

.premium-text {
    font-size: 1.05rem;
    color: var(--text);
    transition: all 0.2s;
    line-height: 1.5;
}

.qty {
    color: var(--recipe-red);
    font-weight: 800;
}

.premium-step-num {
    font-weight: 900;
    color: var(--recipe-red);
    font-style: italic;
    font-size: 1.1rem;
    min-width: 25px;
}

.is-checked .premium-text {
    color: var(--gray) !important;
    text-decoration: line-through !important;
    opacity: 0.8;
}

.is-checked .premium-step-num {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Nutrition Overhaul - Sprint 22 & 23 (Unified with Details) */
.recipe-nutrition {
    margin-top: 30px;
}

.nutrition-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.nutrition-card {
    background: var(--card-bg);
    padding: 15px 12px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@media (hover: hover) {
    .nutrition-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        border-color: var(--recipe-red);
    }
}

.nutri-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
}

.nutri-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text);
}

@media (max-width: 900px) {
    .nutrition-grid-premium {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .recipe-grid-layout {
        flex-direction: column !important;
        gap: 25px;
    }

    .recipe-hero-image-container {
        width: 100% !important;
    }

    .recipe-card-img {
        max-height: none;
        width: 100%;
        height: auto !important;
        border-radius: 15px;
        aspect-ratio: auto;
    }

    .recipe-image-actions {
        flex-direction: row;
    }

    .recipe-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recipe-controls-premium {
        gap: 8px;
        padding-bottom: 5px;
    }

    .control-item-premium {
        flex: 1;
        min-width: 0;
    }

    .control-item-premium label {
        font-size: 0.65rem;
        white-space: normal;
    }

    .select-wrapper {
        min-width: 0;
    }

    .select-wrapper select {
        padding: 8px 22px 8px 8px;
        font-size: 0.85rem;
    }

    .premium-cook-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 4px;
    }
}

/* Related Posts Enhancements - Sprint 24 & 24.1 & 24.2 */
.related-posts {
    margin-top: 20px;
}

.related-posts .section-title {
    color: var(--gray) !important;
    text-align: center;
    margin-bottom: 40px;
}

.related-posts .pin-container {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 900px) {
    .related-posts .pin-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .related-posts .pin-container {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .pin-actions {
        gap: 2px;
    }

    .action-btn {
        padding: 5px 2px;
        font-size: 0.72rem;
        letter-spacing: -0.3px;
    }

    .action-btn svg, .heart-btn::before {
        width: 12px;
        height: 12px;
        margin-right: 2px;
    }

    .pin-btn {
        padding: 5px 6px !important;
    }
}

/* Comment & Review Overhaul - Sprint 25 */
#comments {
    margin-top: 60px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--gray);
    text-align: center;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.comment-body {
    padding: 25px;
    background: var(--card-bg);
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .comment-body:hover {
        transform: translateX(5px);
        background: var(--card-bg);
        box-shadow: 0 5px 15px rgba(0,0,0,0.03);
        border-color: var(--recipe-red);
    }
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-meta img {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-author cite {
    font-style: normal;
    font-weight: 800;
    color: var(--text);
}

.comment-author a, 
.comment-author a:visited,
.comment-metadata a, 
.comment-metadata a:visited,
.comment-meta a,
.comment-meta a:visited {
    color: var(--gray) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .comment-author a:hover,
    .comment-metadata a:hover,
    .comment-meta a:hover {
        color: var(--recipe-red) !important;
        text-decoration: underline !important;
    }
}

.reply a {
    color: var(--recipe-red) !important;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-content {
    color: var(--text);
    line-height: 1.7;
}

.comment-rating {
    color: var(--recipe-red);
    margin: 10px 0;
    font-size: 1rem;
    letter-spacing: 2px;
}

/* Review Form Refinement */
#reply-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text);
    text-align: center;
}

.comment-respond {
    border-top: 1px solid var(--border);
    padding-top: 50px;
    margin-top: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.comment-notes,
.comment-form-notes,
.comment-respond > p,
#commentform .comment-notes,
.comment-form > p.comment-notes,
#respond .comment-notes,
#email-notes {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin: 0 auto 30px !important;
    font-size: 0.9rem;
    color: var(--gray);
    display: block !important;
    width: 100% !important;
    max-width: none !important;
}

.comment-notes span {
    display: inline-block;
    text-align: center;
}

.comment-form {
    display: grid;
    gap: 20px;
}

.comment-form-comment {
    grid-column: 1 / -1;
}

.comment-form-author, .comment-form-email {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .comment-form {
        grid-template-columns: 1fr 1fr;
    }
}

.comment-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--light-gray);
    color: var(--text);
    font-family: inherit;
    transition: all 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--recipe-red);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.05);
}

/* Star Rating - Global Pinterest Red */
.comment-form-rating {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center horizontally */
    gap: 12px;
}

.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center; /* Center stars */
    gap: 8px;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    color: #e0e0e0;
    cursor: pointer;
    font-size: 32px;
    transition: all 0.2s ease;
    margin: 0;
}

.rating-stars input:checked ~ label {
    color: var(--recipe-red);
    text-shadow: 0 0 10px rgba(230, 0, 35, 0.2);
    transform: scale(1.1);
}

@media (hover: hover) {
    .rating-stars label:hover,
    .rating-stars label:hover ~ label {
        color: var(--recipe-red);
        text-shadow: 0 0 10px rgba(230, 0, 35, 0.2);
        transform: scale(1.1);
    }
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.comment-form-cookies-consent input {
    margin: 0 !important;
    width: auto !important;
}

.comment-form-cookies-consent label {
    margin: 0 !important;
    font-size: 0.85rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--gray) !important;
    cursor: pointer;
    line-height: 1.4;
}

.form-submit {
    margin-top: 10px;
    text-align: center;
    grid-column: 1 / -1; /* Full width for centering */
}

.submit {
    background: var(--recipe-red);
    color: #fff;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .submit {
        width: auto;
    }
}

@media (hover: hover) {
    .submit:hover {
        background: #ad001d;
        transform: translateY(-2px);
        box-shadow: 0 15px 30px rgba(230, 0, 35, 0.2);
    }
}


/* Responsive Overrides */
@media (max-width: 900px) {
    .recipe-top-section {
        flex-direction: column;
    }

    .recipe-hero-image {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 0 15px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .hamburger span {
        background: var(--text);
        height: 3px;
        width: 25px;
        border-radius: 2px;
    }

    .main-navigation {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-toggle:checked~.main-navigation {
        max-height: 100vh;
    }

    .header-menu {
        flex-direction: column;
        padding: 20px;
        gap: 0;
        align-items: flex-start;
        width: 100%;
    }

    .header-menu>li {
        height: auto;
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .header-menu>li:last-child {
        border-bottom: 0;
    }

    .header-menu>li>a {
        padding: 15px 0;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding-left: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: var(--light-gray);
        width: 100%;
    }

    .has-dropdown.is-open .dropdown {
        max-height: 1000px;
        padding-bottom: 15px;
    }

    .header-actions {
        padding: 20px 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form {
        width: 100%;
    }

    .search-field {
        width: 100%;
    }
}

footer {
    padding: 60px 20px;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: product page
   ───────────────────────────────────────────────────────────────────────── */
.shop-product-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 80px;
}

.shop-product-hero {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

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

.shop-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 12px;
}

.shop-title {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 20px;
    color: var(--text);
}

.shop-description {
    color: var(--gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

.shop-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 30px;
}

.shop-paypal-container {
    max-width: 420px;
    margin-bottom: 15px;
}

.shop-secure-note {
    font-size: 0.85rem;
    color: var(--gray);
}

.shop-unavailable {
    background: var(--light-gray);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--gray);
    max-width: 420px;
}

.shop-checkout-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--light-gray);
    color: var(--text);
    max-width: 420px;
    font-size: 0.9rem;
}

.shop-checkout-message.shop-checkout-error {
    background: #fef2f2;
    color: #991b1b;
}

[data-theme="dark"] .shop-checkout-message.shop-checkout-error {
    background: rgba(220, 38, 38, 0.18);
    color: #fca5a5;
}

@media (max-width: 800px) {
    .shop-product-hero {
        flex-direction: column;
        gap: 30px;
    }

    .shop-title {
        font-size: 2rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: gated reader page
   ───────────────────────────────────────────────────────────────────────── */
.shop-reader-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 50px 20px 100px;
}

.shop-reader-header {
    text-align: center;
    margin-bottom: 50px;
}

.shop-reader-cover {
    width: 140px;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.shop-reader-header h1 {
    font-size: 2.4rem;
    font-weight: 900;
    margin: 0 0 10px;
    color: var(--text);
}

.shop-reader-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.shop-print-btn {
    background: var(--light-gray);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
}

@media (hover: hover) {
    .shop-print-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
    }
}

.shop-reader-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text);
}

.shop-reader-content h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 50px 0 20px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.shop-reader-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.shop-reader-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 30px 0 15px;
}

.shop-reader-content p {
    margin: 0 0 20px;
}

.shop-reader-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 30px 0;
    display: block;
}

.shop-reader-content ul,
.shop-reader-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.shop-reader-content li {
    margin-bottom: 8px;
}

.shop-reader-invalid {
    text-align: center;
    padding: 60px 20px;
}

.shop-reader-invalid h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.shop-reader-invalid p {
    color: var(--gray);
    max-width: 480px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.shop-buy-cta {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 800;
}

@media (hover: hover) {
    .shop-buy-cta:hover {
        filter: brightness(1.1);
    }
}

/* Printing the reader page ("Save as PDF") should produce a clean document —
   no header, footer, nav, or the print button itself. */
@media print {
    .main-header,
    footer,
    .shop-print-btn {
        display: none !important;
    }

    .shop-reader-page {
        max-width: 100%;
        padding: 0;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: inline promo (homepage + single post) — wraps the exact same hero
   used on the dedicated /shop/ page, just inside a contained card so it
   doesn't feel like it's floating edge-to-edge mid-page.
   ───────────────────────────────────────────────────────────────────────── */
.shop-inline-promo {
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--card-bg) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
}

.shop-inline-promo .shop-product-hero {
    align-items: center;
}

@media (max-width: 700px) {
    .shop-inline-promo {
        padding: 30px 20px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: 3D-tilted cover on the product page
   ───────────────────────────────────────────────────────────────────────── */
.shop-cover-wrap {
    flex: 0 0 360px;
    perspective: 1400px;
}

.shop-cover {
    position: relative;
    transform: rotateY(-18deg) rotateX(4deg);
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

@media (hover: hover) {
    .shop-cover:hover {
        transform: rotateY(-8deg) rotateX(2deg) scale(1.02);
    }
}

.shop-cover img {
    width: 100%;
    height: auto;
    border-radius: 10px 20px 20px 10px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.25),
        -6px 6px 0 rgba(0, 0, 0, 0.08),
        -12px 12px 0 rgba(0, 0, 0, 0.05);
    display: block;
}

.shop-cover-shine {
    position: absolute;
    inset: 0;
    border-radius: 10px 20px 20px 10px;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 30%);
    pointer-events: none;
}

/* Shown before a real cover has been uploaded — during/after setup, or any
   time the admin hasn't added one yet. */
.shop-cover-placeholder {
    aspect-ratio: 3 / 4;
    border-radius: 10px 20px 20px 10px;
    background: linear-gradient(145deg, var(--accent) 0%, var(--recipe-red, var(--accent)) 100%);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.25),
        -6px 6px 0 rgba(0, 0, 0, 0.08),
        -12px 12px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 30px;
}

.shop-cover-placeholder-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.shop-cover-placeholder-text {
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.3;
    opacity: 0.95;
}

@media (max-width: 800px) {
    .shop-cover-wrap {
        flex: 0 0 auto;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        perspective: none;
    }

    .shop-cover {
        transform: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: highlights checklist on the product page
   ───────────────────────────────────────────────────────────────────────── */
.shop-highlights-list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.4;
}

.shop-highlight-check {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: shared section heading + long description + testimonials
   ───────────────────────────────────────────────────────────────────────── */
.shop-section-heading {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    margin: 60px 0 24px;
    text-align: center;
}

.shop-description-section {
    margin-top: 20px;
}

.shop-description-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.shop-description-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 30px 0 14px;
}

.shop-description-content h3:first-child {
    margin-top: 0;
}

.shop-description-content p {
    margin: 0 0 18px;
}

.shop-description-content ul,
.shop-description-content ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

.shop-description-content li {
    margin-bottom: 8px;
}

.shop-testimonials-section {
    margin-top: 20px;
}

.shop-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.shop-testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.shop-testimonial-stars {
    color: #f5a623;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.shop-testimonial-text {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0 0 14px;
}

.shop-testimonial-text::before { content: '\201C'; }
.shop-testimonial-text::after { content: '\201D'; }

.shop-testimonial-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--gray);
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: blurred/faded content teaser ("first look" hook)
   ───────────────────────────────────────────────────────────────────────── */
.shop-teaser-section {
    margin-top: 20px;
}

.shop-teaser-wrap {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    max-height: 520px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    padding: 40px 44px 0;
}

.shop-teaser-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.shop-teaser-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 16px;
}

.shop-teaser-content p {
    margin: 0 0 18px;
}

.shop-teaser-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, var(--card-bg) 85%);
    pointer-events: none;
}

.shop-teaser-unlock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 20px 34px;
    text-align: center;
}

.shop-teaser-unlock p {
    font-weight: 800;
    color: var(--text);
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.shop-teaser-cta {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 14px 34px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) {
    .shop-teaser-cta:hover {
        filter: brightness(1.1);
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Shop: reader-page action buttons (download PDF / print / read online)
   ───────────────────────────────────────────────────────────────────────── */
.shop-reader-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-reader-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--light-gray);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.shop-reader-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@media (hover: hover) {
    .shop-reader-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .shop-reader-btn-primary:hover {
        color: #fff;
        filter: brightness(1.1);
    }
}

/* ═════════════════════════════════════════════════════════════════════════
   PINPRESS MULTI-NICHE DIGITAL LIBRARY & SHOPPING CART SYSTEM (v2.0)
   ═════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   1. HEADER CART BUTTON & DYNAMIC BADGE
   ───────────────────────────────────────────────────────────────────────── */
.header-cart-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.header-cart-btn:hover {
    background-color: var(--light-gray, #f3f4f6);
    transform: scale(1.05);
}

.header-cart-btn svg {
    display: block;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--card-bg, #ffffff);
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────────────────────
   2. SLIDE-OUT CART DRAWER & BACKDROP
   ───────────────────────────────────────────────────────────────────────── */
body.pp-cart-open-scroll-lock {
    overflow: hidden !important;
}

.pp-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    justify-content: flex-end;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.3s ease;
}

.pp-cart-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.pp-cart-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pp-cart-drawer.is-open .pp-cart-backdrop {
    opacity: 1;
}

.pp-cart-panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: var(--card-bg, #ffffff);
    color: var(--text, #111827);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.pp-cart-drawer.is-open .pp-cart-panel {
    transform: translateX(0);
}

.pp-cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg, #ffffff);
}

.pp-cart-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-cart-title-wrap h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text, #111827);
}

.pp-cart-count-badge {
    background: var(--light-gray, #f3f4f6);
    color: var(--text, #111827);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.pp-cart-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--gray, #6b7280);
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.pp-cart-close:hover {
    background: var(--light-gray, #f3f4f6);
    color: var(--text, #111827);
}

.pp-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.pp-cart-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.pp-cart-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.8;
}

.pp-cart-empty-state p {
    color: var(--gray, #6b7280);
    font-size: 15px;
    margin-bottom: 20px;
}

.pp-cart-shop-now-btn {
    display: inline-block;
    background: var(--accent, #e60023);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.pp-cart-shop-now-btn:hover {
    opacity: 0.9;
}

/* Cart Item Row */
.pp-cart-item-row {
    display: flex;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.pp-cart-item-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pp-cart-item-cover {
    width: 65px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--light-gray, #f3f4f6);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.pp-cart-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.pp-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pp-cart-item-cat {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent, #e60023);
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.pp-cart-item-title {
    margin: 0 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text, #111827);
}

.pp-cart-item-price-line {
    margin-bottom: 8px;
}

.pp-cart-item-price {
    font-size: 14.5px;
    font-weight: 800;
    color: #059669;
}

.pp-cart-item-ctrls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.pp-cart-qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
    background: var(--card-bg, #ffffff);
}

.pp-cart-qty-btn {
    background: transparent;
    border: none;
    width: 26px;
    height: 26px;
    font-weight: 800;
    cursor: pointer;
    color: var(--text, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.pp-cart-qty-btn:hover {
    background: var(--light-gray, #f3f4f6);
}

.pp-cart-qty-val {
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
    min-width: 20px;
    text-align: center;
}

.pp-cart-item-remove {
    background: none;
    border: none;
    color: var(--gray, #9ca3af);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}

.pp-cart-item-remove:hover {
    color: #ef4444;
}

/* Cart Footer */
.pp-cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border, #e5e7eb);
    background: var(--light-gray, #f9fafb);
}

.pp-cart-summary {
    margin-bottom: 16px;
}

.pp-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #111827);
}

.pp-cart-subtotal-row strong {
    font-size: 20px;
    font-weight: 800;
    color: #059669;
}

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

.pp-cart-paypal-box {
    min-height: 44px;
}

.pp-cart-btn-secondary {
    width: 100%;
    padding: 12px;
    border-radius: 50px;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--card-bg, #ffffff);
    color: var(--text, #111827);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pp-cart-btn-secondary:hover {
    background: var(--light-gray, #f3f4f6);
    border-color: var(--gray, #d1d5db);
}

.pp-cart-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    margin-top: 10px;
    text-align: center;
}

.pp-cart-security-badge {
    text-align: center;
    margin: 12px 0 0;
    font-size: 11.5px;
    color: var(--gray, #6b7280);
}

/* ─────────────────────────────────────────────────────────────────────────
   3. UNIVERSAL DIGITAL LIBRARY SHOWCASE (HOMEPAGE & SINGLE POSTS)
   ───────────────────────────────────────────────────────────────────────── */
.pp-library-showcase-section {
    margin: 45px 0 55px;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.pp-library-showcase-container {
    display: flex;
    align-items: center;
    padding: 45px 50px;
    gap: 40px;
}

.pp-library-showcase-visual {
    flex: 0 0 280px;
    display: flex;
    justify-content: center;
}

.pp-library-book-stack {
    position: relative;
    width: 170px;
    height: 230px;
}

.pp-library-stack-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pp-library-stack-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-stack-1 { transform: rotate(-8deg) translateX(-15px); z-index: 1; }
.pp-stack-2 { transform: rotate(-2deg) translateY(-6px); z-index: 2; }
.pp-stack-3 { transform: rotate(5deg) translateX(12px); z-index: 3; }
.pp-stack-4 { transform: rotate(12deg) translateX(25px) translateY(8px); z-index: 4; }

.pp-library-book-stack:hover .pp-stack-1 { transform: rotate(-14deg) translateX(-25px); }
.pp-library-book-stack:hover .pp-stack-2 { transform: rotate(-4deg) translateY(-12px); }
.pp-library-book-stack:hover .pp-stack-3 { transform: rotate(8deg) translateX(18px); }
.pp-library-book-stack:hover .pp-stack-4 { transform: rotate(18deg) translateX(36px); }

.pp-stack-placeholder {
    background: linear-gradient(135deg, var(--accent, #e60023) 0%, #b91c1c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.pp-library-showcase-content {
    flex: 1;
}

.pp-library-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.pp-library-title {
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #ffffff;
}

.pp-library-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #d1d5db;
    margin: 0 0 22px;
    max-width: 600px;
}

.pp-library-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.pp-lib-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

.pp-library-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent, #e60023);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 15px;
    padding: 14px 34px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(230, 0, 35, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.pp-library-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(230, 0, 35, 0.5);
    filter: brightness(1.08);
}

@media (max-width: 850px) {
    .pp-library-showcase-container {
        flex-direction: column;
        padding: 35px 24px;
        text-align: center;
    }

    .pp-library-description {
        margin-left: auto;
        margin-right: auto;
    }

    .pp-library-badges {
        justify-content: center;
    }

    .pp-library-title {
        font-size: 1.7rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   4. SHOP CATALOG PAGE (shop.php)
   ───────────────────────────────────────────────────────────────────────── */
.shop-catalog-hero {
    text-align: center;
    padding: 40px 20px 30px;
    max-width: 860px;
    margin: 0 auto 30px;
}

.shop-catalog-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--light-gray, #f3f4f6);
    color: var(--accent, #e60023);
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 12px;
}

.shop-catalog-main-title {
    font-size: 2.6rem;
    font-weight: 900;
    margin: 0 0 12px;
    color: var(--text, #111827);
    line-height: 1.15;
}

.shop-catalog-sub-title {
    font-size: 1.15rem;
    color: var(--gray, #6b7280);
    line-height: 1.6;
    margin: 0 0 25px;
}

.shop-category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.shop-filter-pill {
    display: inline-block;
    background: var(--light-gray, #f3f4f6);
    color: var(--text, #111827);
    border: 1px solid var(--border, #e5e7eb);
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.shop-filter-pill:hover,
.shop-filter-pill.active {
    background: var(--text, #111827);
    color: #ffffff;
    border-color: var(--text, #111827);
}

[data-theme="dark"] .shop-filter-pill:hover,
[data-theme="dark"] .shop-filter-pill.active {
    background: #ffffff;
    color: #111827;
    border-color: #ffffff;
}

/* Product Card Modifications */
.shop-product-card {
    display: flex;
    flex-direction: column;
}

.shop-card-image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: var(--light-gray, #f3f4f6);
}

.shop-card-image .pin-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.shop-product-card:hover .shop-card-image .pin-img {
    transform: scale(1.04);
}

.shop-placeholder-cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-gray, #f3f4f6) 0%, var(--border, #e5e7eb) 100%);
    padding: 20px;
    text-align: center;
}

.shop-placeholder-cover span {
    font-size: 40px;
    margin-bottom: 8px;
}

.shop-placeholder-cover small {
    font-weight: 700;
    color: var(--text, #111827);
    font-size: 13px;
}

.shop-card-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.shop-card-content {
    padding: 14px 4px 6px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card-subtitle {
    font-size: 12.5px;
    color: var(--gray, #6b7280);
    margin: 4px 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.shop-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #059669;
}

.shop-badge-pdf {
    font-size: 10.5px;
    font-weight: 800;
    background: #eff6ff;
    color: #2563eb;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.shop-card-actions {
    display: flex;
    gap: 6px;
    align-items: stretch;
    margin-top: auto;
    padding-top: 6px;
    width: 100%;
}

.shop-view-btn {
    flex: 1;
    min-width: 0;
    background: var(--card-bg, #ffffff);
    color: #374151 !important;
    font-weight: 700;
    font-size: 12px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    text-decoration: none;
    border: 1.5px solid var(--border, #e5e7eb);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.shop-view-btn svg {
    stroke: currentColor;
    fill: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.shop-view-btn:hover {
    background: var(--light-gray, #f3f4f6);
    color: var(--text, #111827) !important;
    border-color: #d1d5db;
}

[data-theme="dark"] .shop-view-btn {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb !important;
}

[data-theme="dark"] .shop-view-btn:hover {
    background: #374151;
    color: #ffffff !important;
}

.shop-add-cart-btn {
    flex: 1;
    min-width: 0;
    background: var(--accent, #e60023);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 12px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.25);
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
}

.shop-add-cart-btn svg {
    stroke: #ffffff;
    fill: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.shop-add-cart-btn span {
    white-space: nowrap;
    color: #ffffff !important;
}

.shop-add-cart-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: 0 6px 16px rgba(230, 0, 35, 0.35);
}

.pp-cart-paypal-btn-placeholder {
    width: 100%;
    height: 44px;
    border-radius: 50px;
    background: #ffc439;
    color: #003087;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, transform 0.15s;
}

.pp-cart-paypal-btn-placeholder:hover {
    background: #f4b628;
    transform: scale(1.01);
}

.shop-newsletter-block {
    margin: 50px 0 60px !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   5. SINGLE PRODUCT DETAIL PAGE (shop-product.php)
   ───────────────────────────────────────────────────────────────────────── */
.shop-product-detail-page {
    max-width: 1080px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

.shop-breadcrumbs {
    font-size: 13px;
    color: var(--gray, #6b7280);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-breadcrumbs a {
    color: var(--gray, #6b7280);
    text-decoration: none;
}

.shop-breadcrumbs a:hover {
    color: var(--accent, #e60023);
}

.shop-breadcrumbs .current-cat {
    font-weight: 700;
    color: var(--text, #111827);
}

.shop-product-hero {
    display: flex;
    gap: 55px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 24px;
    padding: 45px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.04);
}

.shop-cover-trust-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
}

.shop-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray, #6b7280);
}

.shop-meta-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.shop-category-badge {
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}

.shop-star-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #f59e0b;
}

.shop-star-rating .rating-text {
    color: var(--gray, #6b7280);
    font-weight: 600;
}

.shop-eyebrow-subtitle {
    font-size: 1.15rem;
    color: var(--gray, #6b7280);
    line-height: 1.5;
    margin: 0 0 20px;
}

.shop-highlights-box {
    background: var(--light-gray, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    padding: 20px;
    margin: 22px 0;
}

.shop-highlights-title {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text, #111827);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 24px 0 18px;
}

.shop-price-tag {
    font-size: 2.4rem;
    font-weight: 900;
    color: #059669;
    line-height: 1;
}

.shop-format-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gray, #6b7280);
}

.shop-detail-actions {
    margin: 20px 0 12px;
}

.shop-detail-add-cart-btn {
    width: 100%;
    max-width: 360px;
    padding: 16px 28px;
    border-radius: 50px;
    background: var(--accent, #e60023);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(230, 0, 35, 0.3);
    transition: transform 0.15s, filter 0.15s;
}

.shop-detail-add-cart-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.shop-secure-note {
    font-size: 12px;
    color: var(--gray, #6b7280);
    margin: 8px 0 0;
}

@media (max-width: 850px) {
    .shop-product-hero {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   6. MULTI-PDF DOWNLOAD & READING PORTAL (shop-reader.php)
   ───────────────────────────────────────────────────────────────────────── */
.shop-reader-container {
    max-width: 960px;
    margin: 40px auto 70px;
    padding: 0 20px;
}

.shop-reader-banner {
    text-align: center;
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #ffffff;
    padding: 40px 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 12px 30px rgba(4, 120, 87, 0.2);
}

.shop-reader-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.shop-reader-banner h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 10px;
    color: #ffffff;
}

.shop-reader-banner p {
    font-size: 1.05rem;
    color: #e6fffa;
    margin: 0 0 8px;
}

.shop-reader-email-note {
    font-size: 13.5px !important;
    opacity: 0.9;
}

.shop-purchased-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.shop-purchased-card {
    display: flex;
    gap: 30px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.shop-purchased-cover-col {
    flex: 0 0 130px;
}

.shop-purchased-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.shop-purchased-cover-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--light-gray, #f3f4f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.shop-purchased-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-purchased-cat {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent, #e60023);
    margin-bottom: 4px;
}

.shop-purchased-info-col h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--text, #111827);
}

.shop-purchased-sub {
    font-size: 14px;
    color: var(--gray, #6b7280);
    margin: 0 0 18px;
}

.shop-purchased-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.shop-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #059669;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 26px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
    transition: transform 0.15s, background 0.15s;
}

.shop-download-btn:hover {
    transform: translateY(-2px);
    background: #047857;
}

.shop-online-read-btn {
    display: inline-flex;
    align-items: center;
    background: var(--light-gray, #f3f4f6);
    color: var(--text, #111827) !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid var(--border, #e5e7eb);
    transition: background 0.15s;
}

.shop-online-read-btn:hover {
    background: var(--border, #e5e7eb);
}

.shop-reader-content-block {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    padding: 40px;
    margin-top: -15px;
}

.shop-reader-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.shop-reader-content-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.shop-print-btn {
    background: var(--light-gray, #f3f4f6);
    border: 1px solid var(--border, #e5e7eb);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.shop-reader-html-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

@media (max-width: 650px) {
    .shop-purchased-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .shop-purchased-actions {
        justify-content: center;
    }
}
