/* =========================================================================
   D-Zigners - Site header (fully custom, sitewide)
   Ported 1:1 from the approved static preview. We no longer restyle
   Divi's own header module - it's hidden below and this markup (printed
   via dzigners_render_site_header() on the wp_body_open hook in
   functions.php) is the real header on every page.
   ========================================================================= */

/* Hide Divi's native header/top-bar completely - our custom header
   (rendered via wp_body_open) replaces it everywhere. */
#main-header,
#top-header {
	display: none !important;
}

.dz-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--dz-white);
	border-bottom: 1px solid var(--dz-border);
	transition: box-shadow 0.3s ease;
}

/* JS (header.js) adds this once the page scrolls past a small threshold -
   background stays solid white throughout, this just adds a subtle lift
   shadow and shrinks the logo (see .dz-site-logo img below) once stuck
   to the top of the viewport. */
.dz-site-header--scrolled {
	box-shadow: 0 8px 24px rgba(17, 18, 17, 0.08);
}

/* Keep the header below the WP admin bar for logged-in users instead of
   sitting underneath it. */
body.admin-bar .dz-site-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .dz-site-header {
		top: 46px;
	}
}

.dz-site-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 18px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/* The source logo PNG (LOGO_6.png) has a large built-in transparent
   safe-zone margin around the wordmark (measured: visible mark occupies
   only x:180-888 of 1080 and y:84-276 of 360 - roughly 17-23% padding
   on every side). Left uncropped, the visible mark renders far smaller
   than the element's box and sits inset from the left edge instead of
   flush with it, which is what made the logo look "too small" and
   misaligned against the nav/tagline next to it. This wrapper crops
   to the tight visible bounds and scales it up to the intended
   display height, so the actual wordmark - not the padded canvas -
   is what's sized and left-aligned. */
.dz-site-logo__crop {
	display: block;
	overflow: hidden;
	width: 266px;
	height: 72px;
	position: relative;
	transition: width 0.3s ease, height 0.3s ease;
}

.dz-site-logo__crop img {
	position: absolute;
	top: -31.5px;
	left: -67.5px;
	width: 405px !important;
	height: 135px !important;
	max-height: none !important;
	max-width: none !important;
	transition: width 0.3s ease, height 0.3s ease, top 0.3s ease, left 0.3s ease;
}

.dz-site-header--scrolled .dz-site-logo__crop {
	width: 177px;
	height: 48px;
}

.dz-site-header--scrolled .dz-site-logo__crop img {
	top: -21px;
	left: -45px;
	width: 270px !important;
	height: 90px !important;
}

.dz-site-nav {
	display: flex;
	align-items: center;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.dz-site-nav a {
	font-family: var(--dz-font-body);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dz-text);
	text-decoration: none;
	transition: color 0.25s ease;
}

.dz-site-nav a:hover {
	color: var(--dz-accent);
}

.dz-site-header__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Icon-only circular buttons (Cart + Menu) - bigger and more prominent
   than the old bracketed text labels. Shared base class, kept as
   solid-white circles regardless of the header's own transparency so
   they stay legible over any hero/photo behind a transparent header. */
.dz-icon-btn {
	/* !important on color: the cart button also carries Divi's own
	   "et-cart-info" class (kept for WooCommerce's add_to_cart_fragments
	   AJAX refresh + header.js cart-bump animation - it can't just be
	   removed). Divi's own stylesheet has ".et-cart-info { color:
	   inherit; }", which ties this rule's specificity exactly (both are
	   a single class selector) and can win on source order depending on
	   the page, making the icon inherit the surrounding near-black text
	   color instead of staying white - i.e. a black icon on a black
	   circle, effectively invisible. !important guarantees this wins
	   regardless of load order. */
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: var(--dz-black);
	color: var(--dz-white) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.dz-icon-btn:hover {
	background: var(--dz-accent);
	color: var(--dz-white) !important;
	transform: translateY(-2px);
	box-shadow: none;
}

.dz-icon-btn__icon {
	display: block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Small confirmation bubble that appears under the cart icon after a
   successful add-to-cart (see the added_to_cart handler in
   js/header.js) instead of changing the Add to Cart button itself. */
.dz-cart-wrap {
	position: relative;
}

.dz-cart-toast {
	position: absolute;
	top: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%) translateY(-6px);
	background: var(--dz-black);
	color: var(--dz-white);
	font-family: var(--dz-font-body);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	white-space: nowrap;
	padding: 10px 16px;
	border-radius: 999px;
	box-shadow: 0 12px 28px rgba(17, 18, 17, 0.28);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 50;
}

.dz-cart-toast::before {
	content: "";
	position: absolute;
	top: -5px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 6px solid var(--dz-black);
}

.dz-cart-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.dz-icon-btn__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--dz-accent);
	color: var(--dz-white);
	font-family: var(--dz-font-body);
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	border: 2px solid var(--dz-black);
	box-shadow: none;
}

