/* ==========================================================================
   HeyBubbles.pk - Interactive FX, Bubbles Physics & Animation Library
   ========================================================================== */

/* --- Interactive Bubble Canvas (Disabled for clean e-commerce UI) --- */
#bubble-canvas {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* --- Keyframe Animations --- */
@keyframes sparkleRotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes floatPill {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-14px); }
}

@keyframes truckBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 96, 136, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(255, 96, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 96, 136, 0); }
}

@keyframes shimmerEffect {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Shimmer Bar on Buy Now --- */
.btn-buy-now::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmerEffect 2.5s infinite;
}

/* --- Slide-Over Cart Drawer --- */
.cart-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 999998 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.cart-drawer-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #ffffff;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
  z-index: 999999 !important;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
  right: 0 !important;
}

.cart-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
}

.cart-drawer-header h3 {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.cart-close-btn:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

/* Free Shipping Progress Meter */
.free-shipping-meter {
  background: #fff0f4;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 24px;
}

.meter-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #3b2c30;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meter-bar {
  height: 7px;
  background: #ffd0dc;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6088, #ff3366);
  border-radius: 10px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-drawer-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.drawer-empty-state {
  text-align: center;
  padding: 60px 0;
}

.drawer-empty-icon {
  font-size: 50px;
  margin-bottom: 15px;
  opacity: 0.7;
}

.drawer-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  transition: var(--transition);
}

.drawer-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.drawer-item-details {
  flex-grow: 1;
}

.drawer-item-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.drawer-item-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.drawer-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  height: 30px;
  background: #ffffff;
}

.drawer-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: bold;
  color: var(--text-main);
}

.drawer-qty-val {
  width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.drawer-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-remove-btn:hover {
  text-decoration: underline;
}

.cart-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.drawer-coupon-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.drawer-coupon-input {
  flex-grow: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}

.drawer-coupon-btn {
  background: var(--text-main);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.drawer-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.drawer-total-row span {
  font-size: 15px;
  color: var(--text-muted);
}

.drawer-total-row strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-heading);
}

/* Flying item to cart animation element */
.flying-cart-ghost {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 10px 25px rgba(255, 96, 136, 0.5);
  transition: all 0.75s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 900;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.toast-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.toast-text strong {
  font-size: 13px;
  color: var(--text-main);
  display: block;
}

/* Mobile Responsiveness for Cart Drawer */
@media (max-width: 480px) {
  .cart-drawer {
    width: 100% !important;
    max-width: 100vw !important;
    right: -100% !important;
  }
  .cart-drawer.active {
    right: 0 !important;
  }
  .cart-drawer-header,
  .free-shipping-meter,
  .cart-drawer-body,
  .cart-drawer-footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
