* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #222;
  line-height: 1.4;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  background-color: #1f1f1f;
  color: #fff;
  padding: 20px 0;
}

.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 28px;
}

.cart-summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 18px;
}

.main {
  padding: 40px 0;
}

.section-title {
  margin-bottom: 24px;
  font-size: 28px;
}

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

.product-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 12px;
  border-radius: 8px;
}

.product-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.product-price {
  margin-bottom: 14px;
  font-weight: bold;
  font-size: 18px;
}

.product-card button,
.order-btn,
.order-form button,
.cart-controls button,
.remove-btn {
  border: none;
  background-color: #1f1f1f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.product-card button:hover,
.order-btn:hover,
.order-form button:hover,
.cart-controls button:hover,
.remove-btn:hover {
  opacity: 0.9;
}

.cart-section {
  margin-top: 50px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-cart {
  background-color: #fff;
  padding: 16px;
  border-radius: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 16px;
  align-items: center;
  background-color: #fff;
  padding: 16px;
  border-radius: 12px;
}

.cart-item-title h3 {
  margin-bottom: 6px;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.hidden {
  display: none;
}

.modal-content {
  background-color: #fff;
  width: min(500px, 100%);
  padding: 24px;
  border-radius: 12px;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.order-form input {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.order-message {
  margin-top: 16px;
  color: green;
  font-weight: bold;
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

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

  .logo {
    font-size: 24px;
  }

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