/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

:root {
  --wine:        #8b0a2e;
  --wine-dark:   #6b0822;
  --gold:        #b8963a;
  --gold-light:  #d4ab4e;
  --bg:          #f8f5f0;
  --surface:     #ffffff;
  --border:      #e5ddd4;
  --text:        #2a1a1a;
  --text-sub:    #6b5555;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
}

.site-header {
  background: var(--wine-dark);
  text-align: center;
  padding: 20px 24px 16px;
}

.site-header img.logo { height: 64px; width: auto; }

.header-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.steps-bar { background: var(--wine); }

.steps-inner {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
}

.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  gap: 3px;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.step-item.active, .step-item.completed { opacity: 1; }
.step-item.completed { opacity: 0.65; }

.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.step-item.active .step-num { background: var(--gold); }

.step-label {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.container { max-width: 680px; margin: 0 auto; padding: 0 16px; }

.section { display: none; }
.section.active { display: block; animation: fu 0.22s ease; }

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

.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  margin: 20px auto;
}

.form-card h2 {
  font-size: 1rem; font-weight: 700;
  color: var(--wine);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 4px; }

.field label {
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.field label .req { color: var(--wine); }

.field input,
.field select,
.field textarea {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 0.9rem;
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--wine); }

.field input.error, .field select.error { border-color: #c0392b; }
.field .error-msg { font-size: 0.7rem; color: #c0392b; display: none; }
.field.has-error .error-msg { display: block; }
.field .hint { font-size: 0.7rem; color: #bbb; }

textarea { resize: none; height: 62px; }

.distance-info {
  background: #fdf8ee;
  border: 1px solid #e8d9b0;
  border-radius: 5px;
  padding: 7px 11px;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 5px;
  display: none; align-items: center; gap: 6px;
}
.distance-info.show { display: flex; }
.distance-info strong { color: var(--wine); }

.waiter-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 13px;
  background: #faf7f4;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  flex-wrap: wrap;
}

.toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.toggle {
  width: 34px; height: 19px;
  background: var(--border);
  border-radius: 100px;
  position: relative; transition: background 0.2s; cursor: pointer; flex-shrink: 0;
}
.toggle::after {
  content: ''; width: 13px; height: 13px;
  background: #fff; border-radius: 50%;
  position: absolute; top: 3px; left: 3px;
  transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle.on { background: var(--wine); }
.toggle.on::after { transform: translateX(15px); }

.toggle-label { font-size: 0.83rem; color: var(--text-sub); }

.waiter-qty { display: none; align-items: center; gap: 8px; }
.waiter-qty.show { display: flex; }
.waiter-qty input { width: 58px; text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: 6px;
  font-family: 'Lato', sans-serif; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: all 0.15s;
}

.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-dark); }

.btn-ghost {
  background: transparent; color: var(--text-sub);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--wine); color: var(--wine); }

.btn-whatsapp {
  background: #25d366; color: #fff;
  font-size: 0.95rem; padding: 13px 26px;
  width: 100%; max-width: 360px; border-radius: 7px;
}
.btn-whatsapp:hover { background: #1eba58; }

.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border);
}

/* menus */
.menus-section { max-width: 680px; margin: 20px auto; }

.menus-header {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 22px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}

.menus-header h2 { font-size: 0.98rem; color: var(--wine); font-weight: 700; }
.menus-header p { font-size: 0.8rem; color: var(--text-sub); }

.menus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.menu-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.menu-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }

.menu-card.selected {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(139,10,46,0.1);
}

.menu-check {
  position: absolute; top: 11px; right: 11px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--border); font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  color: transparent; transition: all 0.15s;
}
.menu-card.selected .menu-check { background: var(--wine); color: #fff; }

.menu-name { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 5px; padding-right: 26px; line-height: 1.3; }
.menu-price { font-size: 1.2rem; font-weight: 700; color: var(--wine); }
.menu-price-label { font-size: 0.7rem; color: var(--text-sub); margin-bottom: 9px; }
.menu-divider { height: 1px; background: var(--border); margin: 9px 0; }
.menu-items { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.menu-items li { font-size: 0.76rem; color: var(--text-sub); display: flex; align-items: flex-start; gap: 5px; line-height: 1.3; }
.menu-items li::before { content: '—'; color: var(--gold); font-size: 0.6rem; margin-top: 2px; flex-shrink: 0; }

/* quote */
.quote-wrap { max-width: 580px; margin: 20px auto; }

.quote-top {
  background: var(--wine-dark);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 12px;
}
.quote-icon {
  width: 40px; height: 40px; background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.quote-top h2 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 1px; }
.quote-top p { color: rgba(255,255,255,0.55); font-size: 0.76rem; }

.quote-body { background: var(--surface); border: 1px solid var(--border); border-top: none; }

.q-label {
  padding: 7px 18px;
  background: #faf7f4;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}

.q-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 18px; font-size: 0.83rem;
  border-bottom: 1px solid #f0ebe4;
}
.q-row:last-child { border-bottom: none; }
.q-row .lbl { color: var(--text-sub); }
.q-row .val { font-weight: 600; text-align: right; max-width: 58%; }

.quote-total {
  background: var(--wine);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px 22px;
  display: flex; justify-content: space-between; align-items: center;
}
.quote-total .tl { color: rgba(255,255,255,0.7); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.quote-total .tv { color: #fff; font-size: 1.6rem; font-weight: 700; }

.quote-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
.quote-note { font-size: 0.72rem; color: #bbb; text-align: center; margin-top: 2px; }

.site-footer {
  text-align: center; padding: 22px; font-size: 0.76rem; color: #bbb;
  border-top: 1px solid var(--border); margin-top: 36px;
}

.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,0.82);
  display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 9999;
}
.loading-overlay.show { display: flex; }
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--border); border-top-color: var(--wine);
  border-radius: 50%; animation: spin 0.6s linear infinite; margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .form-card { padding: 18px 14px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .menus-grid { grid-template-columns: 1fr; }
  .quote-total { flex-direction: column; gap: 4px; text-align: center; }
}
