/* Стили корзины в дизайне логотипа (синий + оранжевый) */
.cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: -4px 0 24px rgba(37, 99, 235, 0.15);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

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

.cart-head {
  padding: 24px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.cart-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.close-cart {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-cart:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #fff;
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.cart-item:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.cart-item > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item b {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}

.cart-item p {
  margin: 4px 0;
  font-size: 12px;
  color: #64748b;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.item-actions button {
  border: 0;
  background: #2563eb;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-actions button:hover {
  background: #1e40af;
  transform: scale(1.1);
}

.item-actions span {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  min-width: 24px;
  text-align: center;
}

.cart-item > b {
  align-self: center;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
}

.cart-summary {
  padding: 20px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 2px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.cart-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.cart-summary span {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.cart-summary b {
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
}

.cart-summary p {
  font-size: 11px;
  color: #64748b;
  margin: 8px 0 16px;
  text-align: center;
}

.cart-summary .checkout {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-summary .checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.cart-summary .checkout span {
  font-size: 18px;
  color: #fff;
}

/* Кнопка корзины в header */
.cart-toggle {
  border: 2px solid #2563eb;
  border-radius: 24px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-icon {
  width: 20px;
  height: 20px;
  display: block;
  filter: brightness(0) invert(1);
}

.cart-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.cart-toggle span {
  display: inline-grid;
  place-items: center;
  background: #f97316;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 999;
}

@media(max-width: 760px) {
  .cart-panel {
    width: 100%;
    right: -100%;
  }
}
