/* ===== Переменные ===== */
:root {
  --purple:        #7B3FA0;
  --purple-dark:   #5C2E78;
  --purple-light:  #EDE0F5;
  --purple-ultra:  #FAF6FF;
  --dark:          #1C1C2E;
  --dark-secondary:#2A2A40;
  --text:          #2D2D2D;
  --text-muted:    #6B7280;
  --border:        #E5D5F0;
  --white:         #FFFFFF;
}

/* ===== Сброс и база ===== */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--white);
  color: var(--text);
}

a { color: var(--purple); }
a:hover { color: var(--purple-dark); }

/* ===== Топ-бар (лого + контакты) ===== */
.top-bar {
  background: var(--dark);
  padding: 10px 0;
}

.top-bar .logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.top-bar .logo-link:hover { opacity: 1; }

.top-bar .logo-img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
}

.top-bar .contact-item {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.top-bar .contact-item:hover { color: #fff; }
.top-bar .contact-item i { color: #C084FC; }
.top-bar .contact-item--whatsapp i { color: #25D366; }
.top-bar .contact-item--whatsapp:hover { color: #25D366; }

/* ===== Навбар с категориями ===== */
.main-nav {
  background: var(--purple);
  padding: 0;
}

.main-nav .navbar-toggler {
  border-color: rgba(255,255,255,0.4);
  margin: 6px 0;
}

.main-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.main-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 16px !important;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus {
  color: #fff !important;
  background: var(--purple-dark);
}

.main-nav .nav-link.active {
  color: #fff !important;
  background: var(--purple-dark);
}

/* Дропдаун подкатегорий */
.main-nav .dropdown-menu {
  background: var(--white);
  border: none;
  border-top: 3px solid var(--purple);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(123,63,160,0.15);
  min-width: 200px;
  padding: 6px 0;
}

.main-nav .dropdown-item {
  color: var(--text);
  font-size: 0.875rem;
  padding: 8px 18px;
  transition: background 0.15s;
}

.main-nav .dropdown-item:hover {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.main-nav .dropdown-toggle::after {
  vertical-align: middle;
}

/* ===== Баннер ===== */
#main-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 2400 / 900;
  min-height: 280px;
  background-image: url('../img/banner2.png');
  background-size: cover;
  background-position: 75% center;
  overflow: hidden;
}

/* Карусель занимает весь баннер — высота баннера никогда не зависит от контента */
.banner-content {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.banner-carousel {
  width: 100%;
  height: 100%;
}

.banner-carousel .carousel-inner {
  width: 100%;
  height: 100%;
}

/* Все слайды — абсолютные, заполняют весь баннер.
   Видимость управляется только opacity, не display. */
.banner-carousel .carousel-item {
  position: absolute !important;
  inset: 0;
  display: flex !important;
  align-items: center;
  padding: 110px 100px 60px 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease-in-out;
}

.banner-carousel .carousel-item.active {
  opacity: 1;
  pointer-events: auto;
}

/* Подложка под текст слева */
.banner-text-box {
  display: inline-block;
  background: rgba(28, 28, 46, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-left: 4px solid #C084FC;
  border-radius: 12px;
  padding: 36px 48px 36px 40px;
  max-width: 560px;
  min-height: 200px;
  text-align: left;
}

.slide-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  margin-bottom: 12px;
  line-height: 1.15;
}

.slide-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  color: #ffffff !important;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  margin-bottom: 28px;
}

.banner-carousel .btn-banner {
  background: #C084FC;
  color: #fff;
  font-weight: 600;
  padding: 12px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
  display: inline-block;
}

.banner-carousel .btn-banner:hover {
  background: var(--purple);
  transform: translateY(-2px);
}

/* Стрелки карусели */
.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
  width: 44px;
  height: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  opacity: 0.8;
}

.banner-carousel .carousel-control-prev { left: 16px; }
.banner-carousel .carousel-control-next { right: 16px; }

.banner-carousel .carousel-control-prev:hover,
.banner-carousel .carousel-control-next:hover {
  background: rgba(255,255,255,0.35);
  opacity: 1;
}

/* Индикаторы */
.banner-indicators {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 2;
}

.banner-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.banner-indicators [data-bs-target].active {
  background: #fff;
}

/* ===== УТП-полоса ===== */
.utp-bar {
  background: var(--purple-ultra);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.utp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-right: 1px solid var(--border);
}

.utp-item:last-child { border-right: none; }

.utp-item i {
  font-size: 2rem;
  color: var(--purple);
  flex-shrink: 0;
}

.utp-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.utp-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 767.98px) {
  .utp-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
  }
  .utp-item:last-child { border-bottom: none; }
  .utp-item i { font-size: 1.5rem; }
}

/* ===== Разделы страницы ===== */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 28px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
}

/* ===== Карточка товара ===== */
.product-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  background: var(--white);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 8px 28px rgba(123,63,160,0.18);
  transform: translateY(-4px);
  color: var(--text);
}

