/* ==========================================================================
   Основные переменные (цвета, тени и т.д.)
   ========================================================================== */
:root {
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --light-accent: #eff6ff;
  --dark: #0d1b2a;
  --gray: #6b7280;
  --danger: #ef4444;
  --warning: #fbbf24;
  --light: #f8fafc;
  --border: #e5e7eb;
  --shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
  --shadow-md: 0 12px 32px rgba(59,130,246,0.18);
}

/* ==========================================================================
   Подключение Franco Bold Italic — только для заголовков
   ========================================================================== */
@font-face {
  font-family: 'Franco';
  src: url('<?= Yii::$app->view->theme->baseUrl ?>/fonts/Franco-BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

/* Основной текст — обычный шрифт */
body,
input,
select,
textarea,
p,
li,
div,
span,
a:not(.nav-link):not(.btn),
small,
.label,
.badge,
.price span:not(.sale-badge) {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.65;
}

/* Заголовки, меню, кнопки — Franco Bold Italic */
h1, h2, h3, h4, h5, h6,
.display-4,
.banner h2,
.section-padding h2,
.product-card h6,
.category-grid p,
.main-nav a,
.btn,
.price,
.lead,
.hero h1,
.about-hero h1,
.footer-col h4 {
  font-family: 'Franco', sans-serif !important;
  font-weight: bold !important;
  font-style: italic !important;
  letter-spacing: -0.4px;
}

/* Цены — жирные, тёмные, без italic */
.price {
  font-weight: 700;
  font-style: normal;
  color: #111827;
}

/* ==========================================================================
   Базовые стили
   ========================================================================== */
body {
  background: #ffffff;
  color: #111827;
  margin: 0;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
}

.container {
  max-width: 1400px;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 1920px) {
  .container { max-width: 1600px; }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background: #ffffff;
  color: #111827;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  width: 100%;
}

.logo {
  flex: 0 0 auto;
  height: 64px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-img {
  max-height: 100%;
  width: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.logo-img.loaded {
  opacity: 1;
}

@media (max-width: 576px) {
  .logo {
    height: 52px;
    min-width: 100px;
  }
}

.desktop-search-wrap {
  position: relative;
}
.search-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #111827;
  cursor: pointer;
  padding: 0.6rem;
  transition: color 0.2s;
}
.search-toggle:hover {
  color: var(--accent);
}
.desktop-search {
  position: absolute;
  top: 100%;
  right: 0;
  width: 340px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.7rem;
  display: none;
  z-index: 100;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.22s ease;
}
.desktop-search.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.desktop-search input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px 0 0 6px;
  font-size: 1rem;
}
.desktop-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 1.2rem;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background 0.2s;
}
.desktop-search button:hover {
  background: var(--accent-dark);
}

.mobile-controls {
  display: none;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
}
.mobile-search-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #111827;
  cursor: pointer;
  padding: 0.6rem;
}
.mobile-search-toggle:hover {
  color: var(--accent);
}
.burger-menu {
  width: 32px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}
.burger-menu span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #111827;
  border-radius: 2px;
  transition: all 0.35s ease;
}
.burger-menu span:nth-child(1) { top: 0; }
.burger-menu span:nth-child(2) { top: 11px; }
.burger-menu span:nth-child(3) { top: 22px; }
.burger-menu.active span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

.main-nav {
  display: flex;
  justify-content: center;
  flex: 1;
}
.main-nav ul.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  color: #111827;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
}

.header-actions {
  flex-shrink: 0;
}
.header-actions .cart-link {
  color: #111827;
  font-size: 1.5rem;
  position: relative;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-search-panel {
  position: fixed;
  inset: 0;
  z-index: 1050;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-search-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
  opacity: 0;
}
.mobile-search-panel.active .mobile-search-backdrop {
  opacity: 1;
}
.mobile-search-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  background: white;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.22);
  transform: translateY(-120%);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mobile-search-panel.active .mobile-search-container {
  transform: translateY(0);
}
.mobile-search-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.mobile-search-close {
  background: none;
  border: none;
  font-size: 2.4rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 50%;
  transition: all 0.2s;
}
.mobile-search-close:hover {
  color: #ef4444;
  background: #fee2e2;
}
.mobile-search-form {
  display: flex;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.mobile-search-form input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: #111827;
}
.mobile-search-form input::placeholder {
  color: #9ca3af;
}
.mobile-search-form button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 18px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.mobile-search-form button:hover {
  background: var(--accent-dark);
}

