/* ═══════════════════════════════════════════════════════════════════
   PrimaveraTravels — Shared Design System
   Defines every CSS custom property and component class referenced
   by prices.html, app.js, and admin.js.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand ────────────────────────────────────────────────────── */
  --navy:        #0E4F6B;
  --navy-dark:   #0a3d54;
  --gold:        #D9A441;
  --gold-light:  #e8c76a;
  --terracotta:  #C4622D;
  --terracotta-dark:#a34f22;

  /* ── Neutrals ─────────────────────────────────────────────────── */
  --white:       #ffffff;
  --stone:       #F6F3EC;
  --mist:        #E8E4DB;
  --ink:         #15233B;

  --gray-50:     #F9F8F6;
  --gray-100:    #F1EEEA;
  --gray-200:    #E5E0D8;
  --gray-300:    #D5CFC5;
  --gray-400:    #A8A095;
  --gray-500:    #8A8278;
  --gray-600:    #6B655C;
  --gray-700:    #4A453E;

  /* ── Accents ────────────────────────────────────────────────── */
  --blue-50:     #E8F4FA;
  --blue-100:    #C8E4F0;
  --blue-200:    #A0D0E4;
  --blue-500:    #2D7A9E;
  --blue-700:    #1E5A73;
  --horizon:     #2D7A9E;
  --horizon-l:   #5A9EB5;

  --red-50:      #FDF2F2;
  --red-100:     #FCE0E0;
  --red-600:     #B5482F;

  --green-600:   #2E7D4A;

  /* ── Typography ─────────────────────────────────────────────────── */
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* ── Spacing & Shape ────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* ── Shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(21,35,59,.06);
  --shadow-md: 0 4px 12px rgba(21,35,59,.08);
  --shadow-lg: 0 8px 24px rgba(21,35,59,.12);
}

/* ── Reset & Base ───────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navigation ─────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.nav-logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
}
.nav-brand-name span {
  color: var(--terracotta);
}

.nav-tagline {
  font-size: 0.82rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ── Hero Band ──────────────────────────────────────────────────── */
.hero-band {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14,79,107,0.88) 0%,
    rgba(14,79,107,0.35) 55%,
    transparent 100%
  );
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 0 1rem 40px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 8px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
  margin: 0 0 8px;
  line-height: 1.2;
}
.hero-headline em {
  font-style: italic;
  font-weight: 600;
}

.hero-services {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

/* ── Page Layout ────────────────────────────────────────────────── */
.page-main {
  padding: 0 1rem 3rem;
}

.page-center {
  max-width: 900px;
  margin: 0 auto;
}

.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--mist);
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--mist);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-500);
  background: var(--white);
}

.footer-brand {
  font-weight: 600;
  color: var(--navy);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Utilities ──────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--navy);
  color: var(--white);
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { background: var(--navy-dark); }
.btn:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  border-color: var(--mist);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.badge-blue {
  background: var(--blue-50);
  color: var(--blue-700);
}
.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}
.badge-green {
  background: #E8F5E9;
  color: var(--green-600);
}
.badge-gold {
  background: #FDF6E3;
  color: #8B6914;
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--white);
  line-height: 1.4;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--horizon);
  box-shadow: 0 0 0 3px var(--blue-100);
}

/* ── Grid ───────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Data Table ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}
.data-table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  background: var(--gray-50);
}
.data-table tr:hover td {
  background: var(--blue-50);
}

/* ── Admin Layout ───────────────────────────────────────────────── */
.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
}

.sidebar-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: var(--blue-50);
  color: var(--navy);
}

/* ── Breakdown Rows ─────────────────────────────────────────────── */
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}
.breakdown-row.last {
  border-bottom: none;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--gray-200);
  font-weight: 700;
  font-size: 1rem;
}
.breakdown-label { color: var(--gray-600); }
.breakdown-value { color: var(--ink); font-weight: 600; }

/* ── Minimum Prices ─────────────────────────────────────────────── */
.min-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}

/* ── Fuel Badges ────────────────────────────────────────────────── */
.fuel-manual-badge,
.fuel-auto-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.fuel-manual-badge {
  background: var(--gold-light);
  color: #5c4a1a;
}
.fuel-auto-badge {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* ── Trip Details ─────────────────────────────────────────────── */
.trip-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.trip-detail-item:last-child {
  border-bottom: none;
}
.trip-detail-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--gray-500);
}
.trip-detail-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trip-detail-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trip-detail-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* ── Language Switcher ──────────────────────────────────────────── */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--mist);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink);
}
.lang-btn.active {
  border-color: var(--navy);
  background: var(--blue-50);
  color: var(--navy);
}
.lang-flag-img {
  border-radius: 2px;
  display: block;
}

/* ── Extras / Stepper ─────────────────────────────────────────── */
.extra-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.extra-item-label {
  font-size: 0.88rem;
  font-weight: 500;
}
.extra-item-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}
.extra-stepper-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mist);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  font-family: inherit;
  padding: 0;
}
.extra-stepper-btn:hover {
  background: var(--gray-50);
}
.extra-item-count {
  width: 36px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  -moz-appearance: textfield;
  padding: 0;
}
.extra-item-count::-webkit-outer-spin-button,
.extra-item-count::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Stops ──────────────────────────────────────────────────────── */
.stop-group {
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--white);
}
.stop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-700);
}
.remove-stop-btn {
  background: none;
  border: none;
  color: var(--red-600);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.remove-stop-btn:hover {
  background: var(--red-50);
}

/* ── API Status ─────────────────────────────────────────────────── */
.api-status {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
}
.api-ready {
  background: #E8F5E9;
  color: var(--green-600);
}
.api-error {
  background: var(--red-50);
  color: var(--red-600);
}
.api-waiting {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* ── Trip Type Toggle ───────────────────────────────────────────── */
.trip-type-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.trip-type-toggle button {
  flex: 1;
  padding: 10px;
  border: none;
  background: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.15s ease;
}
.trip-type-toggle button.active {
  background: var(--navy);
  color: var(--white);
}
.trip-type-toggle.return-active button.active {
  background: var(--terracotta);
}

/* ── Car Photo Placeholder ────────────────────────────────────── */
#carPhotoPlaceholder svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

/* ── Mobile Language Strip ──────────────────────────────────────── */
.mobile-lang-switcher {
  display: none;
}
@media (max-width: 768px) {
  .mobile-lang-switcher {
    display: flex;
    gap: 6px;
    padding: 8px 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--mist);
    overflow-x: auto;
    position: sticky;
    top: 46px;
    z-index: 99;
  }
}

/* ── Print ──────────────────────────────────────────────────────── */
@media print {
  .nav, .footer, .btn, .lang-btn, .mobile-lang-switcher {
    display: none !important;
  }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}