/* Простые стили для корзины - переделанные с нуля */

.simple-cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  display: none;
  pointer-events: none;
}

.simple-cart-drawer.open {
  display: block;
  pointer-events: none; /* Контейнер не блокирует, только дочерние элементы */
}

.cart-drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: transparent;
  cursor: pointer;
  pointer-events: all;
  z-index: 0;
  transition: width 0.3s ease;
}

.simple-cart-drawer.open .cart-drawer-overlay {
  width: calc(100% - 420px);
  background: rgba(0, 0, 0, 0.3);
}

.cart-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #ffffff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: all;
  z-index: 10;
}

.cart-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.cart-drawer-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-drawer-close:hover {
  color: #000;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item-row {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  min-height: 180px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-title {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: #666;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.cart-item-quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-weight: 600;
}

.qty-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.qty-input {
  width: 45px;
  height: 28px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

/* .cart-item-total и .cart-remove-btn удалены - больше не используются */

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid #e0e0e0;
  background: #fff;
}

.cart-total {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #333;
}

.cart-total-price {
  color: #5c3419;
}

.cart-checkout-btn {
  width: 100%;
  padding: 1rem;
  background: #5c3419;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.cart-checkout-btn:hover:not(:disabled) {
  background: #4a2813;
}

.cart-checkout-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.cart-drawer-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.cart-drawer-empty p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.cart-drawer-empty .button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #5c3419;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
}

.cart-drawer-empty .button:hover {
  background: #4a2813;
}

/* Десктоп версия - увеличенный текст в 1.5 раза */
@media (min-width: 481px) {
  .cart-drawer-header h2 {
    font-size: 2.25rem;
  }
  
  .cart-drawer-close {
    font-size: 3rem;
    width: 48px;
    height: 48px;
  }
  
  .cart-item-title {
    font-size: 1.2rem;
  }
  
  .cart-item-price {
    font-size: 1.725rem;
  }
  
  .qty-btn {
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
  }
  
  .qty-input {
    font-size: 1rem;
    width: 50px;
    height: 32px;
  }
  
  .cart-total {
    font-size: 1.8rem;
  }
  
  .cart-checkout-btn {
    font-size: 1.5rem;
  }
  
  .cart-drawer-empty p {
    font-size: 1.65rem;
  }
  
  .cart-drawer-empty .button {
    font-size: 1.5rem;
  }
}

/* Адаптивность */
@media (max-width: 480px) {
  .cart-drawer-content {
    max-width: 100%;
  }
  
  .simple-cart-drawer.open .cart-drawer-overlay {
    width: 0;
    background: transparent;
  }
  
  .cart-item-row {
    flex-wrap: wrap;
  }
}
