:root {
  --brown-dark: #3b2418;
  --brown: #6b3f2a;
  --brown-light: #a9764f;
  --cream: #fbf3ec;
  --cream-dark: #f0e2d3;
  --accent: #c8843a;
  --accent-2: #e0a458;
  --danger: #c0392b;
  --success: #2e8b57;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(59, 36, 24, 0.12);
  --shadow-lg: 0 14px 32px rgba(59, 36, 24, 0.18);
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--brown-dark);
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--font-heading); }
.container { max-width: 1440px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }
img { max-width: 100%; }

.icon-coffee { --g1: #7a4a24; --g2: #c8843a; }
.icon-choco { --g1: #4a2515; --g2: #8a5a34; }
.icon-pastry { --g1: #d69e4a; --g2: #f0c179; }
.icon-drink { --g1: #b5652f; --g2: #e0a458; }
.icon-wok { --g1: #8a3a1e; --g2: #d4622f; }
.icon-pizza { --g1: #a3341f; --g2: #e0763a; }
.icon-fastfood { --g1: #6b4423; --g2: #b5804a; }

.site-header {
  background: var(--brown-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 56px;
  padding: 0 12px;
  flex-wrap: nowrap;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem; font-weight: 800; text-decoration: none; color: #fff;
  display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; flex: 1; min-width: 0;
}
.logo-img { height: 32px; max-width: 120px; width: auto; object-fit: contain; flex-shrink: 0; }

.breadcrumbs { padding: 10px 16px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 0.8rem; color: #9a8a7e; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs a { color: var(--brown); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #c9b8a8; }
.phone-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.1rem;
}
.cart-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 40px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cart-count {
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  padding: 0 7px;
  font-weight: 700;
  font-size: 0.8rem;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.09) 0, rgba(255,255,255,0.09) 3px, transparent 3px),
    radial-gradient(circle at 45% 70%, rgba(255,255,255,0.07) 0, rgba(255,255,255,0.07) 4px, transparent 4px),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 3px, transparent 3px),
    radial-gradient(circle at 65% 85%, rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 5px, transparent 5px),
    linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  background-size: 90px 90px, 140px 140px, 110px 110px, 160px 160px, 100% 100%;
  color: #fff;
  padding: 40px 16px 34px;
  text-align: center;
  border-radius: 0 0 22px 22px;
}
.hero h1 { margin: 0 0 10px; font-family: var(--font-heading); font-size: 1.7rem; font-weight: 800; }
.hero p { margin: 0 auto; max-width: 560px; opacity: 0.92; font-size: 0.95rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 18px; font-size: 0.82rem;
}
.hero-meta span {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 6px 14px;
}

.menu { padding: 20px 16px 40px; }
.empty-note { text-align: center; color: var(--brown-light); }

.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 0;
  position: sticky;
  top: 56px;
  background: var(--cream);
  z-index: 10;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brown);
  scroll-snap-align: start;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.booking-banner {
  display: flex; align-items: center; gap: 14px; margin: 16px 0;
  padding: 16px 18px; border-radius: 14px; text-decoration: none;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 4px 16px rgba(200, 132, 58, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) {
  .booking-banner:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200, 132, 58, 0.45); }
}
.booking-banner-icon { font-size: 1.8rem; flex-shrink: 0; }
.booking-banner-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.booking-banner-text strong { font-size: 1.05rem; }
.booking-banner-text span:last-child { font-size: 0.85rem; opacity: 0.9; }
.booking-banner-arrow { font-size: 1.3rem; flex-shrink: 0; }

@media (hover: hover) {
  .category-nav a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
}

.category-block { margin-bottom: 40px; }
.category-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 1.25rem;
  font-weight: 800;
  scroll-margin-top: 110px;
}
.category-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 4px 10px rgba(59,36,24,0.25);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
@media (min-width: 860px) {
  .items-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 1140px) {
  .items-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }
}
.item-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .item-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
  .item-card:hover .item-image { transform: scale(1.05); }
}
.item-image { width: 100%; height: 150px; object-fit: cover; display: block; transition: transform 0.35s ease; }
.item-image-placeholder {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,0.16) 0, rgba(255,255,255,0.16) 2px, transparent 2px),
    radial-gradient(circle at 75% 65%, rgba(255,255,255,0.14) 0, rgba(255,255,255,0.14) 3px, transparent 3px),
    radial-gradient(circle at 50% 85%, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 2px, transparent 2px),
    linear-gradient(135deg, var(--g1), var(--g2));
  background-size: 40px 40px, 60px 60px, 50px 50px, 100% 100%;
}
.item-image-placeholder span {
  font-size: 2.6rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}