@media (max-width: 480px) {
  .mobile-search-container {
    padding: 12px 12px 24px;
  }
  .mobile-search-form input {
    padding: 12px 14px;
    font-size: 1rem;
  }
  .mobile-search-form button {
    padding: 0 14px;
  }
}

/* ==========================================================================
   HEADER — мобильная адаптация
   ========================================================================== */
@media (max-width: 991px) {
  .desktop-search-wrap,
  .desktop-cart {
    display: none !important;
  }
  .mobile-controls {
    display: flex !important;
  }
  .main-nav {
    position: fixed;
    inset: 0;
    background: white;
    transform: translateY(-100%);
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 1040;
    padding: 68px 16px 80px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.active {
    transform: translateY(0);
  }
  .main-nav ul.nav-list {
    display: flex;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    margin: 0;
    padding: 0;
    width: 100%;
  }
  .main-nav li {
    width: 100%;
  }
  .main-nav a {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-size: 1.08rem;
    font-weight: 500;
    color: #1f2937;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
  }
  .main-nav a:hover,
  .main-nav a.active {
    color: var(--accent);
    background: #f8fafc;
  }
  .mobile-menu-close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 2.6rem;
    color: #374151;
    background: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
  }
  .mobile-menu-close:hover {
    color: var(--danger);
  }
}

@media (min-width: 992px) {
  .mobile-controls,
  .mobile-menu-close,
  .mobile-search-panel {
    display: none !important;
  }
  .desktop-search-wrap,
  .desktop-cart {
    display: flex;
  }
  .main-nav {
    position: static;
    transform: none !important;
    height: auto;
    background: transparent;
    padding: 0;
    overflow: visible;
  }
  .main-nav ul.nav-list {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 1.6rem;
  }
  .main-nav a {
    font-size: 0.98rem;
    padding: 0.4rem 0;
    border-bottom: none;
    width: auto;
  }
}

@media (max-width: 480px) {
  .mobile-controls { gap: 0.8rem; }
  .logo-img { max-height: 52px; }
  .main-nav { padding: 60px 14px 60px; }
  .mobile-menu-close { top: 12px; right: 12px; font-size: 2.4rem; width: 40px; height: 40px; }
}

/* ==========================================================================
   FOOTER — современный, полностью адаптивный
   ========================================================================== */
