:root {
  --bg-1: #f9f5eb;
  --bg-2: #dbe8e0;
  --ink: #1d2a33;
  --accent: #dd5b2f;
  --accent-dark: #9f3f1f;
  --surface: rgba(255, 255, 255, 0.86);
  --line: rgba(29, 42, 51, 0.16);
  --nav-height: 74px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: var(--nav-height);
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background-image: url("https://olive-adorable-cephalopod-171.mypinata.cloud/ipfs/bafkreia3ded5hrryyyvffpr62pmism5dpwopmx7bzwwjg5iqm4jlpm52ri");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

#store,
#services {
  scroll-margin-top: calc(var(--nav-height) + 10px);
}

.shell {
  width: min(1100px, 92vw);
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1rem;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 1.15rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  margin: 0 0 0.35rem;
  color: var(--accent-dark);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2.7rem);
}

.sub {
  margin: 0.65rem 0 0;
  max-width: 70ch;
}

.hero-pill {
  align-self: flex-start;
  background: #1d2a33;
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
}

.panel-header h2,
.panel-header p {
  margin: 0;
}

.panel-header p {
  color: rgba(29, 42, 51, 0.72);
  margin-top: 0.25rem;
}

.row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

input,
select,
button {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  font: inherit;
}

input,
select {
  background: #fff;
  flex: 1;
  min-width: 180px;
}

button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--ink);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.service-menu {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.service-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 54px;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.service-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29, 42, 51, 0.14);
  border-color: rgba(221, 91, 47, 0.45);
}

.code {
  margin-top: 0.85rem;
  background: #1f2937;
  color: #d7e2ed;
  border-radius: 12px;
  padding: 0.8rem;
  min-height: 90px;
  white-space: pre-wrap;
}

.cart ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.45rem;
}

.cart li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.82);
}

.cart li > div {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.total {
  margin-top: 0.7rem;
}

.status-note,
.wallet-hint {
  font-size: 0.86rem;
  color: rgba(29, 42, 51, 0.75);
}

.chat-bubble {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.product-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.product-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-image.placeholder {
  background: linear-gradient(120deg, #f3d4b3, #ddece3);
}

.product-body {
  padding: 0.75rem;
}

.product-body h3 {
  margin: 0;
  font-size: 1rem;
}

.product-body p {
  margin: 0.45rem 0;
  font-size: 0.9rem;
  color: rgba(29, 42, 51, 0.78);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-panel canvas {
  margin-top: 0.8rem;
  max-height: 280px;
}

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

  .service-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: 94vw;
    margin-top: 1rem;
  }

  .hero {
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .service-menu {
    grid-template-columns: 1fr;
  }
}

/* ── Site Header / Nav ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(29, 42, 51, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 0.75rem 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.nav-logo-mark {
  font-size: 1.4rem;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.nav-links .cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
}

.nav-links .cart-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.logo-image {
  display: block;
  max-height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-icon {
  line-height: 1;
  font-size: 0.95rem;
}

.nav-label {
  line-height: 1;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-links a.active {
  background: rgba(221, 91, 47, 0.3);
  border: 1px solid rgba(221, 91, 47, 0.55);
}

.cart-link {
  position: relative;
}

#cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.4;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 680px) {
  :root {
    --nav-height: 82px;
  }

  .nav-toggle { display: none; }

  .nav-links {
    display: flex;
    margin-left: auto;
    max-width: calc(100vw - 120px);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
  }

  .nav-links a {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    font-size: 0.84rem;
    scroll-snap-align: start;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 0.55rem;
  }
}

@media (max-width: 420px) {
  :root {
    --nav-height: 86px;
  }

  .nav-links {
    max-width: calc(100vw - 94px);
    gap: 0.2rem;
  }

  .nav-links a {
    min-width: 38px;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
  }

  .nav-links .nav-label {
    display: none;
  }

  .nav-links .nav-icon {
    font-size: 1rem;
  }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: rgba(29, 42, 51, 0.07);
}

/* ── Hero badge ────────────────────────────────────────────────────────── */
.hero-badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1d2a33;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  pointer-events: none;
  max-width: 280px;
}

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

/* ── Site Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: #1d2a33;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.footer-brand p {
  margin: 0;
  font-size: 0.85rem;
}

.footer-flag {
  width: 72px;
  height: 48px;
  margin-top: 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ── Wallet hint ───────────────────────────────────────────────────────── */
.wallet-hint code {
  background: rgba(29, 42, 51, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.82rem;
}

/* ── Chart panels ──────────────────────────────────────────────────────── */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.chart-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 1.15rem;
}

.chart-card h3 {
  margin: 0 0 0.75rem;
}

.prediction-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 0.75rem;
  margin-top: 0.75rem;
}

.prediction-label {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 500;
}

.prediction-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #047857;
  margin-top: 0.2rem;
}

