/* ==========================================================================
   Dongfeng Kazakhstan — corporate skin, 2026-08-07
   Keeps the brand red the site already used (#E60020) and pairs it with the
   charcoal/steel that reads as commercial-vehicle rather than consumer-auto.
   Loaded on top of dfg-sass/main.css (Bootstrap grid + resets).
   ========================================================================== */
.dfg {
  --dfg-red: #E60020;
  --dfg-red-dark: #B3001A;
  --dfg-ink: #14181D;
  --dfg-ink-soft: #1D2229;
  --dfg-steel: #5A6470;
  --dfg-line: #DFE3E8;
  --dfg-surface: #F4F6F8;
  --dfg-radius: 4px;

  margin: 0;
  color: var(--dfg-ink);
  background: #fff;
  font-family: Montserrat, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
.dfg h1, .dfg h2, .dfg h3, .dfg h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.dfg a { color: inherit; }
.dfg img { max-width: 100%; }

.dfg-section { padding: 74px 0; }
.dfg-section--soft { background: var(--dfg-surface); }
.dfg-section--ink { background: var(--dfg-ink); color: #fff; }
.dfg-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--dfg-red);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.dfg-section--ink .dfg-label { color: #FF6B7F; }
.dfg-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 14px; }
.dfg-lead { max-width: 68ch; color: var(--dfg-steel); font-size: 1.05rem; }
.dfg-section--ink .dfg-lead { color: #B6BEC8; }

/* ---- buttons ---- */
.dfg-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: var(--dfg-radius);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.dfg .dfg-btn--primary { background: var(--dfg-red); color: #fff; }
.dfg .dfg-btn--primary:hover { background: var(--dfg-red-dark); color: #fff; }
.dfg .dfg-btn--ghost { border-color: currentColor; color: var(--dfg-ink); }
.dfg .dfg-btn--ghost:hover { background: var(--dfg-ink); color: #fff; }
.dfg .dfg-btn--light { background: #fff; color: var(--dfg-ink); }
.dfg .dfg-btn--light:hover { background: var(--dfg-red); color: #fff; }
.dfg-section--ink .dfg-btn--ghost { color: #fff; }
.dfg-btn--sm { padding: 9px 16px; font-size: .88rem; }

/* ---- header ---- */
.dfg-topbar {
  background: var(--dfg-ink);
  color: #C6CCD4;
  font-size: .84rem;
}
.dfg-topbar__inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 9px 0; }
.dfg-topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.dfg-topbar a:hover { color: var(--dfg-red); }
.dfg-topbar__spacer { margin-left: auto; }

.dfg-header { position: sticky; top: 0; z-index: 1040; background: #fff; border-bottom: 1px solid var(--dfg-line); }
.dfg-header__inner { display: flex; align-items: center; gap: 26px; min-height: 76px; }
.dfg-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.dfg-brand img { height: 44px; width: auto; }
.dfg-brand__text strong { display: block; font-size: 1.02rem; font-weight: 800; letter-spacing: .04em; }
.dfg-brand__text span { display: block; font-size: .72rem; color: var(--dfg-steel); letter-spacing: .06em; }
.dfg-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.dfg-nav a {
  padding: 9px 14px;
  border-radius: var(--dfg-radius);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}
.dfg-nav a:hover, .dfg-nav a.is-active { background: var(--dfg-surface); color: var(--dfg-red); }
.dfg-header__cta { flex: 0 0 auto; }
.dfg-burger {
  display: none;
  width: 46px; height: 42px;
  border: 1px solid var(--dfg-line);
  border-radius: var(--dfg-radius);
  background: #fff;
  cursor: pointer;
  padding: 11px 10px;
}
.dfg-burger span { display: block; height: 2px; background: var(--dfg-ink); margin: 0 0 5px; }
.dfg-burger span:last-child { margin-bottom: 0; }

/* ---- hero ---- */
.dfg-hero { position: relative; min-height: 560px; display: flex; align-items: center; background: var(--dfg-ink); overflow: hidden; }
.dfg-hero__bg { position: absolute; inset: 0; }
.dfg-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.dfg-hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20,24,29,.94) 0%, rgba(20,24,29,.86) 42%, rgba(20,24,29,.35) 74%, rgba(20,24,29,.15) 100%);
}
.dfg-hero__inner { position: relative; z-index: 2; padding: 80px 0; color: #fff; max-width: 720px; }
.dfg-hero h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); margin: 0 0 18px; }
.dfg-hero p { color: #C6CCD4; font-size: 1.1rem; max-width: 56ch; }
.dfg-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.dfg-hero__stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.16); }
.dfg-hero__stats div strong { display: block; font-size: 2rem; font-weight: 800; }
.dfg-hero__stats div span { color: #98A2AE; font-size: .86rem; }

/* ---- category tiles ---- */
.dfg-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dfg-cat {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--dfg-line);
  border-radius: var(--dfg-radius);
  background: #fff;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.dfg-cat:hover { border-color: var(--dfg-red); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20,24,29,.10); }
.dfg-cat__img { height: 132px; margin-bottom: 16px; display: grid; place-items: center; }
.dfg-cat__img img { max-height: 132px; width: auto; object-fit: contain; }
.dfg-cat h3 { font-size: 1.06rem; margin: 0 0 6px; }
.dfg-cat span { color: var(--dfg-steel); font-size: .88rem; }
.dfg-cat__go { margin-top: auto; padding-top: 14px; color: var(--dfg-red); font-weight: 700; font-size: .9rem; }

/* ---- model cards ---- */
.dfg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.dfg-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--dfg-line);
  border-radius: var(--dfg-radius);
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dfg-card:hover { border-color: var(--dfg-red); box-shadow: 0 14px 34px rgba(20,24,29,.10); }
.dfg-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--dfg-surface); }
.dfg-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.dfg-card__tag {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px;
  border-radius: var(--dfg-radius);
  background: var(--dfg-ink);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.dfg-card__stock { position: absolute; top: 12px; right: 12px; padding: 5px 10px; border-radius: var(--dfg-radius); background: #1F9D55; color: #fff; font-size: .7rem; font-weight: 700; }
.dfg-card__body { padding: 18px 20px; flex: 1 1 auto; }
.dfg-card__body h3 { font-size: 1.02rem; margin: 0 0 10px; }
.dfg-card__specs { margin: 0; color: var(--dfg-steel); font-size: .85rem; }
.dfg-card__specs table { width: 100%; }
.dfg-card__specs td { padding: 2px 0; }
.dfg-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--dfg-line);
}
.dfg-card__price { font-weight: 800; }
.dfg-card__price--request { color: var(--dfg-steel); font-weight: 600; font-size: .92rem; }

/* ---- feature strip ---- */
.dfg-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dfg-feature { padding: 26px; border: 1px solid var(--dfg-line); border-radius: var(--dfg-radius); background: #fff; }
.dfg-section--ink .dfg-feature { background: var(--dfg-ink-soft); border-color: rgba(255,255,255,.10); }
.dfg-feature strong { display: block; margin-bottom: 8px; font-size: 1.02rem; }
.dfg-feature p { margin: 0; color: var(--dfg-steel); font-size: .92rem; }
.dfg-section--ink .dfg-feature p { color: #98A2AE; }
.dfg-feature__num { display: block; margin-bottom: 12px; color: var(--dfg-red); font-weight: 800; letter-spacing: .1em; font-size: .8rem; }

/* ---- split blocks ---- */
.dfg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: center; }
.dfg-split__media img { width: 100%; border-radius: var(--dfg-radius); }

/* ---- detail page ---- */
.dfg-detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 46px; align-items: start; }
.dfg-detail__gallery { border: 1px solid var(--dfg-line); border-radius: var(--dfg-radius); background: var(--dfg-surface); }
.dfg-detail__gallery img { width: 100%; object-fit: contain; padding: 20px; }
.dfg-detail h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0 0 14px; }
.dfg-detail__price { margin: 20px 0; font-size: 1.7rem; font-weight: 800; }
.dfg-detail__price small { display: block; color: var(--dfg-steel); font-size: .84rem; font-weight: 600; }
.dfg-spec-table { width: 100%; border-collapse: collapse; margin: 22px 0; }
.dfg-spec-table td, .dfg-spec-table th { padding: 11px 4px; border-bottom: 1px solid var(--dfg-line); text-align: left; font-size: .94rem; vertical-align: top; }
.dfg-spec-table th { color: var(--dfg-steel); font-weight: 600; width: 46%; }
.dfg-detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.dfg-prose { max-width: 74ch; }
.dfg-prose table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.dfg-prose td, .dfg-prose th { padding: 10px 6px; border-bottom: 1px solid var(--dfg-line); font-size: .93rem; text-align: left; }

