@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('/inter-v20-cyrillic_latin-regular.woff2') format('woff2');
}

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

:root {
  --bg-color: #f3f4f6;
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  
  --text-main: #1f2937;
  --text-muted: #4b5563;
  
  --primary: #2563eb;
  --success: #047857;
  --danger: #ef4444;
  
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.4rem;
  font-family: 'Inter', sans-serif;
  min-width: 384px;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

a, button {
  color: var(--text-main);
  text-decoration: none; 
}

#root {
  min-height: inherit;
}

/* =========================================
   1. BACKGROUND & UTILITIES
   ========================================= */
.bg-blobs { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(200, 210, 220, 0.6); }
.blob-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: rgba(220, 225, 230, 0.6); }
.blob-3 { top: 30%; left: 40%; width: 40vw; height: 40vw; background: rgba(210, 215, 220, 0.5); }

.content-block {
  padding: 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.main-container { max-width: 1280px; min-height: 100vh; margin: 0 auto; padding: 1rem 1rem; }
.main-container:has(.requisites-layout, .policy-layout){
  max-width: 960px;
}
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

.fw-bold { font-weight: 600; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--text-main); }

h1 { font-size: 1.25rem }
h2 { font-size: 1.125rem }
h3, h4, h5, h6 { font-size: 1rem }

fieldset { border: none; }

/* =========================================
   2. BUTTONS (Сгруппированные)
   ========================================= */
/* Общая база для всех кнопок */
.btn-primary, .btn-success, .btn-danger, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

