/* ==========================================================
   MIYAK Crop Care — Premium Agriculture Ecommerce Frontend
   Author: MIYAK Frontend Team
   Stack: HTML5 / CSS3 / Bootstrap 5
   ========================================================== */

:root {
  --brand-50:  #effaf1;
  --brand-100: #d6f1dc;
  --brand-200: #aee2bb;
  --brand-300: #7ccc92;
  --brand-400: #4cb16e;
  --brand-500: #2e9655;   /* primary */
  --brand-600: #1f7a44;
  --brand-700: #1a5e37;
  --brand-800: #154a2d;
  --brand-900: #0f3a24;
  --accent:    #f4b400;   /* harvest gold */
  --soil:      #5b3a1e;
  --ink:       #102018;
  --muted:     #6b7c74;
  --line:      #e6ece8;
  --bg:        #f6faf6;
  --card:      #ffffff;
  --shadow-sm: 0 4px 14px rgba(20,55,35,.06);
  --shadow-md: 0 12px 30px rgba(20,55,35,.10);
  --shadow-lg: 0 24px 60px rgba(20,55,35,.16);
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --header-h:  76px;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-weight: 700; color: var(--ink); letter-spacing: -.01em;}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p  { color: #2a3b32; }
.text-muted-2 { color: var(--muted) !important; }

a { color: var(--brand-600); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-800); }

.container-xxl { max-width: 1320px; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; padding: .65rem 1.3rem; font-weight: 600; transition: all .25s ease; }
.btn-primary { background: var(--brand-500); border-color: var(--brand-500); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline-primary { color: var(--brand-600); border-color: var(--brand-300); background: #fff; }
.btn-outline-primary:hover { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.btn-accent { background: var(--accent); color: #1c1306; border: none; }
.btn-accent:hover { background: #e0a200; color: #1c1306; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-light-soft { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-light-soft:hover { background: var(--brand-50); border-color: var(--brand-200); }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--brand-800);
  color: #d8efe0;
  font-size: .82rem;
  padding: .45rem 0;
}
.topbar a { color: #d8efe0; }
.topbar a:hover { color: #fff; }

/* ---------- Navbar ---------- */
.navbar-miyak {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1030;
  transition: box-shadow .25s ease, background .25s ease;
}
.navbar-miyak.scrolled { box-shadow: var(--shadow-sm); background: rgba(255,255,255,.98); }
.navbar-miyak .navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--brand-800); font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -.02em; font-size: 1.25rem;}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  box-shadow: 0 6px 16px rgba(31,122,68,.35);
}
.brand-mark svg { width: 22px; height: 22px; }
.navbar-miyak .nav-link { color: #1d2a23; font-weight: 500; padding: .55rem .9rem !important; border-radius: 8px; }
.navbar-miyak .nav-link:hover, .navbar-miyak .nav-link.active { color: var(--brand-700); background: var(--brand-50); }
.nav-icons { display: flex; align-items: center; gap: .35rem; }
.nav-icons .icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid transparent; position: relative; transition: all .2s ease;
}
.nav-icons .icon-btn:hover { background: var(--brand-100); border-color: var(--brand-200); }
.icon-btn .badge-dot {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #1c1306; font-size: .65rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}

/* Mega menu */
.mega-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: var(--shadow-md); padding: 1.5rem 0;
  display: none;
}
.has-mega:hover .mega-menu { display: block; }
.mega-col h6 { color: var(--brand-700); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem; }
.mega-col a { display: block; padding: .35rem 0; color: #2a3b32; font-weight: 500; }
.mega-col a:hover { color: var(--brand-700); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(76,177,110,.20), transparent 60%),
    radial-gradient(800px 400px at -10% 100%, rgba(244,180,0,.18), transparent 60%),
    linear-gradient(180deg, #f1faf2 0%, #ffffff 100%);
  padding: 4.5rem 0 3rem;
  overflow: hidden;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--brand-200); color: var(--brand-700);
  font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-sm);
}
.hero h1 span { background: linear-gradient(120deg, var(--brand-600), var(--brand-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #38473e; font-size: 1.1rem; max-width: 560px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem;
}
.hero-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.hero-stat .num { font-size: 1.6rem; font-weight: 800; color: var(--brand-700); }
.hero-stat .lbl { font-size: .8rem; color: var(--muted); }
.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/4.4;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.4), transparent 60%),
    linear-gradient(135deg, var(--brand-400), var(--brand-700));
  box-shadow: var(--shadow-lg);
}
.hero-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.25) 0 40px, transparent 41px),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.18) 0 60px, transparent 61px);
}
.hero-visual .float-card {
  position: absolute; background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: .88rem;
}
.hero-visual .fc-1 { top: 20px; left: 20px; }
.hero-visual .fc-2 { bottom: 20px; right: 20px; }
.hero-visual .fc-3 { top: 50%; right: 24px; transform: translateY(-50%); }
.fc-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
.section-eyebrow { color: var(--brand-600); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.section-title { margin-top: .4rem; }
.section-head .desc { color: var(--muted); max-width: 640px; margin: .6rem auto 0; }

/* ---------- Category cards ---------- */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 991px){ .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px){ .category-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; text-align: center; transition: all .25s ease; position: relative; overflow: hidden;
}
.cat-card::after {
  content: ""; position: absolute; inset: auto -30% -50% auto; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand-50), transparent 70%); opacity: 0; transition: opacity .25s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.cat-card:hover::after { opacity: 1; }
