/*
Theme Name:  Stay Hungry Meals
Theme URI:   https://instagram.com/stay_hungry_meals
Description: Custom theme for Stay Hungry Meals — weekly healthy meal delivery.
Author:      Nikiforos Katsis
Version:     1.0.0
Text Domain: stay-hungry-meals
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── RESET & BASE ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --yellow: #F7C948;
    --yellow-light: #FFF5CC;
    --yellow-dim: rgba(0, 0, 0, 0.08);
    --green: #2E8B57;
    --red: #E8202A;
    --dark: #1A1A1A;
    --card-bg: rgba(255, 255, 255, 0.55);
    --card-bg-2: rgba(255, 255, 255, 0.35);
    --mid: #444;
    --muted: #666;
    --cream: #FAFAF7;
    --white: #FFFFFF;
    --radius: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --menu-bg: var(--yellow);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--yellow);
    color: var(--dark);
    line-height: 1.6;
}

/* ─── NAV ─── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 201, 72, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0 clamp(20px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
    letter-spacing: -0.3px;
    line-height: 1;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.nav-brand:hover { opacity: 0.8; }

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

.nav-links a {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.55);
    transition: color 0.2s;
}

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

/* ─── HERO ─── */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
    background: var(--yellow);
    align-items: center;
    overflow: hidden;
}

.hero-text {
    padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 72px);
    max-width: 540px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-photo {
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 200px 30px 40px;
}

.hero-photo img {
    width: 150%;
    height: 120%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: 16px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow-light);
    color: #8a6d00;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    width: fit-content;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.hero-title em {
    font-style: normal;
    color: var(--green);
}

.hero-sub {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
    max-width: 380px;
}

/* ─── SECTION WRAPPER ─── */
.section {
    background: var(--yellow);
    padding: clamp(48px, 8vw, 80px) clamp(20px, 5vw, 80px) clamp(60px, 10vw, 100px);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--dark);
}

.section-week-tag {
    background: rgba(0,0,0,0.1);
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.15);
}

/* ─── DAY TABS ─── */
.day-tabs {
    position: relative;
    display: flex;
    background: rgba(0,0,0,0.12);
    border-radius: 14px;
    padding: 6px;
    gap: 4px;
    margin-bottom: 32px;
    border: 1px solid rgba(0,0,0,0.15);
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    background: var(--dark);
    border-radius: 10px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.day-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.45);
    transition: color 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.day-tab .tab-short { display: none; }
.day-tab .tab-full { display: block; }

.day-tab.active {
    color: var(--yellow);
}

.day-tab:hover:not(.active) {
    color: rgba(0,0,0,0.65);
}

/* Today pill */
.day-tab[data-today="true"]::after {
    content: '●';
    font-size: 0.45rem;
    color: var(--green);
    display: block;
    line-height: 1;
}

/* ─── DAY PANELS ─── */
.day-panels {
    position: relative;
}

.day-panel {
    display: none;
    animation: panelFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-panel.active {
    display: block;
}

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

.panel-day-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.4);
    margin-bottom: 20px;
}

/* ─── MEAL CARDS ─── */
.meal-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.meal-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.meal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}

.meal-card--lunch::before {
    background: linear-gradient(90deg, #E8202A, #ff6b35);
}

.meal-card--dinner::before {
    background: linear-gradient(90deg, var(--dark), #444);
}

.meal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.15);
}

.meal-card-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 4px;
}

.meal-card-time {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.meal-card--lunch .meal-card-time { color: var(--red); }
.meal-card--dinner .meal-card-time { color: var(--dark); }

.meal-card-name {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.meal-card-desc {
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.6;
    flex: 1;
}

.meal-card-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.extra-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: rgba(0,0,0,0.07);
    color: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,0,0,0.12);
}

/* ─── FOOTER ─── */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    padding: 28px 20px;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

footer strong {
    color: var(--yellow);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.footer-credit {
    margin-top: 10px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
}

.footer-credit-link {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: color 0.2s, border-color 0.2s;
}

.footer-credit-link:hover {
    color: var(--yellow);
    border-color: var(--yellow);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .meal-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {

    /* NAV */
    nav {
        padding: 0 16px;
        height: auto;
        flex-wrap: wrap;
        gap: 0;
    }

    .nav-brand {
        font-size: 1.3rem;
        padding: 12px 0 8px;
    }

    .nav-links {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        gap: 20px;
        padding: 0 0 10px;
        border-top: 1px solid rgba(0,0,0,0.08);
    }

    .nav-links a {
        font-size: 0.9rem;
        font-weight: 600;
    }

    /* HERO — stack */
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        min-height: unset;
    }

    .hero-text {
        order: 2;
        padding: 28px 20px 32px;
        max-width: 100%;
    }

    .hero-photo {
        order: 1;
        min-height: unset;
        padding: 20px 20px 0;
    }

    .hero-photo img {
        width: 100%;
        max-height: 240px;
        object-fit: cover;
        border-radius: 14px;
    }

    /* Day tabs — short labels on mobile */
    .day-tab .tab-full { display: none; }
    .day-tab .tab-short { display: block; }

    .day-tab {
        padding: 10px 4px;
        font-size: 0.82rem;
    }

    /* HERO TEXT */
    .hero-title { font-size: 2rem; }
    .hero-sub { font-size: 0.9rem; }

    .meal-card {
        padding: 24px 20px;
    }
}

/* ─── CALORIE BADGE ─── */
.meal-card-calories {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(231, 76, 60, 0.10);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.22);
    border-radius: 100px;
    padding: 4px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    width: fit-content;
}
.meal-card--dinner .meal-card-calories {
    background: rgba(26,26,26,0.08);
    color: var(--dark);
    border-color: rgba(0,0,0,0.18);
}
.calorie-fire { font-size: 0.85rem; }