/* Индивидуальные цвета */
.btn-primary { background: #fff; color: var(--text-main); border-color: rgba(0,0,0,0.1); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.btn-primary:hover, .btn-primary.active { background: #f9fafb; border-color: rgba(0,0,0,0.15); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

.btn-success { background: var(--success); color: #fff; border-color: #065f46; box-shadow: 0 1px 2px rgba(4,120,87,0.2); }
.btn-success:hover { background: #065f46; border-color: #064e3b; }

.btn-danger { background: var(--danger); color: #fff; border-color: #dc2626; box-shadow: 0 1px 2px rgba(239,68,68,0.2); }
.btn-danger:hover { background: #dc2626; border-color: #b91c1c; }

.btn-secondary { background: rgba(255,255,255,0.5); color: var(--text-main); border-color: rgba(0,0,0,0.1); }
.btn-secondary:hover { background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.15); }

/* Иконки и круглые кнопки (+, -, удалить) */
.icon-btn, .cart-qty-btn, .cart-remove-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: background 0.2s ease, color 0.2s ease;
}
.icon-btn { padding: 0.5rem; border-radius: var(--radius-sm); }
.cart-qty-btn, .cart-remove-btn { width: 32px; height: 32px; border-radius: 50%; padding: 0.5rem; font-weight: 600; }
.cart-qty-btn:hover { background: rgba(0, 0, 0, 0.05); }
.cart-remove-btn { color: var(--text-muted); }
.cart-remove-btn:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* =========================================
   3. LAYOUT & COMPONENTS
   ========================================= */
/* Header */
.header { position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.header-logo { font-size: 1rem; font-weight: 600;color: var(--text-main); }
.header-actions, .header-brand { display: flex; align-items: center; gap: 1rem; }
.header-nav { 
  display: flex; 
  align-items: center; 
  gap: 1.5rem; 
}
.header-nav-link { 
  color: var(--text-muted); 
  font-size: 0.9rem; 
  font-weight: 500; 
  transition: color 0.2s ease; 
}
.header-nav-link:hover { 
  color: var(--text-main); 
}

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 1.5rem; overflow-x: overlay; -webkit-overflow-scrolling: touch; }
.breadcrumbs::-webkit-scrollbar { display: none; }
.breadcrumbs ol { display: flex; list-style: none; gap: 0.5rem; font-size: 0.875rem; color: var(--text-main); align-items: center; white-space: nowrap; }
.breadcrumbs a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--text-main); }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li:not(:last-child)::after { content: '>'; margin-left: 0.5rem; color: var(--text-muted); }

/* Интерактивные карточки (Секции, Товары, Радио-кнопки) */
.section-card, .product-item, .radio-card {
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, background 0.3s ease;
}
.section-card:hover, .product-item:hover {
  transform: translateY(-0.125rem);
  background: rgba(255, 255, 255, 0.6);
}

/* Sections */
.sections-layout { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.section-card { flex: 1 1 280px; padding: 1.25rem; background: rgba(255, 255, 255, 0.3); border: 1px solid rgba(255, 255, 255, 0.4); }
.section-title { font-weight: 600; margin-bottom: 0.75rem; display: block; color: var(--text-main); }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { padding: 0.375rem 0.75rem; border-radius: 999px; font-size: 0.875rem; background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.8); color: var(--text-muted); transition: all 0.2s; }
.pill:hover { background: #fff; color: var(--text-main); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

/* Products List */
.product-list { display: flex; flex-direction: column; gap: 1rem; }
.product-item { display: flex; align-items: center; gap: 1.5rem; padding: 1rem; }
.product-thumb, .product-image-large { 
  background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.8); 
  display: flex; align-items: center; justify-content: center; overflow: hidden; 
}
.product-preview-image { width: 160px; min-height: 90px; height: auto }
.product-preview-image > .product-image { width: 100%; height: auto; aspect-ratio: 1600 / auto; border-radius: var(--radius-sm); }
.placeholder-icon { font-size: 1rem; opacity: 0.5; }

.product-info { flex: 1; min-width: 0; }
.product-name, .cart-item-name { font-weight: 600; color: var(--text-main); margin-bottom: 0.25rem; transition: color 0.2s; }
.product-name { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-name:hover, .cart-item-name:hover { color: var(--text-muted); }

.product-stock { font-size: 0.875rem; margin-bottom: 0.25rem; }
.product-stock[data-in-stock] { color: var(--success); font-weight: 600; }
.product-meta, .cart-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.product-price, .cart-price { font-size: 1rem; font-weight: 600; white-space: nowrap; }
.product-action { display: flex; align-items: center; gap: 1.5rem; }

/* Product Detail */
.product-detail-layout { display: flex; gap: 2.25rem; }
.product-detail-image { flex: 1; }
.product-detail-image > .product-image { width: 100%; height: auto; aspect-ratio: 1600 / auto; border-radius: var(--radius-sm); }
.product-detail-info { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.product-detail-price { font-size: 1.25rem; font-weight: 600; }
.product-detail-action { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.product-description { line-height: 1.6; font-size: 0.95rem; }
.product-specs { margin-top: 2rem; }
.property-row { display: flex; padding: 0.75rem 0; gap: 1rem; border-bottom: 1px solid rgba(0, 0, 0, 0.05); font-size: 0.9rem; }
.property-name { flex:1; color: var(--text-muted); text-align: start; }
.property-value { color: var(--text-main);  text-align: end; font-weight: 600; }

/* Cart & Tables */
.cart-empty-wrapper { text-align: center; }
.cart-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 2rem; }
.cart-table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
.cart-table th { padding: 1rem; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid rgba(0, 0, 0, 0.1); font-size: 0.875rem; white-space: nowrap; }
.cart-table td { padding: 1.5rem 1rem; border-bottom: 1px solid rgba(0, 0, 0, 0.05); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }

.cart-qty-control { display: inline-flex; align-items: center; overflow: hidden; }
.cart-qty-input { width: 3rem; text-align: center; border: none; background: transparent; font-family: inherit; font-size: 0.95rem; font-weight: 600; color: var(--text-main); -moz-appearance: textfield; }
.cart-qty-input::-webkit-outer-spin-button, .cart-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-qty-input:focus { outline: none; }

.cart-summary { margin-top: 2rem; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.cart-total { font-size: 1rem; font-weight: 600; }
.cart-layout { display: flex; flex-direction: column; gap: 1rem; }

/* Forms & Radio Cards */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }
.form-control { width: 100%; padding: 0.75rem 1rem; border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text-main); font-family: inherit; font-size: 1rem; transition: all 0.2s ease; }
.form-control:focus { outline: none; border-color: var(--text-main); background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05); }
.form-control::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.radio-group { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; padding: 0.25rem; }
.radio-card { position: relative; display: flex; align-items: flex-start; padding: 1rem; cursor: pointer; }
.radio-card:hover, .radio-card:has(input[type="radio"]:checked) { background: rgba(255, 255, 255, 0.4); }
.radio-card input[type="radio"] { position: absolute; opacity: 0; }
.radio-indicator { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid var(--text-muted); margin-right: 1rem; margin-top: 0.125rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.radio-indicator::after { content: ''; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--text-main); transform: scale(0); transition: transform 0.2s ease; }
.radio-card input[type="radio"]:checked ~ .radio-indicator { border-color: var(--text-main); }
.radio-card input[type="radio"]:checked ~ .radio-indicator::after { transform: scale(1); }
.radio-card input[type="radio"]:focus-visible ~ .radio-indicator { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); }
.radio-content { flex: 1; }
.radio-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; transition: color 0.2s ease; }
.radio-description { font-size: 0.875rem; margin-bottom: 0.25rem; line-height: 1.25rem; color: var(--text-muted); }
.radio-link { color: var(--text-main); font-weight: 600; }
.text-center { text-align: center; }

