/* TRIDAAGRO category sections (tridaagro_category_sections 1.0.0). Every rule is scoped to .tdx-* (cards: .tda-card .tdx-*) */
.tdx-preview, .tdx-doors, .tdx-sec-col, .tdx-sell-col, .tdx-modal { --tda-green: #008032; --tda-green-d: #00632a; --tda-green-50: #edf7f0; --tda-green-100: #cfe8d7; --tda-yellow: #f5d90a; --tda-ink: #16211b; --tda-ink-2: #2f3b35; --tda-muted: #66736c; --tda-line: #e3e9e5; --tda-tile: #f3f6f4; --tdx-order: #8a958f; }
.tdx-doors svg, .tdx-sec svg, .tdx-sell svg, .tdx-modal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* staff only: a reminder that visitors do not see this yet */
.tdx-preview { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border: 1px dashed #e3cf6e; border-radius: 8px; background: #fffbe6; color: #7a5d00; font-size: 12px; font-weight: 700; }

/* 1. three doors above the list (OCFilter «Наявність» links) */
.tdx-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.tdx-door { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--tda-line); border-radius: 14px; background: #fff; color: var(--tda-ink) !important; text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tdx-door:hover { border-color: #c9d6ce; box-shadow: 0 8px 22px rgba(22,33,27,.09); transform: translateY(-1px); }
.tdx-door-ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.tdx-door b { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 800; line-height: 1.2; }
.tdx-door b em { font-style: normal; font-size: 20px; letter-spacing: -.02em; }
.tdx-door small { color: var(--tda-muted); font-size: 12.5px; line-height: 1.3; }
.tdx-door-stock .tdx-door-ic { background: var(--tda-green-50); color: var(--tda-green); }
.tdx-door-agro .tdx-door-ic { background: #fff6c4; color: #8a6d00; }
.tdx-door-order .tdx-door-ic { background: var(--tda-tile); color: var(--tda-ink-2); }
.tdx-door-stock b em { color: var(--tda-green); }
.tdx-door-agro b em { color: #8a6d00; }
.tdx-door-order b em { color: var(--tda-ink-2); }
.tdx-door.tdx-on { border-color: var(--tda-green); background: var(--tda-green-50); }
.tdx-door.tdx-on::after { content: "×"; position: absolute; top: 6px; right: 10px; color: var(--tda-muted); font-size: 18px; line-height: 1; }

/* 2. section header: a whole row of the grid where #АгроПідбір or «Під замовлення» starts */
.tdx-sec-col { display: flex; }
.tdx-sec { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "hd btns" "body body"; gap: 16px 24px; align-items: center; padding: 20px 22px 18px; border: 1px solid var(--tda-line); border-radius: 14px; background: #fff; box-shadow: inset 0 4px 0 var(--tdx-c, var(--tda-green)); color: var(--tda-ink); }
.tdx-sec-agro { --tdx-c: #e0b800; background: linear-gradient(160deg, #fffbe3, #fff 60%); }
.tdx-sec-order { --tdx-c: var(--tdx-order); background: linear-gradient(160deg, #f1f4f2, #fff 60%); }
.tdx-sec-hd { grid-area: hd; }
.tdx-sec h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 6px; color: var(--tda-ink); font-size: 20px; font-weight: 800; line-height: 1.25; }
.tdx-sec h2 span { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: rgba(22,33,27,.07); color: var(--tda-ink-2); font-size: 13px; font-weight: 700; }
.tdx-sec p { margin: 0; max-width: 680px; color: var(--tda-ink-2); font-size: 14px; line-height: 1.5; }
.tdx-sec-btns { grid-area: btns; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }

/* the route of #АгроПідбір (colours of the homepage: abroad green, road dashed yellow, Ukraine blue/yellow) */
.tdx-route { grid-area: body; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.tdx-route li { position: relative; padding-right: 14px; }
.tdx-route li::before { content: ""; position: absolute; left: 46px; right: 6px; top: 19px; height: 3px; border-radius: 2px; background: #9fd0b0; }
.tdx-route li:nth-child(2)::before { background: repeating-linear-gradient(90deg, #d9b800 0 8px, transparent 8px 13px); }
.tdx-route li:nth-child(3)::before { top: 18px; height: 6px; background: linear-gradient(#0057b7 50%, #ffd500 50%); }
.tdx-route i { position: relative; display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 50%; background: #e7f4ec; color: var(--tda-green); }
.tdx-route li:nth-child(3) i { background: #e6eefa; color: #0057b7; }
.tdx-route i svg { width: 20px; height: 20px; }
.tdx-route b { display: block; color: var(--tda-ink); font-size: 13.5px; line-height: 1.25; }
.tdx-route small { display: block; margin-top: 2px; color: var(--tda-muted); font-size: 11.5px; font-weight: 600; line-height: 1.3; }

/* buttons */
.tdx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 1.5px solid transparent; border-radius: 10px; font: inherit; font-weight: 800; font-size: 14px; white-space: nowrap; cursor: pointer; text-decoration: none !important; }
.tdx-btn-yellow { background: var(--tda-yellow); color: #1c1f12 !important; }
.tdx-btn-yellow:hover { background: #ffe74d; }
.tdx-btn-line { border-color: var(--tda-green-100); background: #fff; color: var(--tda-green-d) !important; }
.tdx-btn-line:hover { border-color: var(--tda-green); background: var(--tda-green-50); }
.tdx-btn-ghost { background: none; color: var(--tda-ink-2) !important; text-decoration: underline !important; padding: 0 6px; }

/* 3. cards: «Запитати ціну / Уточнити наявність» on «Під замовлення», «Порахувати під ключ →» on #АгроПідбір (category_sections.js) */
.tda-card .tdx-ask { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--tda-yellow); color: #1c1f12; font: inherit; font-weight: 800; font-size: 14px; line-height: 1.15; text-align: center; cursor: pointer; }
.tda-card .tdx-ask:hover { background: #ffe74d; }
.tda-card .tdx-calc { display: inline-block; margin-top: 4px; padding-left: 13px; color: #6d5600 !important; font-size: 12px; font-weight: 700; text-decoration: underline !important; text-underline-offset: 2px; }

/* 4. the quiet banner for sellers */
.tdx-sell { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; border: 1.5px dashed #c9d6ce; border-radius: 14px; background: #f7faf8; color: var(--tda-ink); }
.tdx-sell-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--tda-green); box-shadow: 0 1px 4px rgba(22,33,27,.08); }
.tdx-sell-ic svg { width: 26px; height: 26px; }
.tdx-sell-h { margin: 0 0 2px; font-size: 16.5px; font-weight: 800; }
.tdx-sell p { margin: 0; color: var(--tda-ink-2); font-size: 13.5px; line-height: 1.45; }

/* request windows */
.tdx-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(12,18,15,.55); }
.tdx-box { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; padding: 20px; border-radius: 14px; background: #fff; color: var(--tda-ink); box-shadow: 0 20px 50px rgba(0,0,0,.25); font-size: 14px; }
.tdx-box h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.tdx-box > p { margin: 0 0 12px; color: var(--tda-muted); font-size: 13px; }
.tdx-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: center; margin: 0 0 12px; padding: 8px; border-radius: 10px; background: var(--tda-tile); }
.tdx-item img { width: 72px; height: 54px; border-radius: 7px; object-fit: cover; }
.tdx-item b { display: block; font-size: 13.5px; line-height: 1.3; }
.tdx-item small { color: var(--tda-muted); font-size: 12px; }
.tdx-box label { display: block; margin: 0 0 10px; font-size: 12.5px; font-weight: 600; }
.tdx-box input[type=text], .tdx-box input[type=tel] { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid #e2e8e4; border-radius: 10px; font: inherit; }
.tdx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.tdx-how { font-size: 12.5px; font-weight: 600; }
.tdx-ways { display: flex; gap: 6px; margin: 4px 0 10px; }
.tdx-ways label { position: relative; flex: 1; margin: 0; }
.tdx-ways input { position: absolute; opacity: 0; }
.tdx-ways span { display: flex; align-items: center; justify-content: center; min-height: 38px; border: 1.5px solid #e2e8e4; border-radius: 10px; font-weight: 700; cursor: pointer; }
.tdx-ways input:checked + span { border-color: var(--tda-green); background: var(--tda-green-50); color: var(--tda-green-d); }
.tdx-ways input:focus-visible + span { outline: 2px solid var(--tda-green); outline-offset: 1px; }
.tdx-check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 500 !important; }
.tdx-check input { margin-top: 3px; }
.tdx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tdx-box .tdx-btns { display: flex; gap: 8px; margin-top: 6px; }
.tdx-box .tdx-btns button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.tdx-send { background: var(--tda-green); color: #fff; }
.tdx-send:disabled { opacity: .6; cursor: default; }
.tdx-cancel { background: #f1f4f2; color: var(--tda-ink); }
.tdx-foot { margin: 10px 0 0; color: var(--tda-muted); font-size: 12px; }
.tdx-msg { margin-top: 8px; font-size: 13px; font-weight: 600; }
.tdx-msg:empty { display: none; }
.tdx-msg.tdx-ok { padding: 10px 12px; border-radius: 10px; background: var(--tda-green-50); color: var(--tda-green-d); }

/* tablets and phones */
@media (max-width: 991.98px) {
  .tdx-sec { grid-template-columns: 1fr; grid-template-areas: "hd" "body" "btns"; }
  .tdx-sec-btns { justify-content: flex-start; }
}
@media (max-width: 767.98px) {
  .tdx-doors { gap: 6px; margin: 0 0 10px; }
  .tdx-door { grid-template-columns: 1fr; gap: 2px; align-content: start; padding: 10px 10px 9px; border-radius: 12px; }
  .tdx-door-ic { display: none; }
  .tdx-door b { flex-direction: column; gap: 0; font-size: 12px; }
  .tdx-door b em { font-size: 19px; }
  .tdx-door small { font-size: 10.5px; }
  .tdx-door.tdx-on::after { top: 4px; right: 7px; }
  .tdx-sec { gap: 12px; padding: 16px 14px 14px; }
  .tdx-sec h2 { font-size: 17px; }
  .tdx-sec h2 span { font-size: 12px; }
  .tdx-sec p { font-size: 13px; }
  .tdx-sec-btns { flex-wrap: nowrap; }
  .tdx-sec-btns .tdx-btn { padding: 0 12px; font-size: 13.5px; }
  .tdx-sec-btns .tdx-btn-ghost { padding: 0 2px; font-size: 13px; }
  .tdx-sec-btns .tdx-btn-yellow svg { display: none; }
  .tdx-sec-btns .tdx-btn-yellow, .tdx-sec-btns .tdx-btn-line { flex: 1; }
  .tdx-route li { padding-right: 6px; }
  .tdx-route li::before { left: 38px; top: 15px; }
  .tdx-route li:nth-child(3)::before { top: 14px; }
  .tdx-route i { width: 32px; height: 32px; margin-bottom: 6px; }
  .tdx-route i svg { width: 17px; height: 17px; }
  .tdx-route b { font-size: 11.5px; }
  .tdx-route small { display: none; }
  .tdx-sell { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 12px; padding: 14px; }
  .tdx-sell-ic { width: 40px; height: 40px; }
  .tdx-sell-ic svg { width: 21px; height: 21px; }
  .tdx-sell .tdx-btn { grid-column: 1 / -1; }
  .tdx-sell-h { font-size: 15px; }
  .tdx-sell p { font-size: 12.5px; }
}
@media (max-width: 575.98px) {
  .tda-card .tdx-ask { min-height: 40px; font-size: 13px; padding: 0 6px; }
  .tda-card .tdx-calc { padding-left: 11px; font-size: 10.5px; }
}
