/* ==========================================================================
   COMPONENTS - STICKY BARS, MODALS, CHAT WIDGET & TRACKING TIMELINE
   ========================================================================== */

/* Floating Live Chat & Social Widget */
.floating-chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Floating Buttons Container */
.floating-btns-row {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 9999;
}

/* Shared floating button style */
.float-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  z-index: 1000;
}

.float-btn:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
}

.whatsapp-btn {
  background: #25D366;
  color: #FFFFFF;
}

.instagram-btn {
  background: linear-gradient(135deg, #E44062 0%, #C13584 100%);
  color: #FFFFFF;
}

.luxury-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: var(--toast-fg);
  border: 1px solid var(--toast-border);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-align: center;
  font-size: 0.9rem;
  max-width: 400px;
  white-space: pre-wrap;
}

.luxury-toast.show {
  opacity: 1;
}

.chat-trigger-btn {
  width: 56px;
  height: 56px;
  background: var(--accent-gold);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.chat-trigger-btn:hover {
  transform: scale(1.1);
  background: var(--accent-gold-hover);
}

.chat-popover {
  position: absolute;
  bottom: 75px;
  right: 0;
  max-width: min(320px, calc(100% - 24px));
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: none;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chat-popover.show {
  display: block;
}

.chat-popover-header {
  background: var(--announce-bg);
  color: var(--announce-fg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-popover-body {
  padding: 20px;
}

/* Order Tracking Progress Bar Timeline */
.tracking-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 40px 0;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}

.tracking-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-icon-wrap {
  width: 50px;
  height: 50px;
  background: var(--bg-subtle);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.tracking-step.completed .step-icon-wrap {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #FFFFFF;
}

.tracking-step.active .step-icon-wrap {
  background: var(--text-main);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 0 6px rgba(197, 160, 89, 0.2);
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Photo Upload Review Grid */
.review-photo-grid {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.review-photo-item {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* Sticky Header Quick Buy Bar */
.sticky-product-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1020;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.08);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Device-friendly: floating chat widget & sticky buy bar on small screens */
.floating-chat-widget {
  bottom: 16px;
  right: 16px;
  gap: 10px;
}
.float-btn {
  width: 56px;
  height: 56px;
  font-size: 2rem;
}
.chat-popover {
  bottom: 78px;
  max-width: min(320px, calc(100% - 24px));
  width: 320px;
  right: 0;
}

@media (max-width: 480px) {
  .floating-chat-widget {
    bottom: 12px;
    right: 12px;
  }
  .float-btn { width: 48px; height: 48px; font-size: 1.6rem; }
  .chat-popover { bottom: 70px; right: 0; left: auto; }
  .chat-popover-header { padding: 12px; }
  .chat-popover-body { padding: 14px; }
}

/* Keep chat + sticky bar from overlapping on landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
  .floating-chat-widget { bottom: 60px; }
  .sticky-product-bar { padding: 8px 16px; }
}

/* Ensure popover never clips screen edge */
.chat-popover.show {
  left: auto;
  right: 16px;
  max-width: min(320px, calc(100vw - 32px));
}

