/* Premium Brand Design - FitDelights Colors */
:root {
    --primary: #aef412;
    --primary-dark: #8fd110;
    --primary-light: #c4f84a;
    --secondary: #1a1a1a;
    --dark: #000000;
    --gray-dark: #2c2c2c;
    --gray: #666666;
    --gray-light: #e5e5e5;
    --bg: #ffffff;
    --bg-secondary: #fafafa;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 20px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-secondary);
}

/* Main Container */
.fd-showcase-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Sticky Header Wrapper */
.fd-sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
}

/* Premium Header */
.fd-header {
    background: var(--bg);
    border-bottom: 1px solid var(--gray-light);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.98);
}

.fd-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fd-logo-area {
    display: flex;
    align-items: center;
}

.fd-logo {
    width: 200px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.fd-header-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

/* Hero Section */
.fd-hero {
    padding: 32px 24px;
    text-align: center;
    background: var(--bg);
    border-bottom: 1px solid var(--gray-light);
}

.fd-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.fd-hero h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dark);
    margin-bottom: 12px;
}

.fd-highlight {
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fd-hero p {
    font-size: 18px;
    color: var(--gray);
    line-height: 1.4;
}

/* Filters Section - Also sticky */
.fd-filters-section {
    background: var(--bg-secondary);
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.fd-filters-wrapper {
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fd-filters-wrapper::-webkit-scrollbar {
    display: none;
}

.fd-filters-scroll {
    display: flex;
    gap: 12px;
    padding-bottom: 8px;
    min-width: min-content;
}

/* Filter Chip Styles */
.fd-filter-chip {
    background: var(--bg);
    border: 1px solid var(--gray-light);
    border-radius: 40px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    transition: all 0.2s;
    min-height: 48px;
}

.fd-filter-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(174, 244, 18, 0.2);
}

/* Filter Icon - Base size */
.fd-filter-icon {
    font-size: 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: auto;
    height: auto;
    flex-shrink: 0;
    vertical-align: middle;
}

.fd-chip-select {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    font-family: inherit;
}

.fd-chip-select:focus {
    outline: none;
}

.fd-clear-chip {
    background: var(--dark);
    border: 1px solid var(--dark);
    border-radius: 40px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.fd-clear-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
}

/* Main Content */
.fd-main {
    padding: 0 24px 48px;
}

/* Results area with scrollable content */
.fd-results-area {
    position: relative;
    min-height: 500px;
}

/* Results Header */
.fd-results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.fd-results-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.fd-results-count {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 20px;
}

/* Recipe Cards */
.fd-recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.fd-recipe-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.fd-recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.fd-recipe-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.fd-recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fd-recipe-card:hover .fd-recipe-card-image img {
    transform: scale(1.05);
}

.fd-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fd-recipe-card:hover .fd-card-overlay {
    opacity: 1;
}

.fd-view-details {
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    background: var(--primary);
    border-radius: 40px;
    transition: all 0.2s;
}

.fd-view-details:hover {
    transform: scale(1.05);
    background: var(--primary-dark);
}

.fd-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.fd-draft-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

.fd-recipe-card-content {
    padding: 20px;
}

.fd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 8px;
}

.fd-recipe-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    flex: 1;
}

.fd-recipe-cost {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    background: rgba(174, 244, 18, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.fd-recipe-description {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fd-macro-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

.fd-macro-item {
    text-align: center;
    flex: 1;
}

.fd-macro-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
}

.fd-macro-label {
    font-size: 10px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.fd-recipe-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.fd-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray);
}

/* Load More Button */
.fd-load-more-container {
    text-align: center;
    padding: 32px 0 48px;
}

.fd-load-more-btn {
    background: var(--dark);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.fd-load-more-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(174, 244, 18, 0.3);
}

.fd-load-more-btn:active {
    transform: translateY(0);
}

.fd-load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.fd-load-more-btn.loading .fd-btn-spinner {
    display: inline-block;
}

.fd-btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* No More Recipes Message */
.fd-no-more {
    text-align: center;
    padding: 32px;
    color: var(--gray);
    font-size: 14px;
    border-top: 1px solid var(--gray-light);
    margin-top: 20px;
}

/* Sticky state shadow effect */
.fd-sticky-wrapper.is-sticky {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Loading */
.fd-loading {
    text-align: center;
    padding: 60px 20px;
}

.fd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.fd-no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    background: var(--bg);
    border-radius: var(--radius);
}

/* Modal Styles */
.fd-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fd-modal-container {
    max-width: 650px;
    width: 100%;
    max-height: 85vh;
    background: var(--bg);
    border-radius: 28px;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fd-modal-recipe {
    max-height: 85vh;
    overflow-y: auto;
}

.fd-modal-recipe::-webkit-scrollbar {
    width: 6px;
}

.fd-modal-recipe::-webkit-scrollbar-track {
    background: var(--gray-light);
}

.fd-modal-recipe::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.fd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fd-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.fd-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.fd-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.fd-modal-gallery {
    position: relative;
    background: var(--dark);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-modal-gallery-item {
    display: none;
    width: 100%;
}

.fd-modal-gallery-item.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fd-modal-gallery-item img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
}

.fd-gallery-prev,
.fd-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}

.fd-gallery-prev:hover,
.fd-gallery-next:hover {
    background: var(--primary);
    color: var(--dark);
}

.fd-gallery-prev {
    left: 16px;
}

.fd-gallery-next {
    right: 16px;
}

.fd-gallery-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.fd-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.fd-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 3px;
}