.cat-icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto .9rem;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center;
}
.cat-icon svg { width: 28px; height: 28px; }
.cat-card h5 { margin: 0; font-size: 1rem; }
.cat-card .count { color: var(--muted); font-size: .82rem; }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
@media (max-width: 1199px){ .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px){ .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px){ .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .3s ease; position: relative;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.product-media {
  position: relative;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-media .product-illu {
  width: 60%; height: 75%;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-700));
  border-radius: 14px 14px 30px 30px;
  position: relative;
  box-shadow: 0 12px 30px rgba(31,122,68,.25);
}
.product-media .product-illu::before{
  content:""; position:absolute; top:-14px; left:50%; transform:translateX(-50%);
  width: 30%; height: 26px; background: var(--soil); border-radius: 6px;
}
.product-media .product-illu::after{
  content: attr(data-label); position: absolute; left: 0; right: 0; top: 30%;
  text-align: center; color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .04em;
  text-shadow: 0 1px 0 rgba(0,0,0,.1);
}
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.badge-pill { background: var(--brand-500); color: #fff; padding: .25rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .04em;}
.badge-pill.warn { background: var(--accent); color: #1c1306; }
.badge-pill.dark { background: var(--ink); }

.product-actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(8px); transition: all .25s ease;
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.action-btn { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);}
.action-btn:hover { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }

.product-body { padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-cat { font-size: .7rem; color: var(--brand-600); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.product-name { font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--ink); margin: 0; }
.product-comp { font-size: .8rem; color: var(--muted); }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; }
.product-pack { font-size: .78rem; color: #38473e; }
.product-price { font-weight: 800; color: var(--brand-700); }
.product-price .mrp { display: block; font-size: .68rem; color: var(--muted); font-weight: 500; text-decoration: line-through; }
.product-cta { display: grid; grid-template-columns: 1fr auto; gap: .4rem; margin-top: .7rem; }

/* ---------- Featured strip / chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem 1rem; font-size: .85rem; font-weight: 600; color: #2a3b32; cursor: pointer; transition: all .2s ease;
}
.chip:hover, .chip.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }

/* ---------- Why Us ---------- */
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; height: 100%; transition: all .25s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.feature-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.feature-card h5 { font-size: 1.05rem; }

/* ---------- Stats / counters ---------- */
.stat-band {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff; border-radius: var(--radius-lg); padding: 2.2rem 1.5rem;
  position: relative; overflow: hidden;
}
.stat-band::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(600px 200px at 0% 0%, rgba(255,255,255,.10), transparent 60%),
              radial-gradient(600px 200px at 100% 100%, rgba(244,180,0,.18), transparent 60%);
}
.stat-item { text-align: center; position: relative; }
.stat-item .num { font-size: 2.2rem; font-weight: 800; color: #fff; }
.stat-item .lbl { color: #cfe6d6; font-size: .9rem; }

/* ---------- Tracking ---------- */
.tracking-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.tracking-search {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 999px; padding: .35rem .35rem .35rem 1rem; align-items: center;
}
.tracking-search input { background: transparent; border: 0; outline: none; font-weight: 500; padding: .6rem 0; }
.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.timeline li {
  position: relative; padding: 0 0 1.1rem 50px; min-height: 44px;
}
.timeline li .dot {
  position: absolute; left: 7px; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-300);
}
.timeline li.done .dot { background: var(--brand-500); border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-50); }
.timeline li.current .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(244,180,0,.18); }
.timeline li h6 { margin: 0; font-size: .95rem; }
.timeline li .meta { color: var(--muted); font-size: .8rem; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; height: 100%; box-shadow: var(--shadow-sm);
}
.testimonial-card .stars { color: var(--accent); }
.tm-author { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; }
.tm-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-300), var(--brand-700)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;}

