/* Vaishnavi Enterprises — Custom Styles */

/* ── Product card: lift above siblings when select/dropdown is open ── */
.product-card {
  position: relative;
  z-index: 0;
}
.product-card:focus-within {
  z-index: 20;
}

/* ── Mobile base ─────────────────────────────── */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
body { -webkit-text-size-adjust: 100%; }

:root {
  --brand-navy: #0f172a;
  --brand-orange: #f97316;
  --brand-cream: #fff7ed;
}

body {
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.10), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
}

.body-scroll-lock {
  overflow: hidden !important;
  touch-action: none;
  overscroll-behavior: none;
}

#mobileMenu {
  overscroll-behavior: contain;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.hero-shell {
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.32), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #1e3a5f 52%, #0f766e 100%);
}

.logo-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-frame-header {
  width: 58px;
  height: 58px;
}

.logo-frame-footer {
  width: 166px;
  height: 74px;
}

.logo-frame-admin {
  width: 162px;
  height: 64px;
}

.logo-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.10));
}

/* Minimum tap target 44px on mobile */
button, a, input[type="radio"], input[type="checkbox"],
select { min-height: 44px; }
input[type="radio"], input[type="checkbox"] { min-height: unset; }

/* Prevent zoom on input focus (iOS) */
input, select, textarea { font-size: 16px !important; }

/* ── Product cards ──────────────────────────── */
.product-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.10); }

/* Smooth transitions */
a, button { transition: all 0.15s ease; }

.quick-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  border-radius: 18px 0 0 18px;
  padding: 0.75rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  transition: background 0.15s, transform 0.15s;
}
.quick-contact-pill:hover { transform: translateX(-3px); }

.assistant-panel {
  animation: assistantRise 0.2s ease;
}

.assistant-bubble {
  max-width: 85%;
  border-radius: 18px;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.assistant-bubble-user {
  margin-left: auto;
  background: var(--brand-navy);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.assistant-bubble-bot {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 6px;
}

/* Cart badge bounce */
@keyframes cartBounce { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }
.cart-bounce { animation: cartBounce 0.3s ease; }

/* Stock pulse */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.stock-pulse { animation: pulse 2s infinite; }

/* Form inputs focus ring */
input:focus, select:focus, textarea:focus { outline: none; }

/* Admin sidebar active */
.admin-nav-active { background: #F97316; color: #fff; font-weight: 600; }

/* Responsive table scroll */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Alert slide in */
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
#flashMsg { animation: slideIn 0.3s ease; }

@keyframes assistantRise {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.field-input {
  margin-top: 0.4rem;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0.85rem 1rem;
  background: #fff;
  color: #0f172a;
}

.field-input:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.15);
}

.field-error {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #dc2626;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1rem;
}

#searchSuggestions a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 18px;
  padding: 0.8rem 0.9rem;
  color: #0f172a;
}

#searchSuggestions a:hover {
  background: #fff7ed;
}

/* Hide scrollbar utility (used on tab bars) */
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Auth page: remove body bg gradient so split panel looks clean */
.auth-page { background: #f8fafc !important; }

/* Print invoice */
@media print {
  nav, footer, .no-print { display: none !important; }
  body { background: white; }
}

@media (max-width: 640px) {
  .logo-frame-header {
    width: 48px;
    height: 48px;
  }

  #assistantWidget {
    right: 0.75rem;
    bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }

  #whatsappWidget {
    left: 0.75rem;
    bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }

  #assistantToggle {
    width: 3rem;
    height: 3rem;
    font-size: 0.85rem;
  }

  .assistant-panel {
    position: fixed;
    right: 0.75rem;
    bottom: calc(9.25rem + env(safe-area-inset-bottom));
    width: min(92vw, 340px);
    max-height: min(70vh, 440px);
    overflow: hidden;
  }

  #assistantMessages {
    max-height: min(46vh, 280px);
  }
}

@media (max-width: 374px) {
  #assistantWidget {
    right: 0.5rem;
    bottom: calc(6.25rem + env(safe-area-inset-bottom));
  }

  #whatsappWidget {
    left: 0.5rem;
    bottom: calc(6.25rem + env(safe-area-inset-bottom));
  }

  #assistantToggle {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.75rem;
  }

  .assistant-panel {
    right: 0.5rem;
    bottom: calc(9.5rem + env(safe-area-inset-bottom));
    width: calc(100vw - 1rem);
  }
}
