/* ============================================================
   PADMANABH AYURVEDICS — COMPONENTS CSS
   Buttons · Cards · Nav · Forms · Modals · Badges
   ============================================================ */

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.975); }

/* Primary (Gold) */
.btn-primary {
  background: var(--gold);
  color: var(--text-inverse);
  box-shadow: 0 4px 20px rgba(100,164,53,0.3);
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 6px 28px rgba(100,164,53,0.45);
  transform: translateY(-1px);
}

/* Outline Gold */
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.btn-outline:hover {
  background: var(--gold-muted);
  border-color: var(--gold);
}

/* Ghost / Text */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(224,92,92,0.3);
}

.btn-danger:hover {
  background: rgba(224,92,92,0.1);
}

/* Sizes */
.btn-sm { padding: 9px 18px; font-size: 0.8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Shimmer on primary button */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

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

/* ── Navigation ────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6), 0 0 16px rgba(100, 164, 53, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── Image Upload ───────────────────────────────────────────── */
.image-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.image-upload-zone:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-muted);
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -- FAB Container & Buttons ---------------------------------- */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1500;
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.fab:hover {
  background: var(--bg-card);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.chat-fab {
  background: var(--gold);
  color: var(--text-inverse);
  border: none;
}

.chat-fab:hover {
  background: var(--gold-light);
  color: var(--text-inverse);
}

.fab .cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -- Chatbot Window ------------------------------------------- */
.chatbot-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 360px;
  height: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 1600;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chatbot-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gold);
}

.chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  max-width: 85%;
  line-height: 1.5;
}

.chat-message.bot {
  background: var(--bg-elevated);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  background: var(--gold-dark);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg-elevated);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.chat-input-area input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
}

.chat-input-area input:focus {
  border-color: var(--gold);
}

/* -- Side Drawer ---------------------------------------------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}

.side-drawer.open {
  transform: translateX(0);
}

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

.side-drawer-title {
  margin: 0;
  font-size: 1.25rem;
}

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

@media (max-width: 480px) {
  .chatbot-window {
    right: 12px;
    bottom: 76px;
    width: calc(100% - 24px);
    height: 60vh;
  }
}


/* -- Footer --------------------------------------------------- */
#site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.6;
  max-width: 300px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.social-link:hover {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.footer-heading {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ── Floating Mobile Nav (Glassmorphism) ───────────────────── */
.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }
  
  /* Hide the top navbar on mobile to favor the bottom nav */
  #navbar { 
    display: none !important; 
  }

  /* Add padding to prevent content from being hidden by the floating mobile nav */
  #app {
    padding-bottom: 120px;
  }
}

#floating-mobile-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1400; /* Just below floating actions which are 1500 */
}

/* Move floating actions up slightly on mobile so they don't overlap with the nav */
@media (max-width: 768px) {
  .fab-container {
    bottom: 90px;
  }
}

.glass-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: var(--gold);
}

.glass-pill-container {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-radius: 50px;
  padding: 6px;
  gap: 4px;
}

.glass-pill-link {
  padding: 8px 16px;
  border-radius: 50px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.glass-pill-link:hover {
  color: var(--text-primary);
}

.glass-pill-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