.item-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item-body h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-heading); font-weight: 700; }
.item-desc { margin: 0; font-size: 0.85rem; color: #7a6a5f; flex: 1; }
.item-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 8px; }
.item-price { font-weight: 800; color: var(--brown); font-family: var(--font-heading); }

.btn {
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  min-height: 40px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-heading);
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.97); }
.btn-add { background: var(--cream-dark); color: var(--brown-dark); padding: 9px 16px; border-radius: 999px; }
.btn-add:active { background: var(--accent); color: #fff; }
.btn-primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; }
.btn-primary:active { background: var(--brown); }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }

@media (hover: hover) {
  .btn-add:hover { background: var(--accent); color: #fff; }
  .btn-primary:hover { filter: brightness(1.06); }
}

.cart-overlay, .modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: none; z-index: 30;
}
.cart-overlay.open, .modal-overlay.open { display: block; }

.cart-panel {
  position: fixed; top: 0; right: -380px; width: 360px; max-width: 92vw; height: 100%;
  background: #fff; z-index: 31; transition: right 0.25s ease;
  display: flex; flex-direction: column; box-shadow: -6px 0 20px rgba(0,0,0,0.15);
}
.cart-panel.open { right: 0; }
.cart-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--cream-dark); }
.close-btn { background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; width: 32px; height: 32px; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 16px; }
.cart-empty { text-align: center; color: #999; padding: 40px 16px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--cream-dark); }
.cart-item-name { font-size: 0.92rem; flex: 1; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--cream-dark); background: #fff; cursor: pointer; font-size: 1.1rem; }
.cart-item-price { font-weight: 600; min-width: 70px; text-align: right; }
.cart-summary { padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)); border-top: 1px solid var(--cream-dark); }
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; color: #6b5c50; }
.cart-total-row-final { font-size: 1.1rem; font-weight: 700; color: var(--brown-dark); margin-bottom: 14px; }
.cart-discount-row, .checkout-discount-row { color: var(--success) !important; }
.promo-row { display: flex; gap: 8px; margin-bottom: 8px; }
.promo-row input { flex: 1; padding: 9px 10px; border: 1px solid var(--cream-dark); border-radius: 8px; font-size: 16px; }
.promo-row button { flex-shrink: 0; padding: 9px 14px; }
.promo-message { font-size: 0.82rem; margin-bottom: 10px; padding: 6px 10px; border-radius: 6px; }
.promo-message.success { background: #e9f7ef; color: var(--success); }
.promo-message.error { background: #fdecea; color: var(--danger); }

.modal { background: #fff; border-radius: var(--radius); max-width: 440px; margin: 60px auto; padding: 20px; max-height: 85vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-header h3, .cart-panel-header h3 { font-family: var(--font-heading); margin: 0; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 5px; color: #6b5c50; }
.form-group input, .form-group textarea {
  width: 100%; padding: 11px 10px; border: 1px solid var(--cream-dark); border-radius: 8px;
  font-size: 16px; font-family: inherit;
}
.radio-row { display: flex; gap: 16px; font-size: 0.9rem; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.checkout-breakdown { margin-bottom: 14px; padding: 12px 14px; background: var(--cream); border-radius: 10px; }
.checkout-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: #6b5c50; padding: 3px 0; }
.checkout-row-total { font-size: 1.05rem; font-weight: 700; color: var(--brown-dark); padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--cream-dark); }
.form-error { color: var(--danger); font-size: 0.85rem; margin-bottom: 10px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }

.booking-locations { display: flex; flex-direction: column; gap: 10px; }
.booking-location-card {
  display: flex; align-items: flex-start; gap: 10px; border: 2px solid var(--cream-dark); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; transition: border-color 0.15s ease;
}
.booking-location-card:has(input:checked) { border-color: var(--accent); background: var(--cream); }
.booking-location-card input { margin-top: 4px; accent-color: var(--accent); }
.booking-location-body { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; color: #6b5c50; }
.booking-location-body strong { color: var(--brown-dark); font-size: 1rem; }

.booking-success { text-align: center; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; }
.booking-success h3 { margin: 0 0 6px; font-family: var(--font-heading); font-size: 1.3rem; }
.booking-success p { margin: 0 0 20px; color: #7a6a5f; font-size: 0.92rem; }

.modal-success { text-align: center; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; }
.success-icon {
  font-size: 2.2rem; width: 64px; height: 64px; line-height: 64px; border-radius: 50%;
  background: #e9f7ef; margin: 0 auto 16px;
}
.modal-success h3 { margin: 0 0 6px; font-family: var(--font-heading); font-size: 1.3rem; }
.success-order-number { font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.modal-success p { margin: 0 0 22px; color: #7a6a5f; font-size: 0.92rem; }
.success-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.site-footer { background: var(--brown-dark); color: #d8c4b4; text-align: center; padding: 20px 16px 40px; font-size: 0.85rem; }
.site-footer p { margin: 4px 0; }
.footer-links a { color: #ffd9b0; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Модалка карточки товара */
.modal-item { max-width: 420px; padding: 0; overflow: hidden; position: relative; }
.modal-item-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,0,0,0.4); color: #fff; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
}
.modal-item-close-strip {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0; width: 60px; z-index: 6;
  background: linear-gradient(to left, rgba(0,0,0,0.38), rgba(0,0,0,0));
  align-items: flex-start; justify-content: center;
  padding-top: max(18px, env(safe-area-inset-top, 18px));
  border: none; cursor: pointer;
}
.modal-item-close-strip-icon {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.35); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.modal-item-image { position: relative; height: 220px; }
.modal-item-image img, .modal-item-image .item-image-placeholder { width: 100%; height: 100%; }
.modal-item-body { padding: 18px; }
.modal-item-body h3 { margin: 0 0 6px; font-family: var(--font-heading); font-size: 1.25rem; }
.modal-item-weight { display: inline-block; background: var(--cream-dark); color: var(--brown); border-radius: 999px; padding: 3px 12px; font-size: 0.8rem; margin-bottom: 10px; }
.modal-item-desc { color: #7a6a5f; font-size: 0.92rem; margin: 0 0 12px; }
.modal-item-composition { background: var(--cream); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 0.88rem; }
.modal-item-composition strong { font-family: var(--font-heading); }
.modal-item-composition p { margin: 4px 0 0; color: #6b5c50; }
.modal-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-item-footer .item-price { font-size: 1.2rem; }

/* Авторизация / аккаунт */
.auth-section { padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; width: 100%; max-width: 380px; box-sizing: border-box; }
.auth-card.auth-card-wide { max-width: 560px; }
.auth-card h1 { font-size: 1.4rem; margin: 0 0 16px; text-align: center; }
.auth-switch { text-align: center; font-size: 0.88rem; margin-top: 14px; color: #7a6a5f; }
.auth-switch a { color: var(--accent); font-weight: 700; text-decoration: none; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card h2 { margin: 0 0 4px; font-size: 1.2rem; }

.form-error { color: var(--danger); background: #fdecea; border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; margin-bottom: 12px; }
.form-success { color: var(--success); background: #e9f7ef; border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; margin-bottom: 12px; }

/* История заказов клиента */
.order-history-item { border: 1px solid var(--cream-dark); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.order-history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.order-history-head a { font-weight: 700; color: var(--brown); text-decoration: none; }
.order-history-items { font-size: 0.85rem; color: #7a6a5f; margin: 0; padding-left: 18px; }
.order-history-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; flex-wrap: wrap; }

.preset-item { border: 1px solid var(--cream-dark); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.preset-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.preset-item-actions { display: flex; gap: 6px; }

.account-hello { margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }

.avatar-preview {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--cream-dark); color: var(--brown); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar-field-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.avatar-field-actions { display: flex; flex-direction: column; gap: 6px; }
.avatar-upload-btn { cursor: pointer; display: inline-block; }
.avatar-remove-label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #9a8a7e; cursor: pointer; }
.avatar-remove-label input { margin: 0; }

.review-author { display: flex; align-items: center; gap: 8px; }
.review-author .avatar-preview { width: 32px; height: 32px; font-size: 0.85rem; }
.account-tabs {
  display: flex;
  gap: 6px;
  background: var(--cream-dark);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
  position: sticky;
  top: 56px;
  z-index: 5;
}
.account-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--brown);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 8px;
  border-radius: 9px;
  cursor: pointer;
}
.account-tab-btn.is-active { background: #fff; color: var(--brown-dark); box-shadow: var(--shadow); }

/* Значки статуса */
.status-badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-new { background: #fdecea; color: var(--danger); }
.status-ready { background: #fff6e5; color: #b8860b; }
.status-completed { background: #e9ecef; color: #555; }
.status-cancelled { background: #f4f4f4; color: #999; }

/* Страница отслеживания заказа */
.track-form { display: flex; gap: 8px; flex-wrap: wrap; }
.track-form input { flex: 1; min-width: 160px; }
.order-progress { display: flex; justify-content: space-between; margin: 24px 0; position: relative; }
.order-progress::before {
  content: ''; position: absolute; top: 15px; left: 0; right: 0; height: 3px; background: var(--cream-dark); z-index: 0;
}
.order-progress-fill { position: absolute; top: 15px; left: 0; height: 3px; background: var(--accent); z-index: 1; transition: width 0.4s ease; }
.order-progress-step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.order-progress-dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--cream-dark); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.order-progress-step.done .order-progress-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.order-progress-step.current .order-progress-dot { border-color: var(--accent); background: #fff; color: var(--accent); }
.order-progress-label { font-size: 0.72rem; text-align: center; color: #7a6a5f; max-width: 70px; }
.order-progress-step.done .order-progress-label, .order-progress-step.current .order-progress-label { color: var(--brown-dark); font-weight: 700; }
.order-cancelled-note { background: #fdecea; color: var(--danger); border-radius: 10px; padding: 12px; text-align: center; font-weight: 600; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--cream-dark); }
.table th { background: var(--cream); font-family: var(--font-heading); }

.mobile-cart-bar { display: none; }

@media (max-width: 700px) {
  .menu { padding-bottom: 90px; }
  .cart-panel {
    top: 0; bottom: auto; right: 0; left: 0; width: 100%; max-width: 100%;
    height: 100dvh; height: 100vh; max-height: none; border-radius: 0;
    transform: translateY(100%); transition: transform 0.25s ease;
  }
  .cart-panel.open { transform: translateY(0); }

  .modal { margin: 0; border-radius: 0; position: fixed; inset: 0; height: 100dvh; height: 100vh; max-height: none; width: 100%; max-width: 100%; }
  .modal-overlay.open { display: flex; align-items: stretch; }
  .modal-success { border-radius: 16px; position: static; height: auto; margin: 20px auto; }
  #successOverlay.open { display: flex; align-items: center; }

  .modal-item-close { display: none; }
  .modal-item-close-strip { display: flex; }
  .modal-item-body { padding-right: 60px; }
  .modal-item-image { height: 38vh; }

  .mobile-cart-bar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom, 10px));
    background: transparent;
  }
  .mobile-cart-bar button {
    width: 100%; border: none; border-radius: 12px; background: var(--accent); color: #fff;
    padding: 14px 16px; min-height: 52px; display: flex; align-items: center; justify-content: space-between;
    font-size: 0.95rem; font-weight: 600; box-shadow: 0 6px 20px rgba(59,36,24,0.35); cursor: pointer;
  }
  .mobile-cart-bar-count { background: rgba(255,255,255,0.25); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
}

/* Рейтинг звёздами (выбор) */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; position: relative; }
.star-rating input { position: absolute; opacity: 0; pointer-events: none; }
.star-rating label { font-size: 2rem; line-height: 1; color: var(--cream-dark); cursor: pointer; transition: color 0.1s ease; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: var(--accent); }

.star-display { font-size: 1.4rem; color: var(--accent); letter-spacing: 2px; margin-bottom: 8px; }
.review-admin-reply { margin-top: 12px; padding: 10px 14px; background: var(--cream); border-radius: 10px; font-size: 0.88rem; }

/* Секция отзывов на главной */
.reviews-section { padding: 30px 16px 10px; }
.reviews-header { text-align: center; margin-bottom: 22px; }
.reviews-header h2 { margin: 0 0 6px; }
.reviews-summary { color: var(--brown); font-size: 0.95rem; }
.reviews-summary .star-display { display: inline-block; margin: 0 6px 0 0; font-size: 1.1rem; vertical-align: middle; }
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto;
}
.review-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.review-card .star-display { font-size: 1.1rem; margin-bottom: 6px; }
.review-card-name { font-weight: 700; font-family: var(--font-heading); margin-bottom: 4px; }
.review-card-date { font-size: 0.75rem; color: #9a8a7e; margin-bottom: 8px; }
.review-card-text { font-size: 0.9rem; color: #5a4c42; }
.review-card .review-admin-reply { margin-top: 10px; font-size: 0.82rem; }
.review-card { opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.35s ease; }
.review-card-hidden { opacity: 0; transform: translateY(10px); }
.review-card-hidden.review-card-visible { opacity: 1; transform: none; }

.reviews-more-wrap { text-align: center; margin: 22px 0 8px; }
#reviewsMoreBtn { padding: 10px 22px; border-radius: 999px; }

.review-photo { display: block; max-width: 220px; width: 100%; border-radius: 10px; margin: 10px 0; object-fit: cover; }
.review-photo-sm { max-width: 140px; max-height: 140px; }
.review-card .review-photo { max-width: 100%; max-height: 220px; }

.item-review-block { border: 1px solid var(--cream-dark); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.item-review-block:last-child { margin-bottom: 0; }
.item-review-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.item-review-block .star-rating label { font-size: 1.5rem; }
.item-review-block textarea, .item-review-block input[type="file"] { font-size: 0.88rem; }

/* Мини-отзывы в карточке товара / модалке */
.item-reviews-summary { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--brown); margin-top: 2px; }
.item-reviews-summary .star-display { font-size: 0.85rem; margin: 0; }
.item-reviews-list { margin-top: 14px; border-top: 1px solid var(--cream-dark); padding-top: 12px; }
.item-reviews-actions { margin-top: 12px; }
.item-reviews-actions .form-error { margin-top: 8px; margin-bottom: 0; }
.item-review-mini { padding: 8px 0; border-bottom: 1px solid var(--cream-dark); }
.item-review-mini:last-child { border-bottom: none; }
.item-review-mini-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.item-review-mini-name { font-weight: 700; }
.item-review-mini-text { font-size: 0.85rem; color: #6b5c50; margin: 4px 0 0; }
.item-reviews-more-link { display: inline-block; margin-top: 10px; font-size: 0.85rem; color: var(--accent); font-weight: 700; text-decoration: none; }
.item-reviews-more-link:hover { text-decoration: underline; }
.item-reviews-empty { font-size: 0.85rem; color: #9a8a7e; margin-top: 12px; }
