/* ============================================
   Casa Empanada — Shared Styles
   Palette: Vibrant Latin
   ============================================ */

:root {
  --red: #d62828;
  --red-dark: #a31621;
  --orange: #f77f00;
  --yellow: #fcbf49;
  --cream: #fff5e1;
  --teal: #1d7a74;
  --brown: #3a2313;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(58, 35, 19, 0.14);
  --radius: 14px;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--brown);
  background: var(--cream);
  line-height: 1.6;
}

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

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
}

.logo-mark {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  padding: 3px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text span { color: var(--yellow); }

.main-nav {
  display: flex;
  gap: 0.4rem;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  transition: background 0.2s;
}

.main-nav a:hover { background: rgba(255, 255, 255, 0.18); }

.main-nav a.active {
  background: var(--yellow);
  color: var(--brown);
}

/* Papel picado bunting strip */
.bunting {
  height: 26px;
  background:
    linear-gradient(135deg, var(--yellow) 25%, transparent 25%) 0 0 / 26px 26px,
    linear-gradient(225deg, var(--yellow) 25%, transparent 25%) 0 0 / 26px 26px,
    linear-gradient(135deg, var(--teal) 25%, transparent 25%) 13px 0 / 26px 26px,
    linear-gradient(225deg, var(--teal) 25%, transparent 25%) 13px 0 / 26px 26px;
  background-color: var(--red-dark);
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 3.5rem 1.2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

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

.hero p.tagline {
  font-size: 1.15rem;
  margin-bottom: 1.8rem;
  max-width: 46ch;
  opacity: 0.95;
}

.hero-img {
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35));
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-primary {
  background: var(--yellow);
  color: var(--brown);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  margin-left: 0.6rem;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Sections ---------- */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  text-align: center;
  margin-bottom: 0.4rem;
  color: var(--red-dark);
}

.section-sub {
  text-align: center;
  margin-bottom: 2.4rem;
  color: #6b4f33;
  font-size: 1.05rem;
}

.title-flourish {
  display: block;
  width: 90px;
  height: 4px;
  margin: 0.7rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--orange), var(--yellow), var(--teal));
}

/* ---------- Cards (featured / menu visuals) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover { transform: translateY(-5px); }

.card-img {
  background: var(--cream);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
}

.card-img img { width: 100%; height: 100%; object-fit: contain; }

.card-img.photo { padding: 0; }
.card-img.photo img { object-fit: cover; }

.card-body { padding: 1.1rem 1.2rem 1.4rem; flex: 1; }

.card-body h3 {
  font-family: var(--font-display);
  color: var(--red-dark);
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.card-body p { font-size: 0.95rem; color: #5c4630; }

.card-price {
  display: inline-block;
  margin-top: 0.6rem;
  background: var(--yellow);
  color: var(--brown);
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

/* ---------- Info strip (home) ---------- */

.info-strip {
  background: var(--teal);
  color: var(--white);
}

.info-strip .section { padding: 2.6rem 1.2rem; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
  text-align: center;
}

.info-grid h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
  color: var(--yellow);
}

/* ---------- Menu page ---------- */

.menu-section { margin-bottom: 3rem; }

.menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.9rem 2.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  background: var(--white);
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(58, 35, 19, 0.08);
  border-left: 5px solid var(--orange);
}

.menu-section:nth-of-type(2) .menu-item { border-left-color: var(--teal); }
.menu-section:nth-of-type(3) .menu-item { border-left-color: var(--red); }
.menu-section:nth-of-type(4) .menu-item { border-left-color: var(--yellow); }
.menu-section:nth-of-type(5) .menu-item { border-left-color: var(--red-dark); }

.menu-item .thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.menu-item .name {
  flex: 1;
  font-weight: 700;
  color: var(--brown);
}

.menu-item .desc {
  font-size: 0.88rem;
  color: #6b4f33;
  font-weight: 400;
  display: block;
}

.menu-item .price {
  font-weight: 700;
  color: var(--red-dark);
  white-space: nowrap;
}

.menu-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: #6b4f33;
  font-style: italic;
}

/* ---------- Order page ---------- */

.order-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.order-items { display: flex; flex-direction: column; gap: 0.7rem; }

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(58, 35, 19, 0.08);
}

.order-row .item-name { font-weight: 600; flex: 1; }

.order-row .item-price {
  color: var(--red-dark);
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}

.qty-control button:hover { background: var(--red-dark); }

