/* ==========================================================================
   IRISTON BAKERY — ARTISAN CRAFT DESIGN SYSTEM (Variant 3.4 Edition)
   Theme: Ремесленная пекарня (Традиции Алании, дровяная печь, теплый крафт)
   ========================================================================== */

:root {
  --bg: #f4eee1;
  --card-bg: #faf6ed;
  --border: #dfd5c0;
  --border-dark: #c4b79b;
  --bark: #631726;       /* Фирменный цвет: Аланский гранат */
  --bark-hover: #7b1e30; /* Ховер акцентного цвета */
  --wood: #7b1e30;       /* Цвет рамок и окантовок акцентных блоков */
  --hero-badge-bg: rgba(0, 0, 0, 0.24);
  --hero-badge-border: rgba(255, 255, 255, 0.22);
  --accent-amber: #b45309;
  --accent-gold: #c26908;
  --gold-light: #ffcc80;
  --text: #2c1e19;
  --text-muted: #6d5d54;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 4px 12px rgba(99, 23, 38, 0.04);
  --shadow: 0 10px 25px -5px rgba(99, 23, 38, 0.08);
  --shadow-lg: 0 20px 30px -10px rgba(99, 23, 38, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Background scroll lock when modal is open */
body.modal-open {
  overflow: hidden !important;
}

/* Typography Helpers */
h1, h2, h3, .serif-font {
  font-family: 'Lora', Georgia, serif;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  background: #efe7d6;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(62, 39, 35, 0.04);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-stamp {
  width: 46px;
  height: 46px;
  border: 2px dashed var(--bark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.brand-title {
  font-family: 'Cinzel', 'Lora', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bark);
  letter-spacing: 2px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  white-space: nowrap;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.info-badge .dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
}

.header-phone-link {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bark);
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.header-phone-link:hover {
  color: var(--accent-amber);
}

.btn-header-back,
a.btn-header-back,
.tab-btn.btn-header-back {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 36px;
  box-sizing: border-box;
}
.btn-header-back:hover,
a.btn-header-back:hover,
.tab-btn.btn-header-back:hover {
  text-decoration: none !important;
}

/* ==========================================================================
   HERO SECTION (Variant 3.4: Split Card with Ossetian Hospitality)
   ========================================================================== */
.hero {
  max-width: 1100px;
  margin: 24px auto 10px;
  padding: 0 20px;
}

.hero-split-card {
  background: var(--bark);
  color: #f5efe6;
  border-radius: 18px;
  border: 2px solid var(--wood);
  padding: 32px 34px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 16px 36px rgba(62, 39, 35, 0.2);
}

.hero-split-text {
  display: flex;
  flex-direction: column;
}

.hero-title {
  font-family: 'Lora', serif;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #ffffff;
  text-align: left;
}

.hero-title span {
  color: var(--gold-light);
  font-style: italic;
}

.hero-desc {
  font-size: 0.94rem;
  color: #d7ccc8;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: left;
}

.hero-desc b {
  color: #ffffff;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.hero-badge {
  background: var(--hero-badge-bg, rgba(0, 0, 0, 0.24));
  border: 1px solid var(--hero-badge-border, rgba(255, 255, 255, 0.22));
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #efebe9;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-split-image {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(217, 119, 6, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  height: 280px;
}

.hero-split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.hero-split-image:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   CATEGORY TABS
   ========================================================================== */
.tabs-container {
  max-width: 1100px;
  width: 100%;
  margin: 22px auto 4px;
  padding: 4px 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
  transition: all 0.2s;
  flex-shrink: 0;
}

.tab-btn:hover {
  border-color: var(--bark);
  color: var(--bark);
}

.tab-btn.active {
  background: var(--bark);
  color: #ffffff;
  border-color: var(--bark);
  box-shadow: 0 4px 12px rgba(62, 39, 35, 0.2);
}

/* ==========================================================================
   MENU SECTION & DISH CARDS
   ========================================================================== */
.menu-section {
  max-width: 1100px;
  width: 100%;
  margin: 18px auto 30px;
  padding: 0 20px;
  flex: 1;
}

.section-heading {
  font-family: 'Lora', serif;
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--bark);
}

.dishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.dish-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}

.dish-card:hover {
  transform: translateY(-3px);
  border-color: var(--wood);
  box-shadow: var(--shadow);
}

.dish-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: #2e1c17;
  overflow: hidden;
}

.dish-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.dish-card:hover .dish-image-wrapper img {
  transform: scale(1.04);
}

.dish-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bark);
  color: var(--gold-light);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 204, 128, 0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.dish-meta-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(39, 26, 21, 0.88);
  color: #f5efe6;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.dish-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dish-title {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bark);
  margin-bottom: 2px;
}

