/*
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: #e60023;
    /* Pinterest Red */
    --accent-soft: #ffeeef;
    --recipe-red: #d32f2f;
    --gray: #767676;
    --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;
}

body,
.site-wrapper,
.main-header,
.pin-card,
.dropdown,
.action-btn,
.search-field,
.pinpress-recipe,
.detail-item {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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;
}

.nav-toggle {
    display: none;
}

.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 */
.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-recipes/, /popular-recipes/) */
.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;
}

.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;
}

.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;
}

/* 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 */

@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: #fff;
        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 #ccc;
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s;
    background: #fff;
}

.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: #f9f9f9;
    font-family: inherit;
    transition: all 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--recipe-red);
    background: #fff;
    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);
}