* {
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100%;
    width: 100%;
    position: fixed;
    overflow: hidden;
    overscroll-behavior: none;
}

input,
button,
select {
    font-family: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

#app-container {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-bottom: calc(90px + var(--safe-bottom));
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

/* --- ANIMATIONS --- */
.view {
    min-height: 100%;
    animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

/* --- HOME --- */
.home-header {
    position: relative;
    height: 42vh;
    min-height: 300px;
    border-bottom-left-radius: var(--radius-L);
    border-bottom-right-radius: var(--radius-L);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    background: #000;
}

.home-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    line-height: 1.1;
    margin-bottom: 10px;
}

.home-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(0px);
}

.home-content {
    position: relative;
    z-index: 10;
    color: white;
    margin-bottom: 10px;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFF 0%, #F3F4F6 100%);
    color: #1F2937;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.home-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 400;
    max-width: 90%;
}

.home-body {
    padding: 0 24px;
    margin-top: -35px;
    position: relative;
    z-index: 20;
}

/* SEARCH */

.search-floating {
    background: var(--surface);
    padding: 8px;
    border-radius: 28px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

#voiceBtn {
    width: 48px;
    height: 48px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.search-floating input {
    flex: 1;
    font-size: 1rem;
    color: var(--text-main);
    background: transparent;
    font-weight: 600;
    min-width: 0;
}

#searchBtn {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
    flex-shrink: 0;
}

/* CATEGORIES & CARDS */
.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
}

.horizontal-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.pill {
    background: var(--surface);
    border: 1px solid #E5E7EB;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    transition: 0.2s;
    font-size: 0.9rem;
}

.pill:active {
    transform: scale(0.95);
}

.pill.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.recipe-card {
    min-width: 200px;
    max-width: 200px;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid #F3F4F6;
    scroll-snap-align: start;
}

.recipe-card-img {
    height: 130px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.recipe-card-body {
    padding: 12px 14px;
}

.recipe-card-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ====== RECETTES LIST VIEW ====== */
#view-recettes {
    background: var(--bg-body);
}

#view-recettes .recipes-header {
    padding: 0px 24px 10px;
    position: sticky;
    top: 0;
    background: var(--bg-body);
    z-index: 5;
}

#view-recettes h2 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 10px;
}

#view-recettes .recipes-top {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

#recipes-search {
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    padding: 12px 40px 12px 14px;
    border-radius: 14px;
    font-weight: 600;
}

#recipes-search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#recipes-sort {
    background: #fff;
    border: 1px solid #eee;
    padding: 12px 10px;
    border-radius: 14px;
    font-weight: 700;
}

#recipes-grid {
    padding: 0 24px 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

#recipes-grid .recipe-card {
    min-width: 0;
    max-width: none;
    cursor: pointer;
}

#recipes-grid .recipe-card-img {
    height: 120px;
}

/* ===========================
   ====== RECIPE VIEW 2.0 ======
   =========================== */

.recipe-header {
    position: relative;
    height: 42vh;
    min-height: 300px;
    overflow: hidden;
    background: #000;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
    isolation: isolate;
}

.recipe-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* FIXED TOPBAR AND BUTTONS */
.recipe-topbar {
    position: absolute;
    top: 35px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
}

.btn-close {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    transition: .2s;
}

.btn-icon:active {
    transform: scale(.96);
}

#btn-fav.fav-active {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.6);
    color: #fb7185;
}

.servings-adjuster {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    padding: 4px;
    z-index: 4;
}

.servings-display {
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0 8px;
}

