/* ===== Базовые стили ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --secondary: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #dc2626;
  --dark: #1e293b;
  --gray: #64748b;
  --light: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-lg: 20px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn--secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn--large {
  padding: 16px 32px;
  font-size: 17px;
}

.btn--full {
  width: 100%;
}

.btn--small {
  padding: 8px 16px;
  font-size: 13px;
}

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  color: var(--dark);
}

.header .logo {
  color: #0a0a0a;
}

.favorites-btn {
  background: transparent !important;
  box-shadow: none !important;
}

.favorites-btn:hover {
  transform: scale(1.1);
}

.favorites-btn .cart-btn__count {
  background: var(--danger);
  color: white;
}

.logo__icon {
  font-size: 28px;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav__link {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav__link:hover {
  color: var(--primary);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.cart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.cart-btn__count {
  background: var(--white);
  color: var(--secondary);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
}

.cart-btn__icon {
  font-size: 18px;
}

/* ===== Баннер ===== */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: 48px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero__subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero__image {
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero__badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--danger);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  animation: pulse 2s infinite;
  border: 2px solid var(--danger);
}

.hero__floating {
  position: absolute;
  background: var(--white);
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

.hero__floating--1 {
  bottom: 40%;
  left: 0;
  animation-delay: 0s;
}

.hero__floating--2 {
  bottom: 20%;
  right: 10%;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

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

/* ===== Каталог ===== */
.catalog {
  padding: 80px 0;
}

.section-title {
  font-size: 48px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  padding-bottom: 20px;
}

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

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 20px;
  margin-bottom: 40px;
  font-weight: 500;
}

.categories {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 10px 24px;
  border: 2px solid #e2e8f0;
  background: var(--white);
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.category-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card--clickable {
  cursor: pointer;
}

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

.product-card__image {
  height: 200px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
  overflow: hidden;
}

.product-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-card__badge--sale {
  background: var(--danger);
  color: var(--white);
}

.product-card__badge--new {
  background: var(--success);
  color: var(--white);
}

.product-card__badge--hot {
  background: var(--warning);
  color: var(--dark);
}

.product-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.product-card__fav:hover {
  transform: scale(1.2);
}

.product-card__content {
  padding: 20px;
}

.product-card__category {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-card__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
  line-height: 1.3;
}

.product-card__desc {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card__price {
  display: flex;
  flex-direction: column;
}

.product-card__price-current {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
}

.product-card__price-old {
  font-size: 14px;
  color: var(--gray);
  text-decoration: line-through;
}

.product-card__btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

/* ===== Преимущества ===== */
.features {
  padding: 80px 0;
  background: var(--white);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: center;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card__icon {
  font-size: 50px;
  margin-bottom: 16px;
}

.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.feature-card__text {
  font-size: 14px;
  color: var(--gray);
}

/* ===== О нас ===== */
.about {
  padding: 80px 0;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.about__inner {
  text-align: center;
}

.about__content {
  max-width: 700px;
  margin: 0 auto;
}

.about__content .section-title {
  color: var(--white);
}

.about__text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 40px;
}

.about__stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

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

.stat__number {
  font-size: 42px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.stat__label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* ===== Подписка ===== */
.subscribe {
  padding: 80px 0;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.subscribe__inner {
  text-align: center;
}

.subscribe__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.subscribe__text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 30px;
}

.subscribe__form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe__input {
  flex: 1;
  min-width: 250px;
  padding: 14px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.subscribe__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.subscribe__input:focus {
  border-color: var(--primary);
}

/* ===== Контакты ===== */
.contacts {
  padding: 80px 0;
}

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-card__icon {
  font-size: 50px;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.contact-card p {
  color: var(--gray);
}

/* ===== Футер ===== */
.footer {
  background: #0a0a0a;
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__brand .logo {
  color: var(--white);
}

.footer__copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

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

/* ===== Модальное окно ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s;
}

.modal.active .modal__content {
  transform: scale(1) translateY(0);
}

.modal__content--cart {
  max-width: 600px;
}

.modal__content--product {
  max-width: 1000px;
  width: 95%;
  max-height: 95vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

.product-modal__image-container {
  flex: 1;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  position: relative;
}

.product-modal__scroll {
  flex: 1;
  max-height: 95vh;
  overflow-y: auto;
  padding: 30px;
}

.product-modal__image {
  width: 100%;
  height: 100%;
  max-height: 95vh;
  object-fit: contain;
}

.product-modal__info {
  padding: 0;
}

.product-modal__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.product-modal__price-container {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.product-modal__price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
}

.product-modal__old-price {
  font-size: 20px;
  color: var(--gray);
  text-decoration: line-through;
}

.product-modal__desc {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin-top: 15px;
}

.product-modal__desc strong {
  color: var(--dark);
  font-weight: 600;
}

.product-modal__desc ul {
  margin: 10px 0;
  padding-left: 20px;
}

.product-modal__desc li {
  margin: 5px 0;
}

.product-modal__add-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s;
}

.product-modal__add-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

@media (max-width: 768px) {
  .modal__content--product {
    flex-direction: column;
    max-height: 98vh;
  }
  
  .product-modal__image-container {
    min-height: 300px;
  }
  
  .product-modal__scroll {
    max-height: none;
  }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal__title {
  font-size: 20px;
  font-weight: 700;
}

.modal__close {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
  transition: all 0.3s;
}

.modal__close:hover {
  background: #e2e8f0;
  color: var(--dark);
}

/* ===== Корзина ===== */
.cart-items {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__image {
  width: 80px;
  height: 80px;
  background: #f8fafc;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
}

.cart-item__title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--dark);
}

.cart-item__price {
  color: var(--primary);
  font-weight: 700;
}

.cart-item__quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  background: var(--white);
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.cart-item__qty-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.cart-item__qty {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.3s;
}

.cart-item__remove:hover {
  transform: scale(1.2);
}

.cart-empty {
  padding: 60px 20px;
  text-align: center;
  display: none;
}

.cart-empty.visible {
  display: block;
}

.cart-empty__icon {
  font-size: 60px;
  display: block;
  margin-bottom: 16px;
}

.cart-empty__hint {
  display: block;
  color: var(--gray);
  font-size: 14px;
  margin-top: 8px;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
  display: none;
}

.cart-footer.visible {
  display: block;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.cart-total__price {
  font-size: 24px;
  color: var(--primary);
  font-weight: 800;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: var(--white);
  padding: 16px 28px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 0.4s;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast__icon {
  width: 28px;
  height: 28px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .header__inner {
    height: 60px;
  }
  
  .nav {
    display: none;
  }
  
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero__title {
    font-size: 32px;
  }
  
  .hero__subtitle {
    font-size: 16px;
  }
  
  .hero__image {
    height: 200px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .about__stats {
    gap: 30px;
  }
  
  .stat__number {
    font-size: 32px;
  }
  
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
  
  .footer__links {
    justify-content: center;
  }
}
