/* Общие настройки */
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
  background: #f6efe6;
  color: #4b2e1f;
  padding-bottom: 70px;
}

/* Хедер */
header {
  background: #5b8ecb;
  color: #fff;
  padding: 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

/* Баннер */
.banner {
  margin: 16px;
  background: #dbe9f6;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.banner img {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 24px;
}

/* Сетка карточек */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 0 16px;
}

/* Карточки */
.card {
  background: #fff;
  border-radius: 14px;
  padding: 0;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 180px;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card span {
  display: block;
  font-weight: 500;
}

/* Промо */
.promo strong {
  font-size: 18px;
}

.promo button {
  margin-top: 12px;
  padding: 12px 16px;
  background: #a45a2a;
  border: none;
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}

/* Контакты */
.contact {
  margin: 16px;
}

.contact button {
  width: 100%;
  padding: 14px;
  background: #5b8ecb;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}

/* Футер */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.footer-container {
  display: flex;
  gap: 12px;
  width: 100%;
}

.home-btn,
.vk-link {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
  transition: 0.2s;
}

/* Кнопка "Вернуться на главную" */
.home-btn {
  background: #5b8ecb;
  color: #fff;
}

/* Ссылка ВК */
.vk-link {
  background: #4a76a8;
  color: #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* Эффекты при наведении */
.home-btn:hover,
.vk-link:hover {
  opacity: 0.85;
}

.home-btn:focus,
.vk-link:focus {
  outline: none;
  box-shadow: none;
}

.home-btn:active,
.vk-link:active {
  opacity: 0.7;
}


/* Кнопки категорий на странице каталога */
.category-buttons {
  display: flex;
  gap: 12px;
  margin: 16px;
}

.category-btn {
  flex: 1;
  padding: 12px 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: 0.2s;
}

/* Активная категория */
.category-btn.active {
  background: #5b8ecb;
  color: #fff;
  border-color: #5b8ecb;
}

/* Эффекты при наведении */
.category-btn:hover {
  opacity: 0.85;
}

.category-btn:active {
  opacity: 0.7;
}

.category-btn:focus {
  outline: none;
  box-shadow: none;
}

.orders-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.order-main strong {
  font-size: 15px;
}

.order-status {
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.status-new {
  background: #fff3cd;
  color: #856404;
}

.status-work {
  background: #e3f2fd;
  color: #1565c0;
}

.status-ready {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-cancel {
  background: #fdecea;
  color: #c62828;
}

.order-details-btn {
  margin-top: 6px;
  background: linear-gradient(135deg, #ffb347, #ff8c00);
  border: none;
  color: #fff;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.order-details-btn:active {
  transform: scale(0.97);
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 16px;
}

.order-row:not(:last-of-type) {
  border-bottom: 1px dashed #eee;
}

.order-label {
  color: #8a6b5a;
  font-size: 14px;
}
.order-value {
  font-weight: 600;
  font-size: 16px;
  color: #4b2e1f;
}

.order-total {
  font-size: 18px;
  font-weight: 700;
  color: #a45a2a;
}

.order-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}


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

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Фото */
.item-card img {
  width: 100%;
  aspect-ratio: 16/9; /* сохраняет пропорции */
  object-fit: cover;
}

/* Ценник на фото */
.price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 164, 42, 0.9); /* оранжевый фон */
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 16px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Информация под фото */
.item-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.item-desc {
  font-size: 14px;
  color: #8a6b5a;
  line-height: 1.4;
}

.item-bottom {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.add-btn {
  background: #5b8ecb;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.add-btn:hover {
  opacity: 0.85;
}

.add-btn:active {
  transform: scale(0.97);
}

/* ===== КОРЗИНА ===== */
.cart-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  align-items: center;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.cart-info input[type="number"] {
  width: 60px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.cart-info button {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ffb347, #ff8c00);
  color: #fff;
  transition: 0.2s;
}

.cart-info button:hover {
  opacity: 0.85;
}

.cart-info button:active {
  transform: scale(0.97);
}

.cart-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff8f0;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.cart-total {
  font-size: 18px;
  font-weight: 700;
  color: #a45a2a;
}

.checkout-btn {
  background: #5b8ecb;
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.checkout-btn:hover {
  opacity: 0.85;
}

.checkout-btn:active {
  transform: scale(0.97);
}

/* Пустая корзина */
.cart-container p {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #8a6b5a;
}


/* ===== Блок количества в корзине ===== */
.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb347, #ff8c00);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s;
}

.quantity-control button:hover {
  opacity: 0.85;
}

.quantity-control button:active {
  transform: scale(0.95);
}

.quantity-control span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}