/* ================= THE STONERS SHOP — design system ================= */
:root {
  --ink: #faf7f1;        /* page — warm paper, matches the films */
  --ink-2: #f2ece1;      /* alternating band */
  --ink-3: #ffffff;      /* cards */
  --cream: #241f18;      /* body text */
  --cream-dim: #6b6255;  /* muted text */
  --amber: #9c5c14;      /* accent text — ~5:1 on paper, AA */
  --amber-soft: #e2953f; /* brighter fill */
  --clay: #a8442a;
  --moss: #5f6b40;
  --radius: 18px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

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

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--amber-soft); color: var(--cream); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em.accent { font-style: normal; color: var(--amber); }

/* film grain */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 200;
  opacity: 0.03; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border-radius: 999px; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
}
.btn--amber { background: var(--cream); color: var(--ink); box-shadow: 0 10px 30px rgba(156,92,20,0.3); }
.btn--amber:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(156,92,20,0.42); }
.btn--ghost { background: transparent; color: var(--cream); border: 1.5px solid rgba(36,31,24,0.35); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-3px); }
.btn--solid { background: var(--cream); color: var(--ink); }
.btn--solid:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(36,31,24,0.14); }

/* ---------------- nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 3.5vw;
  background: linear-gradient(rgba(250,247,241,0.75), transparent);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.solid { background: rgba(250,247,241,0.9); backdrop-filter: blur(14px); }
.nav__logo { display: flex; align-items: center; gap: 11px; }
.nav__logo img { height: 42px; width: auto; }
.nav__logo span { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cream-dim); position: relative; transition: color 0.25s;
}
.nav__links a:hover, .nav__links a.active { color: var(--cream); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--amber); transition: width 0.3s cubic-bezier(0.65,0,0.35,1);
}
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__burger {
  display: none; background: rgba(36,31,24,0.1); border: 1px solid rgba(36,31,24,0.25);
  color: var(--cream); width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
}

/* ---------------- generic page bits ---------------- */
.page-hero { padding: 165px 6vw 60px; text-align: center; }
.page-hero .kicker {
  display: block; font-size: 0.75rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--amber); font-weight: 600; margin-bottom: 16px;
}
.page-hero h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
.page-hero p { color: var(--cream-dim); max-width: 560px; margin: 20px auto 0; font-weight: 300; }

.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1); }

/* ---------------- product cards ---------------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px; max-width: 1280px; margin: 50px auto 120px; padding: 0 5vw;
}
.card {
  background: var(--ink-2); border: 1px solid rgba(36,31,24,0.07);
  border-radius: var(--radius); overflow: hidden; display: block;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s, border-color 0.4s;
}
.card:hover { transform: translateY(-9px); box-shadow: 0 26px 60px rgba(36,31,24,0.14); border-color: rgba(156,92,20,0.4); }
.card__img { aspect-ratio: 1; overflow: hidden; background: var(--ink-3); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.card:hover .card__img img { transform: scale(1.07); }
.card__body { padding: 18px 20px 22px; }
.card__body h4 { font-weight: 500; font-size: 0.98rem; line-height: 1.4; margin-bottom: 8px; }
.card__price { color: var(--amber); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

.filter-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.filter-bar button {
  padding: 10px 24px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(36,31,24,0.2); background: transparent; color: var(--cream-dim);
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.25s;
}
.filter-bar button:hover { border-color: var(--amber); color: var(--amber); }
.filter-bar button.active { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.card.hidden { display: none; }

/* ---------------- footer ---------------- */
.footer { padding: 70px 5vw 40px; border-top: 1px solid rgba(36,31,24,0.08); background: var(--ink-2); position: relative; z-index: 5; }
.footer__grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; max-width: 1280px; margin: 0 auto; }
.footer__brand img { height: 52px; margin-bottom: 14px; }
.footer__brand p { color: var(--cream-dim); max-width: 380px; font-size: 0.92rem; font-weight: 300; }
.footer__col h5 {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 16px; font-weight: 600;
}
.footer__col a { display: block; color: var(--cream-dim); margin-bottom: 9px; font-size: 0.93rem; font-weight: 300; transition: color 0.2s, transform 0.2s; }
.footer__col a:hover { color: var(--cream); transform: translateX(4px); }
.footer__bottom { text-align: center; color: rgba(36,31,24,0.35); font-size: 0.82rem; margin-top: 50px; }