@keyframes dz-cart-bump {
	0% { transform: scale(1); }
	35% { transform: scale(1.18); }
	100% { transform: scale(1); }
}

.dz-icon-btn.dz-cart-bump {
	animation: dz-cart-bump 0.4s ease;
}

/* ============ Off-canvas drawer ============ */
.dz-offcanvas-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 18, 17, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0.4s;
	z-index: 1000;
}

body.dz-offcanvas-active .dz-offcanvas-overlay {
	opacity: 1;
	visibility: visible;
}

body.dz-offcanvas-active {
	overflow: hidden;
}

/* box-shadow lives only on the .active rule below, not here - a
   fixed, full-height element with a negative-offset/blurred shadow
   still paints that shadow even while translateX(100%) pushes the
   box itself off-screen, since the shadow's blur radius reaches back
   into the viewport from the right edge on every single page. That
   was showing up as a permanent, unexplained soft shadow along the
   right edge of the whole site. */
.dz-offcanvas {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(400px, 88vw);
	background: var(--dz-white);
	transform: translateX(100%);
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

/* Keep the off-canvas panel (and its overlay) below the WP admin bar for
   logged-in users, same as the sticky header above - otherwise the panel's
   logo/close button render clipped underneath the admin bar. */
body.admin-bar .dz-offcanvas-overlay,
body.admin-bar .dz-offcanvas {
	top: 32px;
}

body.admin-bar .dz-offcanvas {
	height: calc(100% - 32px);
}

@media (max-width: 782px) {
	body.admin-bar .dz-offcanvas-overlay,
	body.admin-bar .dz-offcanvas {
		top: 46px;
	}

	body.admin-bar .dz-offcanvas {
		height: calc(100% - 46px);
	}
}

body.dz-offcanvas-active .dz-offcanvas {
	transform: translateX(0);
	box-shadow: -20px 0 50px rgba(17, 18, 17, 0.18);
}

.dz-offcanvas__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 28px;
	border-bottom: 1px solid var(--dz-border);
}

.dz-offcanvas__logo img {
	max-height: 32px;
}

.dz-offcanvas__close {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--dz-cream);
	color: var(--dz-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.dz-offcanvas__close:hover {
	background: var(--dz-accent);
	color: var(--dz-white);
	transform: rotate(90deg);
}

.dz-offcanvas__nav {
	padding: 20px 28px;
	border-bottom: 1px solid var(--dz-border);
}

/* wp_nav_menu() outputs a <ul>, wrapped inside the .dz-offcanvas__nav
   <nav> above - reset its default list styling so it still looks like
   a plain stack of links. */
.dz-offcanvas__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dz-offcanvas__nav a {
	display: block;
	font-family: var(--dz-font-display);
	font-size: 22px;
	color: var(--dz-text);
	text-decoration: none;
	padding: 8px 0;
	transition: color 0.25s ease;
}

.dz-offcanvas__nav a:hover {
	color: var(--dz-accent);
}

/* ---------- Off-canvas contact card: image, tagline, Call/WhatsApp/
   Directions buttons, phone/address/hours - matches dzigners.com's own
   mobile menu contact card. ---------- */
.dz-offcanvas__card {
	flex: 1;
	background: var(--dz-black);
	color: var(--dz-white);
	display: flex;
	flex-direction: column;
}

.dz-offcanvas__card-media {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.dz-offcanvas__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dz-offcanvas__card-body {
	padding: 24px 28px 28px;
}

.dz-offcanvas__card-tagline {
	font-family: var(--dz-font-display);
	font-weight: 700;
	font-size: 19px;
	text-transform: uppercase;
	color: var(--dz-white);
	margin: 0 0 6px;
	line-height: 1.3;
}

.dz-offcanvas__card-subtext {
	font-family: var(--dz-font-body);
	font-size: 13px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
	margin: 0 0 22px;
	line-height: 1.5;
}

.dz-offcanvas__card-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 22px;
}

.dz-offcanvas__pill {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 20px;
	border-radius: 999px;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
	color: var(--dz-white);
	font-family: var(--dz-font-body);
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.dz-offcanvas__pill svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
}

.dz-offcanvas__pill:hover {
	background: var(--dz-accent);
	border-color: var(--dz-accent);
	color: var(--dz-white);
}

.dz-offcanvas__card-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 18px;
}