.product-card .card-img-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--purple-ultra);
  height: 220px;
}

.product-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s;
}

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

.product-card .card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  font-size: 3rem;
}

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

.product-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  flex: 1;
}

.product-card .card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0;
}

/* ===== Карточка категории ===== */
.category-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: block;
  height: 100%;
}

.category-card:hover {
  border-color: var(--purple);
  background: var(--purple-ultra);
  color: var(--purple-dark);
  transform: translateY(-3px);
}

.category-card .cat-icon {
  font-size: 2.5rem;
  color: var(--purple);
  margin-bottom: 10px;
}

.category-card .cat-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.category-card .cat-children {
  font-size: 0.8rem;
  color: var(--text-muted);
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-card .cat-children li::before {
  content: '›';
  margin-right: 4px;
  color: var(--purple);
}

/* ===== Страница категории — фильтры ===== */
.subcategory-filter .btn-cat {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--white);
  border-radius: 50px;
  font-size: 0.875rem;
  padding: 6px 18px;
  transition: all 0.2s;
}

.subcategory-filter .btn-cat:hover,
.subcategory-filter .btn-cat.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* ===== Страница товара ===== */
.product-gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
  border-color: var(--purple);
}

.product-main-img {
  border-radius: 12px;
  width: 100%;
  height: 420px;
  object-fit: contain;
  background: var(--purple-ultra);
  cursor: zoom-in;
}

/* ===== Лайтбокс ===== */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
#lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}
#lightbox-close:hover { opacity: 1; }

.product-price-tag {
  font-size: 2rem;
  font-weight: 700;
  color: var(--purple);
}

/* ===== Форма обратной связи ===== */
.feedback-form .form-control,
.feedback-form .form-select {
  border-color: var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

.feedback-form .form-control:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123,63,160,0.12);
}

