/* ========================================
   RECIPEDIA - Bulgarian Recipe Website
   Design: Warm & Traditional Bulgarian Kitchen
   ======================================== */

/* CSS Variables */
:root {
    /* Primary Colors */
    --terracotta: #C2703A;
    --sage: #8FBC8F;
    --olive: #6B8E23;
    --gold: #DAA520;
    --coral: #E8845C;
    --brown: #8B4513;

    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #FFFAF5;
    --cream: #FDF5E6;
    --light-gray: #F5F5F5;
    --gray: #666666;
    --dark: #2C2C2C;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Work Sans', -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px;
    --card-radius: 16px;
    --btn-radius: 8px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 20px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--terracotta);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray);
    transition: color 0.2s ease;
    padding: 8px 0;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--terracotta);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--terracotta);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 4px;
    background: var(--light-gray);
    padding: 4px;
    border-radius: var(--btn-radius);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--gray);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.lang-btn.active {
    background: var(--white);
    color: var(--terracotta);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input {
    padding: 8px 14px;
    border: 2px solid var(--light-gray);
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-size: 0.85rem;
    width: 160px;
    transition: border-color 0.2s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--terracotta);
}

.search-btn {
    background: var(--terracotta);
    border: none;
    padding: 8px 12px;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--cream) 0%, var(--off-white) 100%);
    padding: var(--section-padding) 0;
    overflow: hidden;
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--terracotta);
    line-height: 1.1;
    margin-bottom: 8px;
}

.tagline {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--sage);
    margin-bottom: 24px;
    font-style: italic;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
}

.btn-primary:hover {
    background: #A85C2D;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--terracotta);
    border: 2px solid var(--terracotta);
}

.btn-secondary:hover {
    background: var(--terracotta);
    color: var(--white);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-placeholder {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--coral) 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: float 4s ease-in-out infinite;
}

.hero-placeholder span {
    font-size: 8rem;
}

.hero-placeholder p {
    color: var(--white);
    font-weight: 600;
    margin-top: 16px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #E8F4F8 0%, #E0F4FF 100%);
}



.clear-list-btn {
    background: transparent;
    border: 1px solid var(--terracotta);
    color: var(--terracotta);
    padding: 6px 12px;
    border-radius: var(--btn-radius);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-list-btn:hover {
    background: var(--terracotta);
    color: var(--white);
}



/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--btn-radius);
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   CATEGORY TABS (Horizontal)
   ======================================== */
.category-tabs-container {
    width: 100%;
    margin: 32px 0;
    position: relative;
    max-width: 100vw;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 20px;
    justify-content: center;
}

.category-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--card-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    width: calc(14.28% - 12px); /* 7 items per row to fit 14 items exactly on 2 rows */
    min-width: 100px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
    .category-tab-btn {
        width: calc(20% - 12px); /* 5 per row on medium screens */
    }
}
@media (max-width: 768px) {
    .category-tab-btn {
        width: calc(33.33% - 12px); /* 3 per row on mobile */
    }
}

.category-tab-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--cream);
}

.category-tab-btn.active {
    background: linear-gradient(135deg, var(--terracotta) 0%, #D4845A 100%);
    color: var(--white);
    border-color: var(--terracotta);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.category-tab-btn .accordion-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.category-tab-btn .accordion-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--dark);
    margin: 0;
}

.category-tab-btn.active .accordion-title {
    color: var(--white);
    opacity: 1;
}

.show-all-recipes-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px auto 0;
    padding: 14px 28px;
    background: var(--white);
    color: var(--terracotta);
    border: 2px solid var(--terracotta);
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.show-all-recipes-btn:hover {
    background: var(--terracotta);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.show-all-recipes-btn span {
    font-size: 1.2rem;
}

/* ========================================
   PAGE HEADER (for Tips and Blog)
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--cream) 0%, #E8F4F8 100%);
    padding: 80px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

/* ========================================
   TIPS PAGE STYLES
   ======================================== */
.tips-section {
    padding: 60px 0;
}

.tips-block {
    margin-bottom: 48px;
}

.tips-block h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--terracotta);
}

.tip-card {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.tip-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--terracotta);
    margin-bottom: 12px;
}

.tip-card p {
    color: var(--gray);
    line-height: 1.7;
}

.measurements-table {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.measurements-table h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 16px;
}

.measurements-table table {
    width: 100%;
    border-collapse: collapse;
}

.measurements-table th,
.measurements-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

.measurements-table th {
    background: var(--cream);
    font-weight: 600;
    color: var(--dark);
}

.measurements-table tr:last-child td {
    border-bottom: none;
}

