/* ==========================================================================
   ENA Premium Auto Parts - site stylesheet
   Brand palette: ENA blue #2A76C6, gold #fdb813
   Plain CSS, no build step. Loaded via {% static 'catalog/css/site.css' %}.
   ========================================================================== */

:root {
  --ena-blue:        #2a76c6;
  --ena-blue-600:    #2265ad;
  --ena-blue-700:    #1b5391;
  --ena-blue-900:    #0f3866;
  --ena-gold:        #fdb813;
  --ena-gold-600:    #e0a20a;

  --ink:             #1a2331;
  --body:            #3a4757;
  --muted:           #6b7787;
  --line:            #e6eaf0;
  --line-2:          #d7dde6;
  --bg:              #f4f6f9;
  --card:            #ffffff;
  --soft:            #eef2f8;

  --shadow-sm: 0 1px 2px rgba(16,32,64,.06), 0 1px 3px rgba(16,32,64,.05);
  --shadow-md: 0 6px 18px rgba(16,32,64,.08), 0 2px 6px rgba(16,32,64,.05);
  --shadow-lg: 0 18px 40px rgba(16,32,64,.14), 0 6px 14px rgba(16,32,64,.08);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --wrap: 1180px;
  --gap: 24px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: var(--ena-blue-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ena-gold-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -.01em;
}

p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.site-main { flex: 1 0 auto; }

/* Section rhythm ---------------------------------------------------------- */
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.section-head { margin-bottom: 28px; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ena-gold-600);
  margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.section-head p { color: var(--muted); margin: 10px 0 0; max-width: 62ch; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ena-blue);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--btn-fg); }
.btn--gold { --btn-bg: var(--ena-gold); --btn-fg: #2a1c00; }
.btn--gold:hover { background: var(--ena-gold-600); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: #fff;
  border-color: rgba(255,255,255,.55);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline {
  --btn-bg: #fff; --btn-fg: var(--ena-blue-700);
  border-color: var(--line-2);
}
.btn--outline:hover { border-color: var(--ena-blue); color: var(--ena-blue-700); }
.btn--sm { padding: 10px 16px; font-size: .9rem; }

/* Top utility bar --------------------------------------------------------- */
.topbar {
  background: var(--ena-blue-900);
  color: #cfe0f4;
  font-size: .84rem;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 16px; }
.topbar__tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.topbar__links { display: flex; align-items: center; gap: 20px; }
.topbar a { color: #e7f0fb; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { color: var(--ena-gold); }
.topbar svg { width: 15px; height: 15px; flex: none; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16,32,64,.03);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand__text { font-family: var(--font-display); font-weight: 800; color: var(--ena-blue-700); font-size: 1.15rem; letter-spacing: -.01em; line-height: 1; }
.brand__text small { display: block; font-size: .62rem; letter-spacing: .18em; color: var(--muted); font-weight: 700; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px;
  background: var(--ena-gold); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav a:hover { color: var(--ena-blue-700); background: var(--soft); }
.nav a.is-active { color: var(--ena-blue-700); }
.nav a.is-active::after { transform: scaleX(1); }
.nav .btn { margin-left: 8px; }
.nav .btn::after { display: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; color: var(--ink); }

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 88% -10%, rgba(253,184,19,.20), transparent 60%),
    linear-gradient(135deg, var(--ena-blue) 0%, var(--ena-blue-700) 55%, var(--ena-blue-900) 100%);
  color: #eaf2fd;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(115deg, transparent 62%, rgba(255,255,255,.05) 62.2%, rgba(255,255,255,.05) 66%, transparent 66.2%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 66px; padding-bottom: 66px; }
.hero__inner { max-width: 660px; }
.hero .eyebrow { color: var(--ena-gold); }
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  margin: 0 0 16px;
}
.hero h1 .accent { color: var(--ena-gold); }
.hero p { color: #d6e5f7; font-size: 1.12rem; max-width: 54ch; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Feature strip ----------------------------------------------------------- */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: -34px; position: relative; z-index: 2;
}
.feature {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-md);
  display: flex; gap: 14px; align-items: flex-start;
}
.feature__ico {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(42,118,198,.14), rgba(42,118,198,.06));
  color: var(--ena-blue-700);
}
.feature__ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1rem; margin: 2px 0 3px; }
.feature p { font-size: .86rem; color: var(--muted); margin: 0; line-height: 1.45; }

/* Grids ------------------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--cats { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Category card ----------------------------------------------------------- */
.cat-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
  position: relative;
}
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--ena-gold); opacity: 0; transition: opacity .2s ease;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #cfe0f4; }
.cat-card:hover::before { opacity: 1; }
.cat-card__ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ena-blue), var(--ena-blue-700));
  color: #fff; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.cat-card__ico svg { width: 26px; height: 26px; }
.cat-card h3 { font-size: 1.28rem; margin: 0 0 6px; color: var(--ink); }
.cat-card .count { font-size: .88rem; color: var(--muted); margin: 0 0 18px; }
.cat-card p.desc { font-size: .92rem; color: var(--body); margin: 0 0 18px; }
.cat-card__more {
  margin-top: auto; font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  color: var(--ena-blue-700); display: inline-flex; align-items: center; gap: 6px;
}
.cat-card:hover .cat-card__more { color: var(--ena-gold-600); }
.cat-card__more svg { width: 16px; height: 16px; transition: transform .18s ease; }
.cat-card:hover .cat-card__more svg { transform: translateX(3px); }

