/* ── TDR Header v1.1 — 80px → 56px scroll-shrink, glass backdrop ── */

/* ── CSS vars for header transitions ─────────────────────────────────── */
:root {
  --tdr-header-h:           80px;
  --tdr-header-h-scrolled:  56px;
  --tdr-header-logo-h:      48px;
  --tdr-header-logo-h-s:    34px;
  --tdr-header-bg:          rgba(255, 255, 255, 0.96);
  --tdr-header-bg-s:        rgba(255, 255, 255, 0.98);
  --tdr-header-transition:  all 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Top bar ─────────────────────────────────────────────────────────── */
.tdr-topbar { display: none !important; }

.tdr-topbar {
  background: var(--tdr-primary);
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--tdr-text-xs);
  padding-block: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: height 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tdr-scrolled .tdr-topbar,
body.tdr-scrolled .tdr-topbar {
  /* Optionally hide top bar when scrolled — controlled via JS class on body */
}

.tdr-topbar__inner {
  max-width: var(--tdr-max-w);
  margin-inline: auto;
  padding-inline: var(--tdr-sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tdr-sp-4);
  height: 100%;
}

.tdr-topbar__contact {
  display: flex;
  align-items: center;
  gap: var(--tdr-sp-6);
}

.tdr-topbar__item {
  display: flex;
  align-items: center;
  gap: var(--tdr-sp-2);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-weight: 400;
  transition: color 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tdr-topbar__item:hover { color: var(--tdr-white); }

.tdr-topbar__item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--tdr-amber);
}

.tdr-topbar__cert {
  display: flex;
  align-items: center;
  gap: var(--tdr-sp-2);
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tdr-topbar__cert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tdr-amber);
  flex-shrink: 0;
}

/* ── Main header wrapper ─────────────────────────────────────────────── */
.site-header,
#masthead {
  position: sticky;
  top: 0;
  z-index: var(--tdr-z-nav, 40);
  height: var(--tdr-header-h);
  background: var(--tdr-header-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--tdr-border);
  transition: var(--tdr-header-transition);
  /* GPU layer for smooth transitions */
  will-change: height, background-color, box-shadow;
}


/* ── Inner wrapper — height only; Kadence owns the grid layout ──────── */
.site-header .site-header-inner-wrap {
  height: 100%;
}

/* ── Logo ─────────────────────────────────────────────────────────────── */
.site-branding,
.site-logo,
.kadence-logo-container {
  flex-shrink: 0;
}

.site-branding a,
.custom-logo-link {
  display: flex;
  align-items: center;
  gap: var(--tdr-sp-3);
  text-decoration: none;
}

.custom-logo {
  height: var(--tdr-header-logo-h);
  max-height: var(--tdr-header-logo-h);
  width: auto;
  display: block;
  vertical-align: middle;
  transition: var(--tdr-header-transition);
  will-change: height;
}

.tdr-scrolled .custom-logo,
#masthead.tdr-scrolled .custom-logo {
  height: var(--tdr-header-logo-h-s);
  max-height: var(--tdr-header-logo-h-s);
}

/* Logo mai mare pe paginile WooCommerce */
body.woocommerce .custom-logo,
body.tdr-woo .custom-logo {
  height: 56px !important;
  max-height: 56px !important;
  width: auto !important;
}

body.woocommerce.tdr-scrolled .custom-logo,
body.tdr-woo.tdr-scrolled .custom-logo {
  height: 40px !important;
  max-height: 40px !important;
}

