/* =========================================================
   СтройЦени — базов дизайн
   Тема: индустриална / строителна площадка
   ========================================================= */
 
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@400;500;700&display=swap');
 
:root {
  /* Палитра */
  --ink: #1E2124;          /* тъмна стомана / въглен */
  --ink-soft: #33383D;
  --concrete: #E9E7E2;     /* бетонно сив фон */
  --concrete-dark: #D8D5CE;
  --white: #FFFFFF;
  --hazard-yellow: #F4B400; /* сигнална жълта - лента за опасност */
  --steel-blue: #2F5D8A;
  --steel-blue-dark: #234867;
  --rust: #C1440E;
  --best-green: #2E7D46;
  --best-green-bg: #E4F3E9;
  --border: #CBC7BE;
 
  /* Типография */
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
 
  --radius: 10px;
  --shadow: 0 2px 8px rgba(30, 33, 36, 0.09);
  --shadow-lg: 0 10px 28px rgba(30, 33, 36, 0.16);
}
 
* { box-sizing: border-box; }
 
html { scroll-behavior: smooth; }
 
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--concrete);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
 
a { color: var(--steel-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
 
img { max-width: 100%; display: block; }
 
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
 
/* ---------- Hazard stripe (signature element) ---------- */
.hazard-strip {
  height: 8px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--hazard-yellow),
    var(--hazard-yellow) 14px,
    var(--ink) 14px,
    var(--ink) 28px
  );
}
 
/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}
 
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
 
.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.logo span { color: var(--hazard-yellow); }
.logo:hover { text-decoration: none; }
 
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.main-nav a:hover { opacity: 1; text-decoration: none; border-bottom: 2px solid var(--hazard-yellow); }
.main-nav a.active { opacity: 1; border-bottom: 2px solid var(--hazard-yellow); }
 
.nav-toggle { display: none; }
 
/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(155deg, var(--ink) 0%, var(--ink) 60%, var(--steel-blue-dark) 130%);
  color: var(--white);
  padding: 56px 0 72px;
}
 
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  max-width: 780px;
  margin: 0 0 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--hazard-yellow);
}
 
.hero p.lead {
  font-size: 17px;
  color: #C9CDD2;
  max-width: 620px;
  margin: 0 0 32px;
}
 
.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(244, 180, 0, 0.12);
  border: 1px solid rgba(244, 180, 0, 0.4);
  color: var(--hazard-yellow);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.updated-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hazard-yellow);
}
 
/* Search */
.search-box {
  display: flex;
  max-width: 620px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-box input {
  flex: 1;
  border: none;
  padding: 16px 18px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--ink);
  outline: none;
}
.search-box button {
  background: var(--hazard-yellow);
  border: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 0 26px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.search-box button:hover { background: #ffc73d; }
 
/* ---------- Filters ---------- */
.filters-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 66px;
  z-index: 40;
}
 
.filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
 
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
 
.filter-group label {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
}
 
.filter-group select,
.filter-group input[type="text"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--white);
  color: var(--ink);
  min-width: 190px;
}
 
.store-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
 
.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  background: var(--white);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.store-chip input { accent-color: var(--steel-blue); }
.store-chip.active {
  background: #EAF1F7;
  border-color: var(--steel-blue);
}
 
.result-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  align-self: center;
}
 
/* ---------- Products ---------- */
.products-section { padding: 40px 0 80px; }
 
.category-heading {
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--ink);
  display: inline-block;
}
 
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
 
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
 
.product-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}
 
.product-meta {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
 
.price-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
 
.price-row {
  border-radius: 6px;
  overflow: hidden;
}
 
.price-row-link,
.price-row > .offer-thumb + .store-name {
  /* fallback selector target kept minimal; main layout below */
}
 
.price-row-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  color: inherit;
  text-decoration: none;
}
.price-row-link:hover { background: rgba(47, 93, 138, 0.06); text-decoration: none; }
 
.price-row:not(:has(.price-row-link)) {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}
 
.offer-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--concrete);
}
 
.price-row .store-name {
  color: var(--ink-soft);
  font-size: 13.5px;
  flex: 1;
}
 
.price-row .price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
}
 
.price-row.best {
  background: var(--best-green-bg);
}
.price-row.best .store-name { color: var(--best-green); font-weight: 600; }
.price-row.best .price { color: var(--best-green); }
.price-row.best .offer-thumb { border-color: var(--best-green); }
 
.offer-disclaimer {
  margin-top: 4px;
  font-size: 11.5px;
  color: #9AA0A6;
  font-style: italic;
}
 
.best-badge {
  font-size: 10px;
  font-family: var(--font-display);
  letter-spacing: 0.4px;
  background: var(--best-green);
  color: var(--white);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}
 
.savings-note {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--rust);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
 
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 18px;
}
 
/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C9CDD2;
  padding: 40px 0 24px;
}
 
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
 
.footer-col h4 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}
 
.footer-col a, .footer-col p {
  display: block;
  color: #C9CDD2;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--hazard-yellow); }
 
.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-soft);
  font-size: 12px;
  color: #8B9096;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
 
/* ---------- Contact page ---------- */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 44px 0;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 34px;
  margin: 0 0 8px;
}
.page-hero p { color: #C9CDD2; margin: 0; max-width: 560px; }
 
.contact-wrap {
  padding: 48px 0 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}
 
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
 
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-family: var(--font-display);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-soft);
}
.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  resize: vertical;
}
.form-row textarea { min-height: 130px; }
 
.btn-primary {
  background: var(--hazard-yellow);
  border: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 13px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: #ffc73d; }
 
.form-status {
  margin-top: 14px;
  font-size: 13.5px;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { color: var(--best-green); }
 
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
 
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--steel-blue);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.info-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--steel-blue-dark);
}
.info-card p { margin: 0; font-size: 14px; color: var(--ink-soft); }
 
.store-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.store-list-inline span {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--concrete-dark);
  padding: 3px 8px;
  border-radius: 3px;
}
 
/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .filters-section { position: static; }
}
 
@media (max-width: 680px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 12px 24px 20px;
    gap: 14px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    border-radius: var(--radius);
    padding: 7px 10px;
    cursor: pointer;
  }
  .result-count { margin-left: 0; width: 100%; }
}
 
/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--steel-blue);
  outline-offset: 2px;
}
 
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
 
/* ---------- Product detail page (сравнение на един продукт) ---------- */
 
.product-detail-header {
  padding: 40px 0 24px;
}
 
.back-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--steel-blue);
  margin-bottom: 16px;
}
 
.product-detail-header h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  margin: 0 0 6px;
}
 
.match-note {
  margin-top: 14px;
  background: #FFF6E0;
  border: 1px solid #F4B400;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: #6b5400;
}
 
.product-detail-header .savings-note {
  margin-top: 14px;
  font-size: 14px;
  border-top: none;
  padding-top: 0;
}
 
.offer-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 80px;
}
 
.offer-detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.offer-detail-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.offer-detail-card.best {
  border-color: var(--best-green);
  box-shadow: 0 0 0 2px var(--best-green-bg), var(--shadow);
}
 
.offer-detail-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--concrete);
  border-bottom: 1px solid var(--border);
}
 
.offer-detail-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
 
.offer-detail-store {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--steel-blue-dark);
}
 
.offer-detail-label {
  font-size: 14px;
  color: var(--ink-soft);
  min-height: 36px;
}
 
.offer-detail-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.offer-detail-price .price {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}
.offer-detail-card.best .offer-detail-price .price { color: var(--best-green); }
 
.offer-detail-link {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  padding: 10px 16px;
}
 
.details-link {
  margin-top: 4px;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--steel-blue);
}