:root {
  --primary: #142333;
  --secondary: #C68155;
  --background: #F4EFE6;
  --muted: #687A88;
  --white: #ffffff;
  --border: #e5e7eb;
  --success: #16834b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f8f9fb;
  color: var(--primary);
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

button, input, select {
  font: inherit;
}

button, a, select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

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

.top-bar {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 9px 15px;
  font-size: 12px;
  letter-spacing: .5px;
}

.header {
  background: white;
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1400px;
  margin: auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 35px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--primary);
}

.brand-subtitle {
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--secondary);
  margin-top: 7px;
  font-weight: bold;
}

.search-container {
  flex: 1;
}

.search-container input {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f5f6f8;
  outline: none;
}

.search-container input:focus {
  border-color: var(--secondary);
}

.cart-button {
  background: var(--primary);
  color: white;
  padding: 13px 22px;
  border: none;
  border-radius: 9px;
  white-space: nowrap;
}

#cart-count {
  background: var(--secondary);
  border-radius: 20px;
  padding: 3px 8px;
  margin-left: 6px;
}

.navigation {
  background: var(--primary);
}

.nav-container {
  max-width: 1400px;
  margin: auto;
  display: flex;
  gap: 8px;
  padding: 8px 24px;
  overflow-x: auto;
}

.category {
  background: transparent;
  color: white;
  border: none;
  padding: 12px 17px;
  border-radius: 7px;
  white-space: nowrap;
  font-size: 14px;
}

.category:hover,
.category.active {
  background: var(--secondary);
  color: var(--primary);
}

.container {
  max-width: 1400px;
  padding: 25px;
  margin: auto;
}

.hero {
  min-height: 390px;
  background: linear-gradient(
    120deg,
    var(--primary),
    #30485c
  );
  border-radius: 20px;
  color: white;
  display: flex;
  align-items: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 70px solid rgba(198,129,85,.18);
  border-radius: 50%;
  right: -100px;
  top: -100px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-label {
  color: #e4ad88;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 3px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.08;
  margin: 20px 0;
  letter-spacing: -2px;
}

.hero p {
  color: #e2e8ef;
  font-size: 17px;
  max-width: 480px;
  margin-bottom: 30px;
}

.primary-button {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  font-weight: bold;
  padding: 15px 25px;
  border-radius: 8px;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 25px 0 45px;
}

.benefit {
  padding: 24px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.benefit:last-child {
  border-right: none;
}

.benefit strong {
  display: block;
  font-size: 15px;
}

.benefit span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

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

.eyebrow {
  color: #98603d;
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 12px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 32px);
}

#product-count {
  color: var(--muted);
  font-size: 14px;
}

.catalog-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.catalog-toolbar select {
  border: 1px solid var(--border);
  background: white;
  padding: 11px 15px;
  border-radius: 8px;
  color: var(--primary);
}

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

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(20,35,51,.09);
}

.product-image {
  aspect-ratio: 1 / 1;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 6px 10px;
  font-size: 10px;
  border-radius: 5px;
  font-weight: bold;
}

.product-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  color: var(--muted);
  font-size: 12px;
}

.product-name {
  font-size: 17px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.product-description {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.product-price {
  font-size: 25px;
  font-weight: 800;
  margin-top: auto;
  padding-top: 10px;
}

.wholesale-box {
  background: #edf8f1;
  color: #17643c;
  padding: 10px;
  border-radius: 7px;
  margin: 12px 0;
  font-size: 13px;
}

.wholesale-box strong {
  display: block;
  font-size: 16px;
}

.stock {
  font-size: 12px;
  color: var(--success);
  margin: 10px 0;
}

.stock.out {
  color: #b91c1c;
}

.product-button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: bold;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.footer {
  margin-top: 60px;
  background: var(--primary);
  color: white;
}

.footer-container {
  max-width: 1400px;
  margin: auto;
  padding: 40px 25px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.footer p {
  color: #c6d0da;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #c6d0da;
}

@media (max-width: 1000px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    padding: 18px;
    gap: 15px;
  }

  .search-container {
    order: 3;
    flex-basis: 100%;
  }

  .cart-button {
    margin-left: auto;
  }

  .brand-name {
    font-size: 25px;
  }

  .container {
    padding: 15px;
  }

  .hero {
    min-height: 340px;
    padding: 30px;
    border-radius: 13px;
  }

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

  .benefit {
    border: 1px solid #f1f1f1;
    padding: 15px 8px;
  }

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

  .product-info {
    padding: 12px;
  }

  .product-name {
    font-size: 14px;
  }

  .product-price {
    font-size: 20px;
  }

  .wholesale-box strong {
    font-size: 14px;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
