/* Container cho các nút */
.quick-payment-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* Style chung cho tất cả nút */
.quick-payment-buy-button,
.quick-payment-addtocart-button,
.quick-payment-out-of-stock {
  padding: 12px 26px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  text-align: center;
}

/* Nút "Mua ngay" */
.quick-payment-buy-button {
  background-color: #1a73e8;
  color: white;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
}

.quick-payment-buy-button:hover:not(:disabled) {
  background-color: #0c5fd0;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.4);
}

/* Nút "Thêm vào giỏ" */
.quick-payment-addtocart-button {
  background: white;
  color: #1a73e8;
  border: 2px solid #1a73e8;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.1);
}

.quick-payment-addtocart-button:hover:not(:disabled) {
  background-color: #f0f8ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.2);
}

/* Nút hết hàng */
.quick-payment-out-of-stock {
  background-color: #f5f5f5;
  color: #999;
  border: 2px solid #ddd;
  cursor: not-allowed;
}

/* Loading state */
.qpb-loading {
  opacity: 0.7;
  cursor: wait !important;
}

.qpb-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: qpb-spin 1s linear infinite;
}

@keyframes qpb-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification styles - Pure Liquid Glass */
.qpb-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 20px 28px;
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  font-size: 15px;
  z-index: 9999;
  transform: translateX(100%);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 350px;
  min-width: 240px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.37),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
}

.qpb-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  transition: left 0.8s ease;
}

.qpb-notification.qpb-show {
  transform: translateX(0);
  animation: qpb-glass-slide 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.qpb-notification.qpb-show::before {
  left: 100%;
}

.qpb-notification.qpb-success {
  background: rgba(220, 53, 69, 0.15);
  border-left: 3px solid rgba(220, 53, 69, 0.8);
  color: rgba(255, 255, 255, 0.95);
}

.qpb-notification.qpb-error {
  background: rgba(244, 67, 54, 0.15);
  border-left: 3px solid rgba(244, 67, 54, 0.8);
  color: rgba(255, 255, 255, 0.95);
}

/* Pure glass animation */
@keyframes qpb-glass-slide {
  0% {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  50% {
    backdrop-filter: blur(20px);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    backdrop-filter: blur(40px);
  }
}

/* Cart count styling cho số lượng lớn */
.cart-icon strong {
  font-size: 12px;
  min-width: 18px;
  text-align: center;
  display: inline-block;
  position: relative;
}

/* Style riêng cho dấu + */
.qpb-plus {
  position: absolute;
  top: -10px;
  right: -8px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  border: 3px solid white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  line-height: 10px;
  text-align: center;
  font-weight: 900;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,68,68,0.3);
  z-index: 10;
  animation: qpb-pulse 2s infinite;
}

/* Animation cho dấu + */
@keyframes qpb-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Đảm bảo cart icon có z-index thấp hơn */
.cart-icon {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .quick-payment-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-payment-buy-button,
  .quick-payment-addtocart-button,
  .quick-payment-out-of-stock {
    width: 100%;
    margin-bottom: 8px;
  }

  .qpb-notification {
    right: 10px;
    left: 10px;
    max-width: none;
    top: 10px;
    border-radius: 12px;
    padding: 12px 20px 12px 40px;
    font-size: 13px;
  }

  .qpb-notification::after {
    left: 12px;
    width: 16px;
    height: 16px;
    font-size: 10px;
  }

  .cart-icon strong {
    font-size: 11px;
    min-width: 16px;
  }
}