
:root {
  --page: #f7f7f5;
  --surface: #ffffff;
  --text: #20231f;
  --muted: #858980;
  --accent: #365b48;
  --accent-light: #e8eee9;
  --border: #e9ebe6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--text);
  min-height: 100vh;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 24px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--surface);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  margin-bottom: 6px;
}

.header h1 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
}

.brand-dot {
  color: var(--accent);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 30px;
  background: var(--accent);
  color: white;
  padding: 11px 15px;
  font-size: 17px;
}

.cart-count {
  min-width: 19px;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  margin: 16px;
  padding: 30px 24px;
  min-height: 185px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(120deg, #294b3a, #6d8870);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  opacity: .8;
}

.hero h2 {
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.7px;
  margin: 12px 0 9px;
}

.hero p {
  font-size: 13px;
  opacity: .85;
}

.hero-decoration {
  position: absolute;
  right: 18px;
  top: 10px;
  font-size: 115px;
  color: rgba(255,255,255,.12);
}

.catalog {
  padding: 12px 16px;
}

.catalog-heading h2 {
  font-size: 22px;
  letter-spacing: -.5px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0 14px;
  margin: 18px 0;
  color: var(--muted);
}

.search-wrap span {
  font-size: 24px;
}

.search-wrap input {
  width: 100%;
  padding: 14px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.product-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
}

.product-card img,
.product-placeholder {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
  background: #edf0eb;
}

.product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a4aca2;
  font-size: 12px;
}

.product-info {
  padding: 12px;
}

.product-info h3 {
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 5px;
}

.product-info p {
  min-height: 32px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.product-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.price {
  font-size: 16px;
  font-weight: 750;
}

.add-btn,
.primary-btn {
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: white;
  font-weight: 650;
}

.add-btn {
  width: 100%;
  padding: 10px 8px;
  font-size: 12px;
}

.primary-btn {
  width: 100%;
  padding: 15px;
  font-size: 14px;
}

.add-btn:active,
.primary-btn:active {
  opacity: .8;
}

.loading,
.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 35px 15px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 30px 15px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background: rgba(20, 25, 21, .45);
}

.hidden {
  display: none !important;
}

.panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  min-height: 100%;
  background: var(--page);
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-size: 23px;
}

.close-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 25px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item strong {
  font-size: 14px;
}

.cart-item small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.cart-item-price {
  font-weight: 700;
  white-space: nowrap;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.quantity-controls button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.cart-footer {
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 17px;
  font-size: 16px;
}

.total-row strong {
  font-size: 20px;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
}

.order-form label {
  font-size: 13px;
  font-weight: 650;
  margin-top: 7px;
}

.order-form input,
.order-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.order-form input:focus,
.order-form textarea:focus {
  border-color: var(--accent);
}

.order-form textarea {
  min-height: 90px;
  resize: vertical;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0;
}

@media (max-width: 360px) {
  .products {
    gap: 9px;
  }

  .product-card img,
  .product-placeholder {
    height: 120px;
  }

  .product-info {
    padding: 9px;
  }
}
