:root {
  --bg: #f4eadb;
  --bg-soft: #fff8ef;
  --surface: rgba(255, 248, 239, 0.88);
  --surface-strong: #fffaf3;
  --surface-muted: #ecd9bf;
  --text: #3a2314;
  --text-soft: #7a5d49;
  --accent: #b86a2f;
  --accent-dark: #7f4318;
  --accent-soft: #efc38f;
  --success: #7a8f44;
  --danger: #b04a2f;
  --shadow: 0 18px 50px rgba(95, 56, 25, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --border: 1px solid rgba(87, 52, 25, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 106, 47, 0.2), transparent 32%),
    radial-gradient(circle at right, rgba(234, 194, 134, 0.28), transparent 24%),
    linear-gradient(180deg, #f8efe2 0%, #f0e1cc 100%);
}

body.is-modal-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell,
.admin-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.site-nav {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(18px);
  background: rgba(255, 248, 239, 0.82);
  border: var(--border);
  box-shadow: var(--shadow);
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-nav__logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(87, 52, 25, 0.1);
  background: white;
}

.site-nav__brand-text {
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.site-nav__menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 700;
}

.site-nav__menu a:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.site-nav__toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(87, 52, 25, 0.1);
  background: rgba(255, 255, 255, 0.75);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.site-nav__toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.hero,
.card,
.cart-panel__sticky,
.admin-topbar {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr);
  gap: 24px;
  align-items: end;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 260px;
  height: 260px;
  background: linear-gradient(135deg, rgba(184, 106, 47, 0.24), rgba(255, 255, 255, 0.04));
  border-radius: 50%;
}

.hero h1,
.admin-topbar h1,
.section-heading h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  line-height: 0.96;
  max-width: 12ch;
}

.hero__text,
.section-note,
.helper-text,
.cart-help,
.product-card__description,
.product-meta,
.empty-state p {
  color: var(--text-soft);
}

.hero__text {
  font-size: 1.05rem;
  max-width: 54ch;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-dark);
}

.hero__actions,
.form-actions,
.admin-topbar__actions,
.cart-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 6px;
}

.hero-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.86);
  border: 1px solid rgba(87, 52, 25, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero__badge {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-height: 220px;
  border-radius: var(--radius-lg);
  padding: 24px;
  background: linear-gradient(160deg, #c17a38, #8a471e);
  color: #fff8ef;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-transform: uppercase;
}

.hero__badge strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.95;
  font-family: "Syne", sans-serif;
}

.button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button--primary {
  background: var(--accent);
  color: white;
}

.button--ghost {
  background: rgba(255, 250, 243, 0.72);
  color: var(--text);
  border: 1px solid rgba(87, 52, 25, 0.12);
}

.button--block {
  width: 100%;
  justify-content: center;
}

.store-layout {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.catalog-section,
.admin-panel,
.cart-panel {
  min-width: 0;
}

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

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.hero-guide {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 250, 244, 0.92), rgba(240, 227, 213, 0.82));
  border: var(--border);
  box-shadow: 0 12px 28px rgba(55, 25, 8, 0.08);
}

.hero-guide__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hero-guide__steps p {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
  border: 1px solid rgba(38, 23, 15, 0.08);
}

