/* =====================================================================
   TitanCrafts – Buitenkeukens mega-menu header
   Scoped under .tc-header so it never leaks into the rest of the theme.
   All colours/spacing live in CSS variables at the top for easy theming.
   ===================================================================== */

.tc-header {
  --tc-ink:        #272922; /* dark brand */
  --tc-ink-2:      #30322a; /* dark card hover */
  --tc-gold:       #fcaf17; /* accent */
  --tc-gold-soft:  #ffd77a;
  --tc-gold-deep:  #a06f00; /* text hover on light */
  --tc-gold-tint:  #fff6e0; /* pill hover bg */
  --tc-active:     #c2542a; /* active tab underline */
  --tc-cream:      #f7f3ec;
  --tc-cream-2:    #e8ddce;
  --tc-paper:      #efe9df; /* image placeholder bg */
  --tc-text:       #272922;
  --tc-muted:      #4f4a41;
  --tc-muted-2:    #8a8175;
  --tc-muted-3:    #b7ab99;
  --tc-muted-4:    #c9bca9;
  --tc-line:       rgba(32, 7, 7, .09);
  --tc-line-soft:  rgba(32, 7, 7, .08);
  --tc-line-2:     rgba(32, 7, 7, .12);
  --tc-line-3:     rgba(32, 7, 7, .14);
  --tc-line-dark:  rgba(247, 243, 236, .14);
  --tc-maxw:       1240px;
  --tc-pad:        40px;
  --tc-nav-h:      78px;

  position: relative;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--tc-line);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--tc-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.tc-header *,
.tc-header *::before,
.tc-header *::after { box-sizing: border-box; }

.tc-header a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------------
   Defensive reset: the active theme / WooCommerce styles every <button>
   (gold background, padding, radius). Neutralise that for our own header
   controls so they render as designed. !important is required to beat the
   theme's own !important rules.
   --------------------------------------------------------------------- */
.tc-header button {
  font: inherit;
  color: inherit;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  box-shadow: none !important;
  text-transform: none !important;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.tc-header button:hover,
.tc-header button:focus,
.tc-header button:active {
  background: transparent !important;
  box-shadow: none !important;
}

/* ---------------------------------------------------------------------
   Link-colour overrides: the theme forces its own <a> colours (incl.
   white on :hover) with !important. Re-assert our palette so links stay
   on-brand and legible — especially the gold link and CTA text on dark
   backgrounds, which the theme would otherwise render invisible.
   --------------------------------------------------------------------- */
.tc-header .tc-nav__link { color: var(--tc-text) !important; }
.tc-header .tc-nav__link:hover,
.tc-header .tc-nav__link:focus,
.tc-header .tc-nav__link:active,
.tc-header .tc-nav__trigger:hover,
.tc-header .tc-nav__trigger:focus { color: var(--tc-gold) !important; }

.tc-header .tc-pill { color: var(--tc-text) !important; }
.tc-header .tc-pill:hover { color: var(--tc-gold-deep) !important; }

.tc-header .tc-bbq__link { color: var(--tc-gold) !important; }
.tc-header .tc-bbq__link:hover { color: var(--tc-gold-soft) !important; }

.tc-header .tc-dropdown__all { color: #fcaf17 !important; }
.tc-header .tc-dropdown__all:hover { color: #F0A500!important; }

.tc-header .tc-cta__btn { color: #fff !important; }
.tc-header .tc-cta__btn:hover { color: var(--tc-ink) !important; }

.tc-header .tc-utilitybar__links a { color: var(--tc-cream-2) !important; }
.tc-header .tc-utilitybar__links a:hover { color: #fff !important; }

.tc-container {
  max-width: var(--tc-maxw);
  margin: 0 auto;
  padding: 0 var(--tc-pad);
}

/* ---------- utility bar ------------------------------------------- */
.tc-utilitybar { background: var(--tc-ink); color: var(--tc-cream-2); }
.tc-utilitybar__inner {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 500 12px/1 "Inter", sans-serif;
  letter-spacing: .02em;
}
.tc-utilitybar__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--tc-muted-4);
}
.tc-utilitybar__tag {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--tc-gold);
}
.tc-dot { opacity: .4; }
.tc-utilitybar__links { display: flex; align-items: center; gap: 22px; }
.tc-utilitybar__links a { color: var(--tc-cream-2); }
.tc-utilitybar__links a:hover { color: #fff; }

/* ---------- main nav bar ------------------------------------------ */
.tc-navbar {
  height: var(--tc-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tc-navbar__left { display: flex; align-items: center; gap: 46px; }
.tc-logo { display: block; line-height: 0; }
.tc-logo svg { height: 22px; width: auto; display: block; }

.tc-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font: 600 14.5px/1 "Inter", sans-serif;
}
/* each dropdown item wraps its trigger + panel */
.tc-nav__item { display: flex; align-items: center; }
.tc-nav__item--drop { position: relative; } /* anchors the compact dropdown */
.tc-nav__link,
.tc-nav__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tc-text);
  transition: color .2s ease;
}
.tc-nav__link:hover { color: var(--tc-gold); }

/* dropdown trigger is a real <button> for accessibility */
.tc-nav__trigger {
  position: relative;
  height: var(--tc-nav-h);
  margin-bottom: -1px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tc-nav__trigger:hover { color: var(--tc-gold); }
/* keep the active-tab underline despite the button reset above */
.tc-header .tc-nav__trigger { border-bottom: 2px solid transparent !important; }
.tc-nav__chevron { opacity: .55; transition: transform .2s ease; }

/* open state (per dropdown item, toggled by JS) */
.tc-header .tc-nav__item.is-open .tc-nav__trigger { border-bottom-color: var(--tc-gold) !important; color: var(--tc-gold) !important; }
.tc-nav__item.is-open .tc-nav__chevron { transform: rotate(180deg); }

.tc-navbar__right {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--tc-muted);
}
.tc-icon-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; line-height: 0; }
.tc-cart { display: flex; align-items: center; gap: 8px; font: 600 13px/1 "Inter", sans-serif; cursor: pointer; }
.tc-cart__count {
  min-width: 14px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tc-ink);
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
}