.servings-btn,
.servings-reset {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.servings-reset {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* RECIPE BODY */
.recipe-body {
    position: relative;
    z-index: 5;
    margin-top: -18px;
    background:
        radial-gradient(700px 280px at 50% -80px, #fff7ed 0%, transparent 60%),
        var(--surface);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 18px 18px 110px;
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.06);
}

/* tags chips */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    background: #F3F4F6;
    color: #111827;
    border: 1px solid #E5E7EB;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.tag-chip.eco {
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid #EEF0F3;
    padding: 6px;
    border-radius: 999px;
    display: flex;
    gap: 4px;
    margin: 6px 0 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* MODE BUTTONS CONTAINER - STICKY */
.mode-buttons-sticky {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 24px;
    margin: 0 -24px 24px;
    background: var(--bg-body);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
    transition: box-shadow 0.2s ease;
}

.mode-buttons-sticky.is-stuck {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-muted);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .25s cubic-bezier(0.25, 1, 0.5, 1);
}

.mode-btn.active {
    background: white;
    color: var(--text-main);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}


.mode-btn[data-mode="fast"].active {
    background: var(--orange-fast-soft);
    color: var(--orange-fast);
}

.mode-btn:not(.active) {
    border: 1px solid #2727272c;
    color: #2727278a;
}

.mode-btn[data-mode="fast"]:not(.active) {
    border: 1px solid #e49e5daf;
    color: #e49e5daf;
}

.mode-btn[data-mode="eco"]:not(.active) {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
    animation: pulseGreen 2s infinite;
}

.mode-btn[data-mode="eco"].active {
    background: #059669;
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, .4);
}

/* TEASER */
.savings-teaser {
    background: linear-gradient(135deg, #064E3B 0%, #059669 100%);
    color: #fff;
    margin: 10px 0 18px;
    padding: 16px;
    border-radius: 18px;
    position: relative;
    z-index: 2;
}

.teaser-title {
    font-weight: 900;
    font-size: 1rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.teaser-sub {
    font-size: .85rem;
    opacity: .95;
    line-height: 1.4;
}

.teaser-icon {
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.2);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 15px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* DASHBOARD */
.eco-card {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #A7F3D0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.eco-gain {
    font-size: 1.9rem;
    font-weight: 900;
    color: #047857;
    line-height: 1;
    display: block;
}

.eco-label {
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #065F46;
    letter-spacing: 1px;
}

.eco-sep {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
}

.eco-text {
    font-size: .9rem;
    color: #064E3B;
    font-weight: 700;
    line-height: 1.4;
}

/* ING LIST */
.list-container {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    background: var(--surface);
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .03);
}

.item-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 12px;
}

.item-text-col {
    flex: 1;
    min-width: 0;
}

.check-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #f3f4f6);
    flex-shrink: 0;
    margin-top: 2px;
}

.item-name {
    font-weight: 700;
    font-size: .95rem;
}

.item-qty {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 700;
}

.item-price {
    background: #0F172A08;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 900;
    color: #111827;
    min-width: 64px;
    text-align: right;
    margin-top: -4px;
    height: fit-content;
}

.diff-old {
    text-decoration: line-through;
    opacity: .45;
    font-size: .85em;
    margin-right: 6px;

}

.diff-new {
    color: #059669;
    font-weight: 900;
}

.badge-sub {
    display: inline-block;
    background: #D1FAE5;
    color: #059669;
    font-size: .65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 900;
    margin-left: 4px;
}

/* TIP BOX */
.tip-box {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: .8rem;
    line-height: 1.4;
    font-weight: 800;
    color: #374151;
    margin-left: 32px;
}

.tip-box.eco {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #065F46;
}

.tip-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 900;
    flex-shrink: 0;
    background: currentColor;
    color: white;
    margin-top: 1px;
}

/* STEPS TIMELINE */
.steps-timeline {
    position: relative;
    padding-left: 10px;
    border-left: 2px dashed #E5E7EB;
}

.step-card {
    position: relative;
    background: var(--surface);
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid #F1F5F9;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .03);
    margin-left: 8px;
}

.step-card::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px #fff;
    border: 2px solid #FDE7D5;
}

.step-card.fast-changed::before {
    background: var(--orange-fast);
    border-color: #FDBA74;
}

.step-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-weight: 900;
    font-size: .8rem;
    color: var(--primary);
    letter-spacing: .6px;
}

.step-badge-fast {
    background: var(--orange-fast-soft);
    color: var(--orange-fast);
    border: 1px solid #FDBA74;
    font-size: .65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px;
}

.step-old {
    margin-top: 8px;
    font-size: .85rem;
    color: #9CA3AF;
    text-decoration: line-through;
    line-height: 1.4;
    font-weight: 700;
}

/* STICKY TOTAL */
.total-sticky {
    position: fixed;
    bottom: 100px;
    left: 16px;
    right: 16px;
    background: #0f172a;
    color: white;
    padding: 14px 18px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    z-index: 90;
    border: 1px solid rgba(255, 255, 255, .06);
}

