body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.section.cart {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart {
  padding: 40px 0;
}

.cart-content {
  display: grid;
  grid-template-columns: 1fr 800px;
  gap: 30px;
}

.cart-items {
  background: #fff;
}

.cart-item {
  display: grid;
  grid-template-columns: 140px minmax(200px, 1fr) 100px 120px 40px;
  gap: 20px;
  padding: 40px;
  margin: 20px 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  align-items: center;
  transition: all 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.item-image img {
  width: 60%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-title {
  font-size: 18px;
  font-weight: 500;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #666;
}

.item-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 120px;
}

.item-quantity button {
  width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.item-quantity button:hover {
  background: #f5f5f5;
}

.item-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.price {
  color: #666;
}

.total {
  font-weight: 500;
}

.remove-item {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #999;
  transition: color 0.2s ease;
}

.remove-item:hover {
  color: #ff4444;
}

.cart-summary {
  background: #fff;
  padding: 30px;
  height: fit-content;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
}

.item-total {
  width: 140px;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cart-content {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  
  .cart-item {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
  }
  
  .item-quantity, .item-total {
    width: 100%;
    max-width: none;
    text-align: left;
  }
  
  .item-image img {
    width: 140px;
    height: 180px;
  }
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

.summary-content h3 {
    font-size: 24px;
    margin: 0;
    color: #333;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    padding: 8px 0;
}

.summary-row span:last-child {
    font-weight: 500;
    font-size: 20px;
    white-space: nowrap;
}

.btn.shop {
    width: 100%;
    padding: 1em;
    font-size: 1.125em;
    border-radius: 8px;
}

@media (max-width: 479px) {
    .btn.shop {
        font-size: 1.5em;
    }
}

.empty-cart-container {
    width: 100%;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin: 20px 0;
}

.empty-cart-content {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.empty-cart-icon {
    width: 120px;
    height: 120px;
    opacity: 0.7;
}

.empty-cart-content h2 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.empty-cart-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.empty-cart-content .btn.shop {
    margin-top: 16px;
    min-width: 200px;
    background: #8CC63F;
    color: #fff;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 500;
}

.empty-cart-message {
    padding: 40px 20px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.empty-cart-message h2 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin: 0 0 16px 0;
}

.empty-cart-message p {
    font-size: 16px;
    color: #666;
    margin: 0 0 24px 0;
}

.btn-catalog {
    display: inline-block;
    background: #8CC63F;
    color: #fff;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    transition: background-color 0.2s ease;
}

.btn-catalog:hover {
    background: #7ab535;
    color: white;
}

/* Убираем grid-layout при пустой корзине */
.cart-content.empty {
    display: block;
}

/* Добавляем стили для основного контейнера */
.section.cart {
    min-height: calc(100vh - 400px);
    display: flex;
    flex-direction: column;
}

/* Прижимаем футер к низу */
.footer {
    margin-top: auto;
}

/* Стили для формы оформления заказа */
.order-form {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-size: 14px;
    color: #666;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8CC63F;
}

/* Обновляем стили для кнопки оформления заказа */
.btn.shop.submit-order {
    margin-top: 24px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.cart-counter {
    position: absolute;
    top: clamp(-8px, -0.6vw, -6px);
    right: clamp(-8px, -0.6vw, -6px);
    background: #82C400;
    color: white;
    border-radius: 50%;
    min-width: clamp(18px, 1.5vw, 24px);
    height: clamp(18px, 1.5vw, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(11px, 0.8vw, 14px);
    line-height: 1;
    padding: 0;
    margin: 0;
    text-align: center;
    font-weight: 500;
    transform: translateY(0px);
    padding-top: 4px;
}

.cart-notification {
    position: fixed;
    top: clamp(20px, 2vw, 30px);
    right: clamp(20px, 2vw, 30px);
    background: #82C400;
    color: white;
    padding: 20px 25px;
    border-radius: 10px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 25px;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin-right: 10px;
    margin-bottom: 0px;
}

.cart-notification .btn {
    background: white;
    color: #82C400;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.submit-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #cccccc;
}

.order-note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.order-note p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}