:root {
  --primary: #ff6b6b;
  --secondary: #4ecdc4;
  --dark: #2d3436;
  --light: #f8f9fa;
  --gray: #6c757d;
  --success: #51cf66;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

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

.header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s;
}

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

.header__actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search {
  padding: 0.5rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 0.9rem;
  width: 200px;
  transition: border-color 0.3s;
}

.search:focus {
  outline: none;
  border-color: var(--primary);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

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

.btn--primary:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--cart {
  background: var(--secondary);
  color: white;
  position: relative;
}

.btn--cart:hover {
  background: #45b8b0;
}

.cart-count {
  background: var(--primary);
  color: white;
  border-radius: 50%;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.hero__title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--dark);
}

.about {
  padding: 5rem 0;
  background: white;
}

.about__text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  text-align: center;
  color: var(--gray);
  line-height: 1.8;
}

.catalog {
  padding: 5rem 0;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 2rem;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
}

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

.product {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

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

.product__image {
  width: 100%;
  height: 200px;
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product__category {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.product__name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product__description {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.product__price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

.product__btn {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.product__btn:hover {
  background: #ff5252;
}

.benefits {
  padding: 5rem 0;
  background: white;
}

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

.benefit {
  text-align: center;
  padding: 2rem;
}

.benefit__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.benefit h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

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

.reviews {
  padding: 5rem 0;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.review {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.review__author {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.review__stars {
  color: #ffd700;
  margin-bottom: 1rem;
}

.review__text {
  color: var(--gray);
  line-height: 1.6;
}

.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  text-align: center;
}

.cta__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta__text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contacts {
  padding: 5rem 0;
  background: white;
}

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact {
  text-align: center;
  padding: 1.5rem;
}

.footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

.cart-drawer {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
  transition: right 0.3s;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0;
}

.cart-drawer__header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-empty {
  text-align: center;
  color: var(--gray);
  padding: 2rem 0;
}

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

.cart-item__image {
  width: 60px;
  height: 60px;
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__info {
  flex: 1;
}

.cart-item__name {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

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

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cart-item__btn {
  width: 25px;
  height: 25px;
  border: 1px solid var(--primary);
  background: white;
  color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.cart-item__btn:hover {
  background: var(--primary);
  color: white;
}

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

.cart-item__remove {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 1.2rem;
}

.cart-drawer__footer {
  padding: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.cart-total {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

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

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal__content {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal__title {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: bottom 0.3s;
  z-index: 3000;
}

.toast.show {
  bottom: 2rem;
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .burger {
    display: block;
  }
  
  .header__actions {
    gap: 0.5rem;
  }
  
  .search {
    width: 120px;
  }
  
  .hero__title {
    font-size: 2rem;
  }
  
  .hero__subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .cart-drawer {
    width: 100%;
    right: -100%;
  }
  
  .products {
    grid-template-columns: 1fr;
  }
}