.btn-purple {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.btn-purple:hover {
  background: var(--purple-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== Футер ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  margin-top: 64px;
}

.site-footer .footer-main {
  padding: 48px 0 32px;
}

.site-footer .footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer .footer-brand i { color: #C084FC; }

.site-footer .footer-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.site-footer h6 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(192,132,252,0.3);
}

.site-footer .footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.site-footer .footer-contact-item i {
  color: #C084FC;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.site-footer .footer-contact-item:hover { color: #fff; }

.site-footer .footer-nav-link {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 4px 0;
  transition: color 0.2s, padding-left 0.2s;
}

.site-footer .footer-nav-link::before {
  content: '›';
  margin-right: 6px;
  color: #C084FC;
}

.site-footer .footer-nav-link:hover {
  color: #fff;
  padding-left: 4px;
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

/* ===== Корзина ===== */
.btn-buy-now {
  background: var(--white);
  color: var(--purple);
  border: 2px solid var(--purple);
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-buy-now:hover {
  background: var(--purple-light);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: 2px solid #25D366;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-whatsapp:hover {
  background: #1EBE5D;
  border-color: #1EBE5D;
  color: #fff;
}

.cart-toast {
  margin-top: 14px;
  padding: 10px 16px;
  background: #D1FAE5;
  color: #065F46;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.cart-toast a { color: #065F46; font-weight: 700; }

/* Бейдж корзины в навбаре */
.cart-nav-link { position: relative; }

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #C084FC;
  color: #fff;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  margin-left: 2px;
}

/* Список товаров в корзине */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--purple-ultra);
  flex-shrink: 0;
}

.cart-item-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--purple-light);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-name:hover { color: var(--purple); }

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

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  background: var(--white);
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover { background: var(--purple-ultra); }

.qty-value {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 32px;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.cart-remove-btn:hover {
  color: #DC2626;
  background: #FEE2E2;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 2px solid var(--border);
  font-size: 1.1rem;
  font-weight: 600;
}

.cart-total-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple);
}

/* Форма оформления */
.checkout-box {
  background: var(--purple-ultra);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  position: sticky;
  top: 20px;
}

/* Дисклеймер доставки */
.delivery-disclaimer {
  display: flex;
  gap: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #1E40AF;
  line-height: 1.6;
}

.delivery-disclaimer i {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== Страница политики ===== */
.privacy-doc h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple-dark);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.privacy-doc p, .privacy-doc li {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.75;
}

.privacy-doc ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb-item a {
  color: var(--purple);
  text-decoration: none;
}

.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ===== Алерты ===== */
.alert-success {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}

/* ===== Мобильная адаптация ===== */
@media (max-width: 991.98px) {
  .main-nav .navbar-collapse {
    background: var(--purple-dark);
    padding: 8px 0;
    border-radius: 0 0 8px 8px;
  }

  .main-nav .nav-link { padding: 10px 20px !important; }

  .main-nav .dropdown-menu {
    background: rgba(0,0,0,0.15);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .main-nav .dropdown-item {
    color: rgba(255,255,255,0.85);
    padding: 8px 32px;
  }

  .main-nav .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
  }
}

@media (max-width: 767.98px) {
  .top-bar { padding: 14px 0; }
  .top-bar .container {
    flex-direction: column;
    align-items: center !important;
    gap: 14px !important;
  }
  .top-bar .logo-link { justify-content: center; }
  .top-bar .container > .d-flex {
    flex-direction: column;
    align-items: center;
    gap: 10px !important;
    width: 100%;
  }
  .top-bar .contact-item {
    font-size: 0.95rem;
    justify-content: center;
    width: 100%;
  }
  .top-bar .contact-item-text { white-space: normal; }

  #main-banner { aspect-ratio: unset; min-height: 320px; }

  .banner-content {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .banner-carousel .carousel-item {
    padding: 24px 12px;
    align-items: stretch;
  }

  .banner-text-box {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: 20px 18px;
    border-radius: 8px;
    border-left-width: 4px;
  }

  .slide-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 8px;
  }

  .slide-subtitle {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    margin-bottom: 18px;
  }

  .banner-carousel .btn-banner {
    padding: 10px 24px;
    font-size: 0.95rem;
  }

  .banner-carousel .carousel-control-prev,
  .banner-carousel .carousel-control-next {
    width: 36px;
    height: 36px;
  }

  .banner-carousel .carousel-control-prev { left: 6px; }
  .banner-carousel .carousel-control-next { right: 6px; }

  .site-footer .footer-main { padding: 32px 0 20px; }
  .site-footer h6 { margin-top: 24px; }
}

/* ===== Cookie-баннер ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.92);
  padding: 14px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1 1 320px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-banner__text a {
  color: #E5D5F0;
  text-decoration: underline;
}

.cookie-banner__text a:hover {
  color: var(--white);
}

.cookie-banner__btn {
  background: var(--purple);
  color: var(--white);
  border: none;
  padding: 8px 22px;
  font-weight: 500;
  border-radius: 6px;
  flex-shrink: 0;
}

.cookie-banner__btn:hover {
  background: var(--purple-dark);
  color: var(--white);
}

@media (max-width: 576px) {
  .cookie-banner { padding: 12px 0; }
  .cookie-banner__inner { gap: 10px; }
  .cookie-banner__text { font-size: 0.85rem; flex-basis: 100%; }
  .cookie-banner__btn { width: 100%; }
}