.dz-offcanvas__info-line {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--dz-font-body);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color 0.25s ease;
}

a.dz-offcanvas__info-line:hover {
	color: var(--dz-accent);
}

.dz-offcanvas__info-line svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--dz-accent);
}

.dz-offcanvas__info-line--hours {
	color: rgba(255, 255, 255, 0.85);
}

.dz-offcanvas__info-line--hours.is-open {
	color: #6ecb63;
}

.dz-offcanvas__hours {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 22px;
}

.dz-offcanvas__hours tr {
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dz-offcanvas__hours tr:last-child {
	border-bottom: none;
}

.dz-offcanvas__hours td {
	padding: 8px 0;
	font-family: var(--dz-font-body);
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
}

.dz-offcanvas__hours td:last-child {
	text-align: right;
	color: var(--dz-white);
}

.dz-offcanvas__social {
	display: flex;
	gap: 14px;
}

.dz-offcanvas__social a {
	font-family: var(--dz-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
	transition: color 0.25s ease;
}

.dz-offcanvas__social a:hover {
	color: var(--dz-accent);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.dz-site-nav {
		display: none;
	}
}

/* Off-canvas nav links are for mobile only - on desktop the top nav
   bar (.dz-site-nav above) already covers navigation, so showing the
   same links again inside the off-canvas panel (still reachable via
   the menu button at any width) would just be a duplicate menu. */
@media (min-width: 901px) {
	.dz-offcanvas__nav {
		display: none;
	}
}

/* At phone widths the header row (logo + cart + menu button) was
   wider than the viewport at the top-of-page, un-scrolled logo size
   (266px logo + full-size icon buttons + padding routinely exceeded
   ~375-390px). Since horizontal overflow is clipped site-wide
   (overflow-x: clip on html, see base.css), the menu button was
   simply pushed off past the right edge and invisible - not just
   hidden by CSS, but genuinely unreachable. Shrinking the logo to the
   same size it already uses once scrolled (a crop/scale already
   proven correct) and the icon buttons slightly guarantees the whole
   row fits and the hamburger stays on-screen and tappable. */
@media (max-width: 600px) {
	.dz-site-header__inner {
		padding: 14px 16px;
		gap: 12px;
	}

	.dz-site-logo__crop {
		width: 177px;
		height: 48px;
	}

	.dz-site-logo__crop img {
		top: -21px;
		left: -45px;
		width: 270px !important;
		height: 90px !important;
	}

	.dz-site-header__right {
		gap: 8px;
	}

	.dz-icon-btn {
		width: 42px;
		height: 42px;
	}
}

@media (max-width: 480px) {
	.dz-offcanvas {
		width: 100vw;
	}
}

/* ============ Cart drawer (Shopify-style slide-out) ============ */
.dz-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 18, 17, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0.4s;
	z-index: 1000;
}

body.dz-cart-active .dz-cart-overlay {
	opacity: 1;
	visibility: visible;
}

body.dz-cart-active {
	overflow: hidden;
}

/* box-shadow lives only on the .active rule below - see the same
   note on .dz-offcanvas above for why. */
.dz-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 90vw);
	background: var(--dz-white);
	transform: translateX(100%);
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

/* Keep the cart drawer (and its overlay) below the WP admin bar for
   logged-in users, same treatment as the nav off-canvas above. */
body.admin-bar .dz-cart-overlay,
body.admin-bar .dz-cart-drawer {
	top: 32px;
}

body.admin-bar .dz-cart-drawer {
	height: calc(100% - 32px);
}

@media (max-width: 782px) {
	body.admin-bar .dz-cart-overlay,
	body.admin-bar .dz-cart-drawer {
		top: 46px;
	}

	body.admin-bar .dz-cart-drawer {
		height: calc(100% - 46px);
	}
}

body.dz-cart-active .dz-cart-drawer {
	transform: translateX(0);
	box-shadow: -20px 0 50px rgba(17, 18, 17, 0.18);
}

@media (max-width: 480px) {
	.dz-cart-drawer {
		width: 100vw;
	}
}