.dish-ossetian-name {
  font-size: 0.76rem;
  color: var(--accent-amber);
  font-style: italic;
  font-weight: 600;
  margin-bottom: 8px;
}

.dish-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.dish-composition {
  font-size: 0.73rem;
  color: #786c64;
  background: #f4eee1;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
  border: 1px dashed var(--border-dark);
}

.dish-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.dish-price {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bark);
}

.dish-price small {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-add-cart {
  background: var(--bark);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add-cart:hover {
  background: var(--bark-hover);
}

.qty-control {
  display: flex;
  align-items: center;
  background: #efe7d6;
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--border);
}

.qty-btn {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--bark);
  padding: 0 8px;
}

/* ==========================================================================
   BOTTOM THREE PIES LORE CARD (Variant 3.4)
   ========================================================================== */
.bottom-pies-section {
  max-width: 1100px;
  margin: 36px auto 30px;
  padding: 0 20px;
}

.bottom-pies-card {
  background: #efe7d6;
  border: 2px solid #dfd5c0;
  border-radius: 18px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.bottom-pies-image {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #c4b79b;
  box-shadow: 0 8px 20px rgba(62, 39, 35, 0.15);
  height: 230px;
}

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

.bottom-pies-title {
  font-family: 'Lora', serif;
  font-size: 1.55rem;
  color: var(--bark);
  margin-bottom: 10px;
  font-weight: 700;
}

.bottom-pies-desc {
  font-size: 0.92rem;
  color: #5d4037;
  line-height: 1.6;
}

/* ==========================================================================
   FLOATING BOTTOM CART BAR
   ========================================================================== */
.bottom-cart-bar {
  display: none;
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translate3d(0, 0, 0);
  -webkit-transform: translateX(-50%) translate3d(0, 0, 0);
  width: calc(100% - 32px);
  max-width: 520px;
  background: var(--bark);
  color: #ffffff;
  padding: 10px 14px 10px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--wood);
  z-index: 990;
  box-shadow: 0 10px 30px rgba(39, 26, 21, 0.45);
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-cart-bar:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 14px 35px rgba(39, 26, 21, 0.55);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.bottom-cart-info {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.bottom-cart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cart-bar-action {
  background: var(--gold-light);
  color: var(--bark);
  border: none;
  padding: 0 13px;
  height: 38px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-cart-bar-action:hover {
  background: #ffe082;
  transform: translateY(-1px);
}

.btn-cart-bar-clear {
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.btn-cart-bar-clear:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.08);
}

/* ==========================================================================
   MODALS & SLIDE-OVERS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(39, 26, 21, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  border: 2px solid var(--border);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 10;
}

.modal-title {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bark);
}

.btn-close {
  background: #efe7d6;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
}

.cart-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bark);
}

.cart-item-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.btn-remove-item {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-remove-item:hover {
  background: #fca5a5;
  color: #991b1b;
  transform: scale(1.05);
}

.free-delivery-bar {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #92400e;
  font-weight: 600;
}

/* Form inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--bark);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 10px;
}

/* Time Slot Picker */
.time-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.time-type-btn {
  background: #efe7d6;
  border: 1.5px solid var(--border);
  padding: 9px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--text);
}

.time-type-btn.active {
  background: var(--bark);
  border-color: var(--bark);
  color: #ffffff;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.slot-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 7px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.slot-item.selected {
  background: var(--bark);
  color: #fff;
  border-color: var(--bark);
}

.slot-item.disabled {
  background: #f5f5f4;
  color: #a8a29e;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Payment picker */
.payment-methods {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-method-card {
  border: 1.5px solid var(--border);
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.payment-method-card.selected {
  border-color: var(--bark);
  background: #efe7d6;
}

.payment-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--bark);
}

.payment-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Summary */
.checkout-summary {
  background: #efe7d6;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.summary-row.total {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bark);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-dark);
}

.btn-primary {
  width: 100%;
  background: var(--bark);
  color: #ffffff;
  border: none;
  padding: 13px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(84, 55, 43, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 50px;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--bark-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(84, 55, 43, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(84, 55, 43, 0.2);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #efe7d6;
  color: var(--text-muted);
  padding: 40px 20px 70px;
  margin-top: auto;
  border-top: 2px solid var(--border);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.footer-title {
  font-family: 'Lora', serif;
  color: var(--bark);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
}

.footer-contact-item .contact-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: var(--bark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-contact-item a:hover {
  color: var(--accent-amber);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--bark);
}

/* ==========================================================================
   OSSETIAN HERITAGE & NATIONAL ATTRIBUTES (ALANIA DESIGN SYSTEM)
   ========================================================================== */

/* 1. Чеканные золотые медальоны (Герб и Флаг) */
.brand-emblem-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #d97706;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.3), inset 0 0 4px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  margin-left: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.brand-emblem-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.45);
}
.brand-emblem-badge img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  display: block;
}

/* На компьютере (десктоп) значок флага справа скрыт */
.brand-flag-badge {
  display: none;
}

/* Текстовый блок бренда (Базовый для ПК - выравнивание влево) */
.brand-center-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* СТИЛИ ФЛАГА ВНУТРИ ЗНАЧКА (Вариант №1: Классический триколор) */
.flag-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.flag-var-1 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.flag-var-1 .f-stripe {
  flex: 1;
  width: 100%;
}
.flag-var-1 .f-white { background: #ffffff; }
.flag-var-1 .f-red { background: #ee1c25; }
.flag-var-1 .f-yellow { background: #ffd000; }

/* SITE PAUSE BANNER & CART PAUSE ALERT */
.site-pause-banner {
  background: #b91c1c;
  color: #fff;
  padding: 11px 16px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 99;
}
.site-pause-banner.active {
  display: flex;
}
.cart-pause-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 12px;
  text-align: center;
}

/* ==========================================================================
   MOBILE & RESPONSIVENESS (OVERRIDE AT THE BOTTOM)
   ========================================================================== */
@media (max-width: 768px) {
  .header-container {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .header-info,
  .header-phone-link {
    display: none !important;
  }

  /* Главная страница на телефоне: Герб слева, Текст строго по центру, Флаг справа */
  .brand {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    gap: 8px !important;
  }
  .brand-emblem-badge {
    width: 39px !important;
    height: 39px !important;
    margin-left: 4px !important;
    flex-shrink: 0 !important;
  }
  .brand-flag-badge {
    display: flex !important;
    width: 39px !important;
    height: 39px !important;
    margin-right: 4px !important;
    flex-shrink: 0 !important;
  }
  .brand-center-text {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    min-width: 0 !important;
  }
  .brand-title {
    font-size: 1.02rem !important;
    letter-spacing: 0.6px !important;
    line-height: 1.1 !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    white-space: nowrap !important;
    margin: 0 auto !important;
  }
  .brand-subtitle {
    font-size: 0.58rem !important;
    letter-spacing: 0.3px !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    white-space: nowrap !important;
    margin: 0 auto !important;
  }

  /* Специфика для страниц с кнопкой возврата назад (Реквизиты, Оферта, Успех) */
  .header-container.has-back-btn,
  .header-container:has(.btn-header-back) {
    justify-content: space-between !important;
    padding: 8px 12px !important;
    gap: 6px !important;
  }
  .header-container.has-back-btn .brand,
  .header-container:has(.btn-header-back) .brand {
    justify-content: flex-start !important;
    text-align: left !important;
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  .header-container.has-back-btn .brand-flag-badge,
  .header-container:has(.btn-header-back) .brand-flag-badge {
    display: none !important;
  }
  .header-container.has-back-btn .brand-center-text,
  .header-container:has(.btn-header-back) .brand-center-text {
    align-items: flex-start !important;
    text-align: left !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .header-container.has-back-btn .brand-title,
  .header-container:has(.btn-header-back) .brand-title {
    font-size: 0.88rem !important;
    letter-spacing: 0.2px !important;
    text-align: left !important;
    width: auto !important;
    margin: 0 !important;
  }
  .header-container.has-back-btn .brand-subtitle,
  .header-container:has(.btn-header-back) .brand-subtitle {
    font-size: 0.50rem !important;
    letter-spacing: 0.1px !important;
    text-align: left !important;
    width: auto !important;
    margin: 0 !important;
  }
  .btn-header-back,
  .header .tab-btn {
    flex-shrink: 0 !important;
    margin: 0 0 0 auto !important;
    padding: 6px 10px !important;
    min-height: 32px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }
  .hero {
    margin: 14px auto 0;
    padding: 0 14px;
  }
  .hero-split-card {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 18px;
  }
  .hero-split-image {
    height: 220px;
    order: -1;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-desc {
    font-size: 0.9rem;
  }
  .bottom-pies-section {
    margin: 24px auto 14px;
    padding: 0 14px;
  }
  .bottom-pies-card {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 16px;
  }
  .bottom-pies-image {
    height: 200px;
    order: -1;
  }
  .dish-image-wrapper {
    height: 190px;
  }
  .bottom-cart-bar {
    bottom: 0;
    left: 0;
    transform: none !important;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  }
  .modal-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
  }
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    margin: 0 auto;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-sizing: border-box;
  }
  .modal-body {
    padding: 18px 16px max(28px, env(safe-area-inset-bottom));
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #btn-proceed-checkout, #btn-submit-order {
    font-size: 0.91rem !important;
    padding: 13px 8px !important;
    white-space: nowrap !important;
  }
}



