/* =========================================
   RECIPES PAGE STYLES (NEW)
   ========================================= */

/* --- 1. HERO SECTION --- */
.recipes-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 60px;
}

.recipes-hero .hero-container {
    padding: 0 20px;
    max-width: 900px;
}

.recipes-hero .hero-eyebrow {
    display: inline-block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 4px;
    font-weight: 600;
}

.recipes-hero .hero-title {
    font-family: var(--font-heading, serif);
    color: #2c3e2e;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.recipes-hero .hero-desc {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #2c3e2e;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .recipes-hero .hero-title {
        font-size: 2.5rem;
    }

    .recipes-hero {
        height: auto;
        padding: 100px 0;
    }
}


/* --- 2. BENEFITS SECTION --- */
.recipes-benefits {
    padding: 0 20px 80px;
}

.recipes-benefits .benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.recipes-benefits .benefit-item {
    text-align: center;
    padding: 30px;
    background: #fdfdfd;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.recipes-benefits .benefit-item:hover {
    transform: translateY(-5px);
}

.recipes-benefits .benefit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.recipes-benefits h3 {
    font-size: 1.25rem;
    color: var(--brand-dark, #2c3e2e);
    margin-bottom: 10px;
    font-family: var(--font-heading, serif);
}

.recipes-benefits p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .recipes-benefits .benefits-grid {
        grid-template-columns: 1fr;
    }
}


/* --- 3. FEATURED RECIPE --- */
.featured-recipe-section {
    padding: 60px 20px 100px;
}

.featured-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

.featured-image {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--brand-primary, #6f7f63);
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.featured-content {
    padding: 40px 50px 40px 0;
}

.featured-title {
    font-size: 2.5rem;
    font-family: var(--font-heading, serif);
    color: var(--brand-dark, #2c3e2e);
    margin-bottom: 20px;
}

.featured-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

.featured-excerpt {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
}

.btn-recipe-primary {
    display: inline-block;
    padding: 14px 28px;
    background: var(--brand-dark, #2c3e2e);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-recipe-primary:hover {
    background: #5F6F56;
    color: #ffffff !important;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .featured-wrapper {
        grid-template-columns: 1fr;
    }

    .featured-content {
        padding: 30px;
    }

    .featured-image {
        min-height: 250px;
    }
}


/* --- 4. FILTERS --- */
.recipe-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    justify-content: center;
    padding: 0 8px;
}

.filter-btn {
    padding: 9px 22px;
    border: 1.5px solid rgba(180, 195, 170, 0.5);
    border-radius: 50px;
    text-decoration: none;
    color: #5a6b52;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(111, 127, 99, 0.06), transparent);
    opacity: 0;
    transition: opacity 0.22s ease;
    border-radius: inherit;
}

.filter-btn:hover {
    border-color: rgba(111, 127, 99, 0.65);
    color: #3d5231;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 127, 99, 0.12);
}

.filter-btn:hover::before {
    opacity: 1;
}

.filter-btn.active {
    background: #6f7f63;
    color: #fff;
    border-color: #4a5e3a;
    box-shadow: 0 5px 16px rgba(74, 94, 58, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 0.8px;
}

.filter-btn.active::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
    opacity: 1;
}


/* --- 5. RECIPES GRID (Modern) --- */
.recipes-catalog {
    padding: 80px 20px;
}

/* Catalog section title with decorative underline */
.catalog-title {
    text-align: center;
    font-family: var(--font-heading, serif);
    font-size: 2.5rem;
    color: var(--brand-dark, #2c3e2e);
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 14px;
}

.catalog-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #6F7F63 40%, #4a5e3a 60%, transparent);
    border-radius: 2px;
    opacity: 0.7;
    margin: 10px auto 0;
}

/* Subtle decorative ornament beneath title */
.catalog-title-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-subtitle-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
    opacity: 0.45;
}

.catalog-subtitle-ornament span {
    display: block;
    width: 40px;
    height: 1px;
    background: #6F7F63;
}

.catalog-subtitle-ornament em {
    font-family: var(--font-heading, serif);
    font-style: italic;
    font-size: 0.85rem;
    color: #6F7F63;
    letter-spacing: 1px;
}

.recipes-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.recipes-grid-modern>article,
.recipes-grid-modern>div,
.recipes-grid-modern>.modern-recipe-card {
    grid-column: auto !important;
    width: 100% !important;
    /* allow max-width to work if needed */
}