.site-title {
  font-family: var(--tdr-font);
  font-size: var(--tdr-text-xl);
  font-weight: 700;
  color: var(--tdr-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
  transition: font-size 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tdr-scrolled .site-title,
#masthead.tdr-scrolled .site-title {
  font-size: var(--tdr-text-lg);
}

.site-title a { color: inherit; text-decoration: none; }

/* ── Header cart ─────────────────────────────────────────────────────── */
.header-cart-wrap,
.kadence-header-cart {
  position: relative;
  flex-shrink: 0;
}

.header-cart-wrap a,
.kadence-header-cart a {
  display: flex;
  align-items: center;
  gap: var(--tdr-sp-2);
  color: var(--tdr-primary);
  font-size: var(--tdr-text-sm);
  font-weight: 500;
  padding: var(--tdr-sp-2);
  border-radius: var(--tdr-r);
  transition: color 150ms, background-color 150ms;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  text-decoration: none;
}

.header-cart-wrap a:hover,
.kadence-header-cart a:hover {
  background: var(--tdr-slate-100);
  color: var(--tdr-accent);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  background: var(--tdr-accent);
  color: var(--tdr-white);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--tdr-r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 4px;
  transform: translate(4px, -4px);
}

/* ── Header search ───────────────────────────────────────────────────── */
.header-search-wrap .search-toggle,
.kadence-header-search button {
  background: none;
  border: none;
  color: var(--tdr-primary);
  padding: var(--tdr-sp-2);
  border-radius: var(--tdr-r);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms, color 150ms;
}

.header-search-wrap .search-toggle:hover,
.kadence-header-search button:hover {
  background: var(--tdr-slate-100);
  color: var(--tdr-accent);
}

/* ── Hide WordPress site title text (logo image is used instead) ────── */
.site-title-wrap,
.site-description,
.site-tagline-wrap {
  display: none !important;
}

/* ── Footer logo branding bar ────────────────────────────────────────── */
.tdr-footer-logo-bar {
  background: var(--tdr-primary);
  padding-block: var(--tdr-sp-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tdr-footer-logo-bar__inner {
  max-width: var(--tdr-max-w);
  margin-inline: auto;
  padding-inline: var(--tdr-sp-6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tdr-footer-logo-bar__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 200ms;
}

.tdr-footer-logo-bar__link:hover { opacity: 1; }

.tdr-footer-logo-bar__img {
  height: 28px;
  width: auto;
  max-width: 320px;
  filter: brightness(0) invert(1);
}

/* ── Content area — margin redus pe toate paginile ──────────────────── */
#primary.content-area {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
  padding-inline: 10px;
}

/* Fără spațiu sus când primul element e hero-ul split */
#primary.content-area:has(> * > .tdr-hero--split:first-child),
#primary.content-area:has(.tdr-hero--split:first-child) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ── Entry header (page title bar) — dimensiune redusă ──────────────── */
.entry-hero.page-hero-section .entry-header {
  min-height: 0 !important;
  padding-block: 10px !important;
}

.entry-hero.page-hero-section .page-title,
.entry-hero.page-hero-section h1 {
  font-family: var(--tdr-font) !important;
  font-size: 1rem !important;
  font-weight: 300 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: var(--tdr-slate-500) !important;
  margin: 0 !important;
}

/* Pe paginile cu produse (shop + categorii) hero-ul e redundant față de
   woocommerce-products-header — îl ascundem */
.woocommerce-shop .entry-hero.page-hero-section,
.tax-product_cat .entry-hero.page-hero-section,
.tax-product_tag .entry-hero.page-hero-section {
  display: none !important;
}

/* ── Fluid Checkout — progress bar portocaliu ───────────────────────── */
.fc-progress-bar__step.is-current,
.fc-progress-bar__step.is-complete {
  background-color: var(--tdr-amber) !important;
  border-color: var(--tdr-amber) !important;
  color: #ffffff !important;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --tdr-header-h:          60px;
    --tdr-header-h-scrolled: 48px;
    --tdr-header-logo-h:     32px;
    --tdr-header-logo-h-s:   25px;
  }

  body.woocommerce .custom-logo,
  body.tdr-woo .custom-logo {
    height: 32px !important;
    max-height: 32px !important;
  }

  body.woocommerce.tdr-scrolled .custom-logo,
  body.tdr-woo.tdr-scrolled .custom-logo {
    height: 25px !important;
    max-height: 25px !important;
  }

  .tdr-topbar__contact > *:nth-child(n+2) { display: none; }
  .tdr-topbar__cert { display: none; }

  .site-header .header-inner-wrap,
  .site-header .kadence-sticky-header-inner {
    padding-inline: var(--tdr-sp-4);
  }

  /* Kadence generează min-height:80px fără media query — îl anulăm pe mobil
     ca logo-ul să se centreze corect în cei 60px ai headerului */
  .site-main-header-inner-wrap {
    min-height: var(--tdr-header-h) !important;
  }
}
