/* ============================================
   CART — ГРАНДШИНА
   ============================================ */

.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - 200px);
}

.cart-breadcrumbs {
  margin-bottom: 24px;
  font-size: 14px;
  color: #666;
}

.cart-breadcrumbs a {
  color: #0066cc;
  text-decoration: none;
}

.cart-breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #999;
}

.breadcrumb-current {
  color: #333;
}

.cart-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1a1a1a;
}

/* Cart Layout */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* Cart Items */
.cart-items {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.cart-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 50px;
  padding: 16px 24px;
  background: #f8f9fa;
  font-weight: 600;
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e9ecef;
}

.cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 50px;
  padding: 24px;
  border-bottom: 1px solid #e9ecef;
  align-items: center;
  transition: background-color 0.2s;
}

.cart-item:hover {
  background-color: #f8f9fa;
}

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

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f0f0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.cart-item-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #666;
}

.cart-item-season {
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.cart-item-season.winter {
  background: #e3f2fd;
  color: #1976d2;
}

.cart-item-season.summer {
  background: #fff3e0;
  color: #f57c00;
}

.cart-item-type,
.cart-item-brand {
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 4px;
  color: #555;
}

.cart-item-price,
.cart-item-total {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Quantity Controls */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quantity-btn:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

.quantity-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quantity-input {
  width: 50px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-limit {
  font-size: 11px;
  color: #999;
  margin-left: 4px;
}

/* Remove Button */
.cart-remove-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cart-remove-btn:hover {
  background: #fee;
  color: #e74c3c;
}

.cart-remove-btn svg {
  width: 20px;
  height: 20px;
}

/* Cart Summary */
.cart-summary {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 24px;
  position: sticky;
  top: 100px;
}

.cart-summary-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px 0;
  color: #1a1a1a;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 15px;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
}

.cart-summary-total {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: none;
  padding-top: 16px;
}

.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  transition: background 0.2s;
}

.cart-checkout-btn:hover {
  background: #d63a52;
}

.cart-clear-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.cart-clear-btn:hover {
  background: #f8f9fa;
  border-color: #bbb;
}

.cart-clear-btn svg {
  width: 16px;
  height: 16px;
}

/* Empty Cart */
.cart-empty {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-empty-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  color: #ddd;
}

.cart-empty-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #1a1a1a;
}

.cart-empty-text {
  font-size: 16px;
  color: #666;
  margin: 0 0 32px 0;
}

.cart-empty-link {
  display: inline-block;
  padding: 14px 32px;
  background: #e94560;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s;
}

.cart-empty-link:hover {
  background: #d63a52;
}

/* ============================================
   CHECKOUT MODAL
   ============================================ */

.checkout-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.checkout-modal.active {
  display: flex;
}

.checkout-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.checkout-modal__content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkout-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkout-modal__close:hover {
  background: #e0e0e0;
  color: #333;
}

.checkout-modal__content h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

.checkout-modal-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 24px 0;
}

/* Order Summary in Modal */
.checkout-order-summary {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.checkout-order-summary h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #1a1a1a;
}

.checkout-order-items {
  margin-bottom: 16px;
}

.checkout-order-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #555;
  border-bottom: 1px solid #e9ecef;
}

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

.checkout-item-name {
  flex: 1;
  margin-right: 12px;
}

.checkout-item-qty {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.checkout-order-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  border-top: 2px solid #dee2e6;
}

/* Checkout Form */
.checkout-form__group {
  margin-bottom: 20px;
}

.checkout-form__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.checkout-form__input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  transition: border-color 0.2s;
}

.checkout-form__input:focus {
  outline: none;
  border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.checkout-form__submit {
  width: 100%;
  padding: 16px;
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-form__submit:hover {
  background: #d63a52;
}

.checkout-form__privacy {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin: 16px 0 0 0;
  line-height: 1.5;
}

/* ============================================
   SUCCESS MODAL
   ============================================ */

.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.success-modal.active {
  display: flex;
}

.success-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.success-modal__content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: successSlideIn 0.4s ease-out;
  text-align: center;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.success-modal__image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .cart-header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .cart-item-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item-image {
    width: 100%;
    height: 200px;
  }

  .cart-item-price,
  .cart-item-total {
    font-size: 18px;
  }

  .cart-item-quantity {
    justify-content: flex-start;
  }

  .cart-checkout-btn {
    padding: 18px;
    font-size: 18px;
  }

  .checkout-modal__content {
    padding: 24px;
  }

  .checkout-modal__content h3 {
    font-size: 24px;
  }
}
