/* ==========================================================================
   SHOBBAIK MALL - REUSABLE UI COMPONENTS
   Buttons, Glass Cards, Badges, 3D Phone Mockup, Theme Toggle, and Modal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary Cold Gold Button with Shimmer */
.btn-gold {
  background-color: var(--gold-500);
  color: var(--text-on-gold);
  box-shadow: 0 8px 24px -4px rgba(251, 182, 51, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
  z-index: 2;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(251, 182, 51, 0.65), var(--glow-gold);
}

.btn-gold:hover::before {
  left: 150%;
}

/* Glass Outline Button */
.btn-outline {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
}

.btn-outline:hover {
  border-color: var(--gold-500);
  background: var(--bg-surface-elevated);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), var(--glow-gold);
}

/* App Store Buttons */
.store-badges-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-fast);
}

.btn-store:hover {
  border-color: var(--gold-500);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.btn-store svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  fill: currentColor;
}

.btn-store-text {
  display: flex;
  flex-direction: column;
  text-align: start;
}

.btn-store-text .subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.1;
}

.btn-store-text .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   2. Glass Cards
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: var(--card-shadow-hover);
}

/* --------------------------------------------------------------------------
   3. Badges & Pills
   -------------------------------------------------------------------------- */
.badge-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(251, 182, 51, 0.12);
  border: 1px solid rgba(251, 182, 51, 0.28);
  color: var(--text-badge);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.trust-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.trust-pill:hover {
  border-color: var(--gold-500);
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.trust-pill .icon {
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   4. 3D Interactive Phone Mockup & Screen Slider
   -------------------------------------------------------------------------- */
.phone-mockup-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  perspective: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-3d-stage {
  position: relative;
  width: 320px;
  height: 655px;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  filter: drop-shadow(var(--phone-frame-shadow));
}

/* Screen Viewport Inside Phone */
.phone-screen-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.phone-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.phone-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Screen Selector Chips Below Phone */
.screen-chips-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  z-index: 2;
}

.screen-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.screen-chip:hover {
  color: var(--text-main);
  border-color: var(--gold-500);
}

.screen-chip.active {
  background-color: var(--gold-500);
  color: var(--text-on-gold);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(251, 182, 51, 0.4);
}

/* Floating Notification Cards Around Mockup */
.floating-notif-card {
  position: absolute;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 15;
  animation: floatLevitate 5s ease-in-out infinite alternate;
}

.floating-notif-card.card-left {
  top: 18%;
  right: -25px;
  animation-delay: 0s;
}

.floating-notif-card.card-right {
  bottom: 22%;
  left: -25px;
  animation-delay: 2.5s;
}

@keyframes floatLevitate {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-14px) rotate(1deg); }
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notif-details {
  display: flex;
  flex-direction: column;
}

.notif-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.notif-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   5. Theme Switcher & Language Controls
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--gold-500);
  transform: rotate(15deg);
  box-shadow: var(--glow-gold);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Language Pill */
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.lang-pill .tag-future {
  font-size: 0.7rem;
  color: var(--gold-500);
  background: rgba(251, 182, 51, 0.15);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   6. QR Modal Popup
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), var(--glow-gold);
  transform: scale(0.92);
  transition: transform var(--transition-bounce);
  position: relative;
}

.modal-backdrop.active .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: #E11D48;
  color: #fff;
  border-color: transparent;
}

.qr-code-img {
  width: 200px;
  height: 200px;
  margin: 20px auto;
  padding: 12px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 2px solid var(--gold-500);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
