/* ═══════════════════════════════════════════════════════════
   TULASI NURSERY — DIGITAL FLAGSHIP DESIGN SYSTEM (main.css)
   Mobile-First | Ultra-Premium UI | Pure Vanilla CSS & Local Fonts
   Brand Colors: Deep Green (#164E24) & Logo Accent Orange (#F36F21)
   Backgrounds: Pure White (#FFFFFF) & Soft Warm Off-White (#FAF9F5)
═══════════════════════════════════════════════════════════ */

/* ── Local Font Declarations (Offline & PWA Ready) ───────── */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/font_1.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/font_11.woff2') format('woff2');
}

/* ── Custom Design Tokens ────────────────────────────────── */
:root {
  --primary:        #164E24;
  --primary-hover:  #0F3818;
  --accent-orange:  #F36F21;
  --accent-hover:   #D95910;
  --earth-brown:    #5D4037;
  
  --bg-main:        #FFFFFF;
  --bg-warm:        #FAF9F5;
  --bg-botanical:   #F4F7F4;
  --bg-card:        #FFFFFF;
  
  --text-main:      #1E2925;
  --text-muted:     #64748B;
  --text-light:     #94A3B8;
  
  --border-light:   #E8ECE7;
  --border-active:  #CBD5E1;
  
  --shadow-subtle:  0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover:   0 12px 32px rgba(22, 78, 36, 0.08);
  --shadow-drawer:  -4px 0 24px rgba(0, 0, 0, 0.1);
  
  --radius-sm:      10px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-pill:    999px;
  
  --font-head:      'Outfit', -apple-system, system-ui, sans-serif;
  --font-body:      'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  
  --transition:     all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max:  1280px;
}

/* ── Reset & Accessibility ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

input, select, textarea {
  font-family: inherit;
}

/* ── PWA Install Banner Popup ────────────────────────────── */
.pwa-install-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 480px;
  background-color: #FFFFFF;
  border: 2px solid var(--primary);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 10000;
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpBanner {
  from { transform: translate(-50%, 120px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.pwa-banner-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
  min-width: 0;
}

.pwa-banner-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  line-height: 1.2;
  white-space: normal;
}

.pwa-banner-text p {
  font-size: 0.76rem;
  color: #475569;
  margin-top: 0.15rem;
  line-height: 1.25;
  white-space: normal;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.pwa-close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #64748B;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-close-btn:hover {
  background-color: #F1F5F9;
}

/* Custom PWA Instructions Modal */
.pwa-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.pwa-modal-card {
  background-color: #FFFFFF;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  color: #1E2925;
  border: 1px solid #E2E8F0;
  animation: modalZoom 0.25s ease-out forwards;
}

@keyframes modalZoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.pwa-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pwa-modal-header img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.pwa-modal-header h3 {
  font-size: 1.2rem;
  color: #164E24;
  font-weight: 800;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background: #F8FAFC;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.pwa-step-num {
  background: #164E24;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-text {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.4;
}

.pwa-step-text strong {
  color: #0F172A;
}

/* ── Layout Container ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ── Typography System ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-muted);
}

/* ── Button Components ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(22, 78, 36, 0.2);
}

.btn-orange {
  background-color: var(--accent-orange);
  color: #FFFFFF;
}

.btn-orange:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(243, 111, 33, 0.25);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #FFFFFF;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 38px;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  min-height: 54px;
}

.btn-full {
  width: 100%;
}

/* ── Sticky Header & Top Bar ──────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.header-top {
  background-color: var(--bg-warm);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
}

@media (max-width: 991px) {
  .header-top {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    border: none !important;
  }
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ht-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ht-link {
  color: var(--primary);
  font-weight: 600;
}

.ht-link:hover {
  color: var(--accent-orange);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.65rem 1.25rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 68px !important;
  max-height: 68px !important;
  width: auto !important;
  max-width: 270px !important;
  object-fit: contain !important;
}

.logo-badge {
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  line-height: 1;
}

.logo-brand span {
  color: var(--accent-orange);
}

.logo-tagline {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

/* Header Live Search */
.nav-search-wrap {
  flex: 1;
  max-width: 460px;
  position: relative;
}

@media (max-width: 767px) {
  .nav-search-wrap {
    display: none; /* Accessible in mobile drawer / hero */
  }
}

.search-input-field {
  width: 100%;
  padding: 0.65rem 2.8rem 0.65rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background-color: var(--bg-warm);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-input-field:focus {
  background-color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 78, 36, 0.1);
}

.search-submit-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.1rem;
}

/* Instant Search Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-light);
  max-height: 360px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.search-result-item:hover {
  background-color: var(--bg-warm);
}

.search-result-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.search-result-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.search-result-price {
  font-size: 0.85rem;
  color: var(--accent-orange);
  font-weight: 700;
  margin-left: auto;
}

/* Header Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-main);
  font-size: 1.25rem;
  padding: 0.35rem 0.5rem;
  transition: var(--transition);
}

.nav-icon-btn:hover {
  color: var(--primary);
}

.nav-icon-label {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 2px;
  color: var(--text-muted);
}

.nav-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--accent-orange);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-btn {
  font-size: 1.5rem;
  color: var(--primary);
  display: none;
}

@media (max-width: 991px) {
  .hamburger-btn {
    display: block;
  }
  .nav-actions-desktop {
    display: none;
  }
}

/* ── Mobile Menu Drawer ───────────────────────────────────── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background-color: #FFFFFF;
  z-index: 1200;
  box-shadow: var(--shadow-drawer);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  right: 0;
}

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

.drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.drawer-nav-link:hover {
  color: var(--accent-orange);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  background-color: var(--bg-warm);
  border-top: 1px solid var(--border-light);
  margin-top: 4rem;
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-col h4 {
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--accent-orange);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Floating WhatsApp Button */
.whatsapp-floating-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  z-index: 990;
  transition: var(--transition);
}

.whatsapp-floating-btn:hover {
  transform: scale(1.1);
}