.dz-cart-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 28px;
	border-bottom: 1px solid var(--dz-border);
	flex-shrink: 0;
}

.dz-cart-drawer__header h3 {
	font-family: var(--dz-font-display);
	font-size: 20px;
	margin: 0;
	color: var(--dz-text);
}

.dz-cart-drawer__close {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--dz-cream);
	color: var(--dz-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
	flex-shrink: 0;
}

.dz-cart-drawer__close:hover {
	background: var(--dz-accent);
	color: var(--dz-white);
	transform: rotate(90deg);
}

.dz-cart-drawer__body {
	padding: 24px 28px;
	flex: 1;
}

/* ---------- WooCommerce default mini-cart markup ---------- */
.dz-cart-drawer__body .woocommerce-mini-cart {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.dz-cart-drawer__body .woocommerce-mini-cart-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--dz-border);
}

.dz-cart-drawer__body .woocommerce-mini-cart-item:first-child {
	padding-top: 0;
}

.dz-cart-drawer__body .woocommerce-mini-cart-item img {
	width: 68px;
	height: 68px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}

.dz-cart-drawer__body .woocommerce-mini-cart-item a:not(.remove_from_cart_button) {
	display: block;
	font-family: var(--dz-font-body);
	font-size: 15px;
	font-weight: 600;
	color: var(--dz-text);
	text-decoration: none;
	padding-right: 24px;
}

.dz-cart-drawer__body .woocommerce-mini-cart-item a:not(.remove_from_cart_button):hover {
	color: var(--dz-accent);
}

.dz-cart-drawer__body .woocommerce-mini-cart-item .quantity {
	display: block;
	font-family: var(--dz-font-body);
	font-size: 13px;
	color: var(--dz-text-muted);
	margin-top: 4px;
}

.dz-cart-drawer__body .remove_from_cart_button {
	position: absolute;
	top: 16px;
	right: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--dz-cream);
	color: var(--dz-text) !important;
	font-size: 14px;
	line-height: 1;
	text-decoration: none !important;
	transition: background 0.25s ease, color 0.25s ease;
}

.dz-cart-drawer__body .remove_from_cart_button:hover {
	background: var(--dz-accent);
	color: var(--dz-white) !important;
}

.dz-cart-drawer__body .woocommerce-mini-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: var(--dz-font-display);
	font-size: 18px;
	color: var(--dz-text);
	padding-top: 16px;
	margin: 0 0 20px;
	border-top: 2px solid var(--dz-text);
}

.dz-cart-drawer__body .woocommerce-mini-cart__total strong {
	font-weight: 700;
}

.dz-cart-drawer__body .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}

.dz-cart-drawer__body .woocommerce-mini-cart__buttons a {
	display: block;
	text-align: center;
	font-family: var(--dz-font-body);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 14px 20px;
	border-radius: 999px;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.dz-cart-drawer__body .woocommerce-mini-cart__buttons a.wc-forward {
	background: var(--dz-white);
	color: var(--dz-text);
	border: 1px solid var(--dz-text);
}

.dz-cart-drawer__body .woocommerce-mini-cart__buttons a.wc-forward:hover {
	background: var(--dz-cream);
}

.dz-cart-drawer__body .woocommerce-mini-cart__buttons a.checkout {
	background: var(--dz-accent);
	color: var(--dz-white);
	border: 1px solid var(--dz-accent);
}

.dz-cart-drawer__body .woocommerce-mini-cart__buttons a.checkout:hover {
	opacity: 0.88;
}

.dz-cart-drawer__body .woocommerce-mini-cart__empty-message {
	font-family: var(--dz-font-body);
	font-size: 15px;
	color: var(--dz-text-muted);
	text-align: center;
	padding: 40px 0;
}

/* =========================================================================
   Announcement bar - slim promo strip above the header, in normal
   document flow (scrolls away with the page; the header below it is
   what stays sticky). Rendered by dzigners_render_announcement_bar()
   only when Customizer > D-Zigners Settings > Announcement Bar has
   text set - omitted entirely otherwise.
   ========================================================================= */
.dz-announce {
	background: var(--dz-black);
	padding: 10px 20px;
	text-align: center;
}

.dz-announce__text {
	margin: 0;
	font-family: var(--dz-font-body);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--dz-white);
}

@media (max-width: 600px) {
	.dz-announce {
		padding: 9px 16px;
	}

	.dz-announce__text {
		font-size: 10.5px;
		letter-spacing: 0.04em;
	}
}