.measurements-table tr:hover td {
    background: #FAFAFA;
}

/* ========================================
   BLOG PAGE STYLES
   ======================================== */
.blog-section {
    padding: 60px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--cream) 0%, #E8F4F8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-emoji {
    font-size: 4rem;
}

.blog-content {
    padding: 24px;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
    margin-bottom: 8px;
}

.blog-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.blog-content p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-link {
    color: var(--terracotta);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-link:hover {
    color: var(--brown);
}

.categories {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 48px;
    font-size: 1.1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.category-card {
    background: var(--off-white);
    border-radius: var(--card-radius);
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent, var(--terracotta));
    background: var(--white);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--dark);
}

.category-card p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ========================================
   RECIPES SECTION
   ======================================== */
.recipes-section {
    padding: var(--section-padding) 0;
    background: var(--off-white);
}

.healthy-section {
    background: linear-gradient(135deg, #f0f7f0 0%, var(--off-white) 100%);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* Recipe Card - New Layout */
.recipe-card {
    background: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.recipe-card:not(.expanded):hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.recipe-card.expanded {
    grid-column: 1 / -1;
    cursor: default;
    box-shadow: var(--shadow-lg);
}

.recipe-card-main {
    display: flex;
    flex-direction: column;
}

.recipe-card.expanded .recipe-card-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
}

.recipe-image {
    height: 180px;
    background: linear-gradient(135deg, var(--cream) 0%, #E8D5C4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.recipe-card.expanded .recipe-image {
    height: 220px;
}

.recipe-image.healthy-bg {
    background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C8 100%);
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-emoji {
    font-size: 5rem;
}

.recipe-content {
    padding: 16px;
}

.recipe-card.expanded .recipe-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recipe-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    width: fit-content;
}

.tag-meat {
    background: #FDEAEA;
    color: #C44D4D;
}

.tag-fish {
    background: #E0F4FF;
    color: #0077B6;
}

.tag-soup {
    background: #E8F4F8;
    color: #3D8FAD;
}

.tag-salad {
    background: #E8F5E8;
    color: #4CAF50;
}

.tag-dessert {
    background: #FFF3E0;
    color: #E65100;
}

.tag-breakfast {
    background: #FFF8E1;
    color: #F9A825;
}

.tag-vegan {
    background: #E8F5E8;
    color: #2E7D32;
}

.tag-sauce {
    background: #F3E5F5;
    color: #7B1FA2;
}

.recipe-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--dark);
    line-height: 1.3;
}

.recipe-card.expanded h3 {
    font-size: 1.5rem;
}

/* Ingredient Boxes */
.recipe-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ingredient-box {
    background: var(--cream);
    color: var(--dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(194, 112, 58, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.ingredient-box:hover {
    background: rgba(194, 112, 58, 0.15);
    border-color: rgba(194, 112, 58, 0.3);
}

/* Available ingredient (in fridge or pantry) */
.ingredient-box.available {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.ingredient-box.available:hover {
    background: #c3e6cb;
}

/* Ingredient in shopping list */
.ingredient-box.in-shopping {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.ingredient-box.in-shopping:hover {
    background: #ffe69c;
}

/* Both available AND in shopping - available takes priority */
.ingredient-box.available.in-shopping {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.recipe-card:not(.expanded):hover .ingredient-box:not(.available) {
    background: rgba(194, 112, 58, 0.1);
    border-color: rgba(194, 112, 58, 0.25);
}

.ingredient-more {
    background: var(--terracotta);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Available ingredient in expanded list */
.ingredients-full-list li.available {
    background: #d4edda;
    border-left: 3px solid #28a745;
}

/* Expanded View */
.recipe-expanded {
    padding: 24px;
    border-top: 1px solid var(--light-gray);
    background: linear-gradient(180deg, var(--off-white) 0%, var(--white) 100%);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.collapse-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--light-gray);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.collapse-btn:hover {
    background: var(--terracotta);
    color: var(--white);
}

.expanded-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--gray);
}

.expanded-section {
    margin-bottom: 20px;
}

.expanded-section:last-child {
    margin-bottom: 0;
}

.expanded-section h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expanded-section h4::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--terracotta);
    border-radius: 2px;
}

.ingredients-full-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.ingredients-full-list li {
    padding: 10px 14px;
    background: var(--cream);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--dark);
}

.ingredients-full-list li::before {
    content: '• ';
    color: var(--terracotta);
    font-weight: bold;
}

.steps-list {
    padding-left: 20px;
}

.steps-list li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark);
}

.steps-list li::marker {
    color: var(--terracotta);
    font-weight: bold;
}

.recipe-note {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFFDE7 100%);
    border-left: 4px solid var(--gold);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--dark);
}

