/* ============================================
   Recipe Cards, Detail, Ingredients, Gallery
   ============================================ */

/* --- Recipe Cards --- */
.latest-section {
    padding: var(--section-padding) 0 56px;
    background: var(--color-cream);
}
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.latest-section .recipes-grid {
    grid-template-columns: repeat(3, 1fr);
}
.recipe-card {
    display: block;
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s, box-shadow .3s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.recipe-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}
.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.recipe-card:hover .recipe-card-image img {
    transform: scale(1.06);
}
.recipe-card-category {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--color-primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 5px 12px;
    border-radius: 50px;
}
.recipe-card-bimby {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #e65100;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}
.recipe-card-fav {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, .9);
    color: #e53935;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    pointer-events: none;
    z-index: 2;
}
.recipe-card-body {
    padding: 16px 18px 20px;
}
.recipe-card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    transition: color .2s;
}
.recipe-card:hover .recipe-card-body h3 {
    color: var(--color-primary);
}
.recipe-card-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    color: var(--color-text-light);
    margin-bottom: 10px;
    font-style: italic;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.recipe-card-author:hover {
    color: var(--color-primary);
}
.recipe-card-author-icon {
    flex-shrink: 0;
    opacity: .6;
}
.recipe-card-desc {
    font-size: .9rem;
    color: var(--color-text-light);
    line-height: 1.55;
    margin-bottom: 16px;
}
.recipe-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: .82rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}
.recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.recipe-card-meta svg { opacity: .5; }
.recipe-card-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}
.recipe-card-rating svg.star { opacity: 1; }
.recipe-card-rating small {
    margin-left: 4px;
    font-size: .75rem;
    color: var(--color-text-light);
}
.recipe-card-link {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--color-primary);
    transition: color .2s;
    text-decoration: none;
}
.recipe-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.recipe-card:hover .recipe-card-link { color: var(--color-primary-dark); }
.recipe-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-cream) 0%, #e8ddd4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

/* --- Infinite Scroll --- */
.scroll-sentinel {
    grid-column: 1 / -1;
    padding: 40px 0;
}
.grid-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: .4;
    animation: loaderPulse .8s ease-in-out infinite;
}
.loader-dot:nth-child(2) { animation-delay: .15s; }
.loader-dot:nth-child(3) { animation-delay: .3s; }
@keyframes loaderPulse {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-light);
}
.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--color-text);
}
.empty-state p {
    font-size: .95rem;
}

/* --- Recipe Detail --- */
.recipe-breadcrumb-bar {
    background: var(--color-cream);
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}
.recipe-detail { padding: 40px 0 80px; }
.recipe-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.recipe-header { margin-bottom: 32px; }
.recipe-category-badge {
    display: inline-block;
    background: var(--color-green);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.recipe-bimby-badge {
    display: inline-block;
    background: #e65100;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
    margin-left: 6px;
}
/* Badges row with favorite button */
.recipe-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.recipe-badges-row .recipe-category-badge,
.recipe-badges-row .recipe-bimby-badge {
    margin-bottom: 0;
}
.recipe-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    font-size: .8rem;
    color: var(--color-text-light);
    text-decoration: none;
    opacity: .6;
    transition: opacity .2s, color .2s;
}
.recipe-edit-link:hover {
    opacity: 1;
    color: var(--color-primary);
}

/* Favorite button */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 6px;
    color: var(--color-text-light);
    transition: color .2s, transform .15s;
    border-radius: 50%;
}
.favorite-btn:hover {
    color: #e53935;
    transform: scale(1.15);
}
.favorite-btn:active {
    transform: scale(.9);
}
.favorite-btn .favorite-icon--filled {
    display: none;
}
.favorite-btn .favorite-icon--outline {
    display: block;
}
.favorite-btn--active {
    color: #e53935;
}
.favorite-btn--active .favorite-icon--filled {
    display: block;
}
.favorite-btn--active .favorite-icon--outline {
    display: none;
}
@keyframes favPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.favorite-btn--active {
    animation: favPop .3s ease;
}

.recipe-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
}
.recipe-desc {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.65;
    margin-bottom: 28px;
}
.recipe-meta-bar {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: var(--color-cream);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.meta-item svg { color: var(--color-primary); flex-shrink: 0; }
.meta-label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-text-light);
}
.meta-value {
    display: block;
    font-size: .95rem;
    font-weight: 700;
}

/* Section body — neutralize inline styles from WordPress import */
.recipe-body span[style] {
    background-color: transparent !important;
}

/* Cover */
.recipe-cover {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}
.recipe-cover img {
    width: 100%;
    aspect-ratio: 5/3;
    object-fit: cover;
}

