/* ===========================
   Rizara Site Stylesheet
   Production-Stable UI
   Mobile-First + No Overflow
   =========================== */

/* Root Colors */
:root {
  --brand-green: #1E4D2B;
  --brand-gold: #FFD700;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-dark: #333333;
  --gray-mid: #666666;

  /* UI helpers */
  --shadow-sm: 0 6px 16px rgba(0,0,0,0.10);
  --shadow-md: 0 10px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.18);
  --radius-lg: 1.25rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
}

/* ===========================
   Reset & Base
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* CRITICAL: prevent horizontal scroll caused by wide elements */
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--gray-dark);
  line-height: 1.6;
  background-color: var(--white);
}

/* Global media sanity */
img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Avoid long text/buttons forcing overflow */
a, button {
  max-width: 100%;
}

/* ===========================
   Containers
   =========================== */
.container {
  width: min(92%, 1200px);
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   Utility Classes
   =========================== */
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

.text-center { text-align: center; }

.w-full { width: 100%; }

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-w-lg {
  max-width: 720px;
}

/* ===========================
   Grid Layouts
   =========================== */
.grid-2,
.grid-3 {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Navbar (Responsive Fix)
   - Prevents "Login / Place Order" hiding off-screen
   - Prevents "Home" sandwiching
   - Supports hamburger menu via .nav-links.is-open
   =========================== */

/* Keep using your existing <header> + .navbar + .brand + .nav-links */
header {
  background-color: var(--brand-green);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 1.5rem;
  gap: 12px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
  min-width: 0; /* allow flex shrinking safely */
}

.brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.brand span, .brand-text {
  white-space: nowrap;
}

/* Nav links (desktop) */
.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: flex-end;

  /* CRITICAL: prevents off-screen buttons on smaller widths */
  flex-wrap: wrap;
  min-width: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  white-space: nowrap;
  padding: 0.45rem 0.4rem;
  border-radius: 0.6rem;
}

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

/* CTA link inside nav */
.nav-cta {
  background-color: var(--brand-gold);
  color: var(--brand-green) !important;
  padding: 0.55rem 1.25rem !important;
  border-radius: 0.75rem !important;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-cta:hover {
  background-color: var(--white);
}

/* Optional secondary CTA style if you want a "Login" button look */
.nav-cta-outline {
  border: 1px solid rgba(255,255,255,0.55);
  padding: 0.55rem 1.1rem !important;
  border-radius: 0.75rem !important;
  font-weight: 700;
}

/* Hamburger toggle button (add in HTML: <button class="nav-toggle">☰</button>) */
.nav-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,0.55);
  background: transparent;
  color: var(--white);
  border-radius: 0.75rem;
  padding: 0.45rem 0.7rem;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}

/* Mobile navbar behavior */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    flex-wrap: wrap; /* nav can drop under brand row */
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  /* Hide nav by default on mobile; open with .is-open */
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.75rem 0 0.25rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: left;
    padding: 0.8rem 0.9rem;
    background: rgba(255,255,255,0.06);
  }

  .nav-links a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.12);
  }

  .nav-cta {
    width: 100%;
  }

  .nav-cta-outline {
    width: 100%;
  }
}

/* ===========================
   Hero Section
   =========================== */
section.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}

.hero-text {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--brand-green);
}

/* Optional: add a supporting paragraph class if you use it */
.hero-subtext {
  font-size: 1.05rem;
  color: var(--gray-mid);
  margin: 0 0 1.25rem;
  max-width: 54ch;
}

section.hero img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 900px) {
  section.hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtext {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===========================
   Cards
   =========================== */
.card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(0,0,0,0.06);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.16);
}

.card img {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  object-fit: contain;
}

/* Card title/text helpers if you use headings */
.card h3 {
  margin: 0.25rem 0 0.5rem;
  color: var(--brand-green);
}

.card p {
  margin: 0;
  color: var(--gray-mid);
}

/* ===========================
   Buttons
   =========================== */
.btn,
.hero-button {
  background-color: var(--brand-green);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn:hover,
.hero-button:hover {
  background-color: var(--brand-gold);
  color: var(--brand-green);
}

.hero-button {
  font-size: 1.05rem;
  font-weight: 800;
}

/* Optional secondary button style */
.btn-outline {
  background: transparent;
  border: 1px solid rgba(30,77,43,0.35);
  color: var(--brand-green);
}

.btn-outline:hover {
  border-color: var(--brand-green);
  background: rgba(30,77,43,0.08);
  color: var(--brand-green);
}

/* ===========================
   Forms
   =========================== */
form {
  margin-top: 2rem;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  background: var(--white);
}

.input-field:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(30,77,43,0.2);
}

.hp-field {
  display: none;
}

/* ===========================
   Footer
   =========================== */
footer {
  background-color: var(--brand-green);
  color: var(--white);
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
}

footer p,
footer span {
  color: var(--white);
}

/* ===========================
   Admin Floating Button
   =========================== */
.admin-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--brand-green);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: bold;
  text-decoration: none;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.admin-btn:hover {
  background-color: var(--brand-gold);
  color: var(--brand-green);
  transform: scale(1.05);
}

/* ===========================
   Mobile Polish
   =========================== */
@media (max-width: 640px) {
  .hero-text {
    font-size: 2rem;
  }

  .btn,
  .hero-button {
    width: 100%;
    text-align: center;
  }

  /* Keep containers comfy on very small screens */
  .container {
    width: 92%;
  }
}
