/* Dams Construction Trading — product search styles
   Colours fall back to the site's charcoal / rust / paper palette.
   If your main stylesheet uses different variable names, change only these 6 lines. */
.dams-quicksearch, #dams-catalog, #dams-product, .dams-catalog-page {
  --dps-ink: var(--ink, #1b1d1f);
  --dps-accent: var(--rust, #b34f1e);
  --dps-paper: var(--paper, #f7f4ee);
  --dps-card: #ffffff;
  --dps-line: var(--line, #d9d0bb);
  --dps-muted: var(--ink-soft, #59524a);
  font-family: inherit;
  color: var(--dps-ink);
}
.dps-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header quick search ---------- */
.dams-quicksearch { position: relative; width: 100%; max-width: 340px; }
.dqs-form { position: relative; margin: 0; }
.dqs-input, .dps-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--dps-ink);
  background: var(--dps-card); border: 1px solid var(--dps-line); border-radius: 8px;
  padding: 10px 14px 10px 38px; outline: none; transition: border-color .15s, box-shadow .15s;
}
[dir="rtl"] .dqs-input, [dir="rtl"] .dps-input { padding: 10px 38px 10px 14px; }
.dqs-input:focus, .dps-input:focus { border-color: var(--dps-accent); box-shadow: 0 0 0 3px rgba(180, 83, 42, .18); }
.dqs-icon { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; transform: translateY(-50%);
  fill: none; stroke: var(--dps-muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
[dir="rtl"] .dqs-icon { left: auto; right: 12px; }
.dqs-pop {
  position: absolute; z-index: 1000; top: calc(100% + 6px); left: 0; right: 0; min-width: 300px;
  background: var(--dps-card); border: 1px solid var(--dps-line); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .16); padding: 6px; max-height: 70vh; overflow: auto;
}
[dir="rtl"] .dqs-pop { left: auto; }
.dqs-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 7px; text-decoration: none; color: inherit; }
.dqs-item:hover, .dqs-item.is-active { background: var(--dps-paper); }
.dqs-thumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.dqs-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dqs-name { font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dqs-meta { font-size: 12px; color: var(--dps-muted); }
.dqs-pr { flex: 0 0 auto; text-align: end; font-size: 14px; white-space: nowrap; }
.dqs-all { display: block; padding: 10px 8px 4px; font-size: 14px; font-weight: 600; color: var(--dps-accent); text-decoration: none; }
.dqs-vat, .dqs-none { margin: 4px 8px 6px; font-size: 12px; color: var(--dps-muted); }
.dqs-none { font-size: 14px; color: var(--dps-ink); }

/* ---------- prices ---------- */
.dps-price { font-weight: 700; color: var(--dps-ink); font-variant-numeric: tabular-nums; }
.dps-cur { font-size: .78em; font-weight: 600; color: var(--dps-accent); letter-spacing: .03em; }
.dps-unit { font-size: .8em; font-weight: 500; color: var(--dps-muted); }
.dps-por { font-weight: 600; font-size: .92em; color: var(--dps-accent); }
.dps-vat { display: block; font-size: 12px; color: var(--dps-muted); margin-top: 2px; }

/* ---------- catalog ---------- */
#dams-catalog { margin: 0 auto; }
.dps-bar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 10px; }
.dps-searchwrap { position: relative; max-width: 620px; }
.dps-searchwrap .dps-input { font-size: 16px; padding-top: 13px; padding-bottom: 13px; }
.dps-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dps-chip { font: inherit; font-size: 13.5px; cursor: pointer; padding: 7px 14px; border-radius: 999px;
  background: var(--dps-card); color: var(--dps-ink); border: 1px solid var(--dps-line); transition: all .15s; }
.dps-chip:hover { border-color: var(--dps-accent); }
.dps-chip.is-on { background: var(--dps-ink); color: #fff; border-color: var(--dps-ink); }
.dps-count { font-size: 13px; color: var(--dps-muted); margin: 6px 0 14px; }
.dps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.dps-card { display: flex; flex-direction: column; background: var(--dps-card); border: 1px solid var(--dps-line);
  border-radius: 12px; overflow: hidden; scroll-margin-top: 100px; transition: box-shadow .2s, transform .2s; }
.dps-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .09); transform: translateY(-2px); }
.dps-card:target { outline: 2px solid var(--dps-accent); }
.dps-media { display: block; aspect-ratio: 16 / 10; background: var(--dps-paper); }
.dps-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dps-noimg, .dqs-thumb.dps-noimg, .dpp-img.dps-noimg {
  display: flex; align-items: center; justify-content: center; background: var(--dps-paper);
  color: var(--dps-accent); font-weight: 800; letter-spacing: .08em; font-size: 15px;
}
.dps-media .dps-noimg { width: 100%; height: 100%; font-size: 28px;
  background: repeating-linear-gradient(135deg, var(--dps-paper) 0 14px, #efe8dd 14px 28px); }
.dps-body { padding: 14px 16px 6px; flex: 1; }
.dps-cat { margin: 0 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dps-accent); }
[dir="rtl"] .dps-cat { letter-spacing: 0; }
.dps-name { margin: 0 0 6px; font-size: 16px; line-height: 1.35; font-weight: 700; }
.dps-name a { color: inherit; text-decoration: none; }
.dps-name a:hover { color: var(--dps-accent); }
.dps-desc { margin: 0 0 8px; font-size: 13.5px; color: var(--dps-muted); line-height: 1.45; }
.dps-sku { margin: 0; font-size: 12px; color: var(--dps-muted); }
.dps-in { color: #2e7d4f; font-weight: 600; }
.dps-out { color: #9a6a10; font-weight: 600; }
.dps-buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  padding: 12px 16px 16px; border-top: 1px dashed var(--dps-line); margin-top: 10px; }
.dps-buy .dps-price { font-size: 19px; }
.dps-btn { display: inline-block; flex: 0 0 auto; background: var(--dps-accent); color: #fff !important; text-decoration: none;
  font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 7px; transition: filter .15s; }
.dps-btn:hover { filter: brightness(1.1); }
.dps-btn-lg { font-size: 15px; padding: 13px 22px; margin-top: 18px; }
.dps-empty { grid-column: 1 / -1; text-align: center; padding: 40px 16px; background: var(--dps-paper); border-radius: 12px; }
.dps-empty p { margin: 0 0 14px; }
.dps-foot { margin-top: 18px; font-size: 12.5px; color: var(--dps-muted); }

/* ---------- single product ---------- */
.dps-back { display: inline-block; margin-bottom: 18px; font-size: 14px; color: var(--dps-accent); text-decoration: none; font-weight: 600; }
.dpp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.dpp-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: flex; font-size: 40px; }
.dpp-name { margin: 4px 0 10px; font-size: clamp(22px, 3vw, 32px); line-height: 1.2; }
.dpp-desc { color: var(--dps-muted); margin: 0 0 10px; }
.dpp-price { margin-top: 18px; padding: 16px 18px; background: var(--dps-paper); border-radius: 10px; }
.dpp-price .dps-price { font-size: 28px; }
.dpp-related { margin-top: 36px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dpp-related .dqs-item { border: 1px solid var(--dps-line); background: var(--dps-card); }

@media (max-width: 720px) {
  .dams-quicksearch { max-width: none; }
  .dpp-wrap { grid-template-columns: 1fr; gap: 20px; }
  .dps-grid { grid-template-columns: 1fr; }
}
.dpp-img.dps-noimg { background: repeating-linear-gradient(135deg, #fff 0 16px, #efe8dd 16px 32px); border: 1px solid var(--dps-line); }
