﻿:root {
    --brand: #24D26D;
    --brand-2: #1AA85A;
    --ink: #EAF4EE;
    --muted: #94A3B8;
    --cream: #F3F1E7;
    --card: #0f1a14ee;
    --card-2: #0b1410ee;
    --line: #1f2a25;
}

/* ===== Base ===== */
* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font-family: system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
    color: var(--ink);
    background: radial-gradient(1200px 700px at 10% -10%, #1a2c23 0%, transparent 60%), radial-gradient(1000px 600px at 110% 10%, #123f2b 0%, transparent 60%), linear-gradient(180deg,#0b1310 0%,#0e1713 100%);
}

/* ===== Layout ===== */
.container {
    max-width: 1100px;
    margin-inline: auto;
    padding: 20px 22px
}

.header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

@media (max-width:720px) {
    .header {
        grid-template-columns: 1fr;
        gap: 10px
    }
}

/* ===== Brand ===== */
/* LOGO — corregido para imagen */
.brand {
    display: flex;
    align-items: center;
    gap: 12px
}

    .brand .logo {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        /* sin fondo sólido para no teñir tu logo */
        background: #0b131000;
        display: grid;
        place-items: center;
        overflow: hidden; /* evita que la imagen se salga de la caja */
        border: 1px solid var(--line); /* marco sutil opcional */
    }

        .brand .logo img {
            width: 100%;
            height: 100%;
            object-fit: contain; /* mantiene proporciones del PNG/SVG */
            image-rendering: auto;
            display: block;
        }

    .brand h1 {
        margin: 0;
        font-size: 28px;
        letter-spacing: .5px;
        line-height: 1.1
    }

    .brand small {
        display: block;
        color: var(--muted);
        margin-top: 2px
    }

@media (max-width:420px) {
    .brand h1 {
        font-size: 24px
    }
}

/* ===== Controls ===== */
.controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px
}

.input {
    border: 1px solid var(--line);
    background: #0e1713;
    color: #E6F2EC;
    padding: 12px 14px;
    border-radius: 12px;
    min-width: 0;
    width: 100%;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

@media (max-width:720px) {
    .chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none
    }

        .chips::-webkit-scrollbar {
            display: none
        }
}

.chip {
    border: 1px solid var(--line);
    background: #0e1713;
    color: #E6F2EC;
    padding: 10px 12px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: transform .12s ease,border-color .2s ease,background .2s ease;
}

    .chip:hover {
        transform: translateY(-1px)
    }

    .chip.active {
        border-color: var(--brand);
        background: #0f1f16
    }

/* ===== Sections & Grid ===== */
.section h2 {
    margin: 18px 0 10px;
    font-size: 22px;
    color: #DFF7EB
}

.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr))
}

@media (max-width:720px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 12px
    }
}

/* ===== Cards ===== */
.card {
    background: linear-gradient(180deg,var(--card),var(--card-2));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    transition: .15s ease;
}

    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px #00000044
    }

    .card.clickable {
        cursor: pointer
    }

.card-row {
    display: flex;
    gap: 12px;
    align-items: flex-start
}

.thumb {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line);
    background: #0f1a14;
    flex: 0 0 auto;
}

.card-col {
    flex: 1;
    min-width: 0
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px
}

.title {
    font-size: 18px;
    font-weight: 700;
    color: #F1F7F4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.price {
    background: #102219;
    border: 1px solid var(--line);
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}

.badges {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #0b1612;
    font-size: 12px;
    color: #CDE6DA;
}

    .badge.spicy {
        border-color: #b91c1c;
        background: #270d0d
    }

    .badge.reco {
        border-color: #1f8a47;
        background: #0d2316
    }

.desc {
    color: #B9C8C0;
    font-size: 14px;
    line-height: 1.35;
    margin-top: 8px
}

@media (max-width:420px) {
    .thumb {
        width: 72px;
        height: 72px
    }

    .title {
        font-size: 17px
    }

    .desc {
        font-size: 13.5px
    }
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: #0009;
    display: grid;
    place-items: center;
    z-index: 50;
    padding: clamp(10px,3vw,20px);
    overscroll-behavior: contain;
}

.modal-card {
    background: linear-gradient(180deg,var(--card),var(--card-2));
    border: 1px solid var(--line);
    border-radius: 20px;
    width: min(960px,100%);
    height: clamp(520px,80vh,760px);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px #0008;
    padding: 0;
    margin-inline: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: transparent;
    color: #CDE6DA;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.modal-body {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-columns: 1fr 1.1fr
}

.modal-media {
    height: 100%;
    min-width: 0;
    display: grid;
    place-items: center;
    background: #0f1612;
    border-right: 1px solid var(--line);
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.modal-info {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 8px;
    padding: 18px;
    height: 100%;
    min-width: 0;
}

.modal-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px 0;
    color: #F1F7F4;
}

.modal-name {
    font-size: 20px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.modal-text {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
}

    .modal-text .desc {
        margin-top: 6px
    }

    .modal-text .note {
        margin-top: 6px;
        font-size: 14px;
        line-height: 1.4;
        color: #F2F5E8;
        opacity: .95;
        font-style: italic;
    }

@media (max-width:720px) {
    .modal-card {
        width: 100%;
        height: 88vh
    }

    .modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: 38% 62%
    }

    .modal-media {
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .modal-name {
        max-width: 60%;
        font-size: 18px
    }
}

/* ===== Termómetro ===== */
.heat-label {
    color: #CFE7DA;
    font-size: 13px
}

.heat-scale {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9fb6ad;
    margin-top: 2px
}

.heat3 {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center
}

.thermo3 {
    position: relative;
    width: 100%;
    padding: 10px 0 18px
}

    .thermo3 .thermo-track {
        height: 14px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: linear-gradient(90deg,#22c55e 0%,#84cc16 28%,#f59e0b 50%,#fb923c 65%,#ef4444 80%,#b91c1c 100%);
        box-shadow: inset 0 0 8px rgba(0,0,0,.25);
    }

    .thermo3 .thermo-indicator {
        position: absolute;
        left: var(--pos,0%);
        top: 50%;
        transform: translate(-50%,-55%);
        transition: left .6s cubic-bezier(.2,.8,.2,1);
    }

    .thermo3 .thermo-face {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: #0e1713;
        border: 2px solid var(--face-ring,#22c55e);
        box-shadow: 0 0 10px color-mix(in srgb, var(--face-ring) 60%, transparent);
        font-size: 20px;
        line-height: 1;
    }

@keyframes pulse-face {
    0%,100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.06)
    }
}

/* ===== WhatsApp button ===== */
.whatsapp {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    background: var(--brand);
    color: #082213;
    border: 0;
    font-weight: 800;
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 10px 30px #0b161244;
    cursor: pointer;
    text-decoration: none;
}

    .whatsapp:hover {
        background: var(--brand-2)
    }

/* Footer */
.footer-note {
    margin: 30px 0 6px;
    color: #8FA99D;
    font-size: 12px;
    text-align: center
}

/* A11y + motion */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 10px
}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}

/* Lock scroll when modal open */
html.modal-open {
    overflow: hidden
}