.total-sticky.hidden {
    transform: translateY(150%);
}

/* LOADER */
#view-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}

.loader-content {
    text-align: center;
    width: 100%;
    max-width: 320px;
    padding: 20px;
}

.fox-spinner {
    font-size: 4rem;
    display: inline-block;
    animation: bounceFox 1.5s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
    margin-bottom: 15px;
}

@keyframes bounceFox {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.progress-track {
    background: #F1F2F6;
    height: 8px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0 10px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width .3s ease-out;
    border-radius: 10px;
}

/* NAVBAR */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 calc(10px + var(--safe-bottom));
    z-index: 100;
}

.nav-btn {
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #6B7280;
    transition: 0.3s;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn i {
    font-size: 1.4rem;
}

.nav-btn span {
    font-size: .65rem;
    font-weight: 800;
}

.servings-adjuster i {
    padding-top: 3px;
}

/* GENERATION BUTTON */
.btn-generate {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    transition: transform 0.2s;
    font-size: 1rem;
}

.btn-generate:active {
    transform: scale(0.96);
}

/* VOICE SEARCH LISTENING STATE */
#voiceBtn.listening {
    color: #ef4444;
    background: #fee2e2;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ================= SWIPE ACTIONS ================= */
.shopping-item-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    border-radius: 12px;
}

.shopping-item-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    background-color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 24px;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    z-index: 1;
}

.shopping-item {
    position: relative;
    z-index: 2;
    background: white;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
}

.shopping-item.swiping {
    transition: none;
}

/* ================= SIDE MENU (DRAWER) ================= */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: white;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
}

.side-menu.open {
    transform: translateX(0);
}

.menu-header {
    margin-bottom: 40px;
    text-align: center;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-item {
    background: none;
    border: none;
    padding: 16px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 12px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #F3F4F6;
}

.menu-item:active {
    background: #F3F4F6;
}

.menu-item i {
    height: 100%;
    width: 0%;
    transition: width .3s ease-out;
    border-radius: 10px;
}

/* NAVBAR */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 calc(10px + var(--safe-bottom));
    z-index: 100;
}

.nav-btn {
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #6B7280;
    transition: 0.3s;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn i {
    font-size: 1.4rem;
}

.nav-btn span {
    font-size: .65rem;
    font-weight: 800;
}

.servings-adjuster i {
    padding-top: 3px;
}

/* GENERATION BUTTON */
.btn-generate {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    transition: transform 0.2s;
    font-size: 1rem;
}

.btn-generate:active {
    transform: scale(0.96);
}

/* VOICE SEARCH LISTENING STATE */
#voiceBtn.listening {
    color: #ef4444;
    background: #fee2e2;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ================= SWIPE ACTIONS ================= */
.shopping-item-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    border-radius: 12px;
}

.shopping-item-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    background-color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 24px;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    z-index: 1;
}

.shopping-item {
    position: relative;
    z-index: 2;
    background: white;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
}

.shopping-item.swiping {
    transition: none;
}

/* ================= SIDE MENU (DRAWER) ================= */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: white;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
}

.side-menu.open {
    transform: translateX(0);
}

.menu-header {
    margin-bottom: 40px;
    text-align: center;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-item {
    background: none;
    border: none;
    padding: 16px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 12px;
    transition: background 0.2s;
}

.menu-item:active {
    background: #F3F4F6;
}

.menu-item i {
    width: 24px;
    text-align: center;
    color: #fa8e00;
}

.menu-sep {
    height: 1px;
    background: #E5E7EB;
    margin: 16px 0;
}

.menu-version {
    font-size: 0.8rem;
    color: #9CA3AF;
    text-align: center;
    margin-top: auto;
    line-height: 1.5;
}

/* ================= OPTIONS PAGE ================= */
.options-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.btn-back-options {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

.btn-back-options:active {
    background: #F3F4F6;
}

.options-header h2 {
    flex: 1;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #111827;
    margin: 0;
    margin-right: 40px;
}

.options-content {
    padding-top: 60px;
    padding-bottom: 40px;
    min-height: 100vh;
}

.options-section {
    margin: 0 16px 24px;
}

.options-section .section-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #F3F4F6;
}

.option-info {
    flex: 1;
}

.option-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 500;
}

