:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-strong: #f0ebe3;
  --text: #171512;
  --muted: #686159;
  --line: #ddd5ca;
  --accent: #c24f2f;
  --accent-strong: #9f351c;
  --accent-soft: #fae4d8;
  --green: #2c7a5a;
  --shadow: 0 20px 60px rgba(34, 24, 15, 0.14);
  --radius: 8px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151716;
  --surface: #1f2422;
  --surface-strong: #292f2c;
  --text: #f4efe6;
  --muted: #b8afa3;
  --line: #3b423e;
  --accent: #ffb35c;
  --accent-strong: #ffd09a;
  --accent-soft: #3b2b1f;
  --green: #7fd0a8;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto auto;
  left: 0;
  padding: 14px clamp(18px, 4vw, 56px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--text);
  border-radius: var(--radius);
  color: var(--bg);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  letter-spacing: 0;
  width: 44px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  gap: 8px;
}

.site-nav a,
.theme-toggle,
.filter-button,
.button {
  border-radius: var(--radius);
  min-height: 42px;
}

.site-nav a {
  color: var(--muted);
  padding: 10px 12px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.theme-toggle,
.filter-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  padding: 9px 13px;
}

.theme-toggle:hover,
.filter-button:hover {
  border-color: var(--accent);
}

.hero {
  display: grid;
  min-height: min(720px, calc(100vh - 72px));
  overflow: hidden;
  position: relative;
}

.hero-image,
.hero-overlay,
.hero-content {
  grid-area: 1 / 1;
}

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

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(11, 10, 8, 0.82), rgba(11, 10, 8, 0.45) 48%, rgba(11, 10, 8, 0.1)),
    linear-gradient(0deg, rgba(11, 10, 8, 0.34), rgba(11, 10, 8, 0));
}

.hero-content {
  align-self: center;
  color: #fff8ee;
  max-width: 720px;
  padding: clamp(54px, 8vw, 110px) clamp(20px, 6vw, 72px);
  position: relative;
}

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

.hero .eyebrow {
  color: #ffd19d;
}

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

h1 {
  font-size: clamp(2.35rem, 6vw, 5.7rem);
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 780px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.05;
  margin-bottom: 0;
}

h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.hero p:not(.eyebrow) {
  color: rgba(255, 248, 238, 0.86);
  font-size: clamp(1rem, 2vw, 1.22rem);
  max-width: 650px;
}

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

.button {
  align-items: center;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 12px 18px;
  text-decoration: none;
}

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

[data-theme="light"] .button.primary,
:root .button.primary {
  color: #fff8ee;
}

[data-theme="dark"] .button.primary {
  color: #211207;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff8ee;
}

.button.full {
  width: 100%;
}

.quick-info,
.section {
  padding-left: clamp(18px, 5vw, 64px);
  padding-right: clamp(18px, 5vw, 64px);
}

.quick-info {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1px;
  padding-top: 0;
}

.quick-info article {
  background: var(--surface);
  min-height: 170px;
  padding: 28px;
}

.quick-info span,
.contact-grid span {
  color: var(--accent);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.quick-info strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.quick-info p,
.category-card p,
.quote-note {
  color: var(--muted);
  margin-bottom: 0;
}

.section {
  padding-bottom: clamp(56px, 8vw, 96px);
  padding-top: clamp(56px, 8vw, 96px);
}

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

.section-heading h2 {
  max-width: 780px;
}

.category-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.category-card,
.product-card,
.quote-panel,
.contact-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-card {
  min-height: 220px;
  padding: 24px;
}

.category-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 1.5rem;
  height: 48px;
  justify-content: center;
  margin-bottom: 26px;
  width: 48px;
}

.store {
  background: var(--surface-strong);
}

.store-heading {
  align-items: start;
}

.filter-button.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.store-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

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

.product-card {
  display: grid;
  gap: 16px;
  min-height: 276px;
  padding: 18px;
}

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

.product-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 1.55rem;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.product-tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 5px 9px;
}

.product-card p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.price {
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 900;
}

.add-button,
.qty-button {
  border-radius: var(--radius);
  cursor: pointer;
}

.add-button {
  background: var(--text);
  border: 1px solid var(--text);
  color: var(--bg);
  font-weight: 800;
  min-height: 40px;
  padding: 9px 12px;
}

.quote-panel {
  box-shadow: var(--shadow);
  padding: 20px;
  position: sticky;
  top: 92px;
}

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

#cartCount {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #211207;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 10px;
}

.cart-items {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin: 18px 0;
  max-height: 320px;
  overflow: auto;
  padding: 18px 0;
}

.empty-cart {
  color: var(--muted);
  margin: 0;
}

.cart-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

.cart-row strong,
.cart-row small {
  display: block;
}

.cart-row small {
  color: var(--muted);
}

.qty-controls {
  align-items: center;
  display: flex;
  gap: 7px;
}

.qty-button {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
  height: 32px;
  width: 32px;
}

.quote-total {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.quote-total strong {
  font-size: 1.35rem;
}

.quote-note {
  font-size: 0.86rem;
  margin-top: 14px;
}

.contact-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.contact-grid article {
  min-height: 150px;
  padding: 22px;
}

.contact-grid strong,
.contact-grid a,
.contact-grid address {
  font-size: 1rem;
  font-style: normal;
  font-weight: 800;
  text-decoration: none;
  word-break: break-word;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 64px);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .quick-info,
  .category-grid,
  .product-grid,
  .contact-grid,
  .store-layout {
    grid-template-columns: 1fr 1fr;
  }

  .quote-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .site-header {
    gap: 10px;
    padding: 12px 16px;
  }

  .brand small,
  .toggle-text {
    display: none;
  }

  .hero {
    min-height: 660px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(11, 10, 8, 0.84), rgba(11, 10, 8, 0.24));
  }

  .hero-content {
    align-self: end;
    padding-bottom: 58px;
  }

  .quick-info,
  .category-grid,
  .product-grid,
  .contact-grid,
  .store-layout {
    grid-template-columns: 1fr;
  }

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

  .filters {
    width: 100%;
  }

  .filter-button {
    flex: 1 1 calc(50% - 10px);
  }
}
