/* ============================================================
   EASTFARM - Main Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Outfit:wght@300;400;500;600&display=swap');

*{margin:0;padding:0;box-sizing:border-box}
:root{
  --ink:#0D0D0D;--cream:#FAF7F2;--gold:#B8860B;--gold2:#D4AF37;--khaki:#8B7355;
  --green:#1B4332;--green2:#2D6A4F;--sand:#E8DCC8;--white:#FFFFFF;
  --text-muted:#6B6560;--border:#E0D5C5;
}
html{scroll-behavior:smooth}
body{font-family:'Outfit',sans-serif;background:var(--cream);color:var(--ink);overflow-x:hidden}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto}

/* ---- TOPBAR ---- */
.topbar{background:var(--green);color:#A8D5B5;padding:7px 32px;display:flex;justify-content:space-between;font-size:11px;letter-spacing:.4px}

/* ---- HEADER ---- */
header{background:var(--white);border-bottom:1px solid var(--sand);padding:0 32px;position:sticky;top:0;z-index:100}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:70px}
.logo-area{display:flex;align-items:center;gap:12px;text-decoration:none}
.logo-emblem{width:46px;height:46px;background:var(--green);border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logo-emblem svg{width:26px;height:26px}
.brand-name{font-family:'Cormorant Garamond',serif;font-size:20px;font-weight:700;color:var(--green);line-height:1.1}
.brand-tagline{font-size:9px;color:var(--khaki);letter-spacing:2px;text-transform:uppercase;margin-top:1px}
nav{display:flex;gap:24px;align-items:center}
nav a{color:var(--text-muted);font-size:13px;font-weight:500;letter-spacing:.3px;transition:color .2s;text-decoration:none}
nav a:hover,nav a.active{color:var(--green)}
nav a.active{border-bottom:2px solid var(--gold2);padding-bottom:2px}
.nav-cta{background:var(--green) !important;color:var(--white) !important;padding:9px 22px;border-radius:4px;font-size:13px;font-weight:600;letter-spacing:.5px;border:none !important}
.hamburger{display:none;background:none;border:none;font-size:22px;cursor:pointer;color:var(--green)}
.mobile-nav{display:none;flex-direction:column;gap:0;padding:0 0 16px;border-top:1px solid var(--sand)}
.mobile-nav a{padding:12px 32px;font-size:14px;color:var(--text-muted);border-bottom:1px solid var(--sand)}
.mobile-nav.open{display:flex}

/* ---- HERO ---- */
.hero{background:var(--green);min-height:88vh;display:grid;grid-template-columns:55% 45%;overflow:hidden}
.hero-left{padding:80px 56px;display:flex;flex-direction:column;justify-content:center}
.eyebrow{display:flex;align-items:center;gap:10px;margin-bottom:28px}
.eyebrow-line{width:36px;height:1px;background:var(--gold2)}
.eyebrow-text{font-size:11px;color:var(--gold2);letter-spacing:3px;text-transform:uppercase}
.hero h1{font-family:'Cormorant Garamond',serif;font-size:60px;font-weight:700;color:var(--white);line-height:1.05;margin-bottom:22px}
.hero h1 em{color:var(--gold2);font-style:italic}
.hero-sub{font-size:16px;color:rgba(255,255,255,.6);line-height:1.75;margin-bottom:38px;font-weight:300;max-width:440px}
.hero-btns{display:flex;gap:14px;margin-bottom:52px;flex-wrap:wrap}
.btn-primary{background:var(--gold2);color:var(--ink);padding:13px 30px;border-radius:3px;font-size:14px;font-weight:600;letter-spacing:.5px;display:inline-block;transition:opacity .2s}
.btn-primary:hover{opacity:.9}
.btn-outline{border:1px solid rgba(255,255,255,.3);color:var(--white);padding:13px 30px;border-radius:3px;font-size:14px;font-weight:500;letter-spacing:.5px;display:inline-block;transition:background .2s}
.btn-outline:hover{background:rgba(255,255,255,.07)}
.stats-row{display:flex;gap:36px;padding-top:28px;border-top:1px solid rgba(255,255,255,.1);flex-wrap:wrap}
.stat-num{font-family:'Cormorant Garamond',serif;font-size:34px;font-weight:700;color:var(--white);line-height:1}
.stat-num sup{font-size:18px;color:var(--gold2)}
.stat-label{font-size:10px;color:rgba(255,255,255,.4);letter-spacing:1.5px;text-transform:uppercase;margin-top:4px}
.hero-right{background:#162B1E;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:3px;overflow:hidden}
.himg{display:flex;align-items:center;justify-content:center;font-size:56px;position:relative;overflow:hidden;cursor:pointer}
.himg-overlay{position:absolute;inset:0;background:rgba(0,0,0,.25);display:flex;align-items:flex-end;padding:14px}
.himg-label{font-size:11px;color:rgba(255,255,255,.8);letter-spacing:1px;text-transform:uppercase;font-weight:500}
.hero-badge{position:absolute;top:20px;right:20px;background:var(--gold2);color:var(--ink);padding:7px 14px;border-radius:3px;font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase}

/* ---- TICKER ---- */
.ticker{background:var(--sand);padding:11px 0;overflow:hidden;border-top:1px solid #D4C8B0;border-bottom:1px solid #D4C8B0}
.ticker-inner{display:flex;width:max-content;animation:ticker 28s linear infinite}
.tick-item{padding:0 28px;font-size:11px;color:var(--khaki);font-weight:500;letter-spacing:1px;text-transform:uppercase;white-space:nowrap;border-right:1px solid #C4B89A}
@keyframes ticker{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}

/* ---- SECTIONS ---- */
.section{padding:80px 40px}
.section-alt{background:var(--white)}
.section-dark{background:var(--green)}
.section-kicker{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.kicker-line{width:24px;height:1px;background:var(--gold)}
.kicker-text{font-size:10px;color:var(--gold);letter-spacing:3px;text-transform:uppercase;font-weight:600}
.section-title{font-family:'Cormorant Garamond',serif;font-size:42px;font-weight:700;color:var(--green);line-height:1.1;margin-bottom:16px}
.section-desc{font-size:15px;color:var(--text-muted);line-height:1.8;max-width:560px;font-weight:300}
.section-header{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:48px;flex-wrap:wrap;gap:16px}
.view-all{font-size:13px;color:var(--gold);font-weight:600;border-bottom:1px solid var(--gold);padding-bottom:2px}

/* ---- ABOUT STRIP ---- */
.about-grid{display:grid;grid-template-columns:1fr 1fr;background:var(--white);border-bottom:1px solid var(--sand)}
.about-col{padding:72px 56px}
.about-col.dark{background:var(--green)}
.about-col:first-child{border-right:1px solid var(--sand)}
.feat-list{margin-top:28px;display:flex;flex-direction:column;gap:14px}
.feat-row{display:flex;align-items:flex-start;gap:12px}
.feat-dot{width:7px;height:7px;background:var(--gold2);border-radius:50%;flex-shrink:0;margin-top:6px}
.feat-text{font-size:14px;color:var(--ink);line-height:1.5}
.cert-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}
.cert-card{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:6px;padding:14px;text-align:center}
.cert-card-icon{font-size:20px;margin-bottom:6px}
.cert-card-name{font-size:10px;color:rgba(255,255,255,.7);letter-spacing:1.5px;text-transform:uppercase}

/* ---- PRODUCT CARDS ---- */
.products-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.product-card{background:var(--white);border-radius:8px;overflow:hidden;border:1px solid var(--sand);transition:transform .3s,box-shadow .3s;cursor:pointer}
.product-card:hover{transform:translateY(-7px);box-shadow:0 12px 32px rgba(0,0,0,.08)}
.product-img-wrap{height:190px;display:flex;align-items:center;justify-content:center;font-size:68px;position:relative}
.product-flag{position:absolute;top:11px;left:11px;background:var(--green);color:var(--white);font-size:9px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;padding:4px 10px;border-radius:2px}
.product-origin{position:absolute;top:11px;right:11px;background:rgba(0,0,0,.45);color:var(--white);font-size:10px;padding:3px 8px;border-radius:2px}
.product-body{padding:18px}
.product-name{font-family:'Cormorant Garamond',serif;font-size:20px;font-weight:700;color:var(--ink);margin-bottom:4px}
.product-sub{font-size:12px;color:var(--text-muted);margin-bottom:14px;line-height:1.5}
.product-meta{display:flex;justify-content:space-between;align-items:center;padding-top:12px;border-top:1px solid var(--sand)}
.product-moq{font-size:11px;color:var(--khaki);text-transform:uppercase;letter-spacing:1px}
.product-btn{background:var(--green);color:var(--white);padding:8px 16px;border-radius:3px;font-size:11px;font-weight:600;letter-spacing:.5px;border:none;cursor:pointer;text-transform:uppercase;transition:opacity .2s}
.product-btn:hover{opacity:.85}

/* ---- PROCESS STEPS ---- */
.process-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:0;position:relative}
.process-steps::before{content:'';position:absolute;top:31px;left:10%;right:10%;height:1px;background:rgba(255,255,255,.12)}
.step{text-align:center;padding:0 8px;position:relative;z-index:1}
.step-circle{width:62px;height:62px;border-radius:50%;border:1px solid var(--gold2);display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0 auto 18px;background:var(--green);gap:0}
.step-num{font-family:'Cormorant Garamond',serif;font-size:14px;font-weight:700;color:var(--gold2);line-height:1}
.step-emoji{font-size:16px}
.step-title{font-size:13px;font-weight:600;color:var(--white);margin-bottom:6px}
.step-desc{font-size:11px;color:rgba(255,255,255,.45);line-height:1.6}

/* ---- MARKETS ---- */
.markets-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.market-card{border:1px solid var(--sand);border-radius:6px;padding:22px 18px;position:relative;overflow:hidden;background:var(--white)}
.market-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--gold2)}
.market-flag{font-size:26px;margin-bottom:8px}
.market-name{font-size:14px;font-weight:600;color:var(--ink);margin-bottom:3px}
.market-detail{font-size:11px;color:var(--text-muted)}

/* ---- INQUIRY / CONTACT FORM ---- */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:start}
.form-box{background:var(--white);border-radius:10px;padding:36px;border:1px solid var(--sand)}
.form-box h2{font-family:'Cormorant Garamond',serif;font-size:26px;font-weight:700;color:var(--green);margin-bottom:24px}
.form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.fgroup{margin-bottom:14px}
.fgroup label{display:block;font-size:10px;color:var(--khaki);text-transform:uppercase;letter-spacing:1.5px;margin-bottom:5px;font-weight:600}
.fgroup input,.fgroup select,.fgroup textarea{width:100%;background:#FAFAF8;border:1px solid var(--sand);border-radius:4px;padding:10px 13px;font-size:14px;font-family:'Outfit',sans-serif;color:var(--ink);outline:none;transition:border-color .2s}
.fgroup input:focus,.fgroup select:focus,.fgroup textarea:focus{border-color:var(--khaki)}
.fgroup select option{background:#fff}
.fgroup textarea{min-height:88px;resize:vertical}
.btn-submit{width:100%;background:var(--green);color:var(--white);border:none;padding:13px;border-radius:4px;font-size:14px;font-weight:600;cursor:pointer;letter-spacing:.5px;margin-bottom:10px;font-family:'Outfit',sans-serif;transition:opacity .2s}
.btn-submit:hover{opacity:.88}
.btn-wa{width:100%;background:#25D366;color:var(--white);border:none;padding:13px;border-radius:4px;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;font-family:'Outfit',sans-serif}
.contact-items{display:flex;flex-direction:column;gap:18px}
.contact-row{display:flex;align-items:center;gap:14px}
.contact-icon{width:42px;height:42px;background:var(--green);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;color:white}
.contact-label{font-size:10px;color:var(--khaki);text-transform:uppercase;letter-spacing:1.5px;display:block;margin-bottom:2px}
.contact-val{font-size:14px;font-weight:500;color:var(--ink)}
.owner-box{margin-top:28px;background:var(--green);border-radius:8px;padding:22px;display:flex;align-items:center;gap:16px}
.owner-avatar{width:52px;height:52px;background:var(--gold2);border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Cormorant Garamond',serif;font-size:20px;font-weight:700;color:var(--ink);flex-shrink:0}
.owner-name{font-family:'Cormorant Garamond',serif;font-size:18px;color:var(--white);font-weight:700}
.owner-role{font-size:11px;color:rgba(255,255,255,.5);margin-bottom:8px}
.owner-tags{display:flex;gap:6px;flex-wrap:wrap}
.owner-tag{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);padding:3px 10px;border-radius:20px;font-size:10px;color:rgba(255,255,255,.65)}

/* ---- ALERTS ---- */
.alert{padding:14px 18px;border-radius:4px;margin-bottom:18px;font-size:14px}
.alert-success{background:#D1FAE5;color:#065F46;border:1px solid #A7F3D0}
.alert-error{background:#FEE2E2;color:#991B1B;border:1px solid #FECACA}

/* ---- PAGE HERO ---- */
.page-hero{background:var(--green);padding:60px 40px;text-align:center}
.page-hero h1{font-family:'Cormorant Garamond',serif;font-size:48px;font-weight:700;color:var(--white);margin-bottom:12px}
.page-hero p{font-size:15px;color:rgba(255,255,255,.6);max-width:540px;margin:0 auto;line-height:1.7;font-weight:300}
.breadcrumb{display:flex;justify-content:center;gap:6px;margin-top:16px;font-size:12px;color:rgba(255,255,255,.4)}
.breadcrumb a{color:var(--gold2)}

/* ---- CARD SLIDER ARROWS & DOTS ---- */
.ef-slider{position:relative}
.ef-arr{position:absolute;top:50%;transform:translateY(-50%);z-index:4;
  width:28px;height:28px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(255,255,255,.92);color:#1A1A1A;
  display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:700;line-height:1;
  opacity:0;transition:opacity .22s,background .18s;
  box-shadow:0 2px 8px rgba(0,0,0,.18);pointer-events:none}
.ef-arr.arr-l{left:8px}
.ef-arr.arr-r{right:8px}
.ef-slider:hover .ef-arr{opacity:1;pointer-events:auto}
.ef-arr:hover{background:#1B4332;color:#fff}
.ef-dots-bar{position:absolute;bottom:8px;left:50%;
  transform:translateX(-50%);display:flex;gap:5px;z-index:3}
.ef-dot{display:inline-block;width:5px;height:5px;border-radius:50%;
  cursor:pointer;transition:background .25s,width .25s;
  background:rgba(255,255,255,.45)}
.ef-dot.active{background:#fff;width:14px;border-radius:3px}

/* ---- FILTER BAR ---- */
.filter-bar{background:var(--white);border-bottom:1px solid var(--sand);padding:16px 40px;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.filter-btn{background:none;border:1px solid var(--sand);padding:7px 18px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;color:var(--text-muted);font-family:'Outfit',sans-serif;transition:all .2s}
.filter-btn:hover,.filter-btn.active{background:var(--green);color:var(--white);border-color:var(--green)}
.search-box{margin-left:auto;display:flex;align-items:center;gap:8px}
.search-box input{border:1px solid var(--sand);border-radius:4px;padding:7px 14px;font-size:13px;font-family:'Outfit',sans-serif;outline:none;width:200px}

/* ---- FOOTER ---- */
footer{background:var(--ink);padding:60px 40px 28px}
.footer-top{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:40px;margin-bottom:40px}
.footer-top p{font-size:13px;color:rgba(255,255,255,.4);line-height:1.7}
.footer-social{display:flex;gap:10px;margin-top:16px}
.social-btn{padding:7px 16px;border-radius:3px;font-size:12px;font-weight:600;cursor:pointer;letter-spacing:.5px}
.social-btn.wa{background:#25D366;color:white}
.social-btn.em{background:rgba(255,255,255,.08);color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.12)}
.footer-col h4{font-size:9px;color:var(--gold2);text-transform:uppercase;letter-spacing:2px;margin-bottom:14px;font-weight:600}
.footer-col a{display:block;font-size:12px;color:rgba(255,255,255,.4);margin-bottom:9px;transition:color .2s}
.footer-col a:hover{color:var(--gold2)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.06);padding-top:20px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
.footer-bottom p{font-size:11px;color:rgba(255,255,255,.2)}
.footer-certs{display:flex;gap:8px}
.footer-certs span{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);padding:3px 10px;border-radius:2px;font-size:9px;color:rgba(255,255,255,.3);letter-spacing:1px}

/* ---- RESPONSIVE ---- */
@media(max-width:900px){
  .topbar{display:none}
  nav{display:none}
  .hamburger{display:block}
  .hero{grid-template-columns:1fr}
  .hero-right{display:none}
  .hero h1{font-size:40px}
  .about-grid{grid-template-columns:1fr}
  .about-col:first-child{border-right:none;border-bottom:1px solid rgba(255,255,255,.1)}
  .products-grid{grid-template-columns:1fr 1fr}
  .markets-grid{grid-template-columns:1fr 1fr}
  .footer-top{grid-template-columns:1fr 1fr}
  .two-col{grid-template-columns:1fr}
  .process-steps{grid-template-columns:1fr 1fr}
  .section{padding:56px 24px}
  .filter-bar{padding:12px 24px}
}
@media(max-width:560px){
  .products-grid{grid-template-columns:1fr}
  .markets-grid{grid-template-columns:1fr}
  .form-row-2{grid-template-columns:1fr}
  .hero{padding:0}
  .hero-left{padding:48px 24px}
  .page-hero{padding:40px 24px}
  .page-hero h1{font-size:34px}
}


/* ============================================================
   N SQUARE GROUP — RESPONSIVE HARDENING PATCH
   Keeps the existing desktop design and fixes tablet/mobile
   layout, overflow, typography and touch targets.
   ============================================================ */

html, body { max-width:100%; }
*, *::before, *::after { min-width:0; }
button, input, select, textarea { max-width:100%; }
svg { max-width:100%; }

/* Header / mobile navigation */
@media (max-width: 900px) {
  header { padding:0 20px; }
  .header-inner { min-height:64px; height:auto; gap:12px; }
  .ns-logo-box { flex:1 1 auto; min-width:0; }
  .ns-brand-name { font-size:17px; }
  .ns-brand-tag { font-size:8px; letter-spacing:1.4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  header > .header-inner > .nav-cta { display:none; }
  .hamburger { display:flex; align-items:center; justify-content:center; width:42px; height:42px; flex:0 0 42px; }
  .mobile-nav { width:100%; }
  .mobile-nav .nav-cta { display:block !important; width:auto; }
}

@media (max-width: 560px) {
  header { padding:0 14px; }
  .header-inner { min-height:60px; }
  .ns-emblem { width:40px; height:40px; }
  .ns-brand-name { font-size:16px; }
  .mobile-nav a { padding:13px 16px; }
}

/* Public-page layout */
@media (max-width: 900px) {
  .section { padding:52px 24px; }
  .section-header { align-items:flex-start; margin-bottom:32px; }
  .section-title { font-size:36px; }
  .page-hero { padding:52px 24px; }
  .page-hero h1 { font-size:40px; }
  .about-col { padding:52px 32px; }
  .about-col:first-child { border-right:0; border-bottom:1px solid var(--sand); }
  .products-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .markets-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .process-steps { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 0; }
  .process-steps::before { display:none; }
  .two-col { grid-template-columns:minmax(0,1fr); gap:32px; }
  .form-box { padding:28px; }
  .footer-top { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  footer { padding:48px 24px 24px; }
  .filter-bar { padding:12px 16px; }
  .filter-bar .search-box { margin-left:0; width:100%; }
  .filter-bar .search-box input { width:100%; }
}

@media (max-width: 560px) {
  .section { padding:42px 16px; }
  .section-title { font-size:32px; }
  .section-desc { font-size:14px; }
  .page-hero { padding:40px 16px; }
  .page-hero h1 { font-size:34px; line-height:1.1; }
  .page-hero p { font-size:14px; }
  .breadcrumb { flex-wrap:wrap; line-height:1.5; }
  .products-grid { grid-template-columns:1fr; }
  .product-img-wrap { height:210px; }
  .product-meta { align-items:flex-start; gap:10px; flex-wrap:wrap; }
  .markets-grid { grid-template-columns:1fr; }
  .about-col { padding:40px 20px; }
  .cert-grid { grid-template-columns:1fr; }
  .process-steps { grid-template-columns:1fr; gap:24px; }
  .two-col { gap:24px; }
  .form-box { padding:20px 16px; }
  .form-row-2 { grid-template-columns:1fr; }
  .contact-row { align-items:flex-start; }
  .contact-val { overflow-wrap:anywhere; }
  .owner-box { padding:18px; }
  .filter-bar { padding:10px 12px; }
  .filter-tabs { overflow-x:auto; flex-wrap:nowrap; padding-bottom:2px; }
  .search-box { width:100%; }
  .search-box input { width:100%; min-width:0; }
  footer { padding:40px 16px 20px; }
  .footer-grid, .footer-top { grid-template-columns:1fr; gap:28px; }
  .footer-bottom { align-items:flex-start; flex-direction:column; }
  .stats-bar { padding:30px 18px; }
  .stats-left h3 { font-size:28px; }
  .stats-items { gap:20px 28px; width:100%; justify-content:space-between; }
}

/* Product detail pages: override inline two-column layout on small screens */
@media (max-width: 900px) {
  section.section > div[style*="grid-template-columns:1fr 1fr"],
  section.section > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns:1fr !important;
    gap:32px !important;
  }
}

@media (max-width: 560px) {
  .d-slide { object-position:center; }
  #detailSlider { height:280px !important; }
  section.section > div[style*="grid-template-columns:1fr 1fr"],
  section.section > div[style*="grid-template-columns: 1fr 1fr"] {
    gap:24px !important;
  }
}

@media (max-width:900px){
  section.section > div[style*="grid-template-columns:repeat(3,1fr)"],
  section.section > div[style*="grid-template-columns: repeat(3,1fr)"] {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width:560px){
  section.section > div[style*="grid-template-columns:repeat(3,1fr)"],
  section.section > div[style*="grid-template-columns: repeat(3,1fr)"] {
    grid-template-columns:1fr !important;
  }
}


/* FINAL MOBILE/TABLET FIX */
html,body{width:100%;max-width:100%;overflow-x:hidden} img,video,iframe{max-width:100%} *,*::before,*::after{min-width:0}
@media(max-width:900px){
 .ns-logo-box{min-width:0;flex:1 1 auto}.header-inner{min-width:0}.ns-brand-tag{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 [style*="grid-template-columns:1fr 1fr"],[style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr!important}
 [style*="grid-template-columns:repeat(3,1fr)"],[style*="grid-template-columns: repeat(3,1fr)"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .section{max-width:100%;overflow:hidden}.section>div{max-width:100%}.two-col,.contact-grid,.about-grid,.cert-grid,.form-row-2{grid-template-columns:1fr!important}
 .contact-val,.owner-box,p,h1,h2,h3,h4{overflow-wrap:anywhere}
}
@media(max-width:560px){
 .ns-emblem{flex:0 0 40px}.ns-brand-name{font-size:16px!important}.ns-brand-tag{font-size:8px!important;letter-spacing:1px!important}
 [style*="grid-template-columns:repeat(3,1fr)"],[style*="grid-template-columns: repeat(3,1fr)"],[style*="grid-template-columns:repeat(4,1fr)"],[style*="grid-template-columns: repeat(4,1fr)"],[style*="grid-template-columns:repeat(5,1fr)"],[style*="grid-template-columns: repeat(5,1fr)"]{grid-template-columns:1fr!important}
 .section{padding-left:16px!important;padding-right:16px!important}.page-hero{padding-left:16px!important;padding-right:16px!important}.breadcrumb{overflow-wrap:anywhere}
 .filter-bar{max-width:100%;overflow:hidden}.search-box,.search-box form{max-width:100%} input,select,textarea,button{max-width:100%}
 #detailSlider{height:280px!important}.d-slide{max-width:none}.section table{display:block;overflow-x:auto;white-space:nowrap}
}


/* ============================================================
   N SQUARE GROUP — FOOTER + CATEGORY BAR FINAL MOBILE FIX
   ============================================================ */

/* Footer uses classes so inline desktop styles can be overridden safely. */
.ns-footer{width:100%;overflow:hidden;}
.ns-footer-grid{width:100%;display:grid!important;grid-template-columns:2fr 1fr 1fr 1fr 1fr!important;}
.ns-footer-grid > div{min-width:0;}
.ns-footer-grid a,.ns-footer-grid p,.ns-footer-grid span{overflow-wrap:anywhere;}

@media (max-width:900px){
  .ns-footer{padding:48px 24px 24px!important;}
  .ns-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:32px 24px!important;}
}

@media (max-width:560px){
  .ns-footer{padding:42px 18px 22px!important;}
  .ns-footer-grid{grid-template-columns:1fr!important;gap:28px!important;margin-bottom:32px!important;}
  .ns-footer-grid > div{width:100%;max-width:100%;}
  .ns-footer-grid p{max-width:100%!important;}
  .ns-footer-bottom{align-items:flex-start!important;flex-direction:column!important;gap:16px!important;}
  .ns-footer-bottom > p{max-width:100%;line-height:1.6;}
  .ns-footer-bottom > div{width:100%;justify-content:flex-start;display:flex;flex-wrap:wrap;}
}

/* Homepage category bar:
   On phones categories stay in one horizontal touch-scroll row.
   Search is a separate full-width row, never pushed off-screen. */
@media (max-width:900px){
  .filter-bar{padding:0 12px!important;}
  .filter-inner{display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;
    overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .filter-inner::-webkit-scrollbar{display:none;}
  .cat-btn{flex:0 0 auto!important;scroll-snap-align:start;padding:12px 13px!important;}
  .search-wrap{flex:0 0 100%!important;width:100%!important;margin-left:0!important;
    padding:10px 0 12px!important;order:999!important;}
  .search-wrap form{width:100%!important;}
  .search-wrap input{width:100%!important;min-width:0!important;}
}

@media (max-width:560px){
  .filter-inner{overflow-x:auto!important;flex-wrap:nowrap!important;}
  .cat-btn{min-width:82px!important;padding:10px 9px!important;}
  .cat-img,.cat-emoji{width:38px!important;height:38px!important;}
  .cat-btn span{white-space:nowrap;}
  .search-wrap{padding:10px 0 12px!important;}
}

/* Keep the floating WhatsApp button inside the viewport on phones. */
@media(max-width:560px){
  #waFab{width:58px!important;height:58px!important;right:14px!important;bottom:16px!important;}
}


/* FINAL INNER-PAGE FOOTER FIX */
html.mobile-device .ns-footer{width:100%!important;max-width:100%!important;overflow:hidden!important;padding:42px 18px 22px!important;box-sizing:border-box!important;}
html.mobile-device .ns-footer-grid{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;gap:28px!important;width:100%!important;max-width:100%!important;margin-bottom:32px!important;box-sizing:border-box!important;}
html.mobile-device .ns-footer-grid>div{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;}
html.mobile-device .ns-footer-grid a,html.mobile-device .ns-footer-grid p,html.mobile-device .ns-footer-grid h4,html.mobile-device .ns-footer-grid span{max-width:100%!important;overflow-wrap:anywhere!important;word-break:normal!important;}
html.mobile-device .ns-footer-bottom{display:flex!important;align-items:flex-start!important;flex-direction:column!important;gap:16px!important;}
html.mobile-device .ns-footer-bottom>p{width:100%!important;max-width:100%!important;line-height:1.6!important;}
html.mobile-device .ns-footer-bottom>div{width:100%!important;display:flex!important;justify-content:flex-start!important;flex-wrap:wrap!important;}
@media(max-width:560px){
  .ns-footer-grid{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;}
  .ns-footer-grid>div{width:100%!important;max-width:100%!important;min-width:0!important;}
}
