:root {
  --av-blue: #1671e2;
  --av-blue-2: #2c8bf0;
  --av-blue-3: #e8f1ff;
  --radius-xl: 18px;
  --shadow: 0 .5rem 1.25rem rgba(22, 113, 226, .12);
}

body {
  background: #f8fafc;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #1e293b;
  margin: 0;
}

/* =========================================
   Утилиты и Базовые Элементы
   ========================================= */
.pill { border-radius: 999px !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

.page-title {
  background: linear-gradient(180deg, var(--av-blue), var(--av-blue-2));
  color: #fff;
  padding: 2rem 0;
}

.page-title.promotions {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.card-like {
  background: #fff;
  border: 1px solid #edf2ff;
  border-radius: var(--radius-xl);
  box-shadow: 0 .25rem .75rem rgba(22,113,226,.10);
  padding: 2rem;
}

/* =========================================
   Шапка (Header)
   ========================================= */
.navglass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  border: 1px solid rgba(255,255,255,0.8);
  transition: border-radius 0.3s ease;
}

@media (max-width: 991.98px) {
  .navglass.menu-opened {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
  }
  .navbar-collapse {
    padding-top: 1rem;
  }
  .navbar-nav {
    align-items: flex-start !important;
    width: 100%;
  }
  .navbar-nav .nav-item {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  .navbar-nav .nav-link {
    padding: 0.5rem 0.5rem !important;
  }
  .navbar-nav .btn {
    width: 100%;
    text-align: left;
    margin-top: 0.5rem;
  }
  .navbar-nav .dropdown-menu {
    border: none;
    background: transparent;
    padding-left: 1rem;
    box-shadow: none;
  }
}

/* =========================================
   Главная страница (index.php)
   ========================================= */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(22, 113, 226, 0.08), transparent 40%), linear-gradient(180deg, #ffffff, #f0f4f8);
  padding: 6rem 0 5rem;
}
.hero-title {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: #64748b;
}
.search-box {
  background: #fff;
  padding: 8px;
  border-radius: 100px;
  box-shadow: 0 10px 25px rgba(22, 113, 226, 0.15);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
.search-box:focus-within {
  border-color: rgba(22, 113, 226, 0.4);
  box-shadow: 0 10px 30px rgba(22, 113, 226, 0.25);
}
.search-box input {
  border: none;
  box-shadow: none;
  padding: 15px 25px;
  font-size: 1.1rem;
  border-radius: 100px;
  flex: 1;
}
.search-box input:focus {
  outline: none;
  box-shadow: none;
}
.search-box button {
  border-radius: 100px;
  padding: 12px 30px;
  font-weight: 600;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(22, 113, 226, 0.1);
  border-color: rgba(22, 113, 226, 0.3);
}
.feature-card .icon-wrapper {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: var(--av-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.brand-pill {
  border: 1px solid #e2e8f0;
  border-radius: 50rem;
  padding: .75rem 1.5rem;
  background: #fff;
  color: #64748b;
  font-weight: 600;
  display: inline-block;
  width: 100%;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
}
.brand-pill:hover {
  border-color: var(--av-blue);
  color: var(--av-blue);
}

/* =========================================
   Каталог (catalog.php) & Товары
   ========================================= */
.sidebar {
  background: #fff;
  border: 1px solid #edf2ff;
  border-radius: var(--radius-xl);
  box-shadow: 0 .25rem .75rem rgba(22, 113, 226, .10);
}

.product-card {
  background: #fff;
  border: 1px solid #edf2ff;
  border-radius: var(--radius-xl);
  transition: .2s;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.product-card .card-body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem;
  flex-grow: 1;
}

.pill-badge {
  background: var(--av-blue-3);
  color: var(--av-blue);
  font-weight: 600;
  font-size: .75rem;
  border-radius: 999px;
  padding: .2rem .6rem;
}

.filters-title { font-weight: 600; margin-bottom: 6px; }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.muted { color: #6c757d; font-size: .92rem; }
:focus-visible { outline: none; box-shadow: 0 0 0 .25rem rgba(22, 113, 226, .35); }

.mode-banner {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #856404;
  border-radius: 12px;
  padding: .5rem .75rem;
  font-size: .9rem;
}

.card-thumb-wrap, .product-img-wrap {
  width: 100%;
  height: 160px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #edf2ff;
}
.product-img-wrap { height: 200px; background: #fff; padding: 1.5rem; }
.card-thumb-wrap img, .product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity .3s ease;
}
.card-thumb-wrap .thumb-placeholder { color: #cbd5e1; font-size: 3rem; }

.product-title {
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price { font-size: 1.35rem; font-weight: 700; color: var(--av-blue); margin-top: auto; }

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--av-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Карточка одиночного товара (product.php) */
.product-page-thumb {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

/* =========================================
   Контакты (contacts.php)
   ========================================= */
.office-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.office-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  border-color: #cbd5e1;
}
.office-card .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.contact-item i { color: #64748b; margin-top: 3px; }
.contact-item .content { flex: 1; }
.contact-item a { color: #2563eb; text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* =========================================
   Акции (promotions.php)
   ========================================= */
.campaign-card {
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all .25s ease;
  height: 100%;
}
.campaign-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(220,38,38,.12);
  border-color: #fca5a5;
}
.campaign-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}
.campaign-card .cnt {
  display: inline-block;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 700;
  font-size: .85rem;
  padding: 3px 12px;
  border-radius: 999px;
}

.promo-card {
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all .25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(220,38,38,.12);
}
.promo-thumb {
  width: 100%;
  height: 180px;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.promo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.promo-thumb .placeholder-icon { color: #fca5a5; font-size: 3rem; }
.promo-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: 4px 14px;
  border-radius: 999px;
}
.promo-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.price-old { text-decoration: line-through; color: #94a3b8; font-size: .95rem; }
.price-new { color: #dc2626; font-weight: 800; font-size: 1.4rem; }
.timer {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: .5rem .75rem;
  font-size: .85rem;
  color: #991b1b;
  font-weight: 600;
  text-align: center;
}
.timer-global {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  padding: .4rem 1rem;
  font-size: .9rem;
  color: #fff;
  font-weight: 600;
  display: inline-block;
}
.empty-state { text-align: center; padding: 5rem 1rem; }
.empty-state i { font-size: 4rem; color: #cbd5e1; }

/* =========================================
   Детали заказа (order_details.php)
   ========================================= */
.card-glass {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(22,113,226,.08);
  border: 1px solid #e8edf5;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.order-header {
  background: linear-gradient(135deg, #1671e2 0%, #2c8bf0 100%);
  border-radius: 18px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.total-row { background: #f8fafc; font-weight: 700; }

/* =========================================
   Авторизация (login.php / register.php)
   ========================================= */
.auth-body { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  min-height: 100vh; 
}
.login-card { 
  background: #fff; 
  padding: 2.5rem; 
  border-radius: 18px; 
  box-shadow: 0 .5rem 1.25rem rgba(22,113,226,.12); 
  width: 100%; 
  max-width: 450px; 
}
.form-control-auth { border-radius: 999px; padding: 0.75rem 1.25rem; }
.btn-auth { border-radius: 999px; padding: 0.75rem 1.25rem; background: linear-gradient(135deg,#1671e2,#2c8bf0); border: none; font-weight: 600; color: white; width: 100%; }
.btn-auth:hover { color: white; opacity: 0.9; }
.logo-circle { width: 48px; height: 48px; background: linear-gradient(135deg,#1671e2,#8ec5ff); border-radius: 50%; display: inline-block; margin-bottom: 1rem; }

/* =========================================
   Профиль (profile.php)
   ========================================= */
.profile-card {
  background: #fff; border-radius: 18px; box-shadow: 0 .2rem .8rem rgba(0,0,0,.04); border: 1px solid #f1f5f9; padding: 1.5rem;
}

