/* ==========================================================================
   Чех Пласт — основен CSS на темата
   Един файл, по секции, с разделители. Един елемент = един блок.
   Поправка се прави В блока, не с нов блок отдолу.
   Размерите са в px по размерната таблица от демото (body 15px).
   ========================================================================== */


/* ==========================================================================
   00. БАЗА (reset и типография)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 { font-family: var(--font-head); margin: 0; color: var(--ink); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; }
.mono { font-family: var(--font-mono); }

/* Достъпност: скрит текст за четци (WordPress стандарт) */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}


/* ==========================================================================
   01. РЕШЕТКА
   ========================================================================== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }


/* ==========================================================================
   02. СЕКЦИИ (рамка, етикет „01 / СЕКЦИЯ", заглавия)
   ========================================================================== */
.section { padding: 72px 0; border-top: 1px solid var(--border); position: relative; }
.section--tight    { padding: 52px 0; }
.section--spacious { padding: 92px 0; }
.section--compact  { padding: 58px 0; }

.section-label {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 28px;
}
.section-label .num  { color: var(--accent); font-weight: 500; }
.section-label .rule { flex: 0 0 40px; height: 1px; background: var(--border-2); }
.section-label .tag  { color: var(--ink-dim); }

.section h2.big {
  font-size: 60px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 860px;
}
.section h2.big em { font-style: normal; color: var(--accent); }
.section .lede { color: var(--ink-dim); font-size: 17px; max-width: 640px; margin-top: 22px; line-height: 1.6; }

/* Светла секция (островите на началната). Чист вариант на одобрения overlay,
   без !important: правилата за картите вътре идват при съответната секция. */
.section--light {
  background: var(--light-bg);
  color: var(--light-ink);
  border-top: 1px solid var(--light-border);
  border-bottom: 1px solid var(--light-border);
}
.section--light + .section { border-top: 1px solid var(--border); }
.section--light h2, .section--light h3, .section--light h4 { color: var(--light-ink); }
.section--light .section-label       { color: var(--light-ink-mute); }
.section--light .section-label .num  { color: var(--accent); }
.section--light .section-label .rule { background: var(--light-border-2); }
.section--light .section-label .tag  { color: var(--light-ink-dim); }
.section--light .lede                { color: var(--light-ink-dim); }


/* ==========================================================================
   03. БУТОНИ
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all .22s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 24px -8px rgba(46,117,182,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn--primary:hover {
  background: var(--accent-hover); transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(46,117,182,0.65), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--border-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.section--light .btn--ghost { border-color: var(--light-border-2); color: var(--light-ink); }
.section--light .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--link { padding: 0; background: none; color: var(--ink); text-transform: uppercase; border-bottom: 1px solid transparent; }
.btn--link:hover { color: var(--accent); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }


/* ==========================================================================
   04. ГОРНА ЛЕНТА (работно време, адрес, телефон, имейл)
   Размери от демото: височина 36px, mono 12px; на мобилен 34px / 11px
   ========================================================================== */
.topbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: rgba(255,255,255,0.80);   /* от продуктовото демо: по-четимо от сивото в началната (решение 03.09) */
  overflow: hidden;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 36px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.topbar .meta { display: flex; gap: 22px; min-width: 0; }
.topbar .meta span, .topbar .meta a { white-space: nowrap; }
.topbar .meta b { color: var(--ink-dim); font-weight: 500; }
.topbar a:hover { color: var(--accent); }


/* ==========================================================================
   05. ХЕДЪР (лого, меню, бутон „Поискай оферта", бургер)
   Размери от демото: височина 84px, лого 44px, меню 14px/600, бутон 13px
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(30,37,48, 0.88);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 8px 32px -16px rgba(0,0,0,0.4);
}
.header-inner { display: flex; align-items: center; gap: 56px; height: 84px; }

/* Лого: истинският знак (SVG) + надпис като в демото */
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark { width: 49px; height: 40px; flex-shrink: 0; }      /* резервирано място = без CLS */
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt .name { font-size: 16px; font-weight: 700; letter-spacing: 0.09em; }
.brand-txt .sub  { font-size: 10px; color: var(--ink-mute); font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }

/* Главно меню: WordPress дава <ul><li><a>, стилът е този на демото.
   Без бутон вдясно менюто заема цялата лента и точките се разпределят равномерно (решение 03.09) */
.nav { margin-left: 32px; flex: 1; }
.nav ul { display: flex; justify-content: space-between; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a {
  display: inline-block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-radius: var(--radius);
  position: relative;
  transition: color .15s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav a:hover,
.nav .current-menu-item > a,
.nav .current-menu-ancestor > a,
.nav .current-menu-parent > a { color: var(--accent); }
.nav .current-menu-item > a::after,
.nav .current-menu-ancestor > a::after {
  content: ''; position: absolute;
  left: 18px; right: 18px; bottom: calc((100% - 84px) / 2 + 1px);   /* точно на долната линия на хедъра (84px), независимо от височината на реда */
  height: 2px; background: var(--accent);
}
/* Стрелка при точки с подточки (само знак, падащо меню няма в дизайна) */
.nav .menu-item-has-children > a { padding-right: 30px; }
.nav .menu-item-has-children > a::before { content: '▼'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 9px; opacity: 0.5; }
.nav .sub-menu { display: none; } /* падащи менюта няма в одобрения дизайн */

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Бургер (показва се под 1100px) */
.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--ink-dim);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.burger:hover { border-color: var(--accent); color: var(--accent); }
.burger span { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ==========================================================================
   06. МОБИЛНО МЕНЮ (панел отдясно, под хедъра)
   ========================================================================== */
.mobile-nav {
  position: fixed;
  top: 120px; left: 0; right: 0; bottom: 0;   /* top се преизчислява от JS по реалната височина на хедъра */
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 24px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
/* Подточки: скрити, разгъват се с клас open на родителя (JS) */
.mobile-nav .sub-menu { display: none; list-style: none; margin: 0; padding: 0 0 8px 16px; }
.mobile-nav li.open > .sub-menu { display: block; }
.mobile-nav .sub-menu a { font-size: 15px; font-weight: 500; color: var(--ink-dim); padding: 12px 4px; border-bottom: 1px solid var(--border); }
.mobile-nav .sub-menu li:last-child a { border-bottom: 0; }
.mobile-nav .menu-item-has-children > a::after { transition: transform .2s; }
.mobile-nav li.open > a::after { transform: rotate(180deg); }
.mobile-nav a {
  padding: 16px 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
/* Стрелка за разгъване: голяма и с рамка, за да се разбира като бутон */
.mobile-nav .menu-item-has-children > a::after {
  content: '▼';
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  color: var(--accent); font-size: 14px;
  flex-shrink: 0;
}
.mobile-nav .mobile-cta {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--accent); color: #fff;
  justify-content: center;
  border-bottom: 0;
  border-radius: var(--radius);
}
body.menu-open { overflow: hidden; }


/* ==========================================================================
   07. ФУТЪР
   Размери от демото: padding-top 80px, решетка 1.4fr 1fr 1fr 1fr, gap 60px,
   заглавия mono 11px, връзки 14px, долна лента mono 11px
   ========================================================================== */
.footer { background: var(--bg-deep); padding: 80px 0 0; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 60px; padding-bottom: 60px; }
.footer .brand-txt .sub { color: #6B7785; }
.footer-about p { color: var(--ink-dim); font-size: 14px; line-height: 1.6; margin-top: 20px; }
.footer-cert { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.footer-cert .badge {
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col li { color: var(--ink-dim); font-size: 14px; }
.footer-col a { color: var(--ink-dim); font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-place { display: flex; flex-direction: column; gap: 3px; }
.footer-place .place { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.footer-bottom .left { display: flex; gap: 24px; align-items: center; }
.footer-bottom .footer-legal { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a:hover { color: var(--accent); }
.footer-bottom .social { display: flex; gap: 8px; }
.footer-bottom .social a {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--ink-dim);
  transition: all .15s;
}
.footer-bottom .social a:hover { border-color: var(--accent); color: var(--accent); }


/* ==========================================================================
   08. МЕГАМЕНЮ „Продукти" (по заданието: категории + фонова снимка вдясно)
   Отваря се при задържане/фокус върху точката с клас has-mega; на мобилен не съществува
   ========================================================================== */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg-2);   /* плътен фон: под панела е слайдерът и прозираше */
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  z-index: 49;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.mega.open { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.mega-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding-top: 32px; padding-bottom: 32px; }
.mega-cols { display: flex; flex-direction: column; gap: 4px; }
.mega-head { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px; }
.mega-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid transparent; border-radius: var(--radius); transition: background .15s, border-color .15s; }
.mega-item:hover, .mega-item:focus { background: var(--surface); border-color: var(--border-2); }
.mega-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink); }
.mega-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
.mega-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 16px; font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.mega-all:hover { color: var(--accent-hover); }
.mega-visual { position: relative; min-height: 300px; border: 1px solid var(--border); background: var(--surface) center/cover no-repeat; transition: background-image .25s ease; }
.mega-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,17,22,0) 30%, rgba(14,17,22,0.85) 100%); }
.mega-visual-label { position: absolute; left: 24px; bottom: 22px; z-index: 1; font-family: var(--font-head); font-weight: 700; font-size: 22px; color: #fff; line-height: 1.15; }
.mega-visual-label span { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); margin-top: 6px; }
.header { position: sticky; } /* .mega се позиционира спрямо хедъра */
.nav .has-mega > a::before { content: '▼'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 9px; opacity: 0.5; }
.nav .has-mega > a { padding-right: 30px; }
.nav .has-mega.mega-open > a { color: var(--accent); }
@media (max-width: 1100px) { .mega { display: none; } }


/* ==========================================================================
   COOKIE ИЗВЕСТИЕ (inc/cookie-notice.php): лента долу, скрита след „Разбрах"
   ========================================================================== */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 900px; margin: 0 auto; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7); }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-dim); }