.fd-modal-content-inner {
    padding: 28px;
}

.fd-nutrition-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg) 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-light);
}

.fd-nutrition-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fd-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.fd-nutrition-item {
    text-align: center;
}

.fd-nutrition-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
}

.fd-nutrition-label {
    font-size: 11px;
    color: var(--gray);
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fd-recipe-description-full {
    margin-bottom: 24px;
}

.fd-recipe-description-full h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fd-recipe-description-full p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-dark);
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 16px;
}

.fd-recipe-full-content {
    margin: 0;
    padding: 0;
}

.fd-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fd-section-title:first-of-type {
    margin-top: 0;
}

.fd-section-icon {
    font-size: 24px;
}

.fd-section-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-dark);
    padding: 12px 0 12px 16px;
    border-left: 3px solid var(--primary-light);
    margin-bottom: 0;
}

.fd-section-content p:last-child {
    margin-bottom: 0;
}

.fd-section-content ul:last-child,
.fd-section-content ol:last-child {
    margin-bottom: 0;
}

.fd-section-content p {
    margin-bottom: 12px;
}

.fd-section-content ul,
.fd-section-content ol {
    margin: 0 0 12px 20px;
    padding: 0;
}

.fd-section-content li {
    margin-bottom: 6px;
}

.fd-section-content li:last-child {
    margin-bottom: 0;
}

.fd-section-content strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.fd-ingredients-title {
    border-bottom-color: var(--primary);
}

.fd-ingredients-content {
    border-left-color: var(--primary);
}

.fd-instructions-title {
    border-bottom-color: var(--primary-dark);
}

.fd-instructions-content {
    border-left-color: var(--primary-dark);
}

.fd-tips-title {
    border-bottom-color: #ffa500;
}

.fd-tips-content {
    border-left-color: #ffa500;
    background: linear-gradient(135deg, rgba(255,165,0,0.05) 0%, rgba(255,165,0,0) 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 0;
}

.fd-tips-content p:last-child {
    margin-bottom: 0;
}

.fd-recipe-info-footer {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(174, 244, 18, 0.1) 100%);
    border-radius: 16px;
    margin-top: 20px;
}

.fd-info-item {
    font-size: 13px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fd-info-item strong {
    font-weight: 600;
    color: var(--dark);
}

.fd-modal-content-inner > :last-child {
    margin-bottom: 0;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .fd-header-inner {
        padding: 12px 16px;
    }
    
    .fd-logo {
        width: 140px;
        height: auto;
    }
    
    .fd-hero {
        padding: 24px 16px;
    }
    
    .fd-hero h1 {
        font-size: 28px;
    }
    
    .fd-hero p {
        font-size: 14px;
    }
    
    .fd-filters-section {
        padding: 12px 0;
    }
    
    .fd-filters-scroll {
        gap: 10px;
        padding-bottom: 8px;
    }
    
    /* INCREASE FILTER CHIP SIZE AND EMOJIS ON MOBILE */
    .fd-filter-chip {
        padding: 12px 24px;
        gap: 14px;
        min-height: 60px;
    }
    
    .fd-filter-icon {
        font-size: 32px !important; /* Larger emojis on mobile */
    }
    
    .fd-chip-select {
        font-size: 15px;
    }
    
    .fd-clear-chip {
        padding: 12px 24px;
        font-size: 15px;
        min-height: 60px;
    }
    
    .fd-main {
        padding: 0 16px 32px;
    }
    
    .fd-results-header h2 {
        font-size: 24px;
    }
    
    .fd-recipes-grid {
        gap: 16px;
        grid-template-columns: 1fr;
    }
    
    .fd-load-more-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .fd-section-title {
        font-size: 16px;
        margin: 16px 0 10px 0;
    }
    
    .fd-section-icon {
        font-size: 20px;
    }
    
    .fd-section-content {
        font-size: 14px;
        padding: 10px 0 10px 12px;
    }
    
    .fd-tips-content {
        padding: 14px;
    }
    
    .fd-modal-content-inner {
        padding: 20px;
    }
    
    .fd-nutrition-grid {
        gap: 12px;
    }
    
    .fd-nutrition-value {
        font-size: 18px;
    }
    
    .fd-modal-container {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .fd-modal-header h2 {
        font-size: 20px;
    }
}

/* Extra Small Devices (max-width: 480px) */
@media (max-width: 480px) {
    .fd-filter-chip {
        padding: 10px 18px;
    }
    
    /* EVEN LARGER EMOJIS FOR VERY SMALL SCREENS */
    .fd-filter-icon {
        font-size: 24px !important;
    }
    
    .fd-chip-select {
        font-size: 14px;
    }
    
    .fd-filters-scroll {
        gap: 8px;
    }
    
    .fd-hero h1 {
        font-size: 24px;
    }
    
    .fd-hero p {
        font-size: 13px;
    }
}

/* Tablet Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .fd-recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}