:root {
  --primary: #146c43;
  --accent: #f5b301;
  --background: #f7f8f5;
  --surface: #ffffff;
  --text: #17211b;
  --muted: #66736b;
  --border: #dfe5dd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select,
a {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner,
.hero,
.content,
.admin-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  display: grid;
  font-weight: 800;
  height: 42px;
  place-items: center;
  width: 42px;
}

.brand-logo {
  border-radius: 4px;
  display: block;
  height: 30px;
  object-fit: contain;
  width: auto;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 1.05rem;
}

.brand p {
  color: var(--muted);
  font-size: 0.86rem;
}

.cart-button,
.primary-button,
.secondary-button,
.danger-button {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none;
}

.cart-button,
.primary-button {
  background: var(--primary);
  color: #fff;
}

.secondary-button {
  background: #eef3ef;
  color: var(--text);
}

.danger-button {
  background: #8f1d1d;
  color: #fff;
}

.hero {
  display: grid;
  gap: 18px;
  padding: 34px 0 20px;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  margin: 0;
  max-width: 850px;
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 0;
  max-width: 740px;
}

.store-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-meta span {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 11px;
}

.filters {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin: 18px 0;
}

.search,
.select,
.field {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  padding-bottom: 42px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-image {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, #fff), #f4f2eb);
  color: var(--primary);
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

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

.product-body {
  display: grid;
  flex: 1;
  gap: 10px;
  padding: 14px;
}

.product-body h3 {
  font-size: 1rem;
  margin: 0;
}

.product-body p {
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

.product-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: auto;
}

.price {
  font-size: 1.08rem;
  font-weight: 800;
}

.badge {
  background: color-mix(in srgb, var(--accent) 25%, #fff);
  border-radius: 999px;
  color: #5b4200;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 8px;
  width: fit-content;
}

.drawer {
  background: rgba(0, 0, 0, 0.32);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.18s ease;
  z-index: 50;
}

.drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  margin-left: auto;
  max-width: 420px;
  padding: 18px;
  width: min(100%, 420px);
}

.drawer-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.drawer-head h2 {
  font-size: 1.2rem;
  margin: 0;
}

.cart-items {
  display: grid;
  gap: 10px;
  overflow: auto;
}

.cart-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.cart-item strong {
  display: block;
}

.cart-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

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

.qty button,
.icon-button {
  background: #eef3ef;
  color: var(--text);
  height: 34px;
  min-width: 34px;
}

.cart-total {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  font-size: 1.15rem;
  justify-content: space-between;
  padding-top: 12px;
}

.admin-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 280px 1fr;
  padding: 22px 0 48px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.panel h2,
.panel h3 {
  margin: 0 0 12px;
}

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

.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.88rem;
  gap: 6px;
}

.products-admin {
  display: grid;
  gap: 12px;
}

.product-editor {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.notice {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.full-width {
  width: 100%;
}

.product-home,
.catalog-admin {
  --primary: #e10600;
  --accent: #e10600;
  --background: #f6f7f8;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5d6875;
  --border: #e2e6ea;
}

.product-home .topbar,
.catalog-admin .topbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
}

.product-home .secondary-button,
.catalog-admin .secondary-button {
  background: transparent;
  border: 1px solid #cfd5dc;
  color: var(--text);
}

.catalog-admin .panel,
.catalog-admin .product-editor,
.catalog-admin .tenant-row,
.catalog-admin .field {
  background: var(--surface);
  border-color: var(--border);
}

.catalog-admin .field {
  color: var(--text);
}

.product-hero {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr);
  min-height: calc(100vh - 170px);
  padding: 54px 0 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.product-hero h2 {
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  line-height: 0.95;
  margin: 0;
  max-width: 780px;
}

.product-hero p {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.55;
  max-width: 720px;
}

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

.product-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.preview-bar {
  background: var(--primary);
  border-radius: 6px;
  height: 56px;
}

.preview-row,
.preview-grid span {
  background: #e9edf2;
  border-radius: 6px;
  display: block;
}

.preview-row {
  height: 24px;
  width: 74%;
}

.preview-row.strong {
  height: 36px;
}

.preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.preview-grid span {
  aspect-ratio: 1;
}

.preview-total {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
}

.preview-total strong {
  color: var(--primary);
}

.preview-head,
.sale-line {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.preview-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.preview-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.preview-head strong {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border-radius: 999px;
  color: var(--primary);
  padding: 6px 10px;
}

.sale-line {
  background: #f6f7f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.preview-note {
  color: var(--muted);
  line-height: 1.45;
}

.feature-band {
  background: #ffffff;
  color: var(--text);
  padding: 20px 0;
}

.feature-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.feature-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 88px;
  padding: 14px;
}

.product-copy {
  padding: 34px 0 54px;
}

.product-copy h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  margin: 0 0 12px;
  max-width: 760px;
}

.product-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 820px;
}

.commercial-section {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 42px 0;
}

.commercial-inner,
.cta-band {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.commercial-inner h2,
.manage-section h2,
.cta-band h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  margin: 0 0 12px;
}

.commercial-inner p,
.manage-section p,
.cta-band p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.sales-steps,
.manage-grid {
  display: grid;
  gap: 12px;
}

.sales-steps article,
.manage-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.sales-steps strong,
.manage-grid strong {
  color: var(--text);
}

.sales-steps span,
.manage-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.manage-section {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  padding: 44px 0;
}

.manage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cta-band {
  align-items: center;
  background: #111111;
  border-radius: 0;
  color: #ffffff;
  margin-bottom: 48px;
  padding: 28px;
}

.cta-band p {
  color: #cbd5e1;
}

.cta-band .primary-button {
  justify-self: end;
}

.stores-hero,
.stores-content {
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.stores-hero {
  padding: 46px 0 20px;
}

.stores-hero h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin: 0 0 12px;
}

.stores-hero p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.stores-content {
  padding: 18px 0 56px;
}

.stores-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.store-tile {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 14px;
  min-height: 96px;
  padding: 16px;
  transition: 0.16s ease;
}

.store-tile:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  transform: translateY(-2px);
}

.store-icon {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  border-radius: 8px;
  color: var(--primary);
  display: grid;
  flex: 0 0 auto;
  font-weight: 800;
  height: 48px;
  overflow: hidden;
  place-items: center;
  width: 48px;
}

.store-icon img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.store-tile strong,
.store-tile small {
  display: block;
}

.store-tile small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 4px;
}

.tenant-list {
  display: grid;
  gap: 12px;
}

.tenant-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.tenant-row strong,
.tenant-row span {
  display: block;
}

.tenant-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.tenant-actions,
.password-reset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-reset .field {
  min-width: 160px;
  width: auto;
}

@media (max-width: 760px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .filters,
  .admin-layout,
  .form-grid,
  .product-hero,
  .feature-grid,
  .commercial-inner,
  .manage-section,
  .manage-grid,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .product-hero {
    min-height: auto;
    padding-top: 34px;
  }

  .password-reset .field {
    width: 100%;
  }

  .cta-band .primary-button {
    justify-self: stretch;
  }
}
