:root {
  --bg: #f6efe5;
  --surface: rgba(255, 250, 244, 0.84);
  --ink: #16110f;
  --muted: #6b6058;
  --accent: #ef6c33;
  --accent-deep: #c64f1f;
  --line: rgba(22, 17, 15, 0.1);
  --shadow: 0 24px 70px rgba(74, 48, 23, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(239, 108, 51, 0.14), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(32, 99, 155, 0.14), transparent 24rem),
    linear-gradient(180deg, #fff8ef 0%, var(--bg) 100%);
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

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

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.35fr 1fr;
  align-items: stretch;
  margin-bottom: 2rem;
}

.hero-copy,
.hero-panel,
.toolbar,
.product-card,
.cart-drawer,
.product-modal {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel {
  border-radius: 28px;
  padding: 2rem;
}

.eyebrow,
.panel-label,
.product-category,
.store-meta,
.summary-row,
.text-button {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow,
.panel-label {
  color: var(--accent-deep);
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.92;
  margin: 0.5rem 0 1rem;
}

.hero-text {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-actions,
.hero-highlights,
.filter-group,
.store-meta,
.badge-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 1.5rem;
}

.hero-highlights {
  margin-top: 1.5rem;
}

.webmcp-banner {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.webmcp-banner span {
  color: var(--muted);
}

.hero-highlight,
.spotlight-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.hero-highlight {
  border-radius: 18px;
  padding: 1rem;
  min-width: 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero-highlight span,
.spotlight-copy p,
.product-description,
.detail-copy,
.product-highlights,
.cart-item small,
.empty-state {
  color: var(--muted);
}

.spotlight-card {
  border-radius: 24px;
  overflow: hidden;
}

.spotlight-image-wrap {
  padding: 1rem;
  background: linear-gradient(180deg, #fffdf8 0%, #f3e6d8 100%);
}

.spotlight-image {
  width: 100%;
  height: 240px;
  object-fit: contain;
}

.spotlight-copy {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.primary-button,
.secondary-button,
.filter-chip,
.text-button,
.icon-button {
  border-radius: 999px;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.primary-button,
.secondary-button {
  padding: 0.95rem 1.25rem;
}

.primary-button {
  background: var(--ink);
  color: #fff9f0;
}

.primary-button:hover,
.secondary-button:hover,
.filter-chip:hover,
.text-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.secondary-button,
.filter-chip,
.text-button,
.icon-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

#open-cart-count {
  margin-left: 0.35rem;
  font-family: "IBM Plex Mono", monospace;
}

.toolbar {
  border-radius: 24px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.7rem 1rem;
}

.filter-chip.active {
  background: var(--accent);
  color: #fff8ef;
  border-color: transparent;
}

.store-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

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

.product-card {
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-art {
  min-height: 260px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fffdf8 0%, #f1e6da 100%);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
}

.product-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-category,
.product-price {
  font-size: 0.76rem;
}

.product-name {
  font-size: 1.35rem;
}

.product-description {
  line-height: 1.55;
  flex: 1;
}

.product-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quantity-picker,
.cart-quantity-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.qty-button {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  line-height: 1;
}

.quantity-value {
  min-width: 1.5rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100vh;
  border-radius: 28px 0 0 28px;
  padding: 1.5rem;
  transform: translateX(104%);
  transition: transform 220ms ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer.open {
  transform: translateX(0);
  box-shadow: 0 26px 80px rgba(239, 108, 51, 0.28);
}

.cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.05rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  overflow: auto;
}

.cart-item,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.46);
}

.cart-item {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 0.9rem;
  align-items: center;
}

.cart-item-thumb {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  padding: 0.35rem;
}

.cart-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cart-item-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-total {
  font-family: "IBM Plex Mono", monospace;
  align-self: start;
}

.cart-remove {
  padding: 0.35rem 0.7rem;
}

.cart-summary {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.76rem;
}

.full-width {
  width: 100%;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 17, 15, 0.28);
  z-index: 15;
}

.demo-toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.demo-toast {
  min-width: 13rem;
  max-width: 20rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(22, 17, 15, 0.88);
  color: #fff8ef;
  box-shadow: 0 18px 45px rgba(22, 17, 15, 0.28);
  transform: translateY(8px);
  opacity: 0;
  animation: toast-in 220ms ease forwards;
}

.demo-toast.fade-out {
  animation: toast-out 220ms ease forwards;
}

.demo-toast strong {
  display: block;
  margin-bottom: 0.2rem;
}

.demo-ripple {
  position: fixed;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 999px;
  border: 2px solid rgba(239, 108, 51, 0.88);
  background: rgba(239, 108, 51, 0.2);
  pointer-events: none;
  z-index: 45;
  animation: ripple-out 420ms ease-out forwards;
}

.demo-flash {
  animation: target-flash 480ms ease;
}

@keyframes ripple-out {
  from {
    transform: scale(0.5);
    opacity: 1;
  }

  to {
    transform: scale(4.8);
    opacity: 0;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(8px);
    opacity: 0;
  }
}

@keyframes target-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 108, 51, 0.45);
  }

  100% {
    box-shadow: 0 0 0 18px rgba(239, 108, 51, 0);
  }
}

.product-modal {
  width: min(820px, calc(100% - 1rem));
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  z-index: 25;
}

.product-modal::backdrop {
  background: rgba(22, 17, 15, 0.28);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
}

.modal-art {
  min-height: 380px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fffdf8 0%, #f1e6da 100%);
}

.modal-art img {
  width: 100%;
  height: 320px;
  object-fit: contain;
}

.modal-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-buy-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.detail-badge {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(22, 17, 15, 0.06);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.detail-copy {
  line-height: 1.6;
}

.product-highlights {
  margin: 0;
  padding-left: 1rem;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .hero,
  .modal-layout,
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1200px);
  }

  .toolbar {
    align-items: flex-start;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .modal-buy-row {
    align-items: stretch;
  }
}