/* Cooking Methods */
.cooking-methods { margin-bottom: 48px; }
.cooking-methods-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.cooking-methods-desc {
    font-size: .92rem;
    color: var(--color-text-light);
    margin-bottom: 24px;
}
.method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.method-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-white);
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all .25s;
}
.method-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.method-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.method-tab.active svg { stroke: #fff; }
.method-content { display: none; }
.method-content.active { display: block; }
.method-info-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.method-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-text);
}
.method-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Recipe Steps */
.recipe-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.recipe-steps li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-green);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-text {
    font-size: .95rem;
    line-height: 1.65;
    padding-top: 6px;
}
.bimby-setting {
    display: inline-block;
    background: var(--color-green-bg);
    color: var(--color-green);
    font-size: .82rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
.airfryer-setting {
    display: inline-block;
    background: var(--color-warm-bg);
    color: var(--color-primary-dark);
    font-size: .82rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Sidebar: Ingredients */
.recipe-sidebar {
    position: sticky;
    top: 68px;
}
.ingredients-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
}
.ingredients-card h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.ingredients-servings {
    font-size: .88rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.ingredients-group {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--color-primary);
    margin-bottom: 10px;
    margin-top: 18px;
}
.ingredients-group:first-of-type { margin-top: 0; }
.ingredients-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.ingredients-list li {
    font-size: .9rem;
    line-height: 1.4;
    padding: 6px 0;
    border-bottom: 1px dashed var(--color-border);
}
.ingredients-list li:last-child { border-bottom: none; }

/* Ingredient checkbox */
.ing-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.ing-check input {
    display: none;
}
.ing-check-mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    transition: background .15s, border-color .15s;
    position: relative;
}
.ing-check-mark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity .15s;
}
.ing-check input:checked ~ .ing-check-mark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.ing-check input:checked ~ .ing-check-mark::after {
    opacity: 1;
}
.ing-check input:checked ~ .ing-text {
    text-decoration: line-through;
    opacity: .45;
}
.ing-text {
    transition: opacity .2s;
}

.ing-qty {
    font-weight: 700;
    color: var(--color-text);
    margin-right: 4px;
}

/* Mobile ingredients (hidden on desktop) */
.recipe-ingredients-mobile { display: none; }

/* --- Ingredients FAB (mobile only) --- */
.ingredients-fab {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 100;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.ingredients-fab:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.ingredients-fab:active {
    transform: scale(.95);
}

/* --- Ingredients Drawer --- */
.ingredients-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.ingredients-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.ingredients-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 320px;
    max-width: 85vw;
    background: var(--color-white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, .15);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    padding: 24px;
    visibility: hidden;
}
.ingredients-drawer.open {
    transform: translateX(0);
    visibility: visible;
}
.ingredients-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.ingredients-drawer-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}
.ingredients-drawer-close {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background .2s, color .2s;
    display: flex;
    align-items: center;
}
.ingredients-drawer-close:hover {
    background: var(--color-cream);
    color: var(--color-text);
}

/* Gallery */
.recipe-gallery { margin-top: 48px; }
.recipe-gallery h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
}
/* Method tabs (public site) */
.method-tabs-wrapper {
    position: sticky;
    top: var(--nav-height, 49px);
    z-index: 50;
    background: var(--color-bg);
    margin: 0 0 32px;
    padding: 8px 0 0;
}
.method-tabs {
    display: flex;
    gap: 8px;
}
.method-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-light);
    background: var(--color-cream);
    border: 2px solid var(--color-border);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    position: relative;
}
.method-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
}
.method-tab:hover:not(.method-tab--active) {
    color: var(--color-text);
    background: #fff;
}
.method-tab--active {
    color: var(--color-primary);
    background: #fff;
    border-color: var(--color-primary);
}
.method-tab--active::after {
    background: #fff;
}
.method-tab-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.method-panel {
    display: none;
}
.method-panel--active {
    display: block;
}
/* SEO: hidden panels stay in DOM, only visually hidden */

.recipe-section {
    margin-bottom: 40px;
}
.recipe-section:last-child {
    margin-bottom: 0;
}
.recipe-section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 8px;
}
.gallery-grid figure {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.gallery-grid img {
    width: 100%;
    aspect-ratio: 5/4;
    object-fit: cover;
    cursor: pointer;
}
.gallery-grid figcaption {
    padding: 10px 14px;
    font-size: .82rem;
    color: var(--color-text-light);
    background: var(--color-white);
}

/* Empty notice */
.recipe-empty-notice {
    font-size: .9rem;
    font-style: italic;
    color: var(--color-text-light, #888);
    margin: 1rem 0;
}

/* --- Author Byline + Share Row --- */
.recipe-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding: 14px 20px;
    background: var(--color-cream);
    border-radius: var(--radius);
}
.recipe-author-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.recipe-author-link:hover .recipe-author-name {
    color: var(--color-primary);
}
.recipe-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.recipe-author-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    color: var(--color-text-light);
}
.recipe-author-name {
    font-weight: 700;
    font-size: .95rem;
    transition: color .2s;
}
.recipe-author-date {
    display: block;
    font-size: .82rem;
    color: var(--color-text-light);
}

