/*
==========================================================
 El Panda Pizza & Café — elpanda.cl
 style.css
==========================================================
*/

:root {
    --green: #4c5d3a;
    --green-dark: #3a4a2d;
    --green-deep: #2c3622;
    --green-soft: #5d794f;
    --cream: #f6f1e4;
    --paper: #fffdf6;
    --ink: #272b20;
    --muted: #6d7261;
    --terra: #bf5430;
    --whatsapp: #1fab55;
    --radius: 18px;
    --shadow: 0 14px 40px rgba(44, 54, 34, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Baloo 2', 'Inter', sans-serif;
    line-height: 1.15;
    color: var(--green-deep);
}

img {
    max-width: 100%;
    /* height auto: sin esto, el atributo height de las <img>
       (necesario contra CLS) gana al aspect-ratio del CSS */
    height: auto;
    display: block;
}

a {
    color: inherit;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 32px);
}

/*
==========================================================
 Botones
==========================================================
*/

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Baloo 2', sans-serif;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border: 2px solid transparent;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Dimensiones fijas en iconos: Font Awesome carga en diferido
   y sin esto los glifos empujarían el layout al aparecer (CLS). */
.btn i {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(44, 54, 34, 0.22);
}

.btn.green {
    background: var(--green);
    color: #fff;
}

.btn.green:hover {
    background: var(--green-dark);
}

.btn.whatsapp {
    background: var(--whatsapp);
    color: #fff;
}

.btn.whatsapp:hover {
    background: #179147;
}

.btn.outline {
    background: transparent;
    color: var(--green-deep);
    border-color: var(--green);
}

.btn.outline:hover {
    background: var(--green);
    color: #fff;
}

.btn.light {
    background: var(--paper);
    color: var(--green-deep);
}

/*
==========================================================
 Header
==========================================================
*/

.topbar {
    background: var(--cream);
    border-bottom: 1px solid rgba(44, 54, 34, 0.08);
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    width: 52px;
    height: 52px;
}

.brand span {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 19px;
    color: var(--green-deep);
    line-height: 1.1;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.topbar nav a {
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    transition: color 0.2s ease;
}

.topbar nav a:hover {
    color: var(--green-soft);
}

.topbar .btn {
    padding: 10px 20px;
    font-size: 15px;
}

@media (max-width: 760px) {
    .topbar nav .nav-link {
        display: none;
    }
}

/*
==========================================================
 Hero
==========================================================
*/

.hero {
    padding: clamp(40px, 7vw, 84px) 0 clamp(48px, 7vw, 90px);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(76, 93, 58, 0.12);
    color: var(--green-dark);
    font-weight: 700;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero-badge i {
    color: var(--terra);
}

.section-head .hero-badge {
    margin: 14px 0 0;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    margin-bottom: 18px;
}

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

.hero .lead {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--muted);
    max-width: 48ch;
    margin-bottom: 30px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-photo {
    position: relative;
}

.hero-photo img.photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50% 50% 46% 54% / 52% 48% 52% 48%;
    box-shadow: var(--shadow);
}

.hero-photo .sticker {
    position: absolute;
    bottom: 4%;
    left: -4%;
    width: clamp(90px, 10vw, 130px);
    transform: rotate(-9deg);
    filter: drop-shadow(0 8px 16px rgba(44, 54, 34, 0.3));
}

@media (max-width: 860px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-photo {
        order: -1;
        max-width: 420px;
        margin: 0 auto;
    }
}

/*
==========================================================
 Franja de especialidades
==========================================================
*/

.features {
    background: var(--green);
    color: #fff;
    padding: clamp(44px, 6vw, 70px) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 4vw, 48px);
}

.feature {
    text-align: center;
}

.feature svg {
    width: 46px;
    height: 46px;
    stroke: #e9eddd;
    margin-bottom: 14px;
}

.feature i {
    font-size: 42px;
    width: 46px;
    height: 46px;
    line-height: 46px;
    display: inline-block;
    color: #e9eddd;
    margin-bottom: 16px;
}

.feature h3 {
    color: #fff;
    font-size: 21px;
    margin-bottom: 8px;
}

.feature p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    max-width: 30ch;
    margin: 0 auto;
}

