﻿/* ============================================
   RECIPE INDEX PAGE - LISTING & FILTERS
   Professional modern design for recipe listing page only
   Brown color scheme: #705542, #8b6f47
   Used exclusively by: Views/Recipe/Index.cshtml
   ============================================ */

/* ============================================
   PAGE HEADER â€” CTA BANNER (same pattern as Categories page)
   ============================================ */
.view-products-cta--recipe {
    text-align: left;
    padding: 2rem 2rem !important;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Autoplay background video */
.view-products-cta--recipe .recipe-cta-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Dark gradient overlay â€” same feel as .view-products-cta */
.view-products-cta--recipe .recipe-cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.62) 0%, rgba(40, 20, 8, 0.72) 100%);
    z-index: 1;
}

/* Text always above overlay */
.view-products-cta--recipe h2,
.view-products-cta--recipe p {
    position: relative;
    z-index: 2;
}

.view-products-cta--recipe h2 {
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 0.2rem !important;
    position: relative;
    z-index: 2;
    display: inline-block;
    width: fit-content;
    padding-bottom: 0.45rem;
}

.view-products-cta--recipe h2::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.view-products-cta--recipe h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.view-products-cta--recipe:hover h2::after {
    width: 100%;
}

.view-products-cta--recipe p {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.82) !important;
    margin-bottom: 0 !important;
    font-weight: 500;
}

@media (max-width: 576px) {
    .view-products-cta--recipe {
        padding: 1.5rem 1.25rem !important;
        min-height: 90px;
    }
    .view-products-cta--recipe h2 {
        font-size: 1.2rem !important;
    }
}

/* ============================================
   FILTERS SIDEBAR - STICKY
   ============================================ */
.filters-sidebar {
    background: white;
    border-radius: 5px;
    padding: 1.15rem;
    border: 2px solid #f5f1ed;
    box-shadow: 0 2px 8px rgba(112, 85, 66, 0.1);
    position: sticky;
    top: 120px; /* Fixed distance from top (accounting for fixed navbar + promo banner) */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    margin-top: 0;
    margin-bottom: auto;
    z-index: 10;
}

/* Custom scrollbar for filter sidebar */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
    margin-top: 20px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f5f1ed;
    border-radius: 5px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #8b6f47;
    border-radius: 5px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #705542;
}

/* ============================================
   CUSTOM FILTER SWITCH TOGGLE
   Modern toggle switch for filter selections - COMPACT VERSION
   ============================================ */

/* Tighten sidebar global spacing */
.filters-sidebar .filters-title {
    font-size: 1rem;
    padding-bottom: 0.45rem;
    margin-bottom: 0.45rem;
}

.filters-sidebar .filter-section {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.filters-sidebar .filter-section-title {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.filter-switch-item {
    margin-bottom: 0.15rem;
}

.filter-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.filter-switch-label:hover {
    background: #f0f2f4;
    border-color: #e8e4df;
}

.filter-switch-text {
    font-size: 0.82rem;
    font-weight: 500;
    color: #705542;
    display: flex;
    align-items: center;
    flex: 1;
    transition: color 0.3s ease;
}

.filter-switch-text svg {
    color: #8b6f47;
    flex-shrink: 0;
}

.filter-switch-label input[type="checkbox"],
.filter-switch-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-switch-slider {
    position: relative;
    width: 36px;
    height: 18px;
    background: #d1d5db;
    border-radius: 5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-switch-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 5px;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked state */
.filter-switch-label input:checked ~ .filter-switch-slider {
    background: linear-gradient(135deg, #705542 0%, #8b6f47 100%);
}

.filter-switch-label input:checked ~ .filter-switch-slider::before {
    transform: translateX(18px);
    box-shadow: 0 2px 6px rgba(112, 85, 66, 0.4);
}

.filter-switch-label input:checked ~ .filter-switch-text {
    color: #705542;
    font-weight: 600;
}

.filter-switch-label:has(input:checked) {
    background: #fff;
    border-color: #8b6f47;
}

/* Focus state for accessibility */
.filter-switch-label input:focus ~ .filter-switch-slider {
    box-shadow: 0 0 0 3px rgba(112, 85, 66, 0.15);
}

/* Hover effect on slider */
.filter-switch-label:hover .filter-switch-slider::before {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Active/Pressed state */
.filter-switch-label:active .filter-switch-slider::before {
    width: 18px;
}

.filter-switch-label:has(input:checked):active .filter-switch-slider::before {
    transform: translateX(14px);
}

/* ============================================
   RECIPE LISTING GRID LAYOUT - Same style as Home page
   ============================================ */

.recipe-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.recipe-listing-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
}

.recipe-listing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(112, 85, 66, 0.2);
}

/* Recipe Card */
.recipe-listing-grid .recipe-grid-card {
    position: relative;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    height: 100%;
    min-height: 280px;
    transition: all 0.3s ease;
}

/* Recipe Image - Full size with dark overlay and animation */
.recipe-listing-grid .recipe-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #f5f1ed;
    transition: transform 0.5s ease;
    filter: brightness(0.75);
    animation: slowZoomListing 12s ease-in-out infinite alternate;
    position: absolute;
    top: 0;
    left: 0;
}

.recipe-listing-grid .recipe-grid-card:hover .recipe-grid-image {
    transform: scale(1.12);
    animation-play-state: paused;
}

@keyframes slowZoomListing {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.08) translate(2%, -2%);
    }
    100% {
        transform: scale(1.05) translate(-2%, 1.5%);
    }
}

