/* TRIDAAGRO category redesign (tridaagro_category_redesign 0.3.5). Every rule is scoped to .tda-* */
.tda-col, .tda-promo-col, .tda-modal, .tda-quick { --tda-green: #008032; --tda-green-d: #00632a; --tda-green-50: #edf7f0; --tda-green-100: #cfe8d7; --tda-yellow: #f5d90a; --tda-red: #d9352b; --tda-ink: #16211b; --tda-ink-2: #2f3b35; --tda-muted: #66736c; --tda-line: #e3e9e5; --tda-tile: #f3f6f4; }
.tda-card { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--tda-line); border-radius: 14px; background: #fff; overflow: hidden; color: var(--tda-ink); font-size: 14px; line-height: 1.4; transition: box-shadow .15s, border-color .15s; }
.tda-card:hover { border-color: #d3ddd7; box-shadow: 0 10px 28px rgba(22,33,27,.10); }
.tda-card svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.tda-card a { text-decoration: none; }

/* photo */
.tda-media { position: relative; }
.tda-ph { position: relative; display: block; aspect-ratio: 4 / 3; background: #e3e9e5; overflow: hidden; }
.tda-ph img.tda-main { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tda-card:hover .tda-ph img.tda-main { transform: scale(1.02); }
.tda-chips { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 5px; pointer-events: none; }
.tda-chip { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #fff; color: var(--tda-ink); font-size: 11px; font-weight: 700; line-height: 1.2; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.tda-chip-green { background: var(--tda-green); color: #fff; }
.tda-chip-red { background: var(--tda-red); color: #fff; }
.tda-chip-agro { background: var(--tda-yellow); color: #1c1f12; }
.tda-chip-order, .tda-chip-other { background: rgba(255,255,255,.96); color: var(--tda-ink-2); }
.tda-chip-sale { background: var(--tda-red); color: #fff; }
.tda-pcount { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(12,18,15,.68); color: #fff; font-size: 11px; font-weight: 700; }
.tda-pcount svg { width: 13px; height: 13px; }
.tda-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px 8px 0; }
.tda-th { position: relative; display: block; padding: 0; aspect-ratio: 4 / 3; border: 0; border-radius: 6px; overflow: hidden; background: #e8ecea; cursor: pointer; }
.tda-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tda-th:hover, .tda-th:focus-visible { outline: 2px solid var(--tda-green); outline-offset: -2px; }
.tda-more { display: grid; place-items: center; background: var(--tda-ink); color: #fff !important; font-size: 12.5px; font-weight: 700; }

/* name and characteristics */
.tda-bd { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; }
.tda-ttl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; color: var(--tda-ink) !important; font-size: 15.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tda-ttl:hover { color: var(--tda-green-d) !important; }
.tda-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.tda-spec { min-width: 0; padding: 7px 10px; border-radius: 9px; background: var(--tda-tile); }
.tda-spec dt { color: var(--tda-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }
.tda-spec dd { margin: 2px 0 0; color: var(--tda-ink); font-size: 14px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tda-specs-1 .tda-spec, .tda-specs-3 .tda-spec:last-child { grid-column: 1 / -1; }
.tda-nospecs { padding: 8px 10px; border-radius: 9px; background: var(--tda-tile); color: var(--tda-muted); font-size: 12.5px; }

/* price and actions */
.tda-side { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid var(--tda-line); }
.tda-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tda-price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.tda-old { color: var(--tda-muted); font-size: 13px; }
.tda-uah { margin-top: 2px; color: var(--tda-muted); font-size: 12.5px; font-weight: 600; }
.tda-note { position: relative; margin-top: 6px; padding-left: 13px; color: var(--tda-ink-2); font-size: 12px; line-height: 1.35; }
.tda-note::before { content: ""; position: absolute; left: 0; top: .42em; width: 7px; height: 7px; border-radius: 50%; background: #b7c2bc; }
.tda-k-green .tda-note::before { background: var(--tda-green); }
.tda-k-red .tda-note::before { background: var(--tda-red); }
.tda-k-agro .tda-note::before { background: #e0b800; }
.tda-acts { display: grid; grid-template-columns: 44px 1fr; gap: 8px; }
.tda-call, .tda-go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 14px; transition: background .15s, border-color .15s; }
.tda-call { padding: 0; border: 1.5px solid var(--tda-green-100); background: #fff; color: var(--tda-green-d) !important; }
.tda-call span { display: none; }
.tda-call:hover { border-color: var(--tda-green); background: var(--tda-green-50); }
.tda-go { background: var(--tda-green); color: #fff !important; }
.tda-go:hover { background: var(--tda-green-d); }
.tda-mgr { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: -4px; color: var(--tda-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tda-mgr svg { width: 15px; height: 15px; }
.tda-mgr a, .tda-mgr b { overflow: hidden; text-overflow: ellipsis; color: var(--tda-ink-2) !important; font-weight: 600; }
.tda-mgr a:hover { color: var(--tda-green-d) !important; text-decoration: underline; }
.tda-edit { font-size: 12px; color: #2d3b82 !important; text-decoration: underline !important; }

/* staff strip: filled only by the private JSON (managers and admins) */
.tda-staff { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 6px 8px; border: 1px dashed #e3cf6e; border-radius: 9px; background: #fffbe6; font-size: 11.5px; font-weight: 700; }
.tda-staff[hidden] { display: none; }
.tda-staff em { width: 100%; color: #8a6d00; font-size: 9.5px; font-style: normal; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tda-staff span { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 7px; background: #fff; color: var(--tda-ink-2); }
.tda-staff .tda-s-green { background: var(--tda-green-50); color: var(--tda-green-d); }
.tda-staff .tda-s-red { background: #fdecea; color: #a8231b; }
.tda-staff .tda-age-new { background: var(--tda-green-50); color: var(--tda-green-d); }
.tda-staff .tda-age-mid { background: #fff1c2; color: #7a5d00; }
.tda-staff .tda-age-old { background: #fdecea; color: #a8231b; }
.tda-staff .tda-s-none { color: var(--tda-muted); font-weight: 600; }
.tda-staff .tda-s-id { margin-left: auto; color: var(--tda-muted); font-weight: 600; }
.tda-status-btn { display: inline-flex; align-items: center; padding: 2px 9px; border: 1.5px solid #d8b400; border-radius: 7px; background: var(--tda-yellow); color: #1c1f12; font: inherit; font-weight: 800; cursor: pointer; }
.tda-status-btn:hover { background: #ffe74d; }

/* list view (desktop button «Список») */
.product-list .tda-card { display: grid; grid-template-columns: 300px minmax(0, 1fr) 250px; }
.product-list .tda-media { display: flex; flex-direction: column; padding-bottom: 8px; }
.product-list .tda-ph { flex: 1; aspect-ratio: auto; min-height: 200px; }
.product-list .tda-bd { padding: 16px 20px; }
.product-list .tda-ttl { min-height: 0; font-size: 17px; }
.product-list .tda-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-list .tda-specs-1 .tda-spec, .product-list .tda-specs-3 .tda-spec:last-child { grid-column: auto; }
.product-list .tda-side { justify-content: center; margin-top: 0; padding: 16px 18px; border-top: 0; border-left: 1px solid var(--tda-line); }
.product-list .tda-acts { grid-template-columns: 1fr; }
.product-list .tda-call { padding: 0 14px; }
.product-list .tda-call span { display: inline; }

/* promo after the 6th card */
.tda-promo { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin: 4px 0; padding: 22px 24px; border-radius: 14px; background: linear-gradient(120deg, #0b6d33, #075227); color: #fff; }
.tda-promo-h { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.tda-promo p { margin: 0; color: #d6ead9; font-size: 13.5px; line-height: 1.5; }
.tda-promo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tda-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 1.5px solid transparent; border-radius: 10px; font-weight: 800; font-size: 14.5px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.tda-btn-yellow { background: var(--tda-yellow); color: #1c1f12; }
.tda-btn-yellow:hover { background: #ffe74d; }

/* windows: request form, «Статус» */
.tda-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(12,18,15,.55); }
.tda-modal[hidden] { display: none; }
.tda-modal-box { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; padding: 20px; border-radius: 14px; background: #fff; color: #16211b; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tda-modal-box h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.tda-modal-box p { margin: 0 0 12px; color: #66736c; font-size: 13px; }
.tda-modal-box label { display: block; margin: 0 0 10px; font-size: 12.5px; font-weight: 600; }
.tda-modal-box input, .tda-modal-box textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid #e2e8e4; border-radius: 10px; font: inherit; }
.tda-modal-box .tda-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tda-modal-box .tda-btns { display: flex; gap: 8px; margin-top: 6px; }
.tda-modal-box .tda-btns button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.tda-modal-box .tda-send { background: #008032; color: #fff; }
.tda-modal-box .tda-cancel { background: #f1f4f2; color: #16211b; }
.tda-modal-msg { margin-top: 8px; font-size: 13px; font-weight: 600; }
.tda-status-box { max-width: 560px; }
.tda-status-html { margin: 8px 0 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tda-status-html img { max-width: 100%; height: auto; }

/* phones: compact horizontal card, always (the theme hides the view switch below 768px) */
@media (max-width: 575.98px) {
  .tda-card { display: grid; grid-template-columns: 38% minmax(0, 1fr); grid-template-rows: auto 1fr; border-radius: 12px; }
  .tda-media { grid-row: 1 / span 2; }
  .tda-ph { aspect-ratio: auto; height: 100%; min-height: 160px; }
  .tda-card:hover .tda-ph img.tda-main { transform: none; }
  .tda-thumbs { display: none; }
  .tda-bd { gap: 7px; padding: 10px 10px 0; }
  .tda-ttl { min-height: 0; -webkit-line-clamp: 3; font-size: 13.5px; }
  .tda-specs { gap: 4px; }
  .tda-spec { padding: 4px 6px; border-radius: 7px; }
  .tda-spec dt { font-size: 9px; }
  .tda-spec dd { font-size: 12.5px; }
  .tda-side { gap: 6px; padding: 8px 10px 10px; border-top: 0; }
  .tda-price { font-size: 18px; }
  .tda-uah, .tda-mgr { display: none; }
  .tda-note { margin-top: 3px; padding-left: 11px; font-size: 10.5px; }
  .tda-note::before { width: 6px; height: 6px; }
  .tda-acts { grid-template-columns: 40px 1fr; gap: 6px; }
  .tda-call, .tda-go { min-height: 40px; font-size: 13px; }
  .tda-go { padding: 0 8px; }
  .tda-chips { top: 6px; left: 6px; right: 6px; gap: 3px; }
  .tda-chip { padding: 3px 7px; font-size: 10px; }
  .tda-pcount { right: 6px; bottom: 6px; }
  .tda-staff { padding: 4px 6px; font-size: 10.5px; }
  .tda-staff .tda-s-id { margin-left: 0; }
  .tda-promo { grid-template-columns: 1fr; padding: 18px 16px; }
  .tda-promo-btns .tda-btn { flex: 1; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .product-list .tda-card { grid-template-columns: 240px minmax(0, 1fr); }
  .product-list .tda-media { grid-row: 1 / span 2; }
  .product-list .tda-side { grid-column: 2; border-left: 0; padding-top: 0; }
  .product-list .tda-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 0.3.0: quick filters above the list (one scrolling row on phones) */
.tda-quick { margin: 0 0 10px; }
.tda-q-track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tda-q-g { color: var(--tda-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tda-q-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--tda-line); }
.tda-q { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px; border: 1.5px solid var(--tda-line); border-radius: 999px; background: #fff; color: var(--tda-ink-2) !important; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none !important; transition: border-color .15s, background .15s; }
.tda-q:hover { border-color: var(--tda-green); color: var(--tda-green-d) !important; }
.tda-q svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tda-q-on { border-color: var(--tda-green); background: var(--tda-green-50); color: var(--tda-green-d) !important; }
.tda-q-reset { border-style: dashed; color: var(--tda-muted) !important; }

/* 0.3.0: OCFilter «Виробник» — the 8 biggest brands, the rest behind «Показати всі» (classes added by category.js) */
.tda-ocf-hide { display: none !important; }
.tda-ocf-more { display: inline-block; margin: 6px 0 2px; padding: 0; border: 0; background: none; color: #00632a; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tda-ocf-more:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
  .tda-quick { margin: 0 0 8px; }
  .tda-q-track { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tda-q-track::-webkit-scrollbar { display: none; }
  .tda-q { min-height: 36px; }
  .tda-q-g { display: none; }
}
