/* ══════════════════════════════════════════════════════════════════════════════
   SHOPPING CART - PROFESSIONAL FROSTED GLASS DESIGN
   ══════════════════════════════════════════════════════════════════════════════ */

/* Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Main Panel - Frosted Glass */
.cart-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 440px;
  background: rgba(230, 228, 225, 0.88);
  backdrop-filter: blur(24px);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow: hidden;
}

.cart-panel.open {
  transform: translateX(0);
}

/* Header */
.cart-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.cart-header__icon {
  width: 20px;
  height: 20px;
  color: #111111;
  flex-shrink: 0;
}

.cart-header__title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: #111111;
}

.cart-badge {
  background: #e0e0e0;
  color: #111111;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.cart-close {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 999px;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Shipping Bar */
.cart-shipping {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-shipping__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cart-shipping__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.cart-shipping__amount {
  font-size: 13px;
  font-weight: 700;
  color: #2d9d78;
}

.cart-shipping__bar {
  width: 100%;
  height: 4px;
  background: #ddd;
  border-radius: 999px;
  overflow: hidden;
}

.cart-shipping__fill {
  height: 100%;
  background: #111111;
  transition: width 0.3s ease;
}

/* Items Container (scrollable) */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

/* Individual Item */
.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 20px;
  gap: 16px;
  align-items: start;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.cart-item__image {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-item__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item__name {
  font-size: 16px;
  font-weight: 700;
  color: #111111;
}

.cart-item__variant {
  font-size: 12px;
  color: #999;
}

.cart-item__stepper {
  display: flex;
  align-items: center;
  gap: 0;
  width: 90px;
  height: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: white;
  margin-top: 4px;
}

.cart-item__stepper-btn {
  flex: 0 0 32px;
  height: 32px;
  border: none;
  background: none;
  color: #111111;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cart-item__stepper-btn:hover {
  background: #f5f5f5;
}

.cart-item__qty {
  flex: 1;
  text-align: center;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: #111111;
  cursor: default;
}

.cart-item__price {
  position: absolute;
  right: 24px;
  top: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #111111;
}

.cart-item__remove {
  position: absolute;
  right: 24px;
  top: 16px;
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.cart-item:hover .cart-item__remove {
  opacity: 1;
}

.cart-item__remove:hover {
  color: #999;
}

/* Empty State */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}

.cart-empty__icon {
  width: 48px;
  height: 48px;
  opacity: 0.2;
  color: #111111;
}

.cart-empty__text {
  font-size: 14px;
  color: #999;
  margin: 0;
}

/* Checkout Card - White Solid */
.cart-checkout {
  background: #ffffff;
  border-radius: 20px 20px 20px 20px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin-top: -20px;
  position: relative;
  z-index: 10;
}

.cart-checkout__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #666;
  padding: 8px 0;
  font-weight: 500;
}

.cart-checkout__divider {
  height: 1px;
  background: #e0e0e0;
  margin: 12px 0;
}

.cart-checkout__total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 0;
}

.cart-checkout__total-amount {
  font-size: 32px;
  font-weight: 700;
  color: #111111;
  line-height: 1;
}

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

.cart-checkout__btn {
  width: 100%;
  height: 56px;
  background: #111111;
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.2s;
}

.cart-checkout__btn:hover:not(:disabled) {
  background: #333;
}

.cart-checkout__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-checkout__btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.cart-checkout__disclaimer {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .cart-header {
    padding: 16px 20px;
  }

  .cart-header__title {
    font-size: 16px;
  }

  .cart-badge {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .cart-shipping {
    padding: 12px 20px;
  }

  .cart-shipping__label {
    font-size: 10px;
  }

  .cart-item {
    padding: 12px 20px;
  }

  .cart-item__img {
    width: 70px;
    height: 70px;
  }

  .cart-item__name {
    font-size: 12px;
  }

  .cart-item__price {
    font-size: 13px;
  }

  .cart-checkout {
    padding: 16px 20px;
  }

  .cart-checkout__row {
    font-size: 12px;
  }

  .cart-checkout__total {
    font-size: 15px;
  }

  .cart-checkout__btn {
    padding: 12px 16px;
    font-size: 11px;
    height: 48px;
  }
}

@media (max-width: 768px) {
  .cart-panel {
    width: calc(100% - 16px);
    border-radius: 20px;
    right: 8px;
    left: 8px;
    bottom: 8px;
    max-height: 85vh;
  }

  .cart-panel.open {
    transform: translateY(0);
  }

  .cart-header {
    padding: 14px 16px;
  }

  .cart-header__title {
    font-size: 14px;
  }

  .cart-close {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .cart-panel {
    width: 100%;
    right: 0;
    left: 0;
    bottom: 0;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
  }

  .cart-header {
    padding: 12px 16px;
  }

  .cart-header__title {
    font-size: 14px;
  }

  .cart-header__icon {
    width: 16px;
    height: 16px;
  }

  .cart-badge {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .cart-close {
    font-size: 16px;
    width: 24px;
    height: 24px;
  }

  .cart-shipping {
    padding: 12px 16px;
  }

  .cart-shipping__label {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .cart-shipping__amount {
    font-size: 11px;
  }

  .cart-items {
    padding: 8px 0;
  }

  .cart-item {
    padding: 10px 16px;
    gap: 12px;
  }

  .cart-item__img {
    width: 60px;
    height: 60px;
  }

  .cart-item__name {
    font-size: 12px;
  }

  .cart-item__qty {
    flex-wrap: wrap;
  }

  .cart-item__plus,
  .cart-item__minus {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .cart-item__qty-display {
    font-size: 11px;
  }

  .cart-item__price {
    font-size: 12px;
    min-width: 50px;
  }

  .cart-item__remove {
    width: 20px;
    height: 20px;
    font-size: 16px;
  }

  .cart-checkout {
    padding: 12px 16px;
  }

  .cart-checkout__row {
    font-size: 11px;
    padding: 6px 0;
  }

  .cart-checkout__divider {
    margin: 6px 0;
  }

  .cart-checkout__total {
    font-size: 13px;
  }

  .cart-checkout__total-amount {
    font-size: 16px;
  }

  .cart-checkout__currency {
    font-size: 10px;
  }

  .cart-checkout__btn {
    padding: 12px 14px;
    font-size: 10px;
    height: 44px;
    margin-bottom: 8px;
    gap: 6px;
  }

  .cart-checkout__btn svg {
    width: 14px;
    height: 14px;
  }

  .cart-checkout__disclaimer {
    font-size: 10px;
    line-height: 1.5;
  }

  .cart-empty__icon {
    width: 40px;
    height: 40px;
  }

  .cart-empty p {
    font-size: 12px;
    max-width: 160px;
  }
}

/* Scrollbar styling */
.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: transparent;
}

.cart-items::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
