/* ===========================================================
   CLEAN HEALTH FORMULA — ROOT & NAVBAR (STABLE v3.1)
   Fixes: overflow, shifting, unwanted arrows, mobile bounce
=========================================================== */


*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent unwanted page movement */
html, body {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Remove unwanted scrollbars everywhere */
* {
  scrollbar-width: none !important;
}
*::-webkit-scrollbar {
  display: none !important;
}

/* ROOT VARIABLES */
:root {
  --green-dark: #2F5D38;
  --green-light: #91B68C;
  --orange: #D56F1D;
  --beige: #FAF8EE;
  --accent: #1b7a36;
  --accent-2: #2aa64f;
  --muted: #6b7280;
  --bg: #faf7ed;
  --card: #ffffff;

  --shadow: 0 10px 30px rgba(12,34,18,0.06);
  --radius: 14px;
  --pad: 20px;
  --max-width: 1180px;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--beige);
  color: #1C1C1C;
  line-height: 1.55;
}


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


/* ===========================================================
   3️⃣ GLOBAL ELEMENT STYLING
----------------------------------------------------------- */

.container {
  width: 90%;
  max-width: var(--max-width);
  margin-inline: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.25s ease;
}

p { margin-bottom: 14px; }

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

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

ul, li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Correct headings */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  margin: 0;
}

/* ===========================================================
   FIX — Remove arrows from <input type="number">
----------------------------------------------------------- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* ===========================================================
   FIX — Remove arrows from <summary> & <details>
   (This is exactly what is showing in your red-marked screenshot)
----------------------------------------------------------- */
details > summary {
  list-style: none !important;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none !important;
}

/* ===========================================================
   4️⃣ MOBILE SAFETY — Prevent any flex/grid overflow
----------------------------------------------------------- */
@media (max-width: 768px) {
  body, html {
    max-width: 100%;
    overflow-x: hidden !important;
  }
}


/* ===========================================================
   5️⃣ NAVBAR — Clean & Stable
----------------------------------------------------------- */
.navbar {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 10px 0;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.nav-container {
  width: 95%;
  max-width: 1300px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* Brand */
.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-brand h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-dark);
}

.nav-brand span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
  margin-top: -2px;
}

/* Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #000;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--green-dark);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-dark);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* Search */
.nav-search {
  display: flex;
  align-items: center;
  background: #f3f3f3;
  border-radius: 25px;
  padding: 6px 10px;
  overflow: hidden;
  min-width: 220px;
}

.nav-search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.9rem;
  background: transparent;
  padding: 6px 8px;
}

.nav-search button {
  font-size: 1.2rem;
  color: var(--green-dark);
}

.nav-search button:hover {
  color: var(--orange);
}

/* Icons */
.icon-btn {
  font-size: 1.4rem;
  color: var(--green-dark);
  transition: 0.3s;
  position: relative;
}

.icon-btn:hover {
  color: var(--orange);
  transform: scale(1.1);
}

/* Perfect circular cart badge (desktop + mobile) */
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;

  background: var(--orange);
  color: #fff;

  font-size: 0.65rem;
  font-weight: 700;

  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


