:root {
  color-scheme: dark;
  --ink: #dde6f3;
  --ink-soft: #7fa3c0;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --teal: #38bdf8;
  --sand: #1a2f4e;
  --paper: #162844;
  --sky: #1e3a5f;
  --rose: #1a2035;
  --shadow: 0 30px 70px rgba(0, 10, 30, 0.45);
  --navy: #0a1628;
  --navy-mid: #162844;
  --surface: rgba(10, 25, 48, 0.65);
}

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

body {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background-color: #faf7f2;
  background-image:
    linear-gradient(to right, #0a1628 calc(50% - 450px), transparent calc(50% - 450px)),
    linear-gradient(to left,  #0a1628 calc(50% - 450px), transparent calc(50% - 450px));
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

.ambient {
  position: fixed;
  inset: -40vh -30vw auto auto;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(56, 130, 220, 0.14), rgba(0, 0, 0, 0));
  filter: blur(0px);
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,19,35,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 20px;
}

.brand {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch { display: flex; gap: 2px; margin-left: auto; }
.lang-btn {
  padding: 4px 9px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  color: #a0b8d0;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.lang-btn:hover { border-color: var(--accent); color: #fff; }
.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lang-select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #fff;
  font-family: inherit;
}

.cta,
.ghost {
  font-family: inherit;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
}

.cta {
  background: var(--accent);
  color: #fff;
}

.cta:hover {
  background: #ea6b0e;
}

.ghost {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

main {
  padding: 60px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  align-items: center;
}

.hero-content h1 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.05;
  margin: 16px 0;
}

.hero-content h1 span {
  display: block;
  color: var(--teal);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.lead {
  font-size: 1.05rem;
  max-width: 540px;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 26px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 600;
}

.hero-card {
  background: var(--paper);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.price {
  font-size: 2rem;
  font-weight: 600;
}

.tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tags span {
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.section {
  display: grid;
  gap: 30px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.section-heading {
  max-width: 620px;
}

.section-heading h2 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 12px;
}

.section-heading.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.feature {
  background: #fff;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.form-section {
  background: linear-gradient(120deg, rgba(200, 236, 255, 0.8), rgba(255, 225, 210, 0.7));
  padding: 32px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.price-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

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

input,
select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(10,25,48,0.6);
  color: var(--ink);
}

.price-form button {
  justify-self: start;
}

.span-2 {
  grid-column: span 2;
}

.feed-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.control-group {
  display: grid;
  gap: 8px;
}

.control-group label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
}

.toggle input {
  accent-color: var(--teal);
}

.feed-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.feed-note {
  max-width: 360px;
  text-align: right;
}

.price-feed {
  display: grid;
  gap: 18px;
}

.price-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.price-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.price-card .title {
  font-size: 1.1rem;
  font-weight: 600;
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(15, 23, 42, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chip.active {
  background: var(--teal);
  color: #fff;
}

.highlight {
  background: #fff;
  border-radius: 26px;
  padding: 32px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer {
  padding: 40px 20px 60px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 20px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-heading.split {
    flex-direction: column;
    align-items: flex-start;
  }

  .highlight {
    flex-direction: column;
    align-items: flex-start;
  }

  .span-2 {
    grid-column: span 1;
  }

  .feed-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .feed-note {
    text-align: left;
  }
}

@media (max-width: 600px) {
  main {
    padding: 40px 16px 60px;
  }

  .nav-links {
    flex-direction: column;
    gap: 8px;
  }

  .nav-tools {
    width: 100%;
    justify-content: space-between;
  }
}

body.loaded .hero {
  animation: rise 1s ease forwards;
}

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

.admin-section .section-heading {
  max-width: 720px;
}

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.admin-controls .field {
  min-width: 220px;
}

.admin-feedback {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.admin-feedback.error {
  color: #b42318;
}

.admin-sync {
  margin-top: 18px;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.admin-sync h3 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.admin-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.admin-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-grid-stack {
  grid-template-columns: 1fr;
}

.admin-form {
  background: #fff;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 12px;
}

.admin-form-wide {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-form h3 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.2rem;
}

.admin-table-block {
  background: #fff;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 12px;
}

.admin-table-block summary {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.admin-table-block summary::-webkit-details-marker {
  display: none;
}

.admin-table-block summary::after {
  content: "▾";
  font-size: 1.2rem;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
}

.admin-table-block[open] summary::after {
  transform: rotate(180deg);
}

.admin-table {
  width: 100%;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.04);
}

.continent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chip-btn {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip-btn:hover {
  background: rgba(10, 133, 146, 0.12);
  border-color: var(--teal);
}

.chip-btn.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

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

.country-grid-vertical .country-card {
  margin: 0;
}

.country-card {
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  height: 48px;
  box-sizing: border-box;
  overflow: hidden;
}

.country-flag {
  width: 28px;
  min-width: 28px;
  height: auto;
  border-radius: 2px;
}

.country-item-list {
  display: grid;
  gap: 16px;
}

.price-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.item-kicker {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin: 0 0 12px;
}

.item-subkicker {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 10px;
}

.price-row .name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.category-block {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(10, 133, 146, 0.06);
  border: 1px solid rgba(10, 133, 146, 0.18);
}

.subcategory-block {
  padding: 12px 0 4px;
}

.item-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .price-row {
    grid-template-columns: 1fr;
  }
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-link {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.chip-link:hover {
  background: var(--teal);
  color: #fff;
}
.country-card .meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.country-card .name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-card .slug {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.inline-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.country-hero {
  display: grid;
  gap: 16px;
  max-width: 680px;
}

.country-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--ink-soft);
}

.country-stats span {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.92);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: rgba(190, 40, 40, 0.95);
}

.admin-btn {
  padding: 6px 14px;
  font-size: 0.75rem;
}

.admin-btn.danger {
  border-color: rgba(180, 35, 24, 0.4);
  color: #b42318;
}

.admin-inline-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  font-family: inherit;
}

.admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.admin-empty {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.admin-code {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  font-size: 0.8rem;
  overflow-x: auto;
}
