/* ==========================================================================
   Final visual layer — flat design + reliable mobile drawer
   Loaded last. Only the header keeps a shadow while scrolling.
   ========================================================================== */

/* Remove every rounded corner and box shadow across the whole site */
*,
*::before,
*::after {
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* The single allowed shadow: sticky header on scroll */
.ha-header.is-scrolled {
	box-shadow: 0 6px 22px rgba(16, 35, 31, 0.16) !important;
}

/* One cart-button color everywhere, including sticky purchase bars */
button.single_add_to_cart_button,
.woocommerce a.button.ajax_add_to_cart_button,
.woocommerce-cart .wc-proceed-to-checkout .button,
.woocommerce-checkout #payment .place-order .button,
.ha-sticky-buy .ha-btn--primary,
.ha-dlp2-sticky button.single_add_to_cart_button,
.ha-dlp-sticky button.single_add_to_cart_button,
.ha-addon-card__actions .button,
.ha-list-card__body .button {
	background: var(--ha-primary) !important;
	color: #fff !important;
	border-color: var(--ha-primary) !important;
}

/* Desktop: RTL drawer rule must never hide the header menu */
@media (min-width: 1025px) {
	html[dir="rtl"] .ha-nav { transform: translateX(0%) !important; }
}

/* ---------- Desktop header / shop / PDP tabs ---------- */
@media (min-width: 1025px) {
	.ha-header__inner { display: flex !important; align-items: center !important; gap: 14px !important; }
	.ha-header__brand { flex: 0 0 auto; }
	.ha-nav { margin-inline-start: auto !important; }
	.ha-nav__list { display: flex !important; align-items: center !important; flex-wrap: nowrap !important; gap: 2px !important; }
	.ha-nav__list a { white-space: nowrap !important; padding: 8px 10px !important; font-size: .86rem !important; }
	.ha-header__actions { display: flex !important; align-items: center !important; gap: 6px !important; flex: 0 0 auto !important; margin-inline-start: 0 !important; }
	.ha-header__actions .ha-btn { padding: .55rem .95rem !important; font-size: .82rem !important; }

	.ha-store-wrap ul.products {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 20px !important;
	}
	.ha-store-wrap ul.products li.product {
		width: auto !important; float: none !important; margin: 0 !important;
	}
	.ha-store-wrap .ha-store-view--list ul.products { grid-template-columns: 1fr !important; }
	.ha-store-view--list ul.products li.product.ha-addon-card { grid-template-columns: 240px minmax(0, 1fr) !important; }

	.woocommerce div.product .woocommerce-tabs .tabs.wc-tabs {
		display: flex !important; flex-wrap: wrap !important;
	}
	.ha-dlp2-hero__grid, .ha-addon-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) !important; }

	/* Same header everywhere as on the homepage */
	body .ha-header__inner,
	body.home .ha-header__inner { display: flex !important; align-items: center !important; gap: 12px !important; flex-wrap: nowrap !important; }
	body .ha-nav__list,
	body.home .ha-nav__list { display: flex !important; align-items: center !important; flex-wrap: nowrap !important; gap: 2px !important; }
	body .ha-nav__list a,
	body.home .ha-nav__list a { padding: 8px 10px !important; font-size: .86rem !important; white-space: nowrap !important; }
	body .ha-header__actions,
	body.home .ha-header__actions { display: flex !important; align-items: center !important; gap: 6px !important; flex-wrap: nowrap !important; }
	body .ha-header__actions .ha-btn,
	body.home .ha-header__actions .ha-btn { display: inline-flex !important; padding: .55rem .95rem !important; font-size: .82rem !important; }
	body .ha-logo img,
	body.home .ha-logo img { max-width: 150px !important; }
}

@media (min-width: 1025px) and (max-width: 1320px) {
	.ha-nav__list a { padding: 7px 8px !important; font-size: .8rem !important; }
	.ha-store-wrap ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* ---------- Mobile navigation ---------- */
@media (max-width: 1024px) {
	/* backdrop-filter on the header creates a containing block for fixed
	   children, which traps the drawer. Disable it on mobile. */
	.ha-header { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
	html.ha-nav-open .ha-header { z-index: 1300 !important; }

	.ha-nav-backdrop {
		position: fixed !important;
		inset: 0 !important;
		z-index: 1100 !important;
		background: rgba(4, 20, 17, 0.55);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.25s ease, visibility 0.25s ease;
	}
	.ha-nav-backdrop.is-open,
	html.ha-nav-open .ha-nav-backdrop {
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.ha-nav {
		position: fixed !important;
		inset-block: 0 !important;
		inset-inline-end: 0 !important;
		z-index: 1200 !important;
		width: min(340px, 88vw) !important;
		max-width: 88vw !important;
		margin: 0 !important;
		padding: 28px 20px !important;
		background: var(--ha-bg) !important;
		overflow-y: auto !important;
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
		transform: translateX(105%);
		transition: transform 0.3s ease !important;
		pointer-events: none;
	}
	html[dir="rtl"] .ha-nav { transform: translateX(-105%); }

	.ha-nav.is-open,
	html.ha-nav-open .ha-nav,
	html[dir="rtl"] .ha-nav.is-open,
	html.ha-nav-open[dir="rtl"] .ha-nav {
		transform: translateX(0) !important;
		pointer-events: auto !important;
	}

	.ha-nav-toggle {
		display: inline-flex !important;
		position: relative !important;
		z-index: 1400 !important;
	}

	.ha-header__actions .ha-icon-btn { display: inline-flex !important; }
	.ha-header__actions > .ha-icon-btn[data-ha-search-toggle] { display: none !important; }
	body.ha-nav-open { overflow: hidden !important; }
}
