/* ================================================================ */
/* CART SLIDER - Shopping Cart Drawer                              */
/* Manish Jewellers - Fully Responsive                             */
/* ================================================================ */

/* ===== CART TRIGGER BUTTON ===== */
.cart-trigger {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cart-trigger svg {
  width: 24px;
  height: 24px;
  stroke: #00254e;
  transition: stroke 0.3s ease;
}

.cart-trigger:hover svg {
  stroke: #c9a227;
}

.cart-trigger__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50%;
  background: #c9a227;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  transition: transform 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.cart-trigger__badge.bump {
  animation: bump 0.3s ease;
}

@keyframes bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ===== CART OVERLAY ===== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== CART DRAWER ===== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 480px;
  max-width: 92vw;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
}

.cart-drawer.open {
  right: 0;
}

/* ===== CART HEADER ===== */
.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e8ecf1;
  background: #ffffff;
  flex-shrink: 0;
}

.cart-drawer__title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: #082A66;
  margin: 0;
}

.cart-drawer__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f5f7fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cart-drawer__close:hover {
  background: #e8ecf1;
  transform: rotate(90deg);
}

.cart-drawer__close svg {
  width: 20px;
  height: 20px;
  stroke: #082A66;
}

/* ===== CART BODY ===== */
.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  background: #fafbfc;
}

/* ===== CART EMPTY STATE ===== */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #8a9bb0;
}

.cart-empty svg {
  width: 80px;
  height: 80px;
  stroke: #d0d7e3;
  margin-bottom: 20px;
}

.cart-empty p {
  font-size: 20px;
  font-weight: 600;
  color: #082A66;
  margin: 0 0 8px 0;
}

.cart-empty span {
  font-size: 14px;
  color: #8a9bb0;
}

/* ===== CART ITEMS ===== */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  transition: all 0.3s ease;
  position: relative;
  animation: slideIn 0.3s ease forwards;
}

.cart-item:hover {
  border-color: #c9a227;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.cart-item__image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f7fa;
}

.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-item__name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: #082A66;
  margin: 0;
  line-height: 1.3;
}

.cart-item__price {
  font-size: 16px;
  font-weight: 700;
  color: #082A66;
}

.cart-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.cart-item__qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d0d7e3;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  color: #082A66;
}

.cart-item__qty-btn:hover {
  border-color: #c9a227;
  background: #f5f7fa;
}

.cart-item__qty-btn:active {
  transform: scale(0.95);
}

.cart-item__qty {
  font-size: 16px;
  font-weight: 600;
  color: #082A66;
  min-width: 30px;
  text-align: center;
}

.cart-item__remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #8a9bb0;
  transition: all 0.3s ease;
  margin-left: auto;
  align-self: flex-start;
}

.cart-item__remove:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

.cart-item__remove svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* ===== CART FOOTER ===== */
.cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid #e8ecf1;
  background: #ffffff;
  flex-shrink: 0;
}

.cart-summary {
  margin-bottom: 16px;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 15px;
  color: #4a5a7a;
}

.cart-summary__row--shipping {
  font-size: 13px;
  color: #8a9bb0;
  border-bottom: 1px solid #e8ecf1;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.cart-summary__amount {
  font-size: 20px;
  font-weight: 700;
  color: #082A66;
}

.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #082A66, #064789);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.cart-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(8, 42, 102, 0.25);
  background: linear-gradient(135deg, #064789, #082A66);
}

.cart-checkout-btn:active {
  transform: scale(0.98);
}

.cart-checkout-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.cart-checkout-btn:hover svg {
  transform: translateX(4px);
}

/* ================================================================ */
/* ANIMATIONS                                                       */
/* ================================================================ */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

.cart-item.removing {
  animation: slideOut 0.3s ease forwards;
}

/* ================================================================ */
/* RESPONSIVE - TABLET & MOBILE                                    */
/* ================================================================ */

@media (max-width: 768px) {
  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }

  .cart-drawer__header {
    padding: 16px 18px;
  }

  .cart-drawer__title {
    font-size: 20px;
  }

  .cart-drawer__body {
    padding: 12px 16px;
  }

  .cart-item {
    padding: 12px;
    gap: 12px;
  }

  .cart-item__image {
    width: 64px;
    height: 64px;
  }

  .cart-item__name {
    font-size: 14px;
  }

  .cart-item__price {
    font-size: 14px;
  }

  .cart-item__qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .cart-item__qty {
    font-size: 14px;
    min-width: 24px;
  }

  .cart-drawer__footer {
    padding: 16px 18px;
  }

  .cart-summary__amount {
    font-size: 18px;
  }

  .cart-checkout-btn {
    padding: 14px;
    font-size: 15px;
  }

  .cart-empty svg {
    width: 60px;
    height: 60px;
  }

  .cart-empty p {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .cart-drawer__header {
    padding: 14px 16px;
  }

  .cart-drawer__title {
    font-size: 18px;
  }

  .cart-drawer__body {
    padding: 10px 12px;
  }

  .cart-item {
    padding: 10px;
    gap: 10px;
  }

  .cart-item__image {
    width: 56px;
    height: 56px;
  }

  .cart-item__name {
    font-size: 13px;
  }

  .cart-item__price {
    font-size: 13px;
  }

  .cart-drawer__footer {
    padding: 14px 16px;
  }

  .cart-summary__amount {
    font-size: 16px;
  }

  .cart-checkout-btn {
    padding: 12px;
    font-size: 14px;
  }

  .cart-checkout-btn svg {
    width: 18px;
    height: 18px;
  }
}