:root{
  --green-dark:#0f3d2e;
  --green:#1f7a4a;
  --green-light:#6fbf8f;
  --yellow:#f2c400;
  --bg:#f7f9f8;
  --text:#1e1e1e;
  --border:#e5e5e5;
  --shadow:0 10px 26px rgba(0,0,0,.10);
  --radius:12px;
  --header-h:120px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}
a{color:inherit}
.container{max-width:1100px;margin:0 auto;padding:1.25rem 1.5rem}
/* Header full-width so the oversized logo can sit at the far left */
.site-header .container.nav{max-width:none}

.skip-link{
  position:absolute;left:-9999px;top:0;
  background:#000;color:#fff;padding:.6rem .8rem;border-radius:8px;
  z-index:1000
}
.skip-link:focus{left:1rem;top:1rem}

.site-header{
  background:#fff;
  overflow:visible;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:50;
  height:var(--header-h);
  display:flex;
  align-items:center;
}
.nav{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%}

/* Oversized brand mark that deliberately overlaps the hero */
.brand{position:relative; padding-left:420px; height:var(--header-h);}
.brand-logo{
  width:400px;
  height:400px;
  object-fit:contain;
  position:absolute;
  left:0;
  top:-90px;           /* lifts it so it spills down into the green hero */
  transform:none;
  z-index:200;
  pointer-events:auto;  /* allow clicking the logo */
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.18));
}

/* Keep the nav usable beside the oversized logo */
.nav{gap:1.25rem;}

/* Responsive: shrink the logo on smaller screens */
@media (max-width: 900px){
  .brand{padding-left:220px;}
  .brand-logo{width:240px;height:240px;top:-40px;}
}
@media (max-width: 520px){
  .brand{padding-left:160px;}
  .brand-logo{width:160px;height:160px;top:-20px;}
}




.brand-text{
  font-weight:900;
  letter-spacing:.2px;
  color:var(--green-dark);
  font-size:1.15rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Origin badge (Index header) */
.origin-badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.3rem .65rem;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--green-dark);
  font-weight:900;
  font-size:.9rem;
  line-height:1;
}
.origin-badge img{height:18px;width:auto;display:block}
@media (max-width:780px){
  .origin-badge{padding:.4rem .6rem;border-radius:12px}
}
@media (max-width:520px){
  .origin-badge span{display:none}
  .origin-badge{padding:.35rem .5rem}
}

.site-nav{display:flex;align-items:center;gap:1rem}
.site-nav a{
  text-decoration:none;
  color:var(--green-dark);
  font-weight:700;
  position:relative;
  padding:.2rem .1rem;
}
.site-nav a:hover{color:var(--green)}
.site-nav a[aria-current="page"]{color:var(--green)}
.site-nav a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:-10px;
  height:3px;border-radius:999px;
  background:var(--yellow);
}
.nav-toggle{
  display:none;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:.5rem .75rem;
  font-weight:800;
  cursor:pointer;
}
.hero{
  background:linear-gradient(135deg,var(--green-dark),var(--green));
  color:#fff;
  padding:3.25rem 1.5rem;
}
.hero-content{max-width:900px;margin:0 auto}
.hero h1{font-size:2.55rem;line-height:1.15;margin-bottom:.75rem}
.hero p{font-size:1.1rem;max-width:70ch;opacity:.95}
section{padding:3.25rem 1.5rem}

.grid{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem}
.card{
  background:#fff;
  padding:1.6rem;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:0 0 0 rgba(0,0,0,0);
}
.card h3{color:var(--green-dark);margin-bottom:.4rem}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--yellow);
  color:#000;
  padding:.8rem 1.25rem;
  border-radius:10px;
  font-weight:900;
  text-decoration:none;
  border:none;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.btn:hover{opacity:.92}
.btn.secondary{
  background:#fff;
  border:1px solid var(--border);
  color:var(--green-dark);
  font-weight:900;
}

/* PayPal image button (used beside Purchase on product pages) */
.paypal-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:#fff;border-radius:10px;padding:.35rem .6rem;text-decoration:none}
.paypal-btn:hover{opacity:.92}
.paypal-btn img{height:44px;width:auto;display:block}