/* ---------------- chatbot ---------------- */
.bot-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 130;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--cream); color: var(--amber-soft); font-size: 1.5rem;
  display: grid; place-items: center;
  box-shadow: 0 12px 34px rgba(36,31,24,0.14), 0 0 0 0 rgba(156,92,20,0.5);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s;
}
.bot-fab:hover { transform: scale(1.08) rotate(-6deg); }
.bot-fab__badge {
  position: absolute; top: -3px; right: -3px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--clay); border: 2px solid var(--ink);
  transition: opacity 0.3s;
}
.bot-fab.opened .bot-fab__badge { opacity: 0; }

.bot-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 131;
  width: min(370px, calc(100vw - 40px)); height: min(540px, calc(100vh - 140px));
  background: var(--ink-2); border: 1px solid rgba(36,31,24,0.12);
  border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(36,31,24,0.14);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.32s, visibility 0.32s, transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.bot-panel.open { opacity: 1; visibility: visible; transform: none; }
.bot-head {
  display: flex; align-items: center; gap: 11px; padding: 15px 16px;
  border-bottom: 1px solid rgba(36,31,24,0.09); background: var(--ink-3);
}
.bot-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.bot-head b { font-family: var(--font-display); font-size: 1rem; font-weight: 600; display: block; }
.bot-head small { color: var(--moss); font-size: 0.72rem; letter-spacing: 0.06em; }
.bot-head button {
  margin-left: auto; background: none; border: none; color: var(--cream-dim);
  font-size: 1.05rem; cursor: pointer; padding: 6px; transition: color 0.2s, transform 0.2s;
}
.bot-head button:hover { color: var(--cream); transform: rotate(90deg); }

.bot-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bot-log::-webkit-scrollbar { width: 6px; }
.bot-log::-webkit-scrollbar-thumb { background: rgba(36,31,24,0.16); border-radius: 3px; }
.msg {
  max-width: 84%; padding: 11px 15px; border-radius: 15px; font-size: 0.92rem;
  line-height: 1.55; animation: msgIn 0.35s cubic-bezier(0.22,1,0.36,1);
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.bot { background: var(--ink-3); border-bottom-left-radius: 5px; align-self: flex-start; color: var(--cream); }
.msg.me  { background: var(--cream); color: var(--ink); border-bottom-right-radius: 5px; align-self: flex-end; font-weight: 500; }
.msg a { color: var(--amber-soft); text-decoration: underline; text-underline-offset: 2px; }
.msg.me a { color: var(--ink); }
.msg.typing { display: flex; gap: 4px; align-items: center; padding: 14px 16px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--cream-dim); animation: blink 1.3s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.2s; }
.msg.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100% { opacity: 0.25; } 30% { opacity: 1; } }

.bot-chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 16px 12px; }
.bot-chips button {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-family: var(--font-body);
  background: transparent; border: 1px solid rgba(156,92,20,0.45); color: var(--amber);
  font-size: 0.78rem; font-weight: 500; transition: background 0.22s, color 0.22s;
}
.bot-chips button:hover { background: var(--amber); color: #fff; }

.bot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(36,31,24,0.09); }
.bot-form input {
  flex: 1; padding: 11px 15px; border-radius: 999px; font-size: 0.9rem;
  background: var(--ink); border: 1px solid rgba(36,31,24,0.14);
  color: var(--cream); font-family: var(--font-body);
}
.bot-form input:focus { outline: none; border-color: var(--amber); }
.bot-form button {
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--cream); color: var(--ink); font-size: 1rem; flex-shrink: 0;
  transition: transform 0.25s;
}
.bot-form button:hover { transform: scale(1.08); }

@media (max-width: 560px) {
  .bot-panel { right: 12px; left: 12px; width: auto; bottom: 88px; height: min(70vh, 480px); }
  .bot-fab { right: 16px; bottom: 16px; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav.open .nav__links {
    display: flex; position: fixed; inset: 0; background: rgba(250,247,241,0.97);
    flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  }
  .nav.open .nav__links a { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