/* Product card ------------------------------------------------------------ */
.p-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.p-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #cfe0f4; }
.p-card__media {
  aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; padding: 16px;
}
.p-card__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.p-card:hover .p-card__media img { transform: scale(1.045); }
.p-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.p-card__cat {
  align-self: flex-start; font-family: var(--font-display); font-weight: 700;
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ena-blue-700); background: var(--soft); border-radius: var(--radius-pill);
  padding: 4px 10px; margin-bottom: 10px;
}
.p-card__title {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.32;
  color: var(--ink); margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.64em;
}
.p-card__desc {
  font-size: .875rem; color: var(--muted); margin: 0 0 16px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-card__more {
  margin-top: auto; font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  color: var(--ena-blue-700); display: inline-flex; align-items: center; gap: 6px;
}
.p-card__more svg { width: 16px; height: 16px; transition: transform .18s ease; }
.p-card:hover .p-card__more { color: var(--ena-gold-600); }
.p-card:hover .p-card__more svg { transform: translateX(3px); }

/* Image placeholder ------------------------------------------------------- */
.ph {
  display: grid; place-items: center; gap: 8px; width: 100%; height: 100%;
  color: #9aa6b4; background:
    repeating-linear-gradient(45deg, #f5f7fa, #f5f7fa 12px, #eef2f8 12px, #eef2f8 24px);
  text-align: center; padding: 20px;
}
.ph svg { width: 40px; height: 40px; opacity: .7; }
.ph span { font-size: .78rem; font-weight: 600; letter-spacing: .02em; }

/* Breadcrumbs ------------------------------------------------------------- */
.crumbs { padding: 20px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; font-size: .86rem; }
.crumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.crumbs li + li::before { content: "\203A"; padding: 0 9px; color: var(--line-2); }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--ena-blue-700); }
.crumbs li[aria-current] { color: var(--ink); font-weight: 700; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Page header (interior) -------------------------------------------------- */
.page-head { padding: 26px 0 6px; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0; }
.page-head p.lead { color: var(--muted); margin: 12px 0 0; max-width: 68ch; }

/* Product detail ---------------------------------------------------------- */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; padding: 26px 0 8px; }
.pd__media {
  position: sticky; top: 96px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  display: grid; place-items: center; aspect-ratio: 1 / 1;
}
.pd__media img { width: 100%; height: 100%; object-fit: contain; }
.pd__cat {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ena-blue-700); background: var(--soft); border-radius: var(--radius-pill); padding: 6px 13px; margin-bottom: 14px;
}
.pd h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.22; margin: 0 0 18px; }
.pd__rule { height: 1px; background: var(--line); margin: 4px 0 22px; }
.pd__desc { color: var(--body); font-size: 1rem; }
.pd__desc p { margin: 0 0 1rem; }
.pd__section-label { font-family: var(--font-display); font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.cta-card {
  margin-top: 26px; border: 1px solid var(--line); background: linear-gradient(135deg, #fff, var(--soft));
  border-radius: var(--radius); padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.cta-card__txt strong { font-family: var(--font-display); color: var(--ink); font-size: 1.05rem; display: block; }
.cta-card__txt span { color: var(--muted); font-size: .9rem; }
.cta-card__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); text-align: left;
  transition: transform .18s ease, box-shadow .2s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact-card__ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--ena-blue), var(--ena-blue-700)); color: #fff;
}
.contact-card__ico svg { width: 24px; height: 24px; }
.contact-card h3 { font-size: 1.05rem; margin: 0 0 6px; }
.contact-card a { font-weight: 600; font-size: 1.02rem; color: var(--ena-blue-700); word-break: break-word; }
.contact-card a:hover { color: var(--ena-gold-600); }
.contact-card address { font-style: normal; color: var(--body); font-size: 1rem; margin-bottom: 12px; }

.map-wrap { margin-top: 30px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--soft); }
.map-wrap iframe { width: 100%; height: 360px; border: 0; display: block; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ena-blue-900); color: #bcd2ec; margin-top: 64px; }
.site-footer a { color: #d7e5f6; }
.site-footer a:hover { color: var(--ena-gold); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 34px; padding: 52px 0 34px; }
.footer-brand__mark { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #fff; letter-spacing: -.01em; }
.footer-brand__mark span { color: var(--ena-gold); }
.footer-brand__sub { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #86a6cf; font-weight: 700; margin-top: 2px; }
.footer-brand p { margin: 16px 0 0; font-size: .92rem; color: #a9c3e2; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: .95rem; }
.footer-contact div { display: flex; gap: 10px; margin-bottom: 12px; font-size: .95rem; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--ena-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .84rem; color: #8fabce; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

/* Empty state ------------------------------------------------------------- */
.empty {
  text-align: center; padding: 56px 24px; background: var(--card);
  border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted);
}
.empty svg { width: 44px; height: 44px; opacity: .5; margin-bottom: 10px; }

.reset-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.reset-link:hover { color: inherit; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .pd { grid-template-columns: 1fr; gap: 26px; }
  .pd__media { position: static; aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .topbar__tag { display: none; }
  .topbar .wrap { justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; box-shadow: var(--shadow-md);
    display: none;
  }
  .site-header .wrap { position: relative; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav a::after { display: none; }
  .nav a.is-active { background: var(--soft); }
  .nav .btn { margin: 6px 0 0; justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 42px 0; }
  .hero .wrap { padding-top: 48px; padding-bottom: 52px; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-card { flex-direction: column; align-items: flex-start; }
}

/* Motion preference ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .p-card:hover, .cat-card:hover, .contact-card:hover, .btn:hover { transform: none; }
}