/* --- PAGINATION (Desktop only) --- */
@media (min-width: 769px) {
    .recipes-grid-modern>.pagination-wrapper {
        grid-column: 1 / -1 !important;
        margin-top: 60px !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* CONTAINER STYLES - Target UL specifically */
ul.page-numbers {
    display: flex !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 10px 20px !important;
    margin: 0 auto !important;
    /* Auto margin for centering if block */
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 50px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    width: fit-content !important;
    /* Ensure it wraps content */
    height: auto !important;
    border: none !important;
}

ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
}

/* BUTTON STYLES - Target links and spans NOT the UL */
ul.page-numbers li a.page-numbers,
ul.page-numbers li span.page-numbers {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 40px !important;
    height: 36px !important;
    border-radius: 20px !important;
    background: transparent !important;
    color: #5F6F56 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    line-height: 1 !important;
    font-size: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* ACTIVE STATE */
ul.page-numbers li span.page-numbers.current,
ul.page-numbers li span.page-numbers.current:hover {
    background: #6F7F63 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(111, 127, 99, 0.4) !important;
    transform: scale(1.06) !important;
}

/* HOVER STATE */
ul.page-numbers li a.page-numbers:hover {
    background: #EBF0E6 !important;
    color: #5F6F56 !important;
    transform: translateY(-2px);
}

/* NEXT/PREV BUTTONS */
ul.page-numbers li a.next,
ul.page-numbers li a.prev,
ul.page-numbers li span.next,
ul.page-numbers li span.prev {
    width: auto !important;
    padding: 0 20px !important;
    border-radius: 30px !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

ul.page-numbers li a.next:hover,
ul.page-numbers li a.prev:hover {
    background: #6F7F63 !important;
    color: #fff !important;
}

/* DOTS */
ul.page-numbers li .dots {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #bbb !important;
    width: auto !important;
}



.pagination-wrapper .page-numbers.prev,
.pagination-wrapper .page-numbers.next {
    width: auto;
    padding: 0 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-wrapper .page-numbers.prev:hover,
.pagination-wrapper .page-numbers.next:hover {
    background: #6F7F63;
    color: #fff;
}

.pagination-wrapper .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #bbb;
}

/* Tablet layout */
@media (min-width: 769px) and (max-width: 992px) {
    .recipes-grid-modern {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
    }
}

/* Remove tablet breakpoint - let mobile carousel handle up to 768px */

.modern-recipe-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    /* Minimum height for consistency */
}

.modern-recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image-wrapper {
    position: relative;
    padding-top: 65%;
    /* Aspect Ratio */
    background: #eee;
    overflow: hidden;
}

.card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.modern-recipe-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-time-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(111, 127, 99, 0.9);
    /* Brand Primary semi-transparent */
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Distribute content evenly */
    min-height: 180px;
    /* Minimum content height for consistency */
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark, #2c3e2e);
    margin: 0 0 15px 0;
    line-height: 1.4;
    font-family: var(--font-heading, serif);

    /* Consistent height by limiting to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.5em;
    /* 2.5 lines height */
}

.card-macros {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    /* Consistent spacing before action button */
}

.macro-tag {
    font-size: 0.85rem;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #666;
    font-weight: 500;
}

.macro-tag.protein {
    background: #e8efe8;
    color: #3faf3f;
    color: var(--brand-primary, #6f7f63);
}

/* --- 5. CTA MODERN --- */
.recipes-cta-modern {
    padding: 100px 20px;
    text-align: center;
}

.recipes-cta-modern .cta-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    background: #FDFBF7;
    /* Cream background matching front page */
    border-radius: 24px;
    color: var(--color-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.recipes-cta-modern h2 {
    font-family: var(--font-heading, serif);
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.recipes-cta-modern p {
    font-size: 1.15rem;
    opacity: 0.8;
    margin-bottom: 35px;
    color: #666;
}

.btn-recipe-cta {
    display: inline-block;
    padding: 18px 50px;
    background: #6F7F63;
    /* Sage Green */
    color: #ffffff;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 14px 34px rgba(111, 127, 99, 0.18);
    animation: premiumPulse 2.5s infinite;
}

.btn-recipe-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(111, 127, 99, 0.25);
    background: #5F6F56;
    color: #ffffff;
}

/* Placeholder for missing images */
.placeholder-img,
.card-placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-img::after,
.card-placeholder-img::after {
    content: '🍲';
    font-size: 3rem;
    opacity: 0.3;
}


/* --------------------------------------------------------- */
/*  Toast Notification
/* --------------------------------------------------------- */
.fav-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.fav-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.fav-toast-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.fav-toast-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-toast-content {
    flex-grow: 1;
}

.fav-toast-msg {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.fav-toast-link {
    font-size: 12px;
    color: #FF6B6B;
    text-decoration: none;
    font-weight: 500;
}

.fav-toast-link:hover {
    text-decoration: underline;
}

.fav-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    align-self: flex-start;
}

.fav-toast-close:hover {
    color: #333;
}

@media (max-width: 480px) {
    .fav-toast {
        left: 20px;
        right: 20px;
        min-width: auto;
        bottom: 80px;
        /* Above mobile nav if exists */
    }
}


/* Hide carousel arrows completely */
.carousel-nav {
    display: none !important;
}

/* Hide indicators on desktop only */
.carousel-indicators {
    display: none;
}

.carousel-wrapper {
    position: relative;
}

/* Ensure normal desktop layout is preserved */
@media (min-width: 769px) {
    .recipes-catalog .container {
        position: relative !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
    }

    .recipes-catalog .catalog-title,
    .recipes-catalog .recipe-filters {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .carousel-wrapper {
        position: static !important;
        overflow: visible !important;
        margin: 0 !important;
    }

    .recipes-grid-modern {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 30px !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
        align-items: initial !important;
        background: none !important;
        flex-direction: initial !important;
        scroll-behavior: auto !important;
    }

    .recipes-grid-modern article.modern-recipe-card {
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        flex-shrink: initial !important;
        scroll-snap-align: none !important;
        margin-bottom: auto !important;
        height: auto !important;
        display: block !important;
        flex-direction: initial !important;
    }

    /* Removed pagination overrides as we now use Load More on desktop too */

    /* Hide cards beyond the 9th initially on desktop */
    .recipes-grid-modern article.modern-recipe-card:nth-child(n+10) {
        display: none !important;
    }

    /* Hide carousel hints on desktop */
    .carousel-indicators,
    .carousel-hint {
        display: none !important;
    }

    /* Force normal card display on desktop while maintaining consistent height */
    .recipes-grid-modern .modern-recipe-card .card-link-wrapper {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    .recipes-grid-modern .card-content {
        display: flex !important;
        flex-direction: column !important;
        flex-grow: 1 !important;
        justify-content: space-between !important;
    }

    .recipes-grid-modern .card-title {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin-bottom: 15px !important;
        min-height: 3.5em !important;
    }

    /* Ensure consistent card heights on desktop */
    .recipes-grid-modern .modern-recipe-card {
        min-height: 400px !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* --- MOBILE COMPACT GRID OVERRIDES --- */
@media (max-width: 768px) {

    /* Mobile wrapper adjustments */
    .recipes-catalog .container {
        position: relative;
        padding-left: 16px;
        padding-right: 16px;
    }

    .recipes-catalog .catalog-title,
    .recipes-catalog .recipe-filters {
        padding-left: 0;
        padding-right: 0;
    }

    .carousel-wrapper {
        position: relative;
        overflow: visible;
        margin: 0;
    }

    /* Hide carousel indicators and hint on mobile — replaced by load-more */
    .carousel-indicators,
    .carousel-hint {
        display: none !important;
    }

    /* 2-COLUMN COMPACT GRID */
    .recipes-grid-modern {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
        -webkit-overflow-scrolling: auto !important;
        scroll-behavior: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Compact card styling */
    .recipes-grid-modern article.modern-recipe-card {
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        flex-shrink: initial !important;
        margin-bottom: 0 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: auto !important;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    /* Hide cards beyond the 8th initially */
    .recipes-grid-modern article.modern-recipe-card:nth-child(n+9) {
        display: none !important;
    }

    .recipes-grid-modern.show-all article.modern-recipe-card:nth-child(n+9) {
        display: flex !important;
        animation: fadeInCard 0.3s ease forwards;
    }

    @keyframes fadeInCard {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Compact image */
    .recipes-grid-modern .card-image-wrapper {
        padding-top: 75%;
        /* Taller ratio for compact cards */
    }

    /* Compact content */
    .recipes-grid-modern .card-content {
        padding: 12px !important;
        min-height: auto !important;
    }

    .recipes-grid-modern .card-link-wrapper {
        display: flex;
        flex-direction: column;
        height: 100%;
        flex-grow: 1;
    }

    /* Compact title */
    .recipes-grid-modern .card-title {
        font-size: 0.85rem !important;
        margin: 0 0 6px 0 !important;
        min-height: auto !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        line-height: 1.3;
    }

    /* Compact macros */
    .recipes-grid-modern .card-macros {
        margin-bottom: 8px !important;
        gap: 4px !important;
    }

    .recipes-grid-modern .card-macros .macro-tag {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
    }

    /* Compact button */
    .recipes-grid-modern .card-action-row {
        padding-top: 8px !important;
    }

    .recipes-grid-modern .card-action-row .btn-recipe-primary {
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
    }

    /* Category tag compact */
    .recipes-grid-modern .card-category-tag {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
        top: 8px !important;
        left: 8px !important;
    }

    /* Favorite button compact */
    .recipes-grid-modern .recipe-favorite-toggle {
        width: 30px !important;
        height: 30px !important;
        top: 8px !important;
        right: 8px !important;
    }

    .recipes-grid-modern .recipe-favorite-toggle svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Hide pagination universally below */

    /* Reduce vertical spacing on mobile */
    .recipes-catalog {
        padding-bottom: 20px !important;
    }

    .recipes-cta-modern {
        padding-top: 40px !important;
    }
}

/* Universal Pagination Reset */
.pagination-wrapper,
.recipes-grid-modern .pagination-wrapper,
.recipes-grid-modern>.pagination-wrapper,
ul.page-numbers,
.page-numbers,
ul.page-numbers li,
ul.page-numbers li a,
ul.page-numbers li span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Load More Button (Universal) */
.load-more-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 16px;
    gap: 10px;
    grid-column: 1 / -1;
    width: 100%;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: transparent;
    color: #5d7052;
    border: 2px solid #5d7052;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-load-more:hover,
.btn-load-more:active {
    background: #5d7052;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(93, 112, 82, 0.25);
}

.btn-load-more .load-more-icon {
    transition: transform 0.3s ease;
}

.btn-load-more:hover .load-more-icon {
    transform: rotate(180deg);
}

/* Recipe count badge */
.recipe-count-badge {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

/* ========================================
   Recipe Search Bar — Premium
   ======================================== */
.recipe-search-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 48px;
    max-width: 420px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.recipe-search-form {
    width: 100% !important;
    max-width: 420px !important;
}

.search-input-group {
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(111, 127, 99, 0.22);
    border-radius: 50px;
    padding: 13px 22px;
    transition: border-color 0.3s ease, box-shadow 0.35s ease, background 0.2s ease;
    box-shadow: 0 2px 12px rgba(111, 127, 99, 0.07);
}

.search-input-group:focus-within {
    border-color: #6F7F63;
    box-shadow: 0 4px 20px rgba(111, 127, 99, 0.14), 0 0 0 3px rgba(111, 127, 99, 0.08);
    background: #fff;
}

.search-input-group .search-icon {
    flex-shrink: 0;
    margin-right: 12px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.search-input-group:focus-within .search-icon {
    opacity: 0.7;
}

.search-input-group input[type="text"] {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: #2c3e2e;
    flex: 1;
    font-family: inherit;
    min-width: 0;
}

.search-input-group input[type="text"]::placeholder {
    color: #b0b8a8;
    font-style: italic;
}

/* Clear button — shown dynamically via JS */
.search-clear,
.search-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(111, 127, 99, 0.12);
    color: #5a6b52;
    font-size: 15px;
    text-decoration: none;
    margin-left: 8px;
    transition: background 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.search-clear:hover,
.search-clear-btn:hover {
    background: rgba(111, 127, 99, 0.25);
    color: #2c3e2e;
    transform: scale(1.1);
}

/* Hidden: search-clear-btn starts hidden when input is empty */
.search-clear-btn[aria-hidden="true"] {
    display: none;
}

/* ========================================
   Real-time Search: card visibility
   ======================================== */
.modern-recipe-card {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.modern-recipe-card.recipe-card-hidden {
    display: none !important;
}

/* No results message */
.recipes-no-results {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #8a9a82;
    font-family: var(--font-heading, serif);
    font-size: 1.15rem;
    font-style: italic;
    animation: fadeInUp 0.3s ease;
}

.recipes-no-results svg {
    display: block;
    margin: 0 auto 16px;
    opacity: 0.35;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .recipe-search-wrapper {
        margin-bottom: 28px;
    }

    .recipe-search-form {
        max-width: 100%;
        padding: 0 20px;
    }
}