:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-soft: #f1eee6;
  --text: #171717;
  --muted: #6f6b62;
  --line: #e1ded5;
  --accent: #c99a3b;
  --accent-dark: #8a5f18;
  --accent-soft: #f6ecd8;
  --graphite: #252525;
  --warning: #b35c1e;
  --shadow: 0 18px 50px rgba(18, 31, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(24, 24, 20, 0.05) 0, transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1040px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 96px 20px 20px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 242, 0.95);
  padding: 12px max(20px, calc((100vw - 1040px) / 2 + 20px));
  backdrop-filter: blur(14px);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
}

.site-logo img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.site-nav button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.site-nav button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.compact-btn {
  min-height: 42px;
  padding: 0 14px;
}

.public-view {
  display: grid;
  gap: 18px;
}

.public-section {
  scroll-margin-top: 94px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 28px;
  min-height: calc(100vh - 130px);
  border: 1px solid rgba(205, 151, 52, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #181814 0%, #232017 58%, #8f631c 100%);
  color: #fff;
  padding: 30px;
  box-shadow: 0 22px 60px rgba(20, 18, 14, 0.22);
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions .primary-btn,
.hero-actions .ghost-btn,
.hero-actions .dark-btn {
  padding: 0 18px;
}

.hero-brand {
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 207, 133, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  min-height: 360px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-brand img {
  width: min(340px, 100%);
  border-radius: 8px;
}

.hero-section .eyebrow {
  color: #f2cf85;
}

.hero-section h1 {
  color: #fff;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.78);
}

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

.hero-metrics div,
.trust-strip article,
.process-grid article,
.admin-stats-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(20, 18, 14, 0.07);
}

.hero-section .hero-metrics div {
  border-color: rgba(242, 207, 133, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.hero-section .hero-metrics span {
  color: rgba(255, 255, 255, 0.72);
}

.hero-metrics strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.trust-strip strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.2;
}

.hero-metrics span,
.trust-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.hero-section .hero-metrics span {
  color: rgba(255, 255, 255, 0.72);
}

.trust-strip,
.process-grid,
.admin-stats-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trust-section {
  display: grid;
  gap: 16px;
  padding: 24px 0;
}

.section-head {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.section-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.delivery-hero,
.premium-section-head {
  max-width: none;
  border: 1px solid rgba(205, 151, 52, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #181814 0%, #2a2417 62%, #8f631c 100%);
  color: #fff;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(20, 18, 14, 0.18);
}

.delivery-hero .eyebrow,
.premium-section-head .eyebrow {
  color: #f2cf85;
}

.delivery-hero h2,
.premium-section-head h2 {
  color: #fff;
}

.delivery-hero p:last-child,
.premium-section-head p:last-child {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
}

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

.delivery-card,
.delivery-steps article,
.delivery-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(20, 18, 14, 0.07);
}

.delivery-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
}

.delivery-card span {
  width: max-content;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.delivery-card strong {
  font-size: 21px;
  line-height: 1.15;
}

.delivery-card p,
.delivery-steps p,
.delivery-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.delivery-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.delivery-steps article {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.delivery-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-soft);
}

.delivery-note strong {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-weight: 900;
}

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

.process-grid span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #dfb55f 0%, var(--accent) 55%, var(--accent-dark) 100%);
  color: #171717;
  font-weight: 900;
}

.process-grid article {
  border-color: rgba(205, 151, 52, 0.22);
  background: var(--surface);
  color: var(--text);
}

.process-grid article p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-products-section {
  display: grid;
  gap: 16px;
  padding: 18px 0 30px;
}

.home-product-blocks {
  display: grid;
  gap: 16px;
}

.home-product-block {
  display: grid;
  gap: 12px;
}

.home-product-block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.home-product-block-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.home-product-block-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

.home-product-card {
  display: grid;
  grid-template-rows: 150px minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.home-product-visual {
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent);
  font-size: 34px;
  font-weight: 900;
}

.home-product-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
}

.home-product-visual span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.home-product-body {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.home-product-body h3 {
  margin: 0;
  min-height: 44px;
  font-size: 15px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.about-section,
.contacts-section {
  display: grid;
  gap: 18px;
  padding: 30px 0;
}

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

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid rgba(205, 151, 52, 0.22);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 18px 45px rgba(20, 18, 14, 0.12);
}

.contact-form .wide-field,
.contact-form button {
  grid-column: 1 / -1;
}

.story-card {
  display: grid;
  gap: 12px;
  max-width: 880px;
  border: 1px solid rgba(205, 151, 52, 0.24);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 18px 45px rgba(20, 18, 14, 0.12);
}

.story-card p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.info-grid article,
.contacts-grid > div {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(205, 151, 52, 0.22);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(20, 18, 14, 0.07);
}

.info-grid article strong,
.contacts-grid strong {
  color: var(--text);
  font-size: 18px;
}

.contact-link {
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.info-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.auth-view {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  min-height: calc(100vh - 40px);
  gap: 28px;
}

.product-page {
  min-height: calc(100vh - 40px);
  padding: 10px 0 96px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 18px;
}

.product-page-body {
  display: grid;
  gap: 14px;
  align-items: start;
}

.register-view {
  max-width: 680px;
  min-height: calc(100vh - 40px);
  margin: 0 auto;
  padding: 32px 0;
}

.pending-view {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 40px);
}

.admin-view {
  min-height: calc(100vh - 40px);
  padding: 10px 0 96px;
}

.admin-login-card,
.admin-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.admin-login-card {
  max-width: 420px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 4px 0 12px;
  margin-bottom: 16px;
}

.admin-nav button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 900;
}

.admin-nav button.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #dfb55f 0%, var(--accent) 55%, var(--accent-dark) 100%);
  color: #171717;
}

.admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-filter button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 900;
}

.admin-filter button.active {
  border-color: var(--accent);
  background: #fff5d8;
  color: #171717;
}

.admin-client-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  font-weight: 800;
}

.admin-page {
  display: none;
}

.admin-page.active {
  display: grid;
  gap: 14px;
}

.admin-messages-head,
.admin-promos-head,
.admin-catalog-head {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-promo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.admin-promo-form .wide-field,
.admin-promo-form button {
  grid-column: 1 / -1;
}

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

.admin-catalog-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.admin-catalog-card h3 {
  margin: 0;
}

.admin-mapping-form {
  display: grid;
  gap: 10px;
}

.compact-list {
  gap: 8px;
}

.compact-row {
  padding: 10px;
}

.assign-actions {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.admin-check input {
  width: 18px;
  height: 18px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.admin-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-row h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.message-row {
  grid-template-columns: 1fr;
}

.message-row p {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.5;
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-chip {
  color: var(--accent-dark);
  text-decoration: none;
}

.map-chip:hover,
.inline-link:hover {
  text-decoration: underline;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-btn {
  min-height: 40px;
  border: 1px solid #f0c8bb;
  border-radius: 8px;
  background: #fff6f3;
  color: var(--warning);
  padding: 0 12px;
  font-weight: 800;
}

.status-pill.rejected {
  background: #fce5df;
  color: var(--warning);
}

.status-pill.new {
  background: #e8edf7;
  color: #41516d;
}

.pending-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.register-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(260px, 72vw);
  height: auto;
  margin-bottom: 18px;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(18, 31, 24, 0.18);
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.lead {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.auth-card,
.register-card,
.client-panel,
.popular-products,
.product-card,
.orders-panel,
.cart-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-card,
.register-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.geo-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.customer-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.customer-type-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.customer-type-link {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.customer-type-link.active {
  color: var(--accent-dark);
  text-decoration: none;
}

.inline-link {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

textarea {
  min-height: 88px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 154, 59, 0.22);
}

.primary-btn,
.ghost-btn,
.dark-btn,
.icon-btn,
.qty-btn,
.link-btn {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.link-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
  padding: 0 12px;
}

.primary-btn {
  background: linear-gradient(180deg, #dfb55f 0%, var(--accent) 48%, var(--accent-dark) 100%);
  color: #171717;
  box-shadow: 0 12px 24px rgba(138, 95, 24, 0.18);
}

.primary-btn:hover {
  background: linear-gradient(180deg, #edca78 0%, #d4a345 52%, #7a5113 100%);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.dark-btn {
  background: var(--graphite);
  color: #fff;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.topbar,
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 10px 0 18px;
}

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

.topbar-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(18, 31, 24, 0.16);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 22px;
}

.client-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.client-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: -4px 0 14px;
  padding-bottom: 2px;
}

.client-nav button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 800;
}

.client-nav button.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #dfb55f 0%, var(--accent) 55%, var(--accent-dark) 100%);
  color: #171717;
}

.client-panel > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-page {
  display: grid;
  gap: 14px;
}

.client-content-card,
.promo-card,
.promo-product-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.client-content-card p:last-child,
.promo-card p:last-child,
.promo-product-card p:last-child {
  margin-bottom: 0;
}

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

.finance-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.finance-summary strong {
  font-size: 22px;
}

.finance-table-wrap {
  overflow-x: auto;
}

.finance-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.finance-table th,
.finance-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.finance-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.company-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.company-edit-form .wide-field,
.company-edit-form button {
  grid-column: span 2;
}

.popular-products {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.popular-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.popular-product-card {
  display: grid;
  grid-template-rows: 150px minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.popular-product-visual {
  display: grid;
  place-items: center;
  width: 100%;
  height: 150px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  font-size: 32px;
  font-weight: 900;
  overflow: hidden;
}

.popular-product-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
}

.popular-product-info {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.popular-product-info h3 {
  display: -webkit-box;
  min-height: 36px;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.popular-product-meta {
  display: grid;
  gap: 4px;
}

.popular-product-actions {
  display: grid;
  gap: 8px;
}

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

.promo-card h3 {
  margin: 0;
  font-size: 18px;
}

.promo-product-card {
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: stretch;
}

.promo-product-visual {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 38px;
  font-weight: 900;
  overflow: hidden;
}

.promo-product-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.promo-product-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.promo-product-body h3 {
  margin: 0;
  font-size: 18px;
}

.promo-product-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 10px 0 14px;
  background: var(--bg);
}

.catalog-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.catalog-toolbar {
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  align-items: center;
}

.catalog-count {
  color: var(--muted);
  font-weight: 900;
}

.view-toggle {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px;
}

.view-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 900;
}

.view-toggle button.active {
  background: var(--graphite);
  color: #fff;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 16px;
}

.product-list.table-view {
  grid-template-columns: 1fr;
}

.product-list.table-view .product-card {
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 12px 14px;
  min-height: 148px;
}

.product-list.table-view .product-visual {
  width: 124px;
  height: 124px;
  align-self: start;
}

.product-list.table-view .product-info {
  grid-template-columns: minmax(0, 1fr) 168px;
  grid-template-areas:
    "main buy"
    "actions actions";
  align-items: start;
  column-gap: 18px;
  row-gap: 10px;
  height: 100%;
}

.product-list.table-view .product-main-info {
  grid-area: main;
}

.product-list.table-view .price-row {
  grid-area: buy;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  min-width: 168px;
}

.product-list.table-view .product-card-actions {
  grid-area: actions;
  align-items: center;
  justify-content: flex-start;
}

.product-list.table-view .product-title {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.22;
}

.product-list.grid-view {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  align-items: stretch;
}

.product-list.grid-view .product-card {
  grid-template-columns: 118px minmax(0, 1fr);
  grid-template-rows: auto;
  min-height: 0;
  padding: 12px;
}

.product-list.grid-view .product-visual {
  width: 118px;
  height: 118px;
  align-self: start;
}

.product-list.grid-view .product-info {
  grid-template-rows: auto auto auto;
  gap: 10px;
  min-height: 0;
}

.product-list.grid-view .product-title {
  min-height: 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-list.grid-view .price-row,
.product-list.grid-view .product-card-actions {
  align-items: center;
}

.product-list.grid-view .product-card-actions,
.product-list.grid-view .price-row {
  flex-direction: row;
}

.product-list.grid-view .product-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
}

.product-list.grid-view .price-row {
  margin-top: 0;
}

.product-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  overflow: hidden;
}

.product-visual {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 34px;
  font-weight: 900;
  overflow: hidden;
  padding: 8px;
}

.product-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 4px);
  max-height: calc(100% - 4px);
  object-fit: contain;
  object-position: center;
}

.product-info {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.product-main-info {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.product-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.product-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-card-actions .primary-btn,
.product-card-actions .link-btn {
  min-width: 0;
  padding-inline: 10px;
}

.price {
  font-size: 18px;
  font-weight: 900;
}

.promo-price {
  display: grid;
  gap: 2px;
}

.promo-price strong {
  color: var(--accent-dark);
  font-size: 20px;
  line-height: 1;
}

.promo-note {
  color: var(--warning);
  font-size: 12px;
  font-weight: 900;
}

.old-price {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: line-through;
}

.stock-warning {
  color: var(--warning);
}

.qty-control {
  display: grid;
  grid-template-columns: 38px 58px 38px;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.qty-value,
.qty-input {
  text-align: center;
  font-weight: 900;
}

.qty-input {
  width: 58px;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 4px;
}

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #dfb55f 0%, var(--accent) 55%, var(--accent-dark) 100%);
  color: #171717;
  padding: 0 18px;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.cart-fab strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.14);
}

.cart-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(420px, calc(100vw - 24px));
  padding: 16px;
  box-shadow: var(--shadow);
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cart-line-visual {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
  overflow: hidden;
}

.cart-line-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-line-visual span {
  font-size: 26px;
}

.cart-line-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cart-line-top,
.cart-line-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cart-line h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.remove-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--warning);
  padding: 0 10px;
  font-weight: 800;
}

.checkout-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.cart-summary {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cart-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
}

.orders-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 100px;
  padding: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.orders-list {
  display: grid;
  gap: 8px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.order-row h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.status-pill {
  border-radius: 999px;
  background: #dff2ea;
  color: var(--accent-dark);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.detail-body {
  display: grid;
  gap: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.detail-media {
  min-width: 0;
}

.detail-visual {
  display: grid;
  place-items: center;
  min-height: 360px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eaf1e7, #ffffff);
  color: var(--accent);
  font-size: 118px;
  font-weight: 900;
}

.detail-image {
  width: 100%;
  height: 100%;
  min-height: 420px;
  max-height: 520px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

img[data-image-preview] {
  cursor: zoom-in;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(12, 12, 12, 0.72);
  padding: 22px;
}

.image-modal img {
  display: block;
  max-width: min(920px, 94vw);
  max-height: 88vh;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.image-modal .icon-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  background: #fff;
}

.detail-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.detail-headline {
  display: grid;
  gap: 8px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.detail-info-card h2 {
  margin: 0;
  font-size: 22px;
}

.detail-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.detail-grid > div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.detail-grid strong {
  font-size: 15px;
}

.detail-description {
  color: var(--muted);
  line-height: 1.5;
}

.detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  padding: 13px 16px;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 86px 14px 14px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .site-logo img {
    width: 38px;
    height: 38px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px 0 10px;
  }

  .hero-brand {
    min-height: 230px;
  }

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

  .home-product-card {
    grid-template-rows: 132px minmax(0, 1fr);
  }

  .home-product-block-head {
    align-items: flex-start;
  }

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

  .popular-product-card {
    grid-template-rows: 132px minmax(0, 1fr);
  }

  .popular-product-visual {
    height: 132px;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .trust-strip,
  .hero-metrics,
	  .admin-stats-grid,
	  .profile-grid,
	  .finance-summary,
	  .delivery-layout,
  .delivery-steps {
    grid-template-columns: 1fr;
  }

  .delivery-card {
    min-height: 0;
  }

  .delivery-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .info-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .auth-view {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 12px;
  }

  .register-view {
    min-height: calc(100vh - 28px);
    padding: 14px 0;
  }

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

  .admin-promo-form {
    grid-template-columns: 1fr;
  }

  .admin-catalog-grid,
  .assign-actions {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .product-page {
    min-height: calc(100vh - 28px);
    padding-bottom: 88px;
  }

  .product-page-body {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-header {
    align-items: flex-start;
  }

  .detail-visual {
    min-height: 230px;
    font-size: 86px;
  }

  .detail-image {
    min-height: 260px;
    max-height: 360px;
  }

  .detail-buy,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  .detail-buy {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-title {
    font-size: 24px;
  }

  h1 {
    font-size: 48px;
  }

  .lead {
    font-size: 16px;
  }

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

  .promo-grid,
  .info-grid,
  .contacts-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .promo-product-card {
    grid-template-columns: 1fr;
  }

  .contact-form .wide-field,
  .contact-form button,
  .company-edit-form .wide-field,
  .company-edit-form button {
    grid-column: auto;
  }

  .company-edit-form {
    grid-template-columns: 1fr;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-list.grid-view {
    grid-template-columns: 1fr;
  }

  .product-list.grid-view .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
  }

  .product-list.grid-view .product-visual {
    width: 96px;
    height: 96px;
  }

  .product-list.grid-view .price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-list.grid-view .product-card-actions {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .product-list.table-view .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 0;
    padding: 12px;
  }

  .product-list.table-view .product-visual {
    width: 96px;
    height: 96px;
  }

  .product-list.table-view .product-info {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "buy"
      "actions";
  }

  .product-list.table-view .price-row {
    align-items: flex-start;
    min-width: 0;
  }

  .product-list.table-view .product-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .product-visual {
    width: 96px;
    height: 96px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .order-row {
    grid-template-columns: 1fr;
  }

  .order-actions {
    justify-content: flex-start;
  }
}
