/* ==========================================================================
   Thamarat v3 — crop page layer (English crop pages at /en/c/<crop>/)
   Loaded after site.css; uses the same tokens.
   ========================================================================== */

.crop-hero{position:relative;isolation:isolate;overflow:hidden;background:var(--green-900);color:#FCF9F0}
.crop-hero__bg{position:absolute;inset:0;z-index:-2}
.crop-hero__bg img{width:100%;height:100%;object-fit:cover}
.crop-hero__bg::after{content:"";position:absolute;inset:0;
  background:linear-gradient(to top,rgba(6,26,16,.94) 6%,rgba(6,26,16,.62) 52%,rgba(6,26,16,.32) 100%)}
.crop-hero__in{display:flex;flex-direction:column;gap:14px;justify-content:flex-end;
  min-height:clamp(340px,44vh,460px);padding-block:clamp(28px,5vw,52px) clamp(26px,4vw,40px)}
.crumb{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:.8125rem;color:rgba(252,249,240,.72)}
.crumb a{color:rgba(252,249,240,.86)}
.crumb a:hover{color:var(--gold-2)}
.crumb span{opacity:.5}
.crop-hero h1{font-size:clamp(1.9rem,4.6vw,3.2rem);line-height:1.15;color:#FCF9F0}
.crop-hero .lead{color:rgba(252,249,240,.85);max-width:60ch}
.crop-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:var(--r-pill);
  font-size:.8125rem;font-weight:600;color:var(--gold-2);background:rgba(200,164,92,.14);
  border:1px solid rgba(200,164,92,.42)}
.chip--plain{color:rgba(252,249,240,.85);background:rgba(251,247,236,.08);border-color:rgba(251,247,236,.18)}

/* section anchors */
.crop-nav{position:sticky;top:72px;z-index:40;background:rgba(250,246,236,.96);
  border-bottom:1px solid var(--line);backdrop-filter:blur(8px)}
.crop-nav__in{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-block:10px}
.crop-nav__in::-webkit-scrollbar{display:none}
.crop-nav a{flex:none;padding:8px 14px;border-radius:var(--r-pill);font-size:.875rem;font-weight:600;
  color:var(--ink-2);border:1px solid transparent}
.crop-nav a:hover{border-color:var(--line);color:var(--green-700)}

/* planting dates */
.regions{display:grid;gap:clamp(12px,1.8vw,18px);grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.region{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--white);padding:18px 20px;
  display:flex;flex-direction:column;gap:10px}
.region h3{font-size:1rem;font-weight:600}
.region ul{margin:0;padding-inline-start:18px;display:flex;flex-direction:column;gap:6px}
.region li{font-size:.9rem;color:var(--ink-2);line-height:1.7}
.rbadge{align-self:flex-start;font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:3px 8px;border-radius:6px}
.rbadge--spec{background:var(--sand);color:var(--gold-ink);border:1px solid rgba(200,164,92,.5)}
.rbadge--gen{background:var(--green-50,#E9F2EC);color:var(--green-700);border:1px solid rgba(20,86,58,.25)}
[dir="rtl"] .rbadge{letter-spacing:0}
.rnote{font-size:.8125rem;color:var(--ink-3);line-height:1.7}

/* products strip */
.pstrip{display:flex;flex-wrap:wrap;gap:8px}
.pchip{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:var(--r-pill);
  background:var(--white);border:1px solid var(--line);font-size:.875rem;font-weight:600;color:var(--ink)}
.pchip:hover{border-color:rgba(200,164,92,.7);color:var(--green-700)}
.pchip svg{width:16px;height:16px;color:var(--green-600)}

/* stage cards */
.stage{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--white);overflow:hidden}
.stage+.stage{margin-top:clamp(12px,1.6vw,18px)}
.stage__h{display:flex;align-items:center;gap:12px;padding:16px 20px;background:var(--sand);
  border-bottom:1px solid var(--line)}
.stage__n{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;
  background:var(--green-700);color:#FBF7EC;font-family:var(--font-display);font-weight:700;font-size:.875rem}
.stage__t{font-family:var(--font-display);font-weight:600;font-size:1rem}
.stage__body{padding:6px 20px 18px}
.prow{padding-block:12px;border-bottom:1px dashed var(--line-soft)}
.prow:last-child{border-bottom:0}
.prow__h{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:6px}
.prow__cat{font-size:.8125rem;font-weight:700;color:var(--green-700);text-transform:uppercase;letter-spacing:.06em}
[dir="rtl"] .prow__cat{letter-spacing:0}
.prow__when{font-size:.8125rem;color:var(--ink-3)}
.prow ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.prow li{display:flex;gap:10px;align-items:flex-start;font-size:.9375rem;line-height:1.75;color:var(--ink-2)}
.tag{flex:none;margin-top:2px;font-size:.6875rem;font-weight:700;padding:2px 7px;border-radius:5px;white-space:nowrap}
.tag--th{background:#E3EFE8;color:var(--green-700);border:1px solid #BCD6C8}
.tag--gen{background:#FBF2DC;color:var(--gold-ink);border:1px solid rgba(200,164,92,.55)}
.syslbl{flex:none;font-size:.6875rem;font-weight:600;color:var(--ink-3);margin-top:3px}

/* problems */
.pgroup{margin-top:clamp(18px,2.4vw,28px)}
.pgroup>h3{font-size:1.0625rem;font-weight:600;margin-bottom:10px;color:var(--ink)}
details.problem{border:1px solid var(--line);border-radius:var(--r-md);background:var(--white);margin-bottom:10px}
details.problem[open]{box-shadow:var(--shadow-s)}
details.problem>summary{cursor:pointer;list-style:none;display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;
  padding:14px 18px;font-weight:600;font-size:.9688rem}
details.problem>summary::-webkit-details-marker{display:none}
details.problem>summary::after{content:"+";margin-inline-start:auto;color:var(--gold-ink);font-weight:700}
details.problem[open]>summary::after{content:"–"}
.problem__meta,.def__meta{font-size:.75rem;font-weight:500;color:var(--ink-3)}
.problem__body{padding:0 18px 16px;display:flex;flex-direction:column;gap:8px}
.pr{display:flex;gap:10px;font-size:.9rem;line-height:1.75;color:var(--ink-2)}
.pr b{flex:none;min-width:104px;color:var(--ink);font-weight:600}
.credit{font-size:.75rem;color:var(--ink-3)}

/* pest timing table */
.ptable{width:100%;border-collapse:collapse;font-size:.875rem;background:var(--white);
  border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden}
.ptable th,.ptable td{padding:10px 12px;text-align:start;border-bottom:1px solid var(--line-soft);vertical-align:top}
.ptable th{background:var(--sand);font-weight:600;font-size:.8125rem;color:var(--ink)}
.ptable td:first-child{font-weight:600;color:var(--ink);min-width:150px}
.ptable tr:last-child td{border-bottom:0}
.table-wrap{overflow-x:auto}

/* deficiency */
.defs{display:grid;gap:10px}
details.def{border:1px solid var(--line);border-radius:var(--r-md);background:var(--white)}
details.def>summary{cursor:pointer;list-style:none;padding:13px 16px;font-weight:600;font-size:.9375rem}
details.def>summary::-webkit-details-marker{display:none}
details.def>summary::after{content:"+";float:inline-end;color:var(--gold-ink);font-weight:700}
details.def[open]>summary::after{content:"–"}
.def__body{padding:0 16px 14px;display:flex;flex-direction:column;gap:8px}
.def__body p{font-size:.9rem;line-height:1.75;color:var(--ink-2)}
.def__body .credit{font-size:.75rem}

/* sources */
.sources{font-size:.875rem;color:var(--ink-2);display:flex;flex-direction:column;gap:6px;max-width:80ch}
.sources a{color:var(--green-700);text-decoration:underline;text-underline-offset:3px}

@media (max-width:639px){
  .crop-nav{top:64px}
  .stage__body{padding-inline:14px}
  .prow li{font-size:.9rem}
  .pr{flex-direction:column;gap:2px}
  .pr b{min-width:0}
  .ptable{font-size:.8125rem}
}

/* problem photos carried over from the Arabic pages */
.problem__photo { display: block; width: 100%; height: auto; border-radius: 14px; margin: 4px 0 10px; }

/* mobile tables: fit the viewport instead of scrolling off the edge */
@media (max-width:560px){
  .ptable{width:100%;table-layout:fixed}
  .ptable th,.ptable td{padding:8px 6px;font-size:.75rem;white-space:normal;word-break:break-word;overflow-wrap:anywhere}
  .ptable td:first-child{min-width:0}
}