/* iOS-style Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E7EB;
    transition: .3s;
    border-radius: 31px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #E67E22;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* About Card */
.about-card {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid #FED7AA;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.1);
}

/* =================== TRENDS SECTION - CHRISTMAS EDITION =================== */

.trends-banner {
    position: relative;
    margin: 0;
    padding: 30px 24px;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #165B33 100%);
    overflow: hidden;
}

.trends-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.snowflakes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.snowflakes span {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: snowfall 4s linear infinite;
}

.snowflakes span:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.snowflakes span:nth-child(2) {
    left: 30%;
    animation-delay: 0.8s;
}

.snowflakes span:nth-child(3) {
    left: 50%;
    animation-delay: 1.6s;
}

.snowflakes span:nth-child(4) {
    left: 70%;
    animation-delay: 2.4s;
}

.snowflakes span:nth-child(5) {
    left: 90%;
    animation-delay: 3.2s;
}

@keyframes snowfall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(100px) rotate(360deg);
        opacity: 0;
    }
}

.trends-content {
    position: relative;
    z-index: 2;
}

.trends-badge {
    display: inline-block;
    background: linear-gradient(135deg, #BB2528 0%, #EA4630 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(187, 37, 40, 0.4);
}

.trends-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.trends-sub {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 500;
}

/* Seasonal Recipe Cards */
.seasonal-section {
    padding: 20px 0 20px 0;
    background: linear-gradient(180deg, #165B33 0%, var(--bg-body) 100%);
}

#christmas-scroll {
    display: flex;
    gap: 14px;
    padding: 0 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#christmas-scroll::-webkit-scrollbar {
    display: none;
}

.seasonal-card {
    flex: 0 0 160px;
    min-width: 160px;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-snap-align: start;
    cursor: pointer;
}

.seasonal-card:active {
    transform: scale(0.96);
}

.seasonal-img {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Eco Discount Ribbon */
.eco-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 4px 10px 4px 12px;
    font-size: 0.7rem;
    font-weight: 900;
    border-bottom-left-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    letter-spacing: 0.5px;
}

.seasonal-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
}

.seasonal-body {
    padding: 12px;
}

.seasonal-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seasonal-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Section Divider */
.section-divider {
    display: flex;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #165B33 100%);
    overflow: hidden;
}

.section-divider-recettes {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.section-divider-recettes span {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trends-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.snowflakes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.snowflakes span {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: snowfall 4s linear infinite;
}

.snowflakes span:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.snowflakes span:nth-child(2) {
    left: 30%;
    animation-delay: 0.8s;
}

.snowflakes span:nth-child(3) {
    left: 50%;
    animation-delay: 1.6s;
}

.snowflakes span:nth-child(4) {
    left: 70%;
    animation-delay: 2.4s;
}

.snowflakes span:nth-child(5) {
    left: 90%;
    animation-delay: 3.2s;
}

@keyframes snowfall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(100px) rotate(360deg);
        opacity: 0;
    }
}

.trends-content {
    position: relative;
    z-index: 2;
}

.trends-badge {
    display: inline-block;
    background: linear-gradient(135deg, #BB2528 0%, #EA4630 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(187, 37, 40, 0.4);
}

.trends-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.trends-sub {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 500;
}

/* Seasonal Recipe Cards */
.seasonal-section {
    padding: 20px 0 20px 0;
    background: linear-gradient(180deg, #165B33 0%, var(--bg-body) 100%);
}

#christmas-scroll {
    display: flex;
    gap: 14px;
    padding: 0 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#christmas-scroll::-webkit-scrollbar {
    display: none;
}

.seasonal-card {
    flex: 0 0 160px;
    min-width: 160px;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-snap-align: start;
    cursor: pointer;
}

.seasonal-card:active {
    transform: scale(0.96);
}

.seasonal-img {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Eco Discount Ribbon */
.eco-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 4px 10px 4px 12px;
    font-size: 0.7rem;
    font-weight: 900;
    border-bottom-left-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    letter-spacing: 0.5px;
}

.seasonal-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
}

.seasonal-body {
    padding: 12px;
}

.seasonal-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seasonal-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 12px;
}

.section-divider span {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CATEGORY CARDS */
.category-card {
    position: relative;
    flex: 0 0 auto;
    width: 140px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: scale(1.03);
}

.category-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
}

.category-name {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}