/* ─── ORDER BUTTON ─── */
.order-btn-wrap {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}
.btn-order-detail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--dark);
    color: var(--yellow);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 16px 36px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0,0,0,0.20);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-order-detail:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.28);
    background: #111;
}
.btn-order-detail svg { flex-shrink: 0; }

/* ─── MODAL OVERLAY ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open {
    display: flex;
    animation: shmModalBgIn 0.25s ease;
}
@keyframes shmModalBgIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: #fff;
    border-radius: 28px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,0.25);
    animation: shmModalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
@keyframes shmModalSlideIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.modal-header {
    background: var(--dark);
    color: var(--yellow);
    padding: 28px 32px 24px;
    border-radius: 28px 28px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.modal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.modal-day-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(247,201,72,0.65);
    margin-bottom: 6px;
}
.modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.modal-total-cals {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(247,201,72,0.15);
    border: 1px solid rgba(247,201,72,0.3);
    border-radius: 100px;
    padding: 6px 16px;
    margin-top: 14px;
    width: fit-content;
}
.modal-total-cals span {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--yellow);
    letter-spacing: 0.04em;
}
.btn-close-modal {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}
.btn-close-modal:hover { background: rgba(255,255,255,0.2); }

/* ─── MODAL BODY ─── */
.modal-body {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-meal-block {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.07);
}
.modal-meal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}
.modal-meal-header--lunch  { background: linear-gradient(135deg,#fff0ee 0%,#fde 100%); }
.modal-meal-header--dinner { background: linear-gradient(135deg,#f2f2f2 0%,#e8e8e8 100%); }

.modal-meal-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.modal-meal-header--lunch  .modal-meal-dot { background: var(--red); }
.modal-meal-header--dinner .modal-meal-dot { background: var(--dark); }

.modal-meal-type {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.modal-meal-header--lunch  .modal-meal-type { color: var(--red); }
.modal-meal-header--dinner .modal-meal-type { color: var(--dark); }

.modal-meal-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    flex: 1;
}
.modal-meal-kcal-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
}
.modal-meal-header--lunch  .modal-meal-kcal-badge { background: rgba(231,76,60,0.12); color: #c0392b; }
.modal-meal-header--dinner .modal-meal-kcal-badge { background: rgba(26,26,26,0.10); color: var(--dark); }

.modal-meal-details {
    padding: 16px 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.modal-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}
.modal-detail-icon { font-size: 1rem; flex-shrink: 0; }

.modal-extras-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.modal-extra-chip {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,0,0,0.1);
}

.modal-macros {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    padding-top: 6px;
}
.modal-macro-item {
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
}
.macro-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
}
.macro-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(90deg,transparent,rgba(0,0,0,0.08),transparent);
    margin: 0 -32px;
}

/* ─── DAILY TOTAL SUMMARY ─── */
.modal-daily-total {
    background: linear-gradient(135deg, var(--dark) 0%, #333 100%);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.modal-daily-total-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}
.modal-daily-total-num {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--yellow);
    letter-spacing: -1px;
    line-height: 1;
}
.modal-daily-total-unit {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    margin-left: 4px;
}
.modal-daily-total-macros {
    display: flex;
    gap: 16px;
}
.modal-total-macro { text-align: center; }
.modal-total-macro-val {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}
.modal-total-macro-lbl {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── MODAL RESPONSIVE ─── */
@media (max-width: 600px) {
    .modal { border-radius: 20px; max-height: 95vh; }
    .modal-header { padding: 22px 20px 18px; border-radius: 20px 20px 0 0; }
    .modal-body { padding: 20px 16px 24px; }
    .modal-title { font-size: 1.2rem; }
    .modal-meal-name { font-size: 1rem; }
    .modal-daily-total { flex-direction: column; align-items: flex-start; }
    .modal-daily-total-macros { width: 100%; justify-content: space-between; }
    .modal-divider { margin: 0 -16px; }
}