/* Payment method badges */
.pay-badges{display:inline-flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.pay-badge{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:#fff;border-radius:10px;padding:.35rem .55rem;text-decoration:none}
.pay-badge:hover{opacity:.92}
.pay-badge img{height:34px;width:auto;display:block}
.footer{
  background:var(--green-dark);
  color:#d9e9df;
  padding:2.25rem 1.5rem;
  margin-top:3rem;
}
.footer .container{display:flex;flex-direction:column;gap:.5rem}
.footer a{color:#d9e9df}
.footer a:hover{opacity:.9}
.small{font-size:.92rem;opacity:.95}

@media (max-width:780px){
  :root{--header-h:96px}
  .brand-text{display:none}
  
  .nav-toggle{display:inline-flex}
  .site-nav{
    display:none;
    position:absolute;
    left:0;right:0;
    top:var(--header-h);
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:1rem 1.5rem;
    flex-direction:column;
    align-items:flex-start;
    gap:.75rem;
  }
  .site-nav.open{display:flex}
  .site-nav a[aria-current="page"]::after{bottom:-6px}
  .hero h1{font-size:2.05rem}
}

@media (max-width:420px){
  :root{--header-h:88px}
  
  .site-nav{gap:.8rem}
}

/* Auto-hide header on scroll down */
.site-header{
  transition: transform 220ms ease;
  will-change: transform;
}
.site-header.is-hidden{
  transform: translateY(calc(-1 * var(--header-h)));
}
/* Ensure nav stays clickable even with oversized logo */
.site-nav{position:relative; z-index:300;}

/* Cart icon in header */
.cart-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.25rem .4rem;
  border-radius:12px;
  text-decoration:none;
}
.cart-icon{height:26px;width:auto;display:block}
.cart-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 .35rem;
  border-radius:999px;
  background:var(--yellow);
  color:#000;
  font-weight:900;
  font-size:.8rem;
  line-height:1;
  border:1px solid rgba(0,0,0,.08);
}

/* Quantity stepper */
.qty-stepper{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  padding:.25rem .35rem;
}
.qty-btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:8px;
  width:34px;
  height:34px;
  font-weight:900;
  cursor:pointer;
}
.qty-btn:hover{opacity:.9}
.qty-input{
  width:56px;
  height:34px;
  border:1px solid var(--border);
  border-radius:8px;
  text-align:center;
  font-weight:900;
}

/* Checkout layout */
.checkout-wrap{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:1.5rem;
}
@media(max-width:900px){.checkout-wrap{grid-template-columns:1fr}}

.cart-list{display:flex;flex-direction:column;gap:.75rem;margin-top:1rem}
.cart-row{
  display:grid;
  grid-template-columns:64px 1fr auto 120px 34px;
  gap:.75rem;
  align-items:center;
  border:1px solid var(--border);
  border-radius:12px;
  padding:.75rem;
  background:#fff;
}
@media(max-width:520px){
  .cart-row{grid-template-columns:56px 1fr; grid-auto-rows:auto}
  .cart-row-qty,.cart-row-price,.cart-remove{grid-column:2 / -1; justify-self:start}
}
.cart-thumb{width:64px;height:64px;object-fit:contain;border-radius:12px;border:1px solid var(--border);background:var(--bg)}
.cart-row-title{font-weight:900;color:var(--green-dark)}
.cart-row-qty{display:flex;align-items:center;gap:.35rem}
.cart-row-price{font-weight:900}
.cart-remove{
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  width:34px;height:34px;
  cursor:pointer;
}
.cart-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid var(--border);
}
.cart-actions{margin-top:1rem;display:flex;justify-content:flex-end}

/* Payment form */
.pay-form{display:grid;gap:.75rem;margin-top:.75rem}
.pay-form label{display:grid;gap:.35rem;font-weight:800;color:var(--green-dark)}
.pay-form input{
  height:44px;
  border:1px solid var(--border);
  border-radius:10px;
  padding:.55rem .7rem;
  font-weight:700;
}
.pay-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}


/* Mobile nav panel + backdrop */
.nav-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:opacity 200ms ease;
  z-index:250;
}
body.nav-open .nav-backdrop{
  opacity:1;
  pointer-events:auto;
}