.qty-control .qty {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.order-category {
  font-family: var(--font-display);
  color: var(--red-dark);
  font-size: 1.2rem;
  margin: 1.2rem 0 0.2rem;
}

.order-category:first-child { margin-top: 0; }

.order-summary {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}

.order-summary h2 {
  font-family: var(--font-display);
  color: var(--red-dark);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

#summary-lines { margin-bottom: 1rem; min-height: 1.4rem; }

#summary-lines .line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 0.15rem 0;
}

#summary-lines .empty { color: #9a8265; font-style: italic; font-size: 0.95rem; }

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 2px dashed var(--yellow);
  padding-top: 0.8rem;
  margin-bottom: 1.2rem;
}

.form-field { margin-bottom: 0.9rem; }

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 2px solid #e8d9bd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.98rem;
  background: var(--cream);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.order-summary .btn { width: 100%; text-align: center; }

.order-hint {
  font-size: 0.85rem;
  color: #6b4f33;
  margin-top: 0.8rem;
  text-align: center;
}

.order-closed {
  background: var(--white);
  border-left: 6px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.3rem;
  margin: 0 auto 1.5rem;
  max-width: 1100px;
}
.order-closed strong { color: var(--red-dark); font-size: 1.1rem; display: block; margin-bottom: 0.2rem; }
.order-error { color: var(--red-dark); font-weight: 600; font-size: 0.92rem; margin: 0.6rem 0 0; text-align: center; }
.order-summary .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Elegir sabores del trío / trio flavor picker */
.flavor-picker {
  background: var(--white);
  border: 2px solid var(--yellow);
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  margin-top: -0.4rem;
}
.flavor-picker p { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; }
.picker-count { color: var(--red-dark); }
.picker-flavor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px dashed #efe2c8;
}
.picker-flavor .qty-control button { width: 30px; height: 30px; font-size: 1rem; }
.qty-control button:disabled { opacity: 0.35; cursor: not-allowed; }
.flavor-picker .link-btn { background: none; border: 0; color: var(--red-dark); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: 0.95rem; margin-top: 0.6rem; }

/* Combinaciones elegidas, debajo del trío / chosen combinations, under the trio */
.trio-combos { display: grid; gap: 0.4rem; margin-top: -0.4rem; }
.trio-combos:empty { display: none; }
.trio-combo {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.8rem;
  background: var(--white);
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  padding: 0.5rem 1.1rem 0.5rem 1.4rem;
  font-size: 0.92rem;
}
.trio-combo .qty-control button { width: 28px; height: 28px; font-size: 0.95rem; }
.trio-combo .combo-total { font-weight: 700; color: var(--red-dark); min-width: 52px; text-align: right; }
.line .sabores { display: block; font-size: 0.82rem; color: #6b4f33; }

.order-done { text-align: center; }
.order-done .done-num { font-family: var(--font-display); font-size: 3rem; color: var(--red-dark); line-height: 1.1; }
.order-done .done-state {
  display: inline-block; margin: 0.6rem 0 1rem; padding: 0.35rem 1rem; border-radius: 999px;
  background: var(--cream); font-weight: 700;
}
.order-done .done-state.aceptado, .order-done .done-state.listo { background: #e0f2ef; color: var(--teal); }
.order-done .done-state.rechazado { background: #fbe3e1; color: var(--red-dark); }
.order-done .done-lines { text-align: left; margin: 0.8rem 0; }
.order-done .done-lines .line { display: flex; justify-content: space-between; padding: 0.15rem 0; }
.order-done .link-btn { background: none; border: 0; color: var(--red-dark); font-weight: 600; text-decoration: underline; cursor: pointer; margin-top: 0.8rem; font-size: 0.95rem; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: var(--white);
  text-align: center;
  padding: 3rem 1.2rem;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin-bottom: 1.2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--brown);
  color: #e8d9bd;
  padding: 2.5rem 1.2rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.8rem;
}

.site-footer h4 {
  color: var(--yellow);
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

.site-footer a { color: #e8d9bd; }

/* Teléfono como enlace: mismo color que el texto. Phone links keep the surrounding text color. */
a[href^="tel:"] { color: inherit; }

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #5c4630;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.tagline { margin-inline: auto; }
  .hero-img { max-width: 420px; margin: 0 auto; }
  .order-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

@media (max-width: 520px) {
  .main-nav a { padding: 0.4rem 0.7rem; font-size: 0.92rem; }
  .btn-secondary { margin-left: 0; margin-top: 0.6rem; }
}