/* ---------- FAQ ---------- */
.accordion-button { font-weight: 600; color: var(--ink); }
.accordion-button:not(.collapsed) { color: var(--brand-700); background: var(--brand-50); }
.accordion-button:focus { box-shadow: none; }
.accordion-item { border-color: var(--line); border-radius: var(--radius) !important; overflow: hidden; margin-bottom: .7rem; }

/* ---------- Newsletter / CTA band ---------- */
.cta-band {
  background:
    radial-gradient(800px 300px at 100% 0%, rgba(244,180,0,.18), transparent 60%),
    linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff; border-radius: var(--radius-lg); padding: 2.5rem;
}
.cta-band h2 { color: #fff; }
.cta-band .form-control { border-radius: 999px 0 0 999px; border: 0; padding: .8rem 1.1rem; }
.cta-band .btn { border-radius: 0 999px 999px 0; padding: .8rem 1.4rem; }

/* ---------- Footer ---------- */
.footer {
  background: #0c1f14; color: #b9cfc1; padding: 3.5rem 0 1.5rem; margin-top: 4rem;
}
.footer h6 { color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; margin-bottom: 1rem; }
.footer a { color: #b9cfc1; display: block; padding: .25rem 0; }
.footer a:hover { color: #fff; }
.footer .brand-mark { box-shadow: none; }
.footer-bottom { border-top: 1px solid #1a3324; margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: #88a297; }
.social-row { display: flex; gap: .5rem; }
.social-row a { width: 38px; height: 38px; border-radius: 10px; background: #143020; display: inline-flex; align-items: center; justify-content: center; color: #cfe6d6; padding: 0;}
.social-row a:hover { background: var(--brand-500); color: #fff; }

/* ---------- Floating mobile actions ---------- */
.fab-stack {
  position: fixed; right: 16px; bottom: 16px; z-index: 1050;
  display: flex; flex-direction: column; gap: .55rem;
}
.fab {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-500); color: #fff; box-shadow: var(--shadow-lg);
  transition: transform .2s ease;
}
.fab:hover { transform: translateY(-3px); color: #fff;}
.fab.whatsapp { background: #25D366; }
.fab.call { background: #1f7a44; }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(900px 300px at 100% 0%, rgba(76,177,110,.18), transparent 60%),
    linear-gradient(180deg, #eef8f0, #ffffff);
  padding: 3.2rem 0 2rem;
  border-bottom: 1px solid var(--line);
}
.breadcrumb-clean { background: transparent; padding: 0; font-size: .85rem; }
.breadcrumb-clean .breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }
.breadcrumb-clean a { color: var(--brand-700); }

/* ---------- Filters sidebar ---------- */
.filter-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.filter-card h6 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-700); margin-bottom: .6rem; }
.filter-card + .filter-card { margin-top: 1rem; }
.form-check-input:checked { background-color: var(--brand-500); border-color: var(--brand-500); }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .6rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-300); box-shadow: 0 0 0 .2rem rgba(46,150,85,.15); }

/* ---------- Tables ---------- */
.table-clean { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.table-clean table { margin: 0; }
.table-clean th { background: var(--brand-50); color: var(--brand-800); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;}
.table-clean td { vertical-align: middle; }

/* ---------- Dashboard ---------- */
.dash-shell { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; }
@media (max-width: 991px){ .dash-shell { grid-template-columns: 1fr; } }
.dash-side {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; height: max-content; position: sticky; top: calc(var(--header-h) + 16px);
}
.dash-side a {
  display: flex; align-items: center; gap: .65rem; padding: .65rem .8rem; border-radius: 10px;
  color: #2a3b32; font-weight: 500;
}
.dash-side a:hover, .dash-side a.active { background: var(--brand-50); color: var(--brand-700); }
.kpi-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; display: flex; gap: .9rem; align-items: center;
}
.kpi-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; }
.kpi-num { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.kpi-lbl { color: var(--muted); font-size: .8rem; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); }
.scroll-fade-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.scroll-fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  section { padding: 3rem 0; }
  .hero { padding: 3rem 0 1.5rem; }
  .cta-band, .stat-band { padding: 1.5rem; }
}