@media (max-width: 760px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/*
==========================================================
 Secciones genéricas
==========================================================
*/

.section {
    padding: clamp(52px, 8vw, 96px) 0;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(32px, 5vw, 56px);
}

.section-tag {
    display: inline-block;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-head p {
    color: var(--muted);
    font-size: 17px;
}

/*
==========================================================
 Carta teaser
==========================================================
*/

.carousel {
    position: relative;
    margin-bottom: clamp(32px, 5vw, 48px);
}

.carousel-track {
    display: flex;
    gap: clamp(16px, 2.5vw, 24px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    padding: 4px 4px 10px;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(44, 54, 34, 0.15);
    background: var(--paper);
    color: var(--green-dark);
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease background-color, 0.2s ease transform;
}

.carousel-btn:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.carousel-btn.prev {
    left: -10px;
}

.carousel-btn.next {
    right: -10px;
}

@media (pointer: coarse) {
    .carousel-btn {
        display: none;
    }
}

.menu-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    flex: 0 0 min(300px, 78vw);
    scroll-snap-align: start;
}

.menu-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.menu-card:hover img {
    transform: scale(1.04);
}

.menu-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 44px 22px 18px;
    background: linear-gradient(transparent, rgba(30, 37, 22, 0.85));
    color: #fff;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 20px;
}

.menu-cta {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}


/*
==========================================================
 Opiniones
==========================================================
*/

.rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 700;
    box-shadow: var(--shadow);
    margin-top: 14px;
    font-size: 16px;
}

.rating-pill .stars {
    color: #e7a63a;
    letter-spacing: 2px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 3vw, 28px);
    margin-bottom: clamp(32px, 5vw, 44px);
}

.review-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 26px 26px 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card .stars {
    color: #e7a63a;
    font-size: 17px;
    letter-spacing: 3px;
}

.review-card blockquote {
    border: none;
    font-size: 15.5px;
    color: var(--ink);
    flex: 1;
}

.review-card cite {
    font-style: normal;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--green-dark);
}

.review-card cite span {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 860px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/*
==========================================================
 Horarios y ubicación
==========================================================
*/

.visit {
    background: var(--paper);
}

.visit-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(24px, 4vw, 40px);
    align-items: stretch;
}

.visit-card {
    background: var(--cream);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--shadow);
}

.visit-card h3 {
    font-size: 23px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visit-card h3 svg {
    width: 24px;
    height: 24px;
    stroke: var(--green-soft);
}

.visit-card h3 i {
    font-size: 22px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    display: inline-block;
    color: var(--green-soft);
}

.visit-contact i {
    color: var(--green-soft);
    width: 20px;
    height: 16px;
    line-height: 16px;
    display: inline-block;
    text-align: center;
    margin-right: 4px;
}

.hero-badge i {
    width: 14px;
    height: 14px;
    line-height: 14px;
    display: inline-block;
    text-align: center;
}

.hours {
    list-style: none;
}

.hours li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(44, 54, 34, 0.15);
    font-size: 15.5px;
}

.hours li:last-child {
    border-bottom: none;
}

.hours .day {
    font-weight: 600;
}

.hours .closed {
    color: var(--terra);
    font-weight: 600;
}

.visit-contact {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15.5px;
}

.visit-contact a {
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: none;
}

.visit-contact a:hover {
    text-decoration: underline;
}

.map-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 340px;
    display: flex;
}

.map-card iframe {
    border: 0;
    width: 100%;
    min-height: 340px;
    flex: 1;
}

@media (max-width: 860px) {
    .visit-grid {
        grid-template-columns: 1fr;
    }
}

/*
==========================================================
 CTA final
==========================================================
*/

.cta-strip {
    background: var(--green-deep);
    color: #fff;
    padding: clamp(48px, 7vw, 80px) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-strip {
    background:
        linear-gradient(rgba(37, 46, 28, 0.88), rgba(37, 46, 28, 0.88)),
        url('/assets/horno.webp') center / cover no-repeat;
}

.cta-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/assets/logo_white.webp') no-repeat -60px center / 340px;
    opacity: 0.06;
    pointer-events: none;
}

.cta-strip h2 {
    color: #fff;
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 10px;
}

.cta-strip p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 28px;
    font-size: 17px;
}

/*
==========================================================
 Carta (página)
==========================================================
*/

.carta-hero {
    text-align: center;
    padding: clamp(40px, 6vw, 64px) 0 clamp(8px, 2vw, 16px);
}

.carta-hero h1 {
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 800;
    margin-bottom: 12px;
}

.carta-hero p {
    color: var(--muted);
    font-size: 17px;
    max-width: 54ch;
    margin: 0 auto;
}

.carta-section {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px) clamp(18px, 4vw, 32px) clamp(52px, 7vw, 80px);
}

.carta-embed {
    position: relative;
    width: 100%;
    padding-top: 139.52%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--green-deep);
}

.carta-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.carta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

/*
==========================================================
 Footer
==========================================================
*/

footer {
    background: var(--cream);
    border-top: 1px solid rgba(44, 54, 34, 0.1);
    padding: 36px 0 30px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.footer-inner img {
    width: 64px;
    margin-bottom: 4px;
}

.footer-inner a {
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}
