/*
 * Header & Footer builder — layout glue between Elementor containers and the theme design.
 * Colours, fonts, sizes and spacing live in the Elementor templates (editable there);
 * this file only keeps the structure identical to the coded header/footer.
 */

/* Wrappers: rows carry their own backgrounds (editable in Elementor). */
.cc-footer.cc-hf { background: transparent; margin-top: 60px; }
.cc-hf .e-con { --gap: 0px; --row-gap: 0px; --column-gap: 0px; }
.cc-hf .elementor-widget { margin-bottom: 0; }
.cc-theme .cc-hf .e-con > .elementor-widget, .cc-theme .cc-hf .e-con > .e-con-inner > .elementor-widget { flex: 0 0 auto; width: auto; max-width: none; }
.cc-hf .cc-topnav__list a, .cc-hf .cc-menu > li > a { white-space: nowrap; }

/* ---------- Header rows ---------- */
.cc-hf .cc-topbar, .cc-hf .cc-mainbar, .cc-hf .cc-navbar { height: auto; }
.cc-hf .cc-topbar > .e-con-inner { align-items: stretch; justify-content: space-between; }
.cc-hf .cc-topbar__text { display: flex; align-items: center; padding: 0 10px; }
.cc-hf .cc-topbar__right { --width: auto; flex-direction: row; align-items: stretch; }
.cc-hf .cc-topbar__right > .elementor-widget { display: flex; align-items: center; }
.cc-hf .cc-topbar .cc-hf-social { padding: 0 14px; }
.cc-hf .cc-topbar .elementor-widget-cc_menu { align-items: stretch; }
.cc-hf .cc-topnav { height: 100%; }

.cc-hf .cc-mainbar > .e-con-inner { align-items: center; }
.cc-hf .cc-hf-logo { line-height: 0; }
.cc-hf .cc-hf-logo a { display: block; }
.cc-hf .cc-hf-logo img { display: block; padding: 5px 0; }
.cc-theme .cc-hf .e-con > .e-con-inner > .cc-hf-search { flex: 1 1 auto; max-width: 468px; }
.cc-hf .cc-hf-search .cc-search { max-width: none; }
.cc-theme .cc-hf .e-con > .e-con-inner > .cc-hf-tools { margin-left: auto; }
.cc-hf .cc-hf-finder .elementor-button { display: flex; align-items: center; }

.cc-hf .cc-navbar > .e-con-inner { align-items: center; justify-content: space-between; }
.cc-hf .cc-navbar .cc-menu > li { height: var(--cc-hf-navbar-h, 50px); }

/* Social icons (Elementor widget) — same look as the theme icons. */
.cc-hf .cc-hf-social .elementor-social-icons-wrapper { display: flex; align-items: center; gap: var(--grid-column-gap, 12px); }
.cc-hf .cc-hf-social .elementor-social-icon { background: transparent; }
.cc-hf .cc-hf-social .elementor-social-icon:hover { opacity: .8; }

/* ---------- Sticky bar (row with class cc-stickybar; Template settings → Sticky bar on scroll) ----------
 * Hidden unless the header has data-cc-sticky. It floats (position: fixed), so the page never jumps.
 * main.js adds html.cc-sticky-on once the visitor has scrolled past the header (or the set offset).
 * While hidden it uses visibility: hidden, so its links can't be reached by keyboard or screen readers. */