/* The trend line is an extrapolation, so it is shown as a footnote to the live price,
   never as a headline number. */
.prediction-trend {
  font-size: 0.78rem;
  color: #047857;
  opacity: 0.85;
  margin-top: 0.25rem;
}

/* A fixed box keeps the grid steady while Chart.js sizes the canvas. */
.chart-holder {
  position: relative;
  height: 220px;
}

.chart-symbol {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.65;
}

/* Where the figures came from, and when they were measured. */
.chart-source {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: var(--ink);
  opacity: 0.6;
}

/* Why a card is empty. Shown in place of the chart, never alongside stand-in numbers. */
.chart-status {
  margin: 0.6rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(29, 42, 51, 0.04);
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.75;
}

.forecast-disclaimer {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--ink);
  opacity: 0.6;
}

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

/* Alpine panels stay hidden until Alpine has initialised. */
[x-cloak] {
  display: none !important;
}

/* ── Iyobo, the AI assistant ─────────────────────────────────────────────── */
/* Tapping the launcher opens Iyobo over the whole screen: on a phone there is
   no room for a 340px card, and on a desktop a conversation deserves the space.
   The markup is in templates/base.html. */

.aza-launcher {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 8000;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(221, 91, 47, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.aza-launcher:hover { transform: scale(1.06); }
.aza-launcher:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.aza-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
}

@supports (height: 100dvh) {
  .aza-screen { height: 100dvh; }
}

.aza-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Phones and the Telegram Mini App: clear of the notch, and full-bleed behind it. */
  padding: calc(0.85rem + env(safe-area-inset-top)) 1.15rem 0.85rem;
  background: var(--ink);
  color: #fff;
}

.aza-bar h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.aza-bar p {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  opacity: 0.72;
}

.aza-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.aza-close:hover { background: rgba(255, 255, 255, 0.26); }

.aza-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.15rem;
}

/* The conversation stays a readable column however wide the screen is. */
.aza-thread,
.aza-composer-inner {
  display: flex;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}

.aza-thread {
  flex-direction: column;
  gap: 0.7rem;
}

.aza-msg {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.93rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.aza-msg.bot {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.aza-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  margin-left: auto;
}

.aza-msg.thinking {
  color: rgba(29, 42, 51, 0.6);
  font-style: italic;
}

.aza-composer {
  /* Clear of the home indicator on phones. */
  padding: 0.85rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}

.aza-composer-inner { gap: 0.5rem; }

.aza-composer input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  /* Under 16px, iOS Safari zooms the page when the field takes focus. */
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.aza-composer input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.aza-composer button {
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.aza-composer button[disabled] { opacity: 0.55; cursor: progress; }

/* The page behind must not scroll while Iyobo is open. */
body.aza-open { overflow: hidden; }

/* ── Contact Us ──────────────────────────────────────────────────────────── */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-optional {
  font-weight: 400;
  opacity: 0.6;
}

.contact-field input,
.contact-field textarea {
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  /* Under 16px, iOS Safari zooms the page when a field takes focus. */
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
}

.contact-field textarea {
  resize: vertical;
  min-height: 9rem;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* The honeypot: off-screen for people, still filled in by bots. `display: none` would be
   skipped by some of them, which is the whole point of the field. */
.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-status {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.contact-status.is-sent {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #047857;
}

.contact-status.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.contact-status a {
  color: inherit;
  font-weight: 600;
}

.contact-channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-channels li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-channel-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

.contact-channels a {
  color: var(--accent-dark);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-note {
  margin: 1.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  opacity: 0.7;
}
