/* ===== Kalyuzhna Shopping Cart ===== */

/* --- Cart section --- */
.cart-section {
  min-height: 60vh;
  padding: 30px 0 80px;
  background: linear-gradient(180deg, rgba(153,65,122,.03) 0%, rgba(235,200,223,.06) 50%, rgba(153,65,122,.02) 100%);
}

.cart-title {
  font-size: 48px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #99417a, #1a1a1a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cart-subtitle {
  text-align: center;
  font-size: 16px;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 40px;
}

/* --- Cart items --- */
.cart-items { max-width: 900px; margin: 0 auto; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  margin-bottom: 14px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(153,65,122,.1);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
  animation: cartItemIn .4s ease forwards;
  opacity: 0;
  transition: opacity .3s, transform .3s;
}
@keyframes cartItemIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cart-item__image {
  flex-shrink: 0;
  width: 90px; height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(153,65,122,.12);
}
.cart-item__image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__details { flex: 1; min-width: 0; }
.cart-item__name { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.cart-item__sku  { font-size: 14px; color: #999; margin-top: 3px; letter-spacing: .5px; }
.cart-item__link {
  font-size: 13px; color: #99417a; text-decoration: none; margin-top: 6px; display: inline-block;
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.cart-item__link:hover { border-color: #99417a; }

.cart-item__quantity { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cart-item__qty-btn {
  width: 34px; height: 34px; border: 1px solid rgba(153,65,122,.2);
  background: #fff; border-radius: 50%; font-size: 17px; color: #99417a;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s; line-height: 1;
}
.cart-item__qty-btn:hover { background: #99417a; color: #fff; transform: scale(1.05); }
.cart-item__qty-val { font-size: 17px; font-weight: 600; min-width: 22px; text-align: center; }

.cart-item__price {
  font-size: 20px; font-weight: 700; color: #1a1a1a; min-width: 90px; text-align: right; flex-shrink: 0;
}

.cart-item__remove {
  width: 34px; height: 34px; border: none; background: transparent;
  font-size: 22px; color: #ccc; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: color .2s; line-height: 1;
}
.cart-item__remove:hover { color: #99417a; }

/* --- Empty state --- */
.cart-empty {
  display: none;
  flex-direction: column; align-items: center; padding: 80px 20px; text-align: center;
}
.cart-empty__icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(235,200,223,.3); display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.cart-empty__icon svg { width: 40px; height: 40px; opacity: .4; }
.cart-empty__text { font-size: 22px; color: #555; margin-bottom: 20px; }
.cart-empty__link {
  display: inline-block; padding: 12px 32px; font-size: 15px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: #fff; text-decoration: none; border-radius: 30px;
  background: linear-gradient(135deg, #99417a, #7a3362); transition: transform .2s, box-shadow .2s;
}
.cart-empty__link:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(153,65,122,.3); }

/* --- Summary --- */
.cart-summary {
  display: none; max-width: 900px; margin: 30px auto 0;
  padding: 28px 32px; background: rgba(255,255,255,.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(153,65,122,.1); border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
}
.cart-summary__row {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 1px solid rgba(153,65,122,.12);
}
.cart-summary__label { font-size: 18px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 1px; }
.cart-summary__amount { font-size: 32px; font-weight: 700; color: #1a1a1a; }

.cart-summary__checkout {
  display: block; width: 100%; padding: 16px; font-size: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: #fff; border: none; border-radius: 30px;
  background: linear-gradient(135deg, #99417a, #7a3362); cursor: pointer;
  transition: transform .2s, box-shadow .2s; margin-bottom: 12px;
}
.cart-summary__checkout:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(153,65,122,.35); }

.cart-summary__continue {
  display: block; text-align: center; font-size: 14px; color: #99417a; text-decoration: none; padding: 8px;
}

/* --- Checkout overlay --- */
.checkout-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(26,26,26,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .3s;
}
.checkout-overlay.active { display: flex; opacity: 1; }

.checkout-form {
  background: #fff; border-radius: 24px; max-width: 480px; width: 100%;
  padding: 36px 32px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: checkoutIn .35s ease;
}
@keyframes checkoutIn { from { transform: scale(.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.checkout-form__close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border: none; background: transparent; font-size: 24px; color: #ccc; cursor: pointer; line-height: 1;
}
.checkout-form__close:hover { color: #99417a; }
.checkout-form__title { font-size: 24px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.checkout-form__subtitle { font-size: 14px; color: #888; margin-bottom: 24px; line-height: 1.5; }

.checkout-form input,
.checkout-form textarea {
  width: 100%; padding: 12px 16px; margin-bottom: 14px;
  border: 1px solid #e0d0d8; border-radius: 12px; font-size: 15px;
  font-family: Inter, sans-serif; color: #333; background: #faf7f9;
  transition: border-color .2s, box-shadow .2s;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none; border-color: #99417a; box-shadow: 0 0 0 3px rgba(153,65,122,.1);
}
.checkout-form textarea { resize: vertical; min-height: 70px; }

.checkout-form__contact-method { margin-bottom: 20px; }
.checkout-form__contact-method > label { font-size: 14px; color: #555; display: block; margin-bottom: 8px; }
.checkout-form__radios { display: flex; gap: 16px; flex-wrap: wrap; }
.checkout-form__radios label {
  font-size: 14px; color: #333; display: flex; align-items: center; gap: 5px; cursor: pointer;
}
.checkout-form__radios input { accent-color: #99417a; }

.checkout-form__submit {
  display: block; width: 100%; padding: 14px; font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: #fff; border: none; border-radius: 30px;
  background: linear-gradient(135deg, #99417a, #7a3362); cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.checkout-form__submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(153,65,122,.35); }

/* --- Success message --- */
#checkoutSuccess {
  display: none; position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 10000; padding: 16px 32px; background: #fff; border-radius: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15); font-size: 15px; color: #99417a; font-weight: 600;
  align-items: center; gap: 10px;
  animation: cartItemIn .3s ease;
}
#checkoutSuccess::before { content: '\2713'; font-size: 20px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .cart-title { font-size: 32px; }
  .cart-item { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .cart-item__image { width: 70px; height: 70px; }
  .cart-item__name { font-size: 18px; }
  .cart-item__price { font-size: 18px; min-width: auto; }
  .cart-item__quantity { order: 3; }
  .cart-item__price { order: 4; }
  .cart-item__remove { order: 5; }
  .cart-summary__amount { font-size: 26px; }
}
@media (max-width: 480px) {
  .cart-item { flex-direction: column; align-items: flex-start; }
  .cart-item__price { align-self: flex-end; margin-top: -30px; }
}