.recipe-note::before {
    content: '💡 ';
}

.links-list {
    list-style: none;
}

.links-list li {
    margin-bottom: 8px;
}

.links-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--terracotta);
    font-weight: 500;
    transition: color 0.2s ease;
}

.links-list a:hover {
    color: #A85C2D;
    text-decoration: underline;
}

.links-list a::before {
    content: '🔗';
}


/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #888;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--terracotta);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #888;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 24px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-links {
        gap: 16px;
    }

    .language-switcher {
        display: none;
    }

    .recipe-card.expanded .recipe-card-main {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-description {
        margin: 0 auto 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-placeholder {
        width: 280px;
        height: 280px;
    }

    .hero-placeholder span {
        font-size: 5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ingredients-full-list {
        grid-template-columns: 1fr;
    }

    .recipe-card.expanded .recipe-card-main {
        grid-template-columns: 1fr;
    }

    .recipe-card.expanded .recipe-image {
        height: 200px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-panel {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .category-card {
        padding: 24px 16px;
    }

    .ingredient-box {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .recipe-expanded {
        padding: 16px;
    }

    .expanded-meta {
        flex-direction: column;
        gap: 8px;
    }

    .products-section {
        padding: 40px 0;
    }

    .panel-header h3 {
        font-size: 1rem;
    }

    .product-tag {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

/* ========================================
   AUTH UI
   ======================================== */
.auth-btn {
    background: var(--terracotta);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-btn:hover {
    background: #A85C2D;
    transform: translateY(-1px);
}

.logout-btn {
    background: transparent;
    color: var(--terracotta);
    border: 1px solid var(--terracotta);
    padding: 6px 12px;
    font-size: 0.8rem;
}

.logout-btn:hover {
    background: var(--terracotta);
    color: var(--white);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--dark);
    font-weight: 500;
}

/* Auth Modal */
.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.auth-modal-overlay.active {
    display: flex;
}

.auth-modal {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-modal h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--dark);
    margin-bottom: 24px;
    text-align: center;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: var(--dark);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--light-gray);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.auth-form.active {
    display: flex;
}

.auth-form input {
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--terracotta);
}

.auth-submit-btn {
    background: var(--terracotta);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-submit-btn:hover {
    background: #A85C2D;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--light-gray);
}

.auth-divider span {
    background: var(--white);
    padding: 0 16px;
    position: relative;
    color: var(--gray);
    font-size: 0.85rem;
}

.auth-oauth {
    display: flex;
    gap: 12px;
}

.oauth-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: var(--btn-radius);
    background: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.oauth-btn:hover {
    border-color: var(--terracotta);
    background: var(--cream);
}

.oauth-btn.google { color: #4285F4; }
.oauth-btn.github { color: #333; }

/* ========================================
   MODERN PANELS & ACTION BUTTONS
   ======================================== */

.full-width-tables {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

@media (min-width: 992px) {
    .full-width-tables {
        grid-template-columns: 1fr 1fr;
    }
}

.product-panel {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.modern-panel-input {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.modern-panel-input input {
    flex: 2;
    padding: 10px 16px;
    border: 1px solid var(--cream);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.modern-panel-input .qty-input {
    flex: 1;
}

.modern-panel-input input:focus {
    border-color: var(--terracotta);
    outline: none;
    box-shadow: 0 0 0 3px rgba(194, 112, 58, 0.1);
}

.modern-table-container.compact {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    text-align: left;
}

.modern-table th {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-bottom: 2px solid var(--terracotta);
}

.modern-table td {
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--cream);
    border-top: 1px solid var(--cream);
    color: var(--dark);
    font-size: 1rem;
}

.modern-table td:first-child {
    border-left: 1px solid var(--cream);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.modern-table td:last-child {
    border-right: 1px solid var(--cream);
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.modern-table tbody tr {
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.modern-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

.action-buttons-modern {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn-modern {
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-btn-modern.edit {
    background-color: #4A7AFF;
}

.action-btn-modern.delete {
    background-color: #FF5A60;
}

/* ========================================
   MOBILE MEDIA QUERIES
   ======================================== */

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 16px;
        gap: 12px;
    }
    
    .logo {
        font-size: 1.3rem;
        flex: 1 1 50%;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        margin-top: 8px;
    }
    
    .user-info {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }
    
    .user-info-text {
        font-size: 0.85rem;
        word-break: break-all;
    }

    .auth-btn.logout-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .modern-panel-input {
        flex-wrap: wrap;
    }
    
    .modern-panel-input input {
        width: 100%;
        flex: none;
    }
    
    .modern-table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
}