/* --- Share Buttons --- */
.recipe-share-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color .2s, background .2s;
    text-decoration: none;
    padding: 0;
}
.share-btn:hover {
    background: var(--color-white);
    color: var(--color-primary);
}
.share-btn--copy.share-btn--copied {
    color: var(--color-green);
}

/* --- Reviews Section --- */
.reviews-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}
.reviews-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.stars-display {
    display: flex;
    gap: 2px;
}
.star {
    fill: var(--color-border);
}
.star--filled {
    fill: #f5a623;
}
.reviews-avg {
    font-weight: 700;
    font-size: .95rem;
}
.reviews-count {
    font-size: .88rem;
    color: var(--color-text-light);
}
.reviews-empty {
    font-size: .92rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: 24px;
}

/* --- Review Form --- */
.review-form-wrapper {
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}
.review-form-wrapper h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.review-error {
    color: #c0392b;
    font-size: .88rem;
    margin-bottom: 12px;
}

/* Star Rating (clickable) */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 16px;
}
.star-rating input {
    display: none;
}
.star-rating label {
    cursor: pointer;
    transition: transform .15s;
}
.star-rating label svg {
    fill: var(--color-border);
    transition: fill .15s;
}
.star-rating label:hover svg,
.star-rating label:hover ~ label svg,
.star-rating input:checked ~ label svg {
    fill: #f5a623;
}
.star-rating label:hover {
    transform: scale(1.15);
}
.review-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: .92rem;
    resize: vertical;
    margin-bottom: 14px;
    background: var(--color-white);
}
.review-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.review-submit {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.review-submit:hover {
    background: var(--color-primary-dark);
}

/* --- Review Cards --- */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.review-card {
    padding: 20px 24px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.review-moderation-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius);
    line-height: 1.4;
}
.review-moderation-notice svg {
    flex-shrink: 0;
}
.review-moderation-notice--pending {
    background: #fff3cd;
    color: #856404;
}
.review-moderation-notice--rejected {
    background: #f8d7da;
    color: #721c24;
}
.review-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.review-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-cream);
    color: var(--color-text-light);
}
.review-meta {
    flex: 1;
}
.review-author-name {
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    transition: color .2s;
}
a.review-author-name:hover {
    color: var(--color-primary);
}
.review-date {
    display: block;
    font-size: .78rem;
    color: var(--color-text-light);
}
.review-stars {
    display: flex;
    gap: 2px;
}
.review-text {
    font-size: .92rem;
    line-height: 1.6;
    color: var(--color-text);
}

/* Review reply (author response) */
.review-reply {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--color-cream);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.review-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.review-reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.review-reply-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    color: var(--color-text-light);
}
.review-reply-author {
    font-weight: 700;
    font-size: .85rem;
}
.review-reply-badge {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--color-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 50px;
}
.review-reply-date {
    font-size: .75rem;
    color: var(--color-text-light);
    margin-left: auto;
}
.review-reply-text {
    font-size: .88rem;
    line-height: 1.55;
    color: var(--color-text);
}
.review-reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.review-reply-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-primary);
    padding: 0;
    transition: color .2s;
}
.review-reply-action-btn:hover {
    color: var(--color-primary-dark);
}
.review-reply-action-btn--danger {
    color: var(--color-text-light);
}
.review-reply-action-btn--danger:hover {
    color: #c0392b;
}
.review-reply-edit-form {
    margin-top: 10px;
}
.review-reply-edit-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: .88rem;
    resize: vertical;
    margin-bottom: 8px;
    background: var(--color-white);
}
.review-reply-edit-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Reply form toggle + form */
.review-reply-form-wrapper {
    margin-top: 10px;
}
.review-reply-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 700;
    color: var(--color-primary);
    padding: 0;
    transition: color .2s;
}
.review-reply-toggle:hover {
    color: var(--color-primary-dark);
}
.review-reply-form {
    margin-top: 10px;
}
.review-reply-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: .88rem;
    resize: vertical;
    margin-bottom: 8px;
    background: var(--color-white);
}
.review-reply-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.review-reply-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.review-reply-submit {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 7px 18px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.review-reply-submit:hover {
    background: var(--color-primary-dark);
}
.review-reply-cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: .82rem;
    color: var(--color-text-light);
    padding: 0;
    transition: color .2s;
}
.review-reply-cancel:hover {
    color: var(--color-text);
}

/* Review kebab menu */
.review-menu {
    position: relative;
    margin-left: auto;
}
.review-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text-light);
    border-radius: 50%;
    transition: background .2s, color .2s;
    display: flex;
    align-items: center;
}
.review-menu-toggle:hover {
    background: var(--color-cream);
    color: var(--color-text);
}
.review-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 140px;
    z-index: 10;
    padding: 4px 0;
}
.review-menu.open .review-menu-dropdown {
    display: block;
}
.review-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s;
    text-align: left;
}
.review-menu-item:hover {
    background: var(--color-cream);
}
.review-menu-item--danger {
    color: #c0392b;
}
.review-menu-item--danger:hover {
    background: #fdecea;
}

/* --- Confirm Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .45);
    align-items: center;
    justify-content: center;
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px 32px;
    max-width: 400px;
    width: 90%;
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.modal p {
    font-size: .92rem;
    color: var(--color-text-light);
    margin-bottom: 24px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.modal-btn {
    padding: 9px 20px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--color-border);
    transition: background .2s, color .2s;
}
.modal-btn--cancel {
    background: var(--color-white);
    color: var(--color-text);
}
.modal-btn--cancel:hover {
    background: var(--color-cream);
}
.modal-btn--danger {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}
.modal-btn--danger:hover {
    background: #a93226;
}

/* --- Login Modal --- */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: loginFadeIn .2s ease;
}
@keyframes loginFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.login-modal {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: loginSlideIn .25s ease;
}
@keyframes loginSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background .2s, color .2s;
}
.login-modal-close:hover {
    background: var(--color-cream);
    color: var(--color-text);
}
.login-modal-icon {
    color: var(--color-primary);
    margin-bottom: 16px;
}
.login-modal h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text);
}
.login-modal p {
    font-size: .92rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}
.login-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
}
.login-modal-btn:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 16px var(--color-primary-glow);
}
.login-modal-register {
    margin-top: 16px;
    font-size: .88rem;
    color: var(--color-text-light);
}
.login-modal-register a {
    color: var(--color-primary);
    font-weight: 700;
    transition: color .2s;
}
.login-modal-register a:hover {
    color: var(--color-primary-dark);
}

/* --- Lightbox --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .9);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-overlay.open {
    display: flex;
}
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0, 0, 0, .5);
    animation: lightboxIn .2s ease;
}
@keyframes lightboxIn {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
    padding: 8px;
    transition: color .2s;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .85);
    font-size: .9rem;
    text-align: center;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}

/* --- Author Profile Page --- */
.author-profile {
    padding: 48px 0;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-border);
}
.author-profile-header {
    display: flex;
    align-items: center;
    gap: 28px;
}
.author-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.author-profile-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    color: var(--color-text-light);
}
.author-profile-info h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.author-profile-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 8px;
}
.author-profile-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.author-profile-count {
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.author-profile-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}
.author-profile-rating-text {
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-text);
}

/* --- Author Reviews Section --- */
.author-reviews-section {
    padding: 56px 0 80px;
    background: var(--color-white);
}
.author-reviews-header {
    margin-bottom: 28px;
}
.author-reviews-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.review-recipe-link {
    display: inline-block;
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: 6px;
    transition: color .2s;
}
.review-recipe-link:hover {
    color: var(--color-primary-dark);
}

/* --- Profile Edit Page --- */
.profile-edit-page {
    padding: 48px 0 80px;
    background: var(--color-cream);
    min-height: 60vh;
}
.profile-edit-layout {
    max-width: 640px;
    margin: 0 auto;
}
.profile-edit-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
}
.profile-edit-card h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.profile-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.profile-alert--success {
    background: var(--color-green-bg, #e8f5e9);
    color: var(--color-green-dark, #2e7d32);
    border: 1px solid var(--color-green, #4caf50);
}
.profile-alert--error {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #e57373;
}
.profile-alert--error p { margin: 0; }

/* Avatar field */
.profile-avatar-field {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}
.profile-avatar-preview {
    flex-shrink: 0;
}
.profile-avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}
.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-cream);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Form fields */
.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}
.profile-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.profile-field label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-text-light);
    margin-bottom: 6px;
}
.profile-field input,
.profile-field textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: .92rem;
    background: var(--color-white);
    transition: border-color .2s;
}
.profile-field input:focus,
.profile-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.profile-field textarea {
    resize: vertical;
}

/* Buttons */
.profile-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.profile-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
}
.profile-btn--primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.profile-btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}
.profile-btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.profile-btn--outline:hover {
    background: var(--color-primary);
    color: #fff;
}
.profile-btn-text {
    font-size: .85rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color .2s;
}
.profile-btn-text:hover {
    color: #c0392b;
}