.cc-header.cc-hf .cc-stickybar { display: none; }
.cc-header.cc-hf[data-cc-sticky] .cc-stickybar {
	display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 100; margin: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
	transform: translateY(-110%); visibility: hidden;
	transition: transform .3s ease, visibility 0s linear .3s;
}
.cc-sticky-on .cc-header.cc-hf[data-cc-sticky] .cc-stickybar { transform: none; visibility: visible; transition: transform .3s ease; }
.cc-header.cc-hf .cc-stickybar > .e-con-inner { align-items: center; }
.cc-hf .cc-stickybar .cc-menu > li { height: var(--min-height, 60px); }
.cc-hf .cc-stickybar .cc-hf-logo img { padding: 0; }
.cc-theme .cc-hf .cc-stickybar > .e-con-inner > .elementor-widget-cc_menu { flex: 1 1 auto; }
.admin-bar .cc-header.cc-hf[data-cc-sticky] .cc-stickybar { top: 32px; }
@media (max-width: 782px) { .admin-bar .cc-header.cc-hf[data-cc-sticky] .cc-stickybar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .cc-header.cc-hf[data-cc-sticky] .cc-stickybar { top: 0; } }
@media (max-width: 1024px) { .cc-header.cc-hf[data-cc-sticky="desktop"] .cc-stickybar { display: none; } }
@media (prefers-reduced-motion: reduce) { .cc-header.cc-hf[data-cc-sticky] .cc-stickybar { transition: none !important; } }
/* Elementor editor: show the row in place, with a label, so it can be edited. */
.cc-hf-preview .cc-stickybar { display: flex !important; position: relative !important; transform: none !important; visibility: visible !important; outline: 2px dashed rgba(0, 0, 0, .25); outline-offset: -2px; }
/* Elementor already styles .e-con::before as a full-size overlay — reset its size so the label stays in the corner. */
.cc-hf-preview .cc-stickybar::before { content: var(--cc-sticky-label, "Sticky bar"); position: absolute; inset: 0 auto auto 0; width: auto; height: auto; border-radius: 0; opacity: 1; mix-blend-mode: normal; z-index: 5; pointer-events: none; background: #333; color: #fff; font: 11px/1 sans-serif; padding: 4px 6px; }

/* ---------- Footer rows ---------- */
/* Boxed grid containers: Elementor repeats the row padding on the inner box — keep it on the row only. */
.cc-hf .e-con.e-grid.e-con-boxed > .e-con-inner { padding-block-start: 0; padding-block-end: 0; padding-top: 0; padding-bottom: 0; }
.cc-hf .cc-hf-feature .elementor-image-box-wrapper { display: flex; text-align: left; align-items: flex-start; }
.cc-hf .cc-hf-feature .elementor-image-box-img { flex: none; margin-bottom: 0; }
.cc-hf .cc-hf-feature .elementor-image-box-img img { filter: brightness(0) invert(1); }
.cc-hf .cc-hf-feature .elementor-image-box-title { margin: 0 0 12px; }
.cc-hf .cc-hf-feature .elementor-image-box-description { margin: 0; }
.cc-hf .cc-footer__col { display: block; }
.cc-hf .cc-hf-badge-img img { filter: brightness(0) invert(1); }
.cc-hf .cc-hf-badge > .elementor-widget { width: 100%; }
.cc-hf .cc-hf-copy p { margin: 0; }

/* ---------- Tablet and mobile (same breakpoints as the theme) ---------- */
@media (max-width: 1199px) {
	.cc-hf .cc-mainbar > .e-con-inner { gap: 20px; }
	.cc-hf .cc-hf-finder { display: none; }
}
@media (max-width: 1024px) {
	.cc-hf .cc-mainbar > .e-con-inner { flex-wrap: wrap; gap: 0; }
	.cc-hf .cc-mainbar > .e-con-inner::after { content: ""; order: 2; flex-basis: 100%; height: 10px; }
	.cc-hf .cc-mainbar { background: linear-gradient(var(--cc-hf-mobile-top, #02a002) 0 62px, #fff 62px) !important; border-bottom: 1px solid var(--cc-border-2); }
	.cc-hf .cc-hf-burger { order: 3; line-height: 0; }
	.cc-hf .cc-hf-burger .cc-burger { display: inline-flex; background: none; border: 0; font-size: 26px; color: #333; padding: 0 15px 0 0; cursor: pointer; }
	.cc-theme .cc-hf .e-con > .e-con-inner > .cc-hf-search { order: 4; flex: 1 1 0; max-width: none; }
	.cc-hf .cc-hf-search .cc-search__input { border: 2px solid var(--cc-border); height: 44px; }
	.cc-hf .cc-hf-search .cc-search__btn { height: 44px; width: 44px; }
	.cc-hf .cc-hf-logo img { width: 180px; }
	.cc-hf .cc-header-tools { gap: 16px; }
	.cc-hf .cc-tool { font-size: 22px; }
	.cc-hf .cc-tool--wishlist { order: -1; }
}

/* ---------- Editing view (Elementor) ---------- */
.cc-hf-preview__page { max-width: var(--cc-container); margin: 30px auto; padding: 60px 15px; text-align: center; color: #999; border: 2px dashed #ddd; box-sizing: border-box; }