/* Mobile Grid Layout */
@media (max-width: 768px) {
  .nav-container {
    display: grid;
    grid-template-areas:
      "brand icons"
      "search cart"
      "menu menu";
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .nav-brand { grid-area: brand; }
  .nav-top-icons { grid-area: icons; display: flex; justify-content: flex-end; gap: 12px; }
  .nav-search { grid-area: search; width: 100%; }
  .nav-cart { 
    grid-area: cart; 
    display: flex; 
    justify-content: center;
      padding-right: 14px;   /* creates safe space for the badge */
  }
  .nav-menu { 
    grid-area: menu; 
    border-top: 1px solid #eee; 
    padding-top: 8px; 
    justify-content: center;
  }
}

/* Ensure badge stays inside icon */
.nav-cart .icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Badge fine-tuning for mobile */
@media (max-width: 768px) {
  .cart-count {
    top: -3px;
    right: -3px;
    width: 17px;
    height: 17px;
    font-size: 0.62rem;
  }
}

/* ============================
   🔥 FIX — CART BADGE CLIPPING (MOBILE)
=============================== */

/* Make cart container stable and spacious */
.nav-cart {
  grid-area: cart;
  display: flex;
  align-items: center;
  justify-content: flex-end;

  min-height: 40px;   /* prevents clipping */
  min-width: 50px;    /* gives bubble room */
  padding-right: 6px; /* balanced padding */
}


/* GLOBAL: Keep all section titles centered */
.section-title,
.story-title,
.about-brand-lead,
.about-promise .section-title {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}





/* ===========================================================
   CLEAN HEALTH FORMULA — PREMIUM FOOTER
=========================================================== */

.ch-footer {
  background: #0f1f22;
  color: #ffffffdd;
  padding: 60px 0 20px;
  font-family: var(--font-body);
  margin-top: 40px;
}

.footer-container {
  width: 90%;
  max-width: var(--max-width);
  margin: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #ffffffc7;
  font-size: 0.95rem;
  transition: 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--accent-2);
}

/* BRAND BLOCK */
.footer-brand .brand-title {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
}

.footer-brand .brand-title span {
  color: var(--orange);
}

.footer-brand .brand-tagline {
  font-size: 0.95rem;
  color: #ffffffbb;
  margin: 8px 0;
}

.brand-note {
  font-size: 0.9rem;
  color: #ffffffaa;
}

/* TRUST ICONS */
.trust-icons {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.trust-icons img {
  width: 60px;
  opacity: 0.85;
  filter: grayscale(10%);
}

/* SOCIAL ICONS */
.footer-social .social-icons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-social a {
  font-size: 1.35rem;
  color: #ffffffcc;
  transition: 0.3s;
}

.footer-social a:hover {
  color: var(--accent-2);
}

/* ===========================================================
   FOOTER BOTTOM — WITH ANIMATED CREDITS
=========================================================== */

.footer-bottom {
    width: 100%;
    padding: 18px 10px;  /* Added more padding */
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #b7c3c7;
}

.footer-copy,
.footer-credit {
    cursor: pointer;
    position: relative;
    transition: 0.3s ease;
}

/* Shared Hover Glow Effect */
.footer-copy:hover,
.footer-credit:hover span {
    color: #2dff87;
    text-shadow: 0 0 8px rgba(45, 255, 135, 0.8);
    transform: translateY(-2px);
}

/* Underline animation */
.footer-copy::after,
.footer-credit span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: #2dff87;
    box-shadow: 0 0 8px rgba(45, 255, 135, 0.8);
    transition: width 0.35s ease;
    border-radius: 2px;
}

/* Trigger underline on hover */
.footer-copy:hover::after {
    width: 100%;
}

.footer-credit span:hover::after {
    width: 100%;
}

/* Highlight developer name */
.footer-credit span {
    font-weight: 600;
    color: #ffffff;
    position: relative;
    display: inline-block;
}

/* RESPONSIVE FOOTER BOTTOM */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* RESPONSIVE GRID */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .trust-icons {
    justify-content: center;
  }

  .social-icons {
    justify-content: center;
  }
}




/* ============================================================
   Animation
===============================================================*/
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==========================================================
   ✨ TOAST NOTIFICATION ENHANCEMENT (v2)
   Smooth slide-up + fade-in/out animation — matches brand theme
========================================================== */

/* Base toast styling (already defined in your file)
   This snippet enhances animation and responsiveness */
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(60px) scale(0.95);
  background: var(--green-dark);
  color: #fff;
  padding: 14px 22px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
              opacity 0.4s ease;
}

/* ✅ Toast appears with smooth slide-up and fade */
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ✅ Toast disappears with downward fade */
.toast.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(60px) scale(0.95);
}

