:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --line: #e5e5e7;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --accent: #1d1d1f;
  --green: #3f8f3d;
  --radius: 18px;
  --max: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.nav-links a { transition: opacity 0.2s ease; }
.nav-links a:hover { opacity: 0.6; }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
}

.cart-count {
  background: rgba(255,255,255,0.25);
  border-radius: 100px;
  font-size: 12px;
  padding: 1px 7px;
  font-weight: 600;
}

/* HERO */
.hero {
  padding: 84px 24px 0;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-copy {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-copy h1 {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-sub {
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-photo-wrap {
  margin-top: 56px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
  aspect-ratio: 16 / 8;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.trust-bar {
  margin-top: 30px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.trust-bar li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trust-bar li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--bg-alt); }

.btn-full { width: 100%; }

.btn-disabled { opacity: 0.4; pointer-events: none; }

/* SECTION HEAD */
.section-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 17px;
}

/* PROCESS */
.process {
  padding: 100px 0 100px;
  background: var(--bg-alt);
}

.steps {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 30px;
  border: 1px solid var(--line);
  position: relative;
}

.step-num {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  opacity: 0.5;
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.step h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.step p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* SHOP */
.shop {
  padding: 100px 0;
}

.product-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.product-visual {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-tag {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
  margin-bottom: 14px;
}

.product-price {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.product-price strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.price-was {
  text-decoration: line-through;
  color: var(--ink-soft);
  font-size: 14px;
  margin-right: 4px;
}

.deal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.deal-badge {
  display: inline-block;
  background: #fdecec;
  color: #a12727;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.cart-item-free {
  color: var(--green);
  font-weight: 600;
}

.add-btn {
  margin-top: auto;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.add-btn:hover { opacity: 0.85; }
.add-btn.added { background: var(--green); }
.add-btn:disabled { background: var(--ink-soft); opacity: 0.5; cursor: not-allowed; }

.shop-notice {
  max-width: 560px;
  margin: -24px auto 40px;
  padding: 12px 20px;
  background: var(--bg-alt);
  border-radius: 100px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* CTA */
.cta {
  text-align: center;
  padding: 100px 24px 110px;
  background: var(--bg-alt);
}

.cta h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta p {
  color: var(--ink-soft);
  margin-top: 12px;
  margin-bottom: 30px;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 30px 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

/* CART DRAWER */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 200;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 90vw;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  z-index: 201;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-header h3 { font-size: 18px; font-weight: 600; }

.cart-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink-soft);
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
}

.cart-empty {
  color: var(--ink-soft);
  font-size: 14px;
  padding: 30px 0;
  text-align: center;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.cart-item-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.cart-item-info span {
  font-size: 12px;
  color: var(--ink-soft);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-controls button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  position: relative;
}

.qty-controls button::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.cart-footer {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--line);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 16px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.checkout-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 8px;
}

.checkout-form label:first-child { margin-top: 0; }

.checkout-form input {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--ink);
}

.checkout-form input:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.checkout-error {
  font-size: 12px;
  color: #d64545;
  min-height: 14px;
  margin-top: 6px;
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* FOCUS STATES */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* CHAT WIDGET */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 210;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.chat-toggle:hover { transform: translateY(-2px); opacity: 0.9; }

.chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  z-index: 209;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.chat-panel-header h3 { font-size: 15px; font-weight: 600; }
.chat-status { font-size: 12px; color: var(--ink-soft); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.chat-msg.bot {
  background: var(--bg-alt);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: var(--ink);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.error {
  background: #fdecec;
  color: #a12727;
}

.chat-typing {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: chatBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.chat-input-row input {
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-alt);
  color: var(--ink);
}
.chat-input-row input:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.chat-send:hover { opacity: 0.85; }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 480px) {
  .chat-panel {
    right: 16px;
    bottom: 88px;
    width: calc(100vw - 32px);
  }
  .chat-toggle { right: 16px; bottom: 16px; }
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .hero { padding-top: 56px; }
  .hero-photo-wrap { aspect-ratio: 4 / 5; border-radius: 20px; margin-top: 40px; }
  .steps { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.cart-btn) { display: none; }
}