.product-card,
.admin-product {
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: var(--border);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(55, 25, 8, 0.08);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffaf3 0%, #fff4e7 100%);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  padding: 14px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.22)),
    linear-gradient(135deg, #eac89f, #f9efe2);
}

.product-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.product-card h3,
.cart-item h3,
.admin-product h3 {
  margin: 0;
  font-size: 1.1rem;
}

.product-price {
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.pill--danger {
  background: rgba(166, 30, 30, 0.12);
  color: var(--danger);
}

.pill--success {
  background: rgba(45, 106, 79, 0.12);
  color: var(--success);
}

.pill--order {
  background: rgba(184, 106, 47, 0.14);
  color: var(--accent-dark);
}

.cart-panel__sticky {
  position: sticky;
  top: 18px;
  border-radius: var(--radius-xl);
  padding: 22px;
}

.cart-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.cart-badge {
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 18px;
}

.cart-item,
.empty-state,
.login-card,
.card {
  border-radius: var(--radius-lg);
}

.cart-item {
  background: linear-gradient(180deg, #fffaf3 0%, #fff5ea 100%);
  border: var(--border);
  padding: 14px;
}

.cart-item__header,
.cart-item__footer,
.summary-row,
.admin-product__header,
.admin-product__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cart-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.quantity-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(38, 23, 15, 0.12);
  background: white;
  font-weight: 700;
}

.cart-summary {
  border-top: var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row--total {
  font-size: 1.08rem;
}

.empty-state,
.card {
  padding: 24px;
}

.empty-state {
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(87, 52, 25, 0.18);
  background: rgba(255, 249, 241, 0.62);
}

.admin-topbar {
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.login-card {
  width: min(100%, 480px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: start;
}

.stack-form,
.admin-product-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-form label,
.switch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
}

.stack-form input,
.stack-form textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(38, 23, 15, 0.14);
  padding: 12px 14px;
  background: white;
  color: var(--text);
}

.stack-form input:focus,
.stack-form textarea:focus {
  outline: 2px solid rgba(184, 106, 47, 0.18);
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.switch {
  flex-direction: row;
  align-items: center;
}

.switch input {
  width: 18px;
  height: 18px;
}

.status-message {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent-dark);
}

.stack-form select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(38, 23, 15, 0.14);
  padding: 12px 14px;
  background: white;
  color: var(--text);
  font: inherit;
}

.stack-form select:focus {
  outline: 2px solid rgba(184, 106, 47, 0.18);
  border-color: var(--accent);
}

.admin-product {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-product__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: var(--text-soft);
}

.admin-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.is-hidden {
  display: none !important;
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  width: min(92vw, 360px);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 250, 243, 0.98);
  border: 1px solid rgba(87, 52, 25, 0.1);
  box-shadow: var(--shadow);
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
}

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

.toast strong,
.toast p {
  margin: 0;
}

.toast__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast__body p {
  color: var(--text-soft);
}

.toast__close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-soft);
}

.toast--warning {
  border-color: rgba(176, 74, 47, 0.18);
}

.toast--success {
  border-color: rgba(122, 143, 68, 0.2);
}

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 20px;
}

.site-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 27, 14, 0.42);
  backdrop-filter: blur(6px);
}

.site-modal__card {
  position: relative;
  z-index: 1;
  width: min(92vw, 760px);
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: 0 25px 70px rgba(42, 22, 10, 0.24);
}

.site-modal__image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

.site-modal__content {
  padding: 22px 24px 26px;
}

.site-modal__content h2,
.hero-guide h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  letter-spacing: -0.04em;
}

.site-modal__content p:last-child {
  margin-bottom: 0;
  color: var(--text-soft);
}

.site-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.92);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 1080px) {
  .store-layout,
  .dashboard-grid,
  .hero,
  .hero-guide__steps {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .cart-panel__sticky {
    position: static;
  }
}

@media (max-width: 680px) {
  .page-shell,
  .admin-shell {
    width: min(100% - 20px, 1400px);
    padding-top: 12px;
  }

  .site-nav {
    top: 10px;
    align-items: start;
    flex-wrap: wrap;
  }

  .site-nav__toggle {
    display: inline-flex;
  }

  .site-nav__menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    margin-left: 0;
  }

  .site-nav__menu.is-open {
    display: flex;
  }

  .site-nav__menu a {
    background: rgba(255, 255, 255, 0.65);
  }

  .hero,
  .admin-topbar,
  .card,
  .cart-panel__sticky {
    padding: 20px;
  }

  .form-row,
  .admin-product__meta {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .admin-topbar {
    align-items: start;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .site-modal__content {
    padding: 18px 18px 22px;
  }
}
