/* =========================
   Clayora — Final stylesheet (updated)
   Replace your styles.css with this file
   ========================= */

/* --------------------
   Color + variables
-------------------- */
:root {
  --majestic-green: #2e473b;
  --cream: #fdfbf7;
  --tan: #d2b48c; /* used as golden/tan border color */
  --white: #ffffff;
  --black: #000000;
  --gray: #666;
  --light-gray: #f5f5f5;

  /* layout vars */
  --site-max: 1200px;
  --gutter: 1.2rem;
  --card-radius: 12px;
  --header-height: 64px; /* used for reserved space */
}

/* --------------------
   Reset / base
-------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--majestic-green);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  /* reserve header space immediately so there's no flash/overlap */
  padding-top: var(--header-height);
}

/* small utility */
.sr-only { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* --------------------
   Promo Bar
-------------------- */
.promo {
  background: var(--majestic-green);
  color: var(--cream);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.4rem var(--gutter);

  /* golden border on majestic blocks */
  border: 2px solid var(--tan);
  border-radius: 6px;
  box-sizing: border-box;
}

/* --------------------
   Header (fixed by default)
-------------------- */
header {
  background: var(--white);
  border-bottom: 1px solid #eee;
  position: fixed; /* fixed by default as requested */
  left: 0;
  right: 0;
  top: 0;
  height: var(--header-height);
  z-index: 10000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.header-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0.6rem 1.2rem; /* slightly reduced padding so header fits neatly */
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* fallback in case any script toggles classes */
header.fixed { /* kept for compatibility with scripts, behaves same as header */
  position: fixed;
}

/* ensure we keep reserved space if body class toggles are used later */
body.header-fixed { padding-top: var(--header-height); }

.left-nav a {
  margin-right: 1.2rem;
  text-decoration: none;
  color: var(--majestic-green);
  font-weight: 500;
  font-size: 0.95rem;
}

/* --- Logo changes: larger and more prominent --- */
.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.9rem; /* increased for more emphasis */
  color: var(--majestic-green);
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 6px;
}

/* subtle gold outline option for logo area when placed over green blocks
   (not applied by default — keeps compatibility), you can add .logo--gold to HTML if desired */
.logo--gold {
  border: 2px solid var(--tan);
  background: rgba(242, 236, 218, 0.02);
}

/* right icons */
.right-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.icon-btn {
  text-decoration: none;
  color: var(--majestic-green);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* --------------------
   Hero Section
-------------------- */
.hero {
  text-align: center;
  padding: 4rem var(--gutter);
  min-height: 220px; /* reserves space to reduce layout jump */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
}

/* Slightly reduced hero heading so logo becomes more dominant */
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem); /* reduced a touch from previous */
  margin-bottom: 0.4rem;
  color: var(--majestic-green);
}

.hero p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--gray);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  background: var(--majestic-green);
  color: var(--cream);
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.18s ease, transform 0.08s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* touch target */
}
.btn-primary:hover { background: #25392f; transform: translateY(-1px); }

/* --------------------
   Sections
-------------------- */
.section {
  max-width: var(--site-max);
  margin: 2rem auto;
  padding: 0 var(--gutter);
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1.2rem;
  text-align: center;
  color: var(--majestic-green);
}

/* --------------------
   Product Grid
-------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* good mobile fit */
  gap: 1rem;
}

/* --------------------
   Product Cards
-------------------- */
.card {
  background: var(--white);
  border-radius: var(--card-radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
}

/* Media frame — reserve aspect ratio to avoid CLS.
   Use contain on images so products are never cropped. */
.card .media {
  width: 100%;
  aspect-ratio: 4 / 3; /* consistent frame; change if you prefer */
  border-radius: 10px;
  overflow: hidden;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Images inside frame — no crop: show full product */
.card .media img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* show whole product, no crop */
  object-position: center;
  display: block;
  border-radius: 0;    /* parent already has rounding */
}

/* Titles — allow wrapping on small screens */
.card-title {
  margin-top: 0.4rem;
  font-weight: 600;
  color: var(--majestic-green);
  font-size: clamp(0.95rem, 1.7vw, 1rem);
  white-space: normal;        /* allow wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* show max 2 lines */
  -webkit-box-orient: vertical;
  line-height: 1.2;
  min-height: 2.4em;
}

/* --------------------
   Imagery helpers
-------------------- */
/* placeholder shimmer while images load to reduce perceived CLS */
.img-placeholder {
  background: linear-gradient(90deg, #f3f3f3 0%, #ecebeb 50%, #f3f3f3 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 10px;
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* --------------------
   Footer
   (also given the golden border treatment)
-------------------- */
footer {
  background: var(--majestic-green);
  color: var(--cream);
  padding: 2rem var(--gutter);
  margin-top: 3rem;

  /* golden border */
  border: 2px solid var(--tan);
  border-radius: 8px;
  box-sizing: border-box;
}

.footer-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-inner h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.8rem;
}

.footer-inner a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-inner a:hover { text-decoration: underline; }

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
}

/* also apply golden border for the our-story section (keeps original green background) */
.our-story {
  border: 2px solid var(--tan);
  border-radius: 8px;
  box-sizing: border-box;
}

/* --------------------
   Mobile Bottom Nav
-------------------- */
.bottom-nav { display: none; }

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

  .bottom-nav {
    display: flex;
    justify-content: space-around;
    background: var(--white);
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 0.6rem 0;
    z-index: 9999;
  }
  .bottom-nav a { text-decoration: none; color: var(--majestic-green); font-weight: 500; }

  /* mobile spacing tweaks */
  .hero { padding: 2.6rem var(--gutter); min-height: 200px; }
  .card .media { aspect-ratio: 4 / 3; }
  .card { padding: 0.5rem; }
  .card .media img { object-position: center; }
  /* reduce shadow on mobile for better paint performance */
  .card { box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
}

/* --------------------
   Accessibility & touch targets
-------------------- */
a, button { min-height: 44px; min-width: 44px; touch-action: manipulation; -webkit-tap-highlight-color: rgba(0,0,0,0.06); }

/* --------------------
   Optional floating WhatsApp CTA (use in footer or body)
-------------------- */
.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: 80px; /* above bottom-nav if present */
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  background: #25D366;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.whatsapp-float img { width: 60%; height: auto; display: block; }
.whatsapp-float:focus { outline: 3px solid rgba(37,211,102,0.22); outline-offset: 4px; }

/* --------------------
   Minor performance hints
-------------------- */
@media (max-width: 520px) {
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: 0.95rem; }
  .card .media { height: auto; aspect-ratio: 4/3; }
  .logo { font-size: 1.35rem; } /* slightly scale down logo on tiny screens */
}

/* --------------------
   End of stylesheet
-------------------- */
.our-story .story-text p {
  margin-bottom: 1.6rem;
}