/* AppBar */
.app-bar {
  display: none;
  position: sticky;
  bottom: 0;
  width: 100%;
  z-index: 50;
  border-bottom: none;
  border-left: none;
  border-right: none;
}

.app-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
}

.app-bar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.25rem 0.5rem;
}

.app-bar-link:hover,
.app-bar-link:active {
  color: var(--text-main);
}

.map-card {
  padding: 0;
  overflow: hidden;
  min-height: 350px;
  display: flex;
}
.min-size-btn { min-width: 112px; min-height: 38px; }
.error-page-block { text-align: center; }
.error-message { margin: 1rem; }
.error-trace { color: var(--danger, red); }
.btn-link { display: inline-flex; align-items: center; justify-content: center; }
.mt-8 { margin-top: 2rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.cart-summary-sticky { position: sticky; top: 5rem; }
.order-items-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.order-item-row { display: flex; justify-content: space-between; font-size: 0.875rem; gap: 1rem; }
.order-item-name { color: var(--text-muted); line-height: 1.75; font-size: 0.75rem; }
.order-item-price { font-weight: 600; white-space: nowrap; }
.order-delivery-info { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.order-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.order-total-label { font-weight: 600; font-size: 1.125rem; }
.order-total-value { font-weight: 600; font-size: 1.25rem; color: var(--text-main); }
.btn-full-width { width: 100%; justify-content: center; padding: 0.875rem; }
.order-agreement { text-align: center; margin-top: 1rem; font-size: 0.75rem; color: var(--text-muted); }
.text-main-link { color: var(--text-main); }
.modal-backdrop {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-main);
    background-color: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal-body {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.modal-body p {
  margin-bottom: 1rem;
}

.modal-link {
    color: var(--text-main); font-weight: 600;
}

.btn-text {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--text-main);
}
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.requisites-block {
    max-width: 100%;
}
.map-card {
  padding: 0;
  overflow: hidden;
  min-height: 350px;
  display: flex;
}

.subsection-block {
  margin-bottom: 1.5rem;
}

.subsection-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.map-toggle-container {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.map-toggle-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-toggle-btn:hover {
  background: #f9fafb;
  color: var(--text-main);
}

.map-toggle-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
@media (min-width: 1024px) {
  .cart-layout { flex-direction: row; align-items: flex-start; }
  .cart-items-section { flex: 1; }
  .cart-summary-section { width: 380px; flex-shrink: 0; }
}
@media (max-width: 768px) {
  .product-item { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .product-action { width: 100%; justify-content: space-between; }
  .product-detail-layout { flex-direction: column; }
  .product-preview-image { width: 100%; height: auto; }
  .header {
    display: none;
  }
  .app-bar {
    display: block;
  }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contacts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes spin {
  from {
      transform: rotate(0deg);
  }
  to {
      transform: rotate(360deg);
  }
}