/* Footer quick navigation */
.footer-grid{
  display:flex;
  gap:1.5rem;
  justify-content:space-between;
  align-items:flex-start;
}
.footer-title{font-weight:900;color:#fff}
.footer-nav{
  display:grid;
  grid-template-columns:repeat(2, minmax(140px, 1fr));
  gap:.35rem 1rem;
  align-content:start;
}
.footer-nav a{
  text-decoration:none;
  color:#d9e9df;
  font-weight:800;
  font-size:.95rem;
  padding:.15rem 0;
}
.footer-nav a:hover{opacity:.9;text-decoration:underline}

@media (max-width:780px){
  .footer-grid{flex-direction:column}
  .footer-nav{grid-template-columns:repeat(2, minmax(130px,1fr)); width:100%}
}

/* Upgrade mobile menu to a phone-friendly slide-in panel */
@media (max-width:780px){
  .site-nav{
    display:flex;                 /* always in DOM; hidden via transform */
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:auto;
    width:min(360px, 86vw);
    padding:1rem 1.25rem 1.25rem;
    gap:.85rem;
    background:#fff;
    border-left:1px solid var(--border);
    box-shadow:var(--shadow);
    transform:translateX(110%);
    transition:transform 220ms ease;
    z-index:300; /* above backdrop */
  }
  .site-nav.open{transform:translateX(0)}
  .nav-close{
    align-self:flex-end;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    padding:.45rem .7rem;
    font-weight:900;
    cursor:pointer;
    margin-bottom:.25rem;
  }
  .nav-toggle{z-index:320}
}


/* ===== MOBILE MENU FIX ===== */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
}

nav {
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        background: #0f3d2e;
        width: 100%;
        padding: 15px 0;
    }

    nav.active {
        display: flex;
    }

    nav a {
        padding: 12px 20px;
        display: block;
    }
}

/* ===== FOOTER SPACING FIX ===== */
footer nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

footer nav a {
    margin: 5px 0;
    text-decoration: none;
}

/* Checkout */
.checkout-grid{display:grid;grid-template-columns:1.4fr 0.9fr;gap:24px}
@media (max-width:900px){.checkout-grid{grid-template-columns:1fr}}
.card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:14px;padding:18px;box-shadow:0 6px 20px rgba(0,0,0,.04)}
.cart-list{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.cart-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:10px;border:1px solid rgba(0,0,0,.06);border-radius:12px}
.cart-row-left{display:flex;gap:12px;align-items:center}
.cart-thumb{width:54px;height:54px;object-fit:contain;border-radius:10px;background:#f6f6f6;padding:6px}
.cart-item-name{font-weight:700}
.cart-row-right{display:flex;gap:12px;align-items:center}
.link-btn{background:transparent;border:none;color:#0a6;border-bottom:1px dashed rgba(0,0,0,.35);cursor:pointer;padding:0}
.radio{display:flex;gap:10px;align-items:flex-start;margin:10px 0}
.totals{margin-top:12px}
.totals-row{display:flex;justify-content:space-between;margin:6px 0}
.totals-total{font-size:1.1rem;font-weight:800}
.btn-primary{background:#0a6;color:#fff;border:none}


/* ================================
   Checkout + Success page fixes
   ================================ */

/* On checkout/success we don't want the giant 400px floating logo */
.checkout-page .brand-logo,
.success-page .brand-logo{
  width:140px !important;
  height:140px !important;
  position:static !important;
  top:auto !important;
  left:auto !important;
  transform:none !important;
  z-index:auto !important;
  filter:none !important;
}

/* Keep header layout tidy when logo is normal sized */
.checkout-page .site-header .container.nav,
.success-page .site-header .container.nav{
  align-items:center;
}

/* Checkout layout (JS renders .checkout-grid) */
.checkout-grid{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:1.5rem;
  padding:0 1rem 2rem;
}
@media(max-width:900px){
  .checkout-grid{grid-template-columns:1fr}
}

/* Cart rows rendered by checkout.js */
.cart-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.85rem;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
}
.cart-row-left{
  display:flex;
  align-items:center;
  gap:.85rem;
  min-width:240px;
  flex:1 1 auto;
}
.cart-row-right{
  display:flex;
  align-items:center;
  gap:.85rem;
  flex:0 0 auto;
}
@media(max-width:520px){
  .cart-row{align-items:flex-start}
  .cart-row-right{width:100%;justify-content:space-between}
}

.cart-thumb{
  width:56px;
  height:56px;
  object-fit:contain;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
}

.cart-item-name{font-weight:900}
.qty-stepper{display:flex;align-items:center;gap:.5rem}
.qty-input{
  width:54px;
  height:36px;
  text-align:center;
  border:1px solid var(--border);
  border-radius:10px;
  font-weight:800;
}
.qty-btn{
  width:36px;height:36px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  font-weight:900;
  cursor:pointer;
}
.link-btn{
  border:none;
  background:transparent;
  color:var(--green-dark);
  text-decoration:underline;
  cursor:pointer;
  font-weight:800;
}

/* Prevent ugly word-by-word wrapping in Delivery options */
.radio span{white-space:normal; word-break:normal; overflow-wrap:anywhere;}
