/* ===================================================
   Sticky Add-to-Cart Bar - Luxury Floating Component
   =================================================== */
.sticky-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1.5px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 -10px 40px rgba(138, 21, 81, 0.09), 0 -2px 10px rgba(0, 0, 0, 0.03);
  z-index: 1040;
  padding: 12px 0;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: auto;
}

.sticky-cart-bar.show {
  transform: translateY(0);
  opacity: 1;
}

.sticky-cart-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}

/* ─── Loader State ─── */
.sticky-bar-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 8px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-primary, #8A1551);
}

.sticky-inline-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(138, 21, 81, 0.15);
  border-top-color: var(--color-gold, #D4AF37);
  border-radius: 50%;
  animation: stickySpin 0.8s linear infinite;
}

@keyframes stickySpin {
  to { transform: rotate(360deg); }
}

/* ─── Content Wrapper ─── */
.sticky-bar-content-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.sticky-cart-product {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}

.sticky-cart-product:hover {
  transform: translateX(-3px);
}

.sticky-img-wrap {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-img-spinner {
  position: absolute;
  inset: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.sticky-img-spinner-ring {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(138, 21, 81, 0.15);
  border-top-color: var(--color-gold, #D4AF37);
  border-right-color: var(--color-primary, #8A1551);
  border-radius: 50%;
  animation: stickyImgSpin 0.75s linear infinite;
}

@keyframes stickyImgSpin {
  to { transform: rotate(360deg); }
}

.sticky-cart-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  background-color: var(--color-white, #ffffff);
  padding: 2px;
  border: 2px solid var(--color-gold, #D4AF37);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  display: block;
  position: relative;
  z-index: 2;
}

.sticky-discount-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
  z-index: 10;
  white-space: nowrap;
}

.sticky-discount-inline {
  display: none;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff !important;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  margin-right: 2px;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
  letter-spacing: 0.1px;
}

.sticky-bundle-pill {
  font-size: 10px;
  font-weight: 800;
  color: #8A1551;
  background: rgba(138, 21, 81, 0.12);
  border: 1px solid rgba(138, 21, 81, 0.3);
  padding: 1.5px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.2px;
}

.sticky-cart-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sticky-cart-tag {
  font-size: 10px;
  font-weight: 800;
  color: #a47e1b;
  background-color: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 2px 10px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  letter-spacing: 0.3px;
}

.sticky-cart-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-dark-bg, #1a0b12);
  margin: 0;
  letter-spacing: -0.3px;
}

.sticky-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sticky-cart-price {
  font-size: 15px;
  font-weight: 900;
  color: var(--color-primary, #8A1551);
}

.sticky-old-price {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 600;
}

.sticky-cart-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-sticky-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-primary, #8A1551);
  border: 1.5px solid rgba(138, 21, 81, 0.2);
  font-weight: 750;
  font-size: 13.5px;
  padding: 9px 20px;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-sticky-details:hover {
  background-color: rgba(138, 21, 81, 0.06);
  border-color: var(--color-primary, #8A1551);
  transform: translateY(-1px);
}

.btn-sticky-buy {
  background: linear-gradient(135deg, var(--color-primary, #8A1551), var(--color-secondary, #6F1041));
  color: var(--color-white, #ffffff);
  font-weight: 800;
  font-size: 13.5px;
  padding: 9px 26px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(138, 21, 81, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sticky-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(138, 21, 81, 0.4);
}

.btn-sticky-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 50%;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-sticky-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ─── Ultra-Modern Luxury Floating Mobile Sticky Cart Bar ─── */
@media (max-width: 768px) {
  .sticky-cart-bar {
    position: fixed !important;
    bottom: 12px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 8px 10px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 10px 32px rgba(138, 21, 81, 0.18), 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    border: 1.2px solid rgba(138, 21, 81, 0.14) !important;
    z-index: 999 !important;
    transform: translateY(120%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
    box-sizing: border-box !important;
  }

  .sticky-cart-bar.show {
    transform: translateY(0) !important;
  }

  .sticky-cart-container {
    padding: 0 !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .sticky-bar-content-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .sticky-cart-product {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    text-decoration: none !important;
  }

  .sticky-img-wrap,
  .sticky-img-spinner,
  .sticky-cart-img {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 12px !important;
  }

  .sticky-img-wrap {
    overflow: hidden !important;
    border: 1px solid rgba(138, 21, 81, 0.12) !important;
    background: #fdfafb !important;
    position: relative !important;
    flex-shrink: 0 !important;
  }

  .sticky-cart-img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }

  .sticky-img-spinner-ring {
    width: 18px !important;
    height: 18px !important;
  }

  .sticky-cart-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    text-align: right !important;
  }

  .sticky-cart-tag {
    font-size: 8px !important;
    padding: 1px 6px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    background: #fff7ed !important;
    color: #c2410c !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    width: fit-content !important;
  }

  .sticky-bundle-pill {
    font-size: 8px !important;
    padding: 1px 6px !important;
    line-height: 1.2 !important;
  }

  .sticky-cart-title {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 135px !important;
    line-height: 1.3 !important;
    color: #1a1a1a !important;
    margin: 1px 0 !important;
  }

  .sticky-discount-badge {
    display: none !important;
  }

  .sticky-discount-inline {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 9px !important;
    padding: 1px 5px !important;
    border-radius: 5px !important;
    background: #dc2626 !important;
    color: #fff !important;
    font-weight: 800 !important;
  }

  .sticky-price-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .sticky-cart-price {
    font-size: 12.5px !important;
    font-weight: 900 !important;
    color: var(--color-primary, #8a1551) !important;
  }

  .sticky-old-price {
    font-size: 10px !important;
    color: #888888 !important;
    text-decoration: line-through !important;
  }

  .sticky-cart-action {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  .btn-sticky-details {
    padding: 6px 9px !important;
    font-size: 10.5px !important;
    border-radius: 16px !important;
    border: 1.2px solid rgba(138, 21, 81, 0.25) !important;
    background: transparent !important;
    color: var(--color-primary, #8a1551) !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    display: none !important;
  }

  .btn-sticky-buy {
    padding: 7px 12px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, var(--color-primary, #8a1551), var(--color-secondary, #6f1041)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(138, 21, 81, 0.25) !important;
    gap: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  .btn-sticky-buy svg {
    width: 14px !important;
    height: 14px !important;
    stroke-width: 2.2 !important;
  }

  .btn-sticky-close {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    font-size: 12px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.05) !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  .btn-sticky-close:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
  }
}

@media (max-width: 380px) {
  .sticky-cart-bar {
    bottom: 8px !important;
    left: 6px !important;
    right: 6px !important;
    padding: 6px 8px !important;
  }

  .sticky-img-wrap,
  .sticky-img-spinner,
  .sticky-cart-img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .sticky-cart-title {
    max-width: 100px !important;
    font-size: 11.5px !important;
  }

  .sticky-cart-price {
    font-size: 11.5px !important;
  }

  .btn-sticky-buy {
    padding: 6px 9px !important;
    font-size: 10.5px !important;
  }

  .btn-sticky-buy svg {
    display: none !important;
  }

  .sticky-cart-tag {
    display: none !important;
  }
}

/* Ensure Guzel Smart Chat Assistant always floats safely ABOVE Sticky Bottom Bar on mobile */
@media (max-width: 768px) {
  body.has-sticky-bottom-bar .smart-chat-fab,
  body:has(#sticky-cart-bar.show) .smart-chat-fab,
  body:has(.sticky-cart-bar.show) .smart-chat-fab {
    bottom: 138px !important;
  }
}

@media (max-width: 420px) {
  body.has-sticky-bottom-bar .smart-chat-fab,
  body:has(#sticky-cart-bar.show) .smart-chat-fab,
  body:has(.sticky-cart-bar.show) .smart-chat-fab {
    bottom: 132px !important;
  }
}

/* ─── Floating Sticky Restorer Pill ─── */
.sticky-restore-pill {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1f0719 0%, #150311 50%, #2a0a22 100%);
  color: #ffffff !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 30px;
  padding: 10px 18px;
  box-shadow: 0 10px 30px rgba(138, 21, 81, 0.35), 0 4px 12px rgba(212, 175, 55, 0.2);
  cursor: pointer;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sticky-restore-pill.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.sticky-restore-pill:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 35px rgba(138, 21, 81, 0.5), 0 6px 18px rgba(212, 175, 55, 0.35);
  border-color: rgba(212, 175, 55, 0.8);
}

.sticky-restore-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(138, 21, 81, 0.3));
  border: 1px solid rgba(212, 175, 55, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  flex-shrink: 0;
}

.sticky-restore-text {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: 0.2px;
}

.sticky-restore-arrow {
  color: var(--color-gold, #d4af37);
  transition: transform 0.3s ease;
}

.sticky-restore-pill:hover .sticky-restore-arrow {
  transform: translateY(-2px);
}

/* Pulse Glow */
.sticky-restore-glow {
  position: absolute;
  inset: -3px;
  border-radius: 32px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
  opacity: 0.6;
  filter: blur(6px);
  pointer-events: none;
  animation: restorePillPulse 2.5s infinite alternate;
}

@keyframes restorePillPulse {
  0% { opacity: 0.3; transform: scale(0.98); }
  100% { opacity: 0.8; transform: scale(1.02); }
}

@media (max-width: 768px) {
  .sticky-restore-pill {
    bottom: 20px;
    right: 18px;
    padding: 8px 14px;
    gap: 8px;
  }

  .sticky-restore-icon {
    width: 24px;
    height: 24px;
  }

  .sticky-restore-icon svg {
    width: 13px;
    height: 13px;
  }

  .sticky-restore-text {
    font-size: 12px;
  }
}