/* hamburger – hidden on desktop (high specificity + !important to beat the
   theme button styles; shown again in the mobile media query) */
.tc-header .tc-nav-toggle {
  display: none !important;
  width: 42px !important;
  height: 42px !important;
  border: 1px solid var(--tc-line-3) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--tc-ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* =====================================================================
   MEGA PANEL
   ===================================================================== */
.tc-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--tc-line-soft);
  border-bottom: 1px solid var(--tc-line-2);
  box-shadow: 0 26px 46px -26px rgba(32, 7, 7, .45);
  display: none;
}
.tc-nav__item.is-open .tc-mega,
.tc-nav__item.is-open .tc-dropdown {
  display: block;
  animation: tc-in .22s ease both;
}
@keyframes tc-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tc-mega__grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
}

/* ---------- left: BBQ card ---------------------------------------- */
.tc-mega__left { padding: 32px 40px 34px 0; }
.tc-bbq {
  background: var(--tc-ink);
  color: var(--tc-cream);
  border-radius: 16px;
  padding: 26px 26px 28px;
}
.tc-bbq__head { margin-bottom: 18px; }
.tc-eyebrow {
  font: 600 11px/1 "Inter", sans-serif;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--tc-gold);
}
.tc-bbq__eyebrow { margin-bottom: 7px; }
.tc-bbq__title {
  margin: 0;
  font: 500 21px/1.15 "Bebas Neue", "Inter", sans-serif;
  letter-spacing: .01em;
  color: var(--tc-cream);
}

.tc-bbq__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tc-fire {
  display: block;
  border-radius: 13px;
  overflow: hidden;
  background: var(--tc-ink);
  border: 1px solid var(--tc-line-dark);
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.tc-fire:hover {
  border-color: var(--tc-gold);
  background: var(--tc-ink-2);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .55);
}
.tc-fire__img {
  height: 132px;
  background: var(--tc-paper) center / cover no-repeat;
  display: block;
}
.tc-fire__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-fire__body { display: block; padding: 14px 16px 16px; }
.tc-fire__name { display: block; font: 600 17px/1.1 "Inter", sans-serif; color: var(--tc-cream); }
.tc-fire__desc { display: block; font: 400 12.5px/1.4 "Inter", sans-serif; color: var(--tc-muted-3); margin-top: 4px; }

.tc-bbq__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font: 600 13px/1 "Inter", sans-serif;
  color: var(--tc-gold);
  transition: gap .2s ease, color .2s ease;
}
.tc-bbq__link:hover {
  color: var(--tc-gold-soft);
  gap: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- right: filters + CTA ---------------------------------- */
.tc-mega__right {
  padding: 32px 0 34px 40px;
  border-left: 1px solid var(--tc-line-soft);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.tc-group__eyebrow { margin-bottom: 13px; }
.tc-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.tc-pill {
  padding: 4px 10px;
  border: 1px solid var(--tc-line-3);
  border-radius: 999px;
  font: 600 13.5px/1 "Inter", sans-serif;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.tc-pill:hover {
  border-color: var(--tc-gold);
  color: var(--tc-gold-deep);
  background: var(--tc-gold-tint);
}

.tc-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--tc-cream);
  border-radius: 13px;
}
.tc-cta__title { font: 600 14.5px/1.15 "Inter", sans-serif; }
.tc-cta__sub { font: 400 12.5px/1.35 "Inter", sans-serif; color: var(--tc-muted-2); margin-top: 2px; }
.tc-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--tc-ink);
  color: #fff;
  border-radius: 999px;
  font: 600 13.5px/1 "Inter", sans-serif;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.tc-cta__btn:hover { background: var(--tc-gold); color: var(--tc-ink); transform: translateY(-2px); }

/* =====================================================================
   COMPACT DROPDOWN  (.tc-dropdown) — e.g. "Accessoires & meer"
   Anchored under its own nav item (not full-width like .tc-mega).
   ===================================================================== */
