/* ============================================
   TimPlus - Современные стили для MODX 3.2.1
   ============================================ */

:root {
  --primary: #3b4a6b;
  --secondary: #f0d43a;
  --accent: #e6c511;
  --dark: #1e2a3a;
  --light: #f8f9fa;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --white: #ffffff;
  --black: #000000;
  --gray: #6c757d;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #333;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ========== HEADER ========== */
.header_section {
  padding: 5px 0;
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand span {
  font-weight: bold;
  color: var(--primary);
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  color: var(--black) !important;
  font-weight: 500;
  padding: 8px 20px !important;
  transition: all 0.3s;
  border-radius: 5px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
  color: var(--white) !important;
  background: var(--primary);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s;
}

.phone-link:hover {
  color: var(--success);
  transform: scale(1.05);
}

.phone-link i {
  color: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ========== HERO SECTION ========== */
.hero-slider {
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-slider .carousel-item {
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.hero-title {
  font-size: 48px;
  font-weight: bold;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 20px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

.hero-features {
  display: flex;
  gap: 20px;
  color: var(--secondary);
  animation: fadeInUp 1s ease 0.6s;
  animation-fill-mode: both;
}

.hero-features span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== SECTIONS ========== */
.section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

/* ========== CATEGORY CARD ========== */
.category-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.category-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Контейнер изображения - фиксированная высота, flex по центру */
.cat-img-wrap {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  padding: 20px;
}

/* Само изображение - НЕ растягиваем, сохраняем пропорции */
.cat-img-wrap img {
  max-width: 100%;
  max-height: 160px;
  width: auto;
  height: auto;
  display: block;
  transition: transform 0.5s;
}

.category-card:hover .cat-img-wrap img {
  transform: scale(1.1);
}

/* ========== PRODUCT CARD ========== */
.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.product-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card-img {
  background: #f8f9fa;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
}

.product-card-img img {
  max-width: 100%;
  max-height: 172px;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img img {
  transform: scale(1.06);
}

.product-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 22px;
  font-weight: 700;
  color: #e63946;
  margin-bottom: 4px;
}

.product-card-installment {
  font-size: 13px;
  color: #666;
  background: #f8f9fa;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: inline-block;
  align-self: flex-start;
}

.product-card-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: linear-gradient(135deg, #f0d43a, #e6c511);
  color: #222;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  margin-top: auto;
  transition: all 0.3s;
}

.product-card:hover .product-card-btn {
  background: linear-gradient(135deg, #3b4a6b, #1e2a3a);
  color: #fff;
}

/* ========== BUTTONS ========== */
.btn-installment {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: var(--dark);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-installment:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(240, 212, 58, 0.4);
  color: var(--dark);
}

.btn-installment::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-installment:hover::before {
  left: 100%;
}

.btn-subscribe {
  display: inline-block;
  padding: 10px 30px;
  background: var(--secondary);
  color: var(--dark);
  border: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-subscribe:hover {
  background: var(--accent);
  color: var(--dark);
  transform: translateY(-2px);
}

/* ========== ADVANTAGES ========== */
.advantage-card {
  background: var(--white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  height: 100%;
}

.advantage-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.advantage-card i {
  color: var(--secondary);
}

/* ========== CONSULTATION ========== */
.consultation-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
}

.consultation-form {
  background: var(--white);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ========== REVIEWS ========== */
.review-card {
  background: var(--white);
  border-radius: 15px;
  padding: 30px;
  margin: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.stars {
  color: var(--warning);
  font-size: 20px;
}

/* ========== FOOTER ========== */
.footer_section {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 0;
}

.footer_section h4 {
  color: var(--secondary);
  margin-bottom: 20px;
  font-weight: bold;
  font-size: 20px;
}

.contact_link_box a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.3s;
  padding: 5px 0;
}

.contact_link_box a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.contact_link_box a i {
  width: 20px;
  text-align: center;
  color: var(--secondary);
}

.footer_social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer_social a {
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 20px;
}

.footer_social a:hover {
  background: var(--secondary);
  color: var(--dark);
  transform: translateY(-5px);
}

.footer_form input {
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  padding: 12px;
  border-radius: 5px;
}

.footer_form input::placeholder {
  color: rgba(255,255,255,0.6);
}

.footer_form input:focus {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  outline: none;
  border-color: var(--secondary);
}

.footer-info {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  margin-top: 40px;
}

.footer-info a {
  color: var(--secondary);
  text-decoration: none;
}

.footer-info a:hover {
  text-decoration: underline;
}

/* ========== ПЛАВАЮЩИЕ КНОПКИ ========== */
.floating-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.floating-buttons a {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.floating-buttons a:hover {
  transform: scale(1.1);
}

.viber-btn {
  background: #7360F2 !important;
}

.telegram-btn {
  background: #0088cc !important;
}

.phone-btn {
  background: #28a745 !important;
  animation: pulse 2s infinite;
}

/* Кнопка наверх */
.scroll-to-top {
  width: 55px !important;
  height: 55px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 24px !important;
  text-decoration: none !important;
  transition: all 0.3s !important;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3) !important;
  border: none !important;
  cursor: pointer !important;
  background: #3b4a6b !important;
  order: -1 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.scroll-to-top.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.scroll-to-top:hover {
  background: #f0d43a !important;
  color: #000 !important;
}

/* ========== PRODUCT DETAIL ========== */
.product-detail {
  background: #f8f9fa;
}

.product-name {
  font-size: 32px;
  font-weight: bold;
  color: var(--dark);
}

.product-gallery img {
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-price-block {
  background: var(--white);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.product-price-block .current-price {
  font-size: 36px;
}

/* ========== BREADCRUMBS ========== */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 30px;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--gray);
}

/* ========== FORM VALIDATION ========== */
.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.2rem rgba(240, 212, 58, 0.25);
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 40px;
  }
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .section-title {
    font-size: 30px;
  }
  
  .user-actions {
    margin-top: 15px;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    min-height: auto;
  }
  
  .hero-slider .carousel-item {
    min-height: auto;
    padding: 40px 0;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-features {
    flex-direction: column;
    gap: 10px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .product-name {
    font-size: 24px;
  }
  
  .floating-buttons {
    bottom: 20px;
    right: 20px;
    gap: 10px;
  }
  
  .floating-buttons a {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 24px;
  }
  
  .section-title {
    font-size: 22px;
  }
  
  .navbar-brand span {
    font-size: 22px;
  }
  
  .product-price-block .current-price {
    font-size: 28px;
  }
}
/* ========== ПОИСК В ШАПКЕ ========== */
.header-search {
  margin-right: 15px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 220px;
  padding: 10px 45px 10px 20px;
  border: 2px solid transparent;
  border-radius: 30px;
  background: #f5f5f5;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  width: 280px;
  background: #fff;
  border-color: #f0d43a;
  box-shadow: 0 0 0 3px rgba(240, 212, 58, 0.15);
}

.search-input::placeholder {
  color: #999;
  font-size: 13px;
}

.search-btn {
  position: absolute;
  right: 3px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0d43a;
  border: none;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #3b4a6b;
  color: #fff;
  transform: scale(1.05);
}
/* ========== СТРАНИЦА ТОВАРА ========== */
.product-page {
  background: #f8f9fa;
}

.product-main {
  transition: all 0.3s ease;
}

.gallery-main {
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-block {
  border: 2px solid #f0d43a;
}

.characteristics table {
  width: 100%;
}

.characteristics td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.characteristics td:first-child {
  color: #666;
  width: 40%;
}

.characteristics td:last-child {
  font-weight: 500;
}

.trust-badges small {
  font-size: 13px;
  color: #666;
}

/* Анимация для формы */
#installmentForm .form-control:focus,
#installmentForm .form-select:focus {
  border-color: #f0d43a;
  box-shadow: 0 0 0 3px rgba(240, 212, 58, 0.15);
}
/* ========== ГАЛЕРЕЯ ТОВАРА ========== */
.gallery-main {
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8f9fa;
}

.gallery-main img {
  max-height: 400px;
  object-fit: contain;
  transition: transform 0.1s ease;
}

/* Миниатюры */
.gallery-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb-item {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ddd;
  transition: all 0.2s ease;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

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

.thumb-item.active {
  border-color: #f0d43a;
  box-shadow: 0 0 0 2px rgba(240, 212, 58, 0.3);
}

.thumb-item:hover {
  border-color: #f0d43a;
}

/* ========== СТРАНИЦА ТОВАРА ========== */
.product-page {
  background: #f8f9fa;
}

.price-block {
  border: 2px solid #f0d43a;
}

.characteristics table {
  width: 100%;
}

.characteristics td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.characteristics td:first-child {
  color: #666;
  width: 40%;
}

.characteristics td:last-child {
  font-weight: 500;
}

.trust-badges small {
  font-size: 13px;
  color: #666;
}