/* ---- lead form ---- */
.dfg-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dfg-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--dfg-line);
  border-radius: var(--dfg-radius);
  font: inherit;
  background: #fff;
  color: var(--dfg-ink);
}
.dfg-form input:focus { outline: 2px solid var(--dfg-red); outline-offset: 1px; }
.dfg-form button { width: 100%; justify-content: center; }
.dfg-form__note { margin-top: 12px; font-size: .82rem; color: var(--dfg-steel); }
.dfg-section--ink .dfg-form__note { color: #98A2AE; }

/* ---- contacts ---- */
.dfg-contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dfg-contact-card { padding: 26px; border: 1px solid var(--dfg-line); border-radius: var(--dfg-radius); background: #fff; text-decoration: none; display: block; }
.dfg-contact-card:hover { border-color: var(--dfg-red); }
.dfg-contact-card small { display: block; color: var(--dfg-steel); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.dfg-contact-card strong { font-size: 1.12rem; }

/* ---- breadcrumbs ---- */
.dfg-crumbs { padding: 16px 0; font-size: .87rem; color: var(--dfg-steel); }
.dfg-crumbs a { text-decoration: none; }
.dfg-crumbs a:hover { color: var(--dfg-red); }
.dfg-crumbs span { margin: 0 8px; opacity: .5; }

/* ---- footer ---- */
.dfg-footer { background: var(--dfg-ink); color: #98A2AE; padding: 62px 0 0; }
.dfg-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 46px; }
.dfg-footer h4 { color: #fff; font-size: .96rem; margin: 0 0 16px; }
.dfg-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.dfg-footer a { text-decoration: none; }
.dfg-footer a:hover { color: var(--dfg-red); }
.dfg-footer__bar { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.09); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .dfg-cats, .dfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dfg-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dfg-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dfg-detail { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .dfg-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 860px) {
  .dfg-burger { display: block; margin-left: auto; }
  .dfg-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--dfg-line);
    box-shadow: 0 18px 34px rgba(20,24,29,.12);
  }
  .dfg-nav.is-open { display: flex; }
  .dfg-nav a { padding: 13px 8px; border-bottom: 1px solid var(--dfg-line); border-radius: 0; }
  .dfg-header { position: relative; }
  .dfg-header__cta { display: none; }
  .dfg-hero { min-height: 460px; }
  .dfg-hero__bg::after { background: linear-gradient(180deg, rgba(20,24,29,.86) 0%, rgba(20,24,29,.92) 100%); }
  .dfg-section { padding: 52px 0; }
  .dfg-form { grid-template-columns: minmax(0, 1fr); }
  .dfg-contacts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .dfg-cats, .dfg-grid, .dfg-features { grid-template-columns: minmax(0, 1fr); }
  .dfg-hero__stats { gap: 22px; }
}

/* --- catalogue: the filter rail eats ~280px, so a fixed 3-up squeezed cards
       to ~200px and pushed the price/button row out of the card. Let the grid
       choose its own column count from the space it actually has. --- */
.tf-results .dfg-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.dfg-card__foot { flex-wrap: wrap; row-gap: 10px; }
.dfg-card__foot .dfg-btn { flex: 0 0 auto; }
.dfg-card__price { min-width: 0; overflow-wrap: anywhere; }

/* Operator-entered spec tables carry their own widths; contain them. */
.dfg-card__specs { overflow: hidden; }
.dfg-card__specs table { table-layout: fixed; width: 100%; }
.dfg-card__specs td, .dfg-card__specs th { overflow-wrap: anywhere; hyphens: auto; }
.dfg-card__body h3 { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .tf-results .dfg-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* --- detail gallery (exterior + detail shots; interior is for cars, not trucks) --- */
.dfg-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.dfg-gallery figure { margin: 0; border: 1px solid var(--dfg-line); border-radius: var(--dfg-radius); overflow: hidden; background: var(--dfg-surface); }
.dfg-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
