body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.45;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

html {
  scroll-behavior: smooth;
}

body::after {
  content: "";
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  position: fixed;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

body,
button,
a,
input,
[role="button"] {
  cursor: auto;
}

body.locked {
  overflow-x: hidden;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  box-shadow: var(--focus-ring);
  outline: 0;
}

.app-shell {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: calc(var(--navbar-height) + clamp(24px, 4vw, 46px)) clamp(18px, 4vw, 52px)
    clamp(96px, 12vw, 140px);
  position: relative;
  z-index: 2;
}

.hero-panel {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.62fr);
  margin-bottom: clamp(44px, 7vw, 84px);
}

.hero-panel h1,
.journal-panel h2,
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8.4rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.9;
  margin: 0;
}

.section-heading h2 {
  font-size: clamp(2.8rem, 6vw, 5.6rem);
}

.hero-panel p,
.journal-panel p,
.section-heading p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin: clamp(16px, 2vw, 24px) 0 0;
  max-width: 680px;
}

.eyebrow {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-link,
.secondary-link,
.checkout-button,
.chat-input button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  color: #fff;
  display: inline-flex;
  font-weight: 500;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  transition:
    background 200ms var(--transition-smooth),
    transform 200ms var(--transition-smooth),
    box-shadow 200ms var(--transition-smooth);
}

.secondary-link {
  background: var(--accent-muted);
  color: var(--accent-dark);
}

.primary-link:hover,
.checkout-button:hover,
.chat-input button:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.secondary-link:hover {
  background: var(--accent-hover);
}

.hero-image {
  margin: 0;
  position: relative;
}

.hero-image img {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  object-fit: cover;
  width: 100%;
}

.product-section,
.journal-panel {
  margin-top: clamp(38px, 6vw, 80px);
}

.product-section,
.journal-panel,
.hero-panel {
  scroll-margin-top: calc(var(--navbar-height) + 22px);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.journal-panel {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 54px);
}

.overlay {
  background: var(--overlay);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 220ms var(--transition-smooth);
  z-index: 60;
}

.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.toast-region {
  bottom: 96px;
  display: grid;
  gap: 10px;
  position: fixed;
  right: 24px;
  z-index: 120;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  color: var(--text-primary);
  padding: 14px 16px;
}

.cursor-dot,
.cursor-ring {
  display: none;
}

@media (max-width: 768px) {
  body,
  button,
  a,
  input {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .app-shell {
    margin-left: 0;
    padding: 86px 12px 108px;
  }

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

  .product-card {
    padding: 6px;
  }

  .product-image-wrap {
    aspect-ratio: 1 / 1.18;
  }

  .product-info {
    padding: 8px 1px 1px;
  }

  .product-info h3 {
    font-size: 0.82rem;
    line-height: 1.1;
    margin-bottom: 6px;
  }

  .product-info strong {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }

  .card-bottom {
    gap: 6px;
  }

  .card-action-row,
  .item-actions {
    gap: 3px;
  }

  .size-selector {
    gap: 3px;
  }

  .size-selector button {
    font-size: 0.56rem;
    min-height: 22px;
    padding: 0;
  }

  .add-cart-button {
    font-size: 0.58rem;
    min-height: 28px;
    padding: 0 4px;
  }

  .fav-button,
  .cart-button,
  .buy-now-card-button {
    height: 28px;
    width: 28px;
  }

  .fav-button svg,
  .cart-button svg,
  .buy-now-card-button svg {
    height: 12px;
    width: 12px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

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

  .item-panel {
    width: min(100vw, 420px);
  }

  .product-section,
  .journal-panel,
  .hero-panel {
    scroll-margin-top: 20px;
  }
}

@media (max-width: 380px) {
  .add-cart-button {
    font-size: 0;
  }

  .add-cart-button::after {
    content: "Cart";
    font-size: 0.58rem;
  }

  .fav-button,
  .cart-button,
  .buy-now-card-button {
    height: 26px;
    width: 26px;
  }
}