.tc-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  width: 344px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--tc-line-2);
  border-radius: 14px;
  box-shadow: 0 22px 44px -22px rgba(32, 7, 7, .5);
  padding: 10px;
  color: var(--tc-text);
  cursor: default;
  z-index: 999;
  display: none;
}
/* same treatment as the mega's .tc-eyebrow labels */
.tc-dropdown__label {
  font: 600 11px/1 "Inter", sans-serif;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--tc-gold);
  padding: 8px 10px 10px;
}
.tc-drop-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 10px;
  border-radius: 11px;
  transition: background .16s ease;
}
.tc-drop-item:hover { background: var(--tc-gold-tint); }
.tc-drop-item__thumb {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: var(--tc-paper) center / cover no-repeat;
}
.tc-drop-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-drop-item__body { min-width: 0; }
.tc-drop-item__title { display: block; font: 600 14.5px/1.15 "Inter", sans-serif; color: var(--tc-text); }
.tc-drop-item__desc { display: block; font: 400 12px/1.3 "Inter", sans-serif; color: var(--tc-muted-2); margin-top: 2px; }
.tc-dropdown__all {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 6px 4px 2px;
  padding: 11px 10px;
  border-top: 1px solid var(--tc-line-soft);
  font: 600 12.5px/1 "Inter", sans-serif;
  color: var(--tc-gold-deep);
  transition: gap .16s ease;
}
.tc-dropdown__all:hover { gap: 11px; }

/* =====================================================================
   RESPONSIVE  (<= 980px : collapse into a mobile drawer)
   ===================================================================== */
@media (max-width: 980px) {
  .tc-header { --tc-pad: 20px; }

  .tc-header .tc-nav-toggle { display: inline-flex !important; }

  .tc-navbar__left { gap: 0; flex: 1; justify-content: flex-start; }
  .tc-logo { margin-right: auto; }

  /* nav becomes a stacked drawer under the bar */
  .tc-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--tc-line);
    box-shadow: 0 26px 46px -26px rgba(32, 7, 7, .45);
    padding: 8px var(--tc-pad) 16px;
    display: none;
  }
  .tc-header.is-nav-open .tc-nav { display: flex; }

  /* each item stacks full-width; trigger + panel below it */
  .tc-header .tc-nav__item { display: block; width: 100%; }
  .tc-header .tc-nav__link,
  .tc-header .tc-nav__trigger {
    height: auto;
    width: 100% !important;
    justify-content: space-between;
    padding: 14px 0;
    margin: 0;
    border-bottom: 1px solid var(--tc-line-soft) !important;
  }

  /* mega + compact dropdown flow inline inside the drawer on mobile */
  .tc-mega,
  .tc-dropdown {
    position: static;
    width: auto;
    max-width: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
  }
  .tc-dropdown { padding: 4px 0 10px; }
  .tc-mega .tc-container { padding: 0; } /* drawer already supplies side padding */
  .tc-mega__grid { grid-template-columns: 1fr; }
  .tc-mega__left { padding: 18px 0; }
  .tc-mega__right { padding: 4px 0 12px; border-left: 0; }

  .tc-navbar__right { gap: 16px; }
}

@media (max-width: 460px) {
  .tc-bbq__cards { grid-template-columns: 1fr; }
  .tc-utilitybar__links a:first-child { display: none; }
  .tc-cta { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   BARE VARIANT  (.tc-header--bare)
   Only the nav + mega, to embed in a header you build in Elementor
   (logo / utility bar / search / cart are separate Elementor widgets).
   Placed last so it overrides the base rules above.
   ===================================================================== */
.tc-header--bare {
  background: transparent;
  border-bottom: 0;
  z-index: 999; /* keep the dropdown above the sections below it */
}
/* the nav row no longer needs the full navbar chrome */
.tc-header--bare .tc-nav { height: auto; }

/* Full-viewport mega. The JS refines left/width precisely on open; this is
   the no-JS fallback and assumes the widget sits roughly centered. */
.tc-header--bare .tc-mega {
  left: 50%;
  right: auto;
  width: 100vw;
  margin-left: -50vw;
  z-index: 999;
}

@media (max-width: 980px) {
  /* No hamburger in this variant: keep items visible and let them wrap.
     (Prefer hiding this widget on mobile and using Elementor's mobile menu.) */
  .tc-header--bare .tc-nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    background: transparent;
    border-top: 0;
    box-shadow: none;
    padding: 0;
  }
  /* keep items inline (override the stacked-drawer rule) */
  .tc-header--bare .tc-nav__item { display: flex; width: auto; }
  .tc-header--bare .tc-nav__link,
  .tc-header--bare .tc-nav__trigger {
    width: auto !important;
    height: auto;
    padding: 10px 0 !important;
    border-bottom: 0 !important;
  }
  /* mega drops inline under the row, full width of the widget */
  .tc-header--bare .tc-mega {
    position: static;
    left: auto;
    width: auto;
    margin-left: 0;
    box-shadow: none;
    border: 0;
  }
  .tc-header--bare .tc-mega .tc-container { padding: 0; }
}
