/* ======================================================
   styles.css — JF Wholesales
   Carefully tuned, accessible, responsive, no gradients.
   Palette:
     --brand:    #FEAC28 (Orange brand color)
     --bg:       #F6F7F6 (page background)
     --surface:  #FFFFFF (cards / surfaces)
     --text:     #111827 (primary text)
     --muted:    #6B7280 (secondary text)
     --line:     #E6E8EB (dividers)
   ====================================================== */

:root{
  --brand: #FEAC28;
  --bg: #F6F7F6;
  --surface: #FFFFFF;
  --text: #111827;
  --muted: #6B7280;
  --line: #E6E8EB;

  --radius: 14px;
  --gap: clamp(12px, 2vw, 22px);
  --container-max: 1120px;

  --shadow-sm: 0 6px 18px rgba(17,24,39,.06);
  --shadow-md: 0 12px 30px rgba(17,24,39,.10);

  --focus-ring: 3px solid rgba(254,172,40,.16);
  --safe-pad: 16px;
}

/* Reset / sensible defaults */
* { box-sizing: border-box; }
html,body { height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Layout container */
.container{
  width: min(var(--container-max), 92vw);
  margin-inline: auto;
  padding-inline: var(--safe-pad);
}

/* Images and media */
img, picture, svg, video { display:block; max-width:100%; height:auto; }

/* -------------------
   Top contact bar
   ------------------- */
.topbar{
  background:var(--surface);
  border-bottom:1px solid var(--line);
  font-size:0.95rem;
}
.topbar-inner{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  align-items:center;
  padding:8px 0;
  color:var(--muted);
}
.toplink{
  color:var(--muted);
  text-decoration:none;
  white-space:nowrap;
}
.toplink:hover{ color:var(--text); text-decoration:underline; }
.dot{ color:#C8CCD2; }

/* -------------------
   Header / Navigation
   ------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  /* subtle backdrop blur for sticky effect on supported browsers */
  backdrop-filter: saturate(1.02) blur(4px);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
}

/* Brand */
.brand-wrap{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:inherit;
}
.brand-logo{
  width:48px;
  height:48px;
  object-fit:contain;
  display:inline-block;
}
.brand{
  font-weight:800;
  font-size:1.08rem;
  letter-spacing:0.2px;
}

/* Nav */
.nav{ display:flex; align-items:center; gap:6px; }
.nav a{
  color:var(--text);
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  font-weight:600;
}
.nav a:hover{ background:#F2F3F2; }
.nav a[aria-current="page"]{ background:#F7F7F7; box-shadow:inset 0 -2px 0 rgba(0,0,0,.03); }

/* -------------------
   Hero
   ------------------- */
.hero{
  padding: calc(var(--gap) * 1.6) 0;
}
.tagline{
  color:var(--brand);
  font-weight:800;
  letter-spacing:0.3px;
  margin:0 0 8px 0;
}
.hero h1{
  margin:0 0 10px 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height:1.08;
}
.hero p{ margin:0 0 18px 0; color:var(--muted); }

/* Action buttons */
.actions{ display:flex; gap:12px; flex-wrap:wrap; }
.btn{
  display:inline-block;
  padding:11px 18px;
  border-radius:12px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  border: none;
  background:var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow:var(--shadow-md); }
.btn:active{ transform: translateY(0); }
.btn:focus{ outline: none; box-shadow: 0 0 0 4px rgba(254,172,40,.08); border-radius:12px; }

/* Ghost / secondary */
.btn-ghost{
  background:transparent;
  color:var(--brand);
  border:1px solid rgba(254,172,40,.12);
  box-shadow:none;
}
.btn-ghost:hover{ background:#FFF9F0; }

/* -------------------
   Section heading helpers
   ------------------- */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: calc(var(--gap) * 0.8) 0 var(--gap);
}
.section-head h1, .section-head h2 { margin:0; }
.link{
  color:var(--brand);
  font-weight:700;
  text-decoration:none;
}
.link:hover{ text-decoration:underline; }

/* -------------------
   Responsive product grid & cards
   ------------------- */
/* flexible responsive grid that adapts to available width */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

/* Card base */
.card{
  background:var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .12s ease;
}
.card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color:#D9DDE3;
}

/* Product image placeholder & image handling
.product-image{
  aspect-ratio: 4 / 3;
  background:#ECEEEB;
  border-bottom: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-weight:600;
  font-size:0.95rem;
} */
.product-image {
  aspect-ratio: auto;          /* remove forced ratio */
  background-size: contain;    /* show full image */
  background-repeat: no-repeat;
  background-position: center;
  min-height:220px          /* optional, ensures consistent card height */
}

/* If you add <img> inside .product-image: */
.product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Card body */
.card-body{ padding:14px; }
.card-body h3{ margin: 2px 0 6px 0; font-size:1rem; line-height:1.2; }
.muted{ color:var(--muted); font-weight:500; }
.price{ display:inline-block; margin-top:8px; font-weight:800; color:var(--text); }

/* -------------------
   Contact / Forms
   ------------------- */
.contact{ padding: calc(var(--gap) * 0.8) 0; min-height: 60vh;    }
.form{
  padding:18px;
  border-radius: var(--radius);
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.form .form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-bottom:6px;
}
@media (max-width:720px){ .form .form-row{ grid-template-columns: 1fr; } }

.field{ display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
label{ font-weight:700; font-size:.95rem; }
input[type="text"], input[type="email"], select, textarea{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:#FAFBFA;
  font:inherit;
  color:var(--text);
}
input::placeholder, textarea::placeholder{ color: #9AA0A6; }

input:focus, select:focus, textarea:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(254,172,40,.08);
  border-color: rgba(254,172,40,.35);
  background: #fff;
}

textarea{ min-height:120px; resize: vertical; }

/* Checkbox row */
.checkbox{ display:flex; gap:10px; align-items:center; }
.checkbox input[type="checkbox"]{ width:16px; height:16px; }

/* small helpful text */
.micro{ font-size:.92rem; color:var(--muted); margin-top:8px; }

/* -------------------
   Contact mini cards (phone/email/location)
   ------------------- */
.contact-cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top:18px;
}
@media (max-width:720px){ .contact-cards{ grid-template-columns: 1fr; } }

.card.mini{ padding:14px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow: none; }
.mini-title{ font-weight:800; margin-bottom:6px; }
.mini-body{ color:var(--muted); }

/* inquiry badge that appears when product is passed in query string */
.inquiry-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:#FFF9F0;
  color:var(--brand);
  border:1px solid rgba(254,172,40,.18);
  font-weight:700;
  margin:8px 0 12px 0;
}

/* -------------------
   Footer
   ------------------- */
.site-footer{
  border-top:1px solid var(--line);
  background:var(--surface);
  margin-top: calc(var(--gap) * 1.6);
}
.footer-inner{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap:12px;
  align-items:center;
  padding:18px 0;
}
@media (max-width:920px){
  .footer-inner{ grid-template-columns: 1fr; gap:10px; text-align:left; }
}
.footer-brand{ display:flex; gap:12px; align-items:center; }
.footer-contact{ display:flex; gap:16px; align-items:center; justify-self:center; color:var(--muted); flex-wrap:wrap; }
.footer-contact a{ color:var(--muted); text-decoration:none; }
.footer-contact a:hover{ color:var(--text); text-decoration:underline; }
.nav.small a{ font-size:.95rem; color:var(--muted); text-decoration:none; margin-left:8px; }
.footer-bottom{ padding:12px 0; border-top:1px solid var(--line); color:var(--muted); font-size:.95rem; }

/* -------------------
   Accessibility & small helpers
   ------------------- */
/* Clear focus styles (but leave visible ring for keyboard users) */
:focus{ outline: none; }
:focus-visible{
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 8px;
}

/* -------------------
   Modal styles
   ------------------- */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
}
.modal.hidden{ display: none; }

.modal-content{
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: fadeIn .25s ease;
}

.modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
}
.modal-close:hover{ color: var(--text); }

.modal-body{
  text-align: center;
}
.modal-body .product-image.large{
  aspect-ratio: 4 / 3;
  background:#ECEEEB;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
@keyframes fadeIn{
  from{ opacity:0; transform: scale(.95); }
  to{ opacity:1; transform: scale(1); }
}


/* Respect user's preference for reduced motion */
@media (prefers-reduced-motion: reduce){
  * { transition: none !important; animation: none !important; }
}

/* Small utility classes */
.text-center{ text-align:center; }
.small{ font-size:.92rem; }
.hidden{ display:none !important; }
.container-tight{ width:min(880px, 94vw); margin-inline:auto; }

/* -------------------
   Minor responsive tweaks
   ------------------- */
@media (max-width:720px){
  .brand{ display:block; font-size:1rem; }
  .brand-logo{ width:40px; height:40px; }
  .topbar-inner{ justify-content:center; text-align:center; flex-wrap:wrap; gap:8px; padding:8px 0; }
  .header-inner{ padding:12px 0; }
  .hero{ padding:18px 0; }
}