.site-footer {
  background: #0f1117;
  color: #d1d5db;
  padding: 4.5rem 0 2.5rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col h4 {
  color: white;
  font-size: 1.28rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
  letter-spacing: 0.4px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.95rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.footer-col a {
  color: #9ca3af;
  transition: color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* Поиск в футере */
.footer-search-form {
  display: flex;
  margin-top: 1.2rem;
  max-width: 100%;
}

.footer-search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1.4rem;
  background: #1f2937;
  border: none;
  border-radius: 8px 0 0 8px;
  color: white;
  font-size: 0.98rem;
}

.footer-search-form input::placeholder {
  color: #6b7280;
}

.footer-search-form button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 1.6rem;
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.22s ease;
}

.footer-search-form button:hover {
  background: var(--accent-dark);
}

/* Соцсети / иконки (если будут) */
.footer-social {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.footer-social a {
  color: #9ca3af;
  font-size: 1.4rem;
  transition: all 0.25s ease;
}

.footer-social a:hover {
  color: white;
  transform: translateY(-3px);
}

/* Нижняя часть */
.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid #1f2937;
  background: #000;
  color: #6b7280;
  font-size: 0.94rem;
  text-align: center;
  line-height: 1.7;
}

.footer-bottom p {
  margin: 0.5rem 0;
}

.footer-bottom a {
  color: #60a5fa;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* ────────────────────────────────────────────────
   МОБИЛЬНАЯ ВЕРСИЯ ФУТЕРА
   ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .site-footer {
    padding: 3.5rem 0 2.2rem;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2.8rem;
    text-align: center;
  }

  .footer-col {
    align-items: center;
  }

  .footer-col h4 {
    margin-bottom: 1.4rem;
  }

  .footer-search-form {
    max-width: 420px;
    margin: 1.5rem auto 0;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .site-footer {
    padding: 3rem 0 2rem;
  }

  .footer-columns {
    gap: 2.4rem;
  }

  .footer-col h4 {
    font-size: 1.18rem;
  }

  .footer-search-form input {
    padding: 0.9rem 1.2rem;
    font-size: 0.96rem;
  }

  .footer-search-form button {
    padding: 0 1.3rem;
  }

  .footer-bottom {
    margin-top: 2.8rem;
    padding-top: 1.6rem;
    font-size: 0.9rem;
  }
}

/* ────────────────────────────────────────────────
   Медиа-запросы — мобильная версия футера
   ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .site-footer {
    padding: 3rem 0 2rem;               /* меньше отступов на мобильных */
  }

  .footer-columns {
    grid-template-columns: 1fr;         /* всегда одна колонка */
    gap: 2rem;
    text-align: center;                 /* центрируем текст и элементы */
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-col h4 {
    margin-bottom: 1.2rem;
  }

  .footer-col ul {
    padding: 0;
  }

  .footer-col li {
    margin-bottom: 0.8rem;
  }

  .footer-search {
    max-width: 100%;
    margin: 0 auto;
  }

  .footer-bottom {
    margin-top: 2.5rem;
    padding: 1.5rem 0 1.3rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 2.5rem 0 1.8rem;
  }

  .footer-columns {
    gap: 1.8rem;
  }

  .footer-search input,
  .footer-search button {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .footer-bottom {
    font-size: 0.86rem;
  }
}

/* ==========================================================================
   Главная страница
   ========================================================================== */
.section-padding {
  padding: 5.5rem 0;
}
.section-padding.bg-light {
  background: #f8fafc;
}
.display-4, h1, h2 {
  font-weight: 700;
  letter-spacing: -0.6px;
  color: #111827;
}
.display-4 {
  font-size: 3.9rem;
  line-height: 1.08;
  margin-bottom: 1.4rem;
}
h2 {
  font-size: 2.3rem;
  margin-bottom: 1.8rem;
}
.lead {
  font-size: 1.28rem;
  line-height: 1.65;
  color: #4b5563;
  font-weight: 400;
}

/* Баннеры */
.banner {
  position: relative;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.35s ease;
}
.banner:hover {
  transform: scale(1.018);
  box-shadow: 0 24px 48px rgba(0,0,0,0.16);
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 3px 10px rgba(0,0,0,0.8);
}
.banner h2 {
  font-size: 3.4rem;
  font-weight: 800;
  text-shadow: 0 4px 14px rgba(0,0,0,0.7);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff !important;
}

/* Две колонки */
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.8rem;
  font-size: 1.1rem;
  line-height: 1.75;
  color: #374151;
}
@media (max-width: 768px) {
  .two-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Карточки категорий */
.category-grid a {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
  height: 100%;
}
.category-grid a:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 48px rgba(59,130,246,0.2);
}
.category-grid .img-container {
  height: 240px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  overflow: hidden;
  flex-shrink: 0;
}
.category-grid img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s ease;
}
.category-grid a:hover img {
  transform: scale(1.06);
}
.category-grid p {
  padding: 1.3rem 1.2rem;
  margin: 0;
  font-weight: 600;
  font-size: 1.15rem;
  text-align: center;
  color: #1f2937;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Карточки товаров */
.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 24px 52px rgba(59,130,246,0.18);
}
.product-card .img-container {
  height: 260px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  overflow: hidden;
}
.product-card img.img-fluid {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease;
}
.product-card:hover img {
  transform: scale(1.04);
}
.product-card .price {
  font-size: 1.48rem;
  font-weight: 700;
  color: #111827;
  margin: 0.8rem 0 1.2rem;
  padding: 0 1.2rem;
}
.product-card .old-price {
  color: #6b7280;
  font-size: 1.05rem;
  text-decoration: line-through;
  margin-left: 0.8rem;
}
.sale-badge {
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  top: 14px;
  left: 14px;
  border-radius: 8px;
  background: #ef4444;
  color: white;
  font-weight: 600;
}

/* Видео */
.video-embed {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.14);
}

/* Полноэкранный баннер */
.full-image-link {
  height: 440px;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  margin: 3.5rem 0;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  transition: all 0.4s ease;
}
.full-image-link:hover {
  transform: scale(1.01);
}

/* Адаптив */
@media (max-width: 992px) {
  .display-4 { font-size: 3.4rem; }
  h2 { font-size: 2.1rem; }
  .section-padding { padding: 4.5rem 0; }
}
@media (max-width: 768px) {
  .display-4 { font-size: 2.9rem; }
  h2 { font-size: 1.9rem; }
  .banner { height: 320px; }
  .banner h2 { font-size: 2.8rem; }
  .full-image-link { height: 340px; }
}

/* ==========================================================================
   Дополнительные классы
   ========================================================================== */
.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}
.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
}
.text-center {
  text-align: center;
}
.row.g-4 {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}