/* ❌ Error type color — consistent with theme */
.toast.error {
  background: var(--orange, #d63031);
}

/* ✅ Optional: subtle animation for icon */
.toast i {
  animation: toastIconPop 0.5s ease forwards;
}
@keyframes toastIconPop {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive improvements */
@media (max-width: 480px) {
  .toast {
    bottom: 20px;
    font-size: 0.9rem;
    padding: 12px 18px;
  }
}




/* Modal Overlay */
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Main Box */
.fancy-login {
  background: #ffffff;
  padding: 40px 35px;
  border-radius: 18px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 10px 45px rgba(0,0,0,0.15);
  position: relative;
  animation: popIn 0.25s ease;
}

/* Close Button */
.login-close {
  position: absolute;
  right: 18px;
  top: 18px;
  border: none;
  background: none;
  font-size: 26px;
  cursor: pointer;
  color: #444;
}

/* Brand Title */
.brand-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: #174b2b;
  margin-bottom: 6px;
}

.brand-title span {
  color: #e37b22;
}

.brand-tagline {
  text-align: center;
  color: #6a6a6a;
  font-size: 1rem;
  margin-bottom: 28px;
}

/* Input */
.login-input {
  width: 90%;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #f5f8fc;
  margin-top: 6px;
  font-size: 1rem;
}

/* Labels */
.input-label {
  display: block;
  font-size: 1rem;
  color: #444;
  margin-bottom: 4px;
}

.primary-btn {
  width: 90%;
  padding: 12px;
  margin-top: 14px;
  background: #176533;
  color: white;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.primary-btn:hover {
  background: #0e4a24;
}

.resend-btn {
  margin-left: 10px;
  padding: 12px 16px;
  background: #dfe7e2;
  border-radius: 8px;
  color: #174b2b;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.resend-btn.enabled {
  background: #c4efcc;
}

.otp-actions {
  display: flex;
  justify-content: left;
  align-items: center;
  margin-top: 10px;
}

/* Change number */
.change-number {
  text-align: center;
  margin-top: 15px;
  color: #176533;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

/* Error text */
.auth-error {
  margin-top: 8px;
  color: red;
  font-size: .9rem;
}

/* Animation */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* MOBILE RESPONSIVE FIX */
@media (max-width: 500px) {
    .login-box {
        width: 92% !important;
        max-width: 92% !important;
        padding: 20px !important;
        border-radius: 14px !important;
        margin: 0 4%;
    }

    .login-box h2 {
        font-size: 1.4rem !important;
        text-align: center;
    }

    .login-box p {
        text-align: center;
        font-size: 0.95rem !important;
    }

    .login-box input {
        font-size: 1rem !important;
    }

    .login-box button {
        width: 100%;
        font-size: 1rem !important;
    }
}

/* FIX CLOSE BUTTON ON MOBILE */
@media (max-width: 500px) {
    .login-close {
        top: 8px !important;
        right: 10px !important;
        font-size: 30px !important;
    }
}


/* ===========================================================
   CLEAN HEALTH FORMULA — POLICY PAGES
=========================================================== */

.policy-page {
    margin: 50px auto;
    max-width: var(--max-width);
    padding: 20px 10px;
}

.policy-card {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
    line-height: 1.75;
}

.policy-card h1 {
    font-size: 1.9rem;
    color: var(--green-dark);
    margin-bottom: 10px;
}

.policy-card h2 {
    font-size: 1.35rem;
    color: var(--green-dark);
    margin-top: 28px;
    margin-bottom: 10px;
}

.policy-card p,
.policy-card li {
    font-size: 1rem;
    color: #444;
}

.policy-card ul {
    padding-left: 20px;
}

.policy-card a {
    color: var(--accent);
    font-weight: 600;
}

.policy-card a:hover {
    text-decoration: underline;
}

.policy-card .muted {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .policy-card {
        padding: 22px;
    }

    .policy-card h1 {
        font-size: 1.6rem;
    }

    .policy-card h2 {
        font-size: 1.2rem;
    }
}