/* Top Info - Arrow Icon */
.recipe-listing-grid .recipe-top-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: flex-start;
    z-index: 3;
}

.recipe-listing-grid .recipe-arrow-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.recipe-listing-grid .recipe-grid-card:hover .recipe-arrow-icon {
    transform: translateX(5px);
}

/* Recipe Content - Overlay at bottom */
.recipe-listing-grid .recipe-grid-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: transparent;
    color: white;
    z-index: 2;
    transition: all 0.3s ease;
}

.recipe-listing-grid .recipe-grid-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.15rem;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.recipe-listing-grid .recipe-grid-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-listing-grid .recipe-simple-text {
    font-size: 1.25rem;
    color: white;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recipe-listing-grid .recipe-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border: 1.5px solid #f4d9a6;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    background: transparent;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.recipe-listing-grid .recipe-pill svg {
    vertical-align: middle;
    color: #f4d9a6;
    fill: #f4d9a6;
}

/* No Results Message */
.no-products {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.no-products svg {
    color: #9ca3af;
}

.no-products h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 1rem 0 0.75rem;
}

.no-products p {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* ============================================
   RESPONSIVE STYLES - RECIPE LISTING GRID
   ============================================ */

/* Tablet Landscape and Below */
@media (max-width: 1199px) {
    .recipe-listing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .recipe-listing-grid .recipe-grid-card {
        min-height: 250px;
    }

    .recipe-listing-grid .recipe-grid-title {
        font-size: 1.2rem;
    }
}

/* Tablet Portrait and Below */
@media (max-width: 991px) {
    .filter-switch-label {
        padding: 0.5rem 0.65rem;
    }

    .filter-switch-text {
        font-size: 0.85rem;
    }

    .filter-switch-slider {
        width: 38px;
        height: 20px;
    }

    .filter-switch-slider::before {
        width: 16px;
        height: 16px;
    }

    .filter-switch-label input:checked ~ .filter-switch-slider::before {
        transform: translateX(18px);
    }

    .recipe-listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recipe-listing-grid .recipe-grid-card {
        min-height: 240px;
    }
}

/* Mobile Landscape and Below */
@media (max-width: 767px) {
    .filter-switch-text {
        font-size: 0.8rem;
    }

    .recipe-listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .recipe-listing-grid .recipe-grid-card {
        min-height: 220px;
    }

    .recipe-listing-grid .recipe-top-info {
        top: 0.75rem;
        right: 0.75rem;
    }

    .recipe-listing-grid .recipe-arrow-icon {
        width: 20px;
        height: 20px;
    }

    .recipe-listing-grid .recipe-grid-content {
        padding: 1rem;
    }

    .recipe-listing-grid .recipe-grid-title {
        font-size: 1.1rem;
    }

    .recipe-listing-grid .recipe-simple-text {
        font-size: 1rem;
    }
}

/* Mobile Portrait */
@media (max-width: 575px) {
    .recipe-listing-grid {
        grid-template-columns: 1fr;
    }

    .recipe-listing-grid .recipe-grid-card {
        min-height: 260px;
    }

    .recipe-listing-grid .recipe-grid-title {
        font-size: 1.25rem;
    }
}