.cookie-bar p a { color: var(--accent); white-space: nowrap; }
.cookie-bar .btn { flex: 0 0 auto; padding: 12px 20px; }
@media (max-width: 640px) { .cookie-bar { flex-direction: column; align-items: stretch; left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; } .cookie-bar .btn { justify-content: center; } }

/* ==========================================================================
   99. RESPONSIVE (хедър и горна лента). Секциите добавят своите правила тук.
   ========================================================================== */
/* 1100-1366px: осемте точки на менюто не се побират с пълните отстояния (08.09) */
@media (max-width: 1366px) {
  .header-inner { gap: 28px; }
  .nav { margin-left: 8px; }
  .nav a { padding: 10px 11px; font-size: 13px; }
}

@media (max-width: 1100px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .header-actions .btn--primary { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; padding-bottom: 40px; }
  .footer { padding-top: 56px; }
}

@media (max-width: 640px) {
  /* Горна лента: остават само работно време и телефон (в демото имейлът излизаше извън екрана) */
  .topbar .meta:first-child span:nth-child(n+2) { display: none; }
  .topbar .meta:last-child a:nth-child(n+2) { display: none; }
  .topbar-inner { height: 34px; font-size: 11px; }
  .topbar .meta { gap: 14px; }

  .header-inner { height: 72px; gap: 16px; }
  .nav .current-menu-item > a::after, .nav .current-menu-ancestor > a::after { bottom: calc((100% - 72px) / 2 + 1px); }
  .brand-mark { width: 39px; height: 32px; }
  .brand-txt .name { font-size: 14px; }
  .brand-txt .sub { font-size: 8.5px; }
  .mobile-nav { top: 106px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer { padding-top: 44px; }
  .footer-bottom { flex-direction: column; gap: 16px; padding: 20px 0; text-align: center; }
  .footer-bottom .left { flex-wrap: wrap; justify-content: center; gap: 12px; }
}
