/**
 * Zipgun shop header
 */

.zg-shop-header {
	padding: 0 !important;
	margin-bottom: 0 !important;
	background: #222 !important;
	box-shadow: none !important;
}

.zg-shop-header .site-header-inner,
.zg-header-main__inner,
.zg-topbar__inner {
	width: 100%;
	max-width: var(--zg-container, 1440px);
	margin: 0 auto;
	padding-left: var(--zg-gutter, 20px);
	padding-right: var(--zg-gutter, 20px);
	box-sizing: border-box;
}

/* Top bar */
.zg-topbar {
	background: #1a1a1a;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.72);
}

.zg-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	min-height: 34px;
	padding-top: 6px;
	padding-bottom: 6px;
}

.zg-topbar__item {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	white-space: nowrap;
}

.zg-topbar__label {
	color: var(--zg-bronze, #a6764c);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.68rem;
}

.zg-topbar__value {
	color: rgba(255, 255, 255, 0.85);
}

.zg-topbar a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}

.zg-topbar a:hover {
	color: #fff;
}

@media (max-width: 767px) {
	.zg-topbar__item--geo,
	.zg-topbar__item--mail {
		display: none;
	}
}

/* Main header row */
.zg-header-main {
	background: #222;
	padding: 14px 0;
}

.zg-header-main__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	gap: 16px 20px;
	align-items: center;
}

.zg-header-burger {
	display: none;
	position: relative;
	z-index: 5;
}

@media (max-width: 991px) {
	.zg-header-main__inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"burger brand actions"
			"search search search"
			"contacts contacts contacts";
	}

	.zg-header-burger {
		display: block;
		grid-area: burger;
	}

	.zg-header-brand { grid-area: brand; }
	.zg-header-search { grid-area: search; }
	.zg-header-contacts { grid-area: contacts; }
	.zg-header-actions { grid-area: actions; justify-self: end; }
}

/* Brand */
.zg-header-brand {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.zg-header-brand__logo {
	display: block;
	line-height: 0;
}

.zg-header-brand__logo img {
	display: block;
	max-height: 64px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
}

@media (max-width: 991px) {
	.zg-header-brand__logo img {
		max-height: 48px;
		max-width: 160px;
	}
}

.zg-header-brand__title {
	color: #fff;
	font-size: 1.15rem;
	font-weight: 800;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.zg-header-brand__tag {
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Search */
.zg-header-search {
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	background: #fff;
	border: 2px solid transparent;
	border-radius: 2px;
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.zg-header-search:focus-within {
	border-color: var(--zg-bronze, #a6764c);
}

.zg-header-search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: none;
	padding: 0.7rem 0.9rem;
	font-size: 0.92rem;
	color: #222;
	background: transparent;
}

.zg-header-search__btn {
	border: 0;
	background: var(--zg-bronze, #a6764c);
	color: #fff;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.78rem;
	padding: 0 1.1rem;
	cursor: pointer;
	transition: background 0.2s ease;
}

.zg-header-search__btn:hover {
	background: #8a5f3a;
}

/* Contacts: WhatsApp icon left of phone */
.zg-header-contacts {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}

.zg-header-phone {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: #fff;
	line-height: 1.2;
}

.zg-header-phone__label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.55);
}

.zg-header-phone__num {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: #fff;
	white-space: nowrap;
}

.zg-header-phone:hover .zg-header-phone__num {
	color: var(--zg-bronze, #a6764c);
}

.zg-header-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	color: #fff;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.06);
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.zg-header-whatsapp__icon {
	display: block;
	width: 22px;
	height: 22px;
}

.zg-header-whatsapp:hover {
	color: #fff;
	border-color: #fff;
	background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 991px) {
	.zg-header-contacts {
		justify-content: flex-start;
		width: 100%;
		padding-top: 2px;
	}

	.zg-header-phone__num {
		font-size: 1.05rem;
	}
}

/* Actions: callback + cart */
.zg-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.zg-header-callback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 0.9rem;
	border: 1px solid var(--zg-bronze, #a6764c);
	border-radius: 2px;
	background: var(--zg-bronze, #a6764c);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.zg-header-callback__icon {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.81.36 1.6.68 2.35a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.75.32 1.54.55 2.35.68A2 2 0 0 1 22 16.92z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.81.36 1.6.68 2.35a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.75.32 1.54.55 2.35.68A2 2 0 0 1 22 16.92z'/></svg>") center / contain no-repeat;
}

.zg-header-callback:hover {
	background: #8a5f3a;
	border-color: #8a5f3a;
	transform: translateY(-1px);
}

@media (max-width: 1100px) {
	.zg-header-callback__text {
		display: none;
	}

	.zg-header-callback {
		width: 48px;
		padding: 0;
	}
}

/* Callback modal */
html.zg-callback-open,
html.zg-callback-open body {
	overflow: hidden;
}

.zg-callback-modal[hidden] {
	display: none !important;
}

.zg-callback-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.zg-callback-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 16, 0.72);
	backdrop-filter: blur(2px);
}

.zg-callback-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(440px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	background:
		linear-gradient(180deg, #faf7f3 0%, #fff 42%),
		#fff;
	border: 1px solid #e2e2e2;
	border-top: 3px solid var(--zg-bronze, #a6764c);
	border-radius: 2px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
	padding: 1.5rem 1.4rem 1.35rem;
	animation: zg-callback-in 0.22s ease;
}

@keyframes zg-callback-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.zg-callback-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: #6b6b6b;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.zg-callback-modal__close:hover {
	color: #222;
}

.zg-callback-modal__eyebrow {
	margin: 0 0 0.35rem;
	color: var(--zg-bronze, #a6764c);
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.zg-callback-modal__title {
	margin: 0 0 0.35rem;
	color: #222;
	font-size: 1.35rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.zg-callback-form__lead {
	margin: 0 0 1rem;
	color: #6b6b6b;
	font-size: 0.92rem;
	line-height: 1.4;
}

.zg-callback-form__row {
	margin: 0 0 0.75rem;
}

.zg-callback-form__row--submit {
	margin-top: 1rem;
	margin-bottom: 0;
}

.zg-callback-modal .wpcf7-form-control-wrap,
.zg-callback-modal .wpcf7-form-control-wrap input,
.zg-callback-modal input.wpcf7-form-control,
.zg-callback-modal input[type="text"],
.zg-callback-modal input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
}

.zg-callback-modal input.wpcf7-form-control,
.zg-callback-modal input[type="text"],
.zg-callback-modal input[type="tel"] {
	height: 46px;
	padding: 0 0.85rem;
	border: 1px solid #e2e2e2;
	border-radius: 2px;
	background: #fff;
	color: #222;
	font-size: 0.95rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zg-callback-modal input.wpcf7-form-control:focus,
.zg-callback-modal input[type="text"]:focus,
.zg-callback-modal input[type="tel"]:focus {
	outline: none;
	border-color: var(--zg-bronze, #a6764c);
	box-shadow: 0 0 0 2px rgba(166, 118, 76, 0.18);
}

.zg-callback-modal input.wpcf7-submit,
.zg-callback-modal .wpcf7-submit {
	width: 100%;
	height: 48px;
	border: 1px solid #222 !important;
	border-radius: 2px;
	background: #222 !important;
	color: #fff !important;
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.zg-callback-modal input.wpcf7-submit:hover,
.zg-callback-modal .wpcf7-submit:hover {
	background: var(--zg-bronze, #a6764c) !important;
	border-color: var(--zg-bronze, #a6764c) !important;
}

.zg-callback-modal .wpcf7-response-output {
	margin: 0.85rem 0 0 !important;
	padding: 0.65rem 0.75rem !important;
	border-radius: 2px;
	font-size: 0.88rem;
}

.zg-callback-modal .wpcf7-not-valid-tip {
	font-size: 0.8rem;
	color: #b33a2b;
}

.zg-callback-modal .screen-reader-response {
	position: absolute;
	left: -9999px;
}

/* Cart icon + dropdown */
.zg-header-cart-wrap {
	position: relative;
	z-index: 40;
}

.zg-header-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	color: #fff !important;
	text-decoration: none !important;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.06);
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.zg-header-cart:hover,
.zg-header-cart-wrap:hover .zg-header-cart,
.zg-header-cart-wrap:focus-within .zg-header-cart {
	border-color: var(--zg-bronze, #a6764c);
	background: rgba(166, 118, 76, 0.18);
	color: #fff !important;
}

.zg-header-cart__icon {
	display: block;
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='21' r='1'/><circle cx='20' cy='21' r='1'/><path d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h7.8a2 2 0 0 0 2-1.6L23 6H6'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='21' r='1'/><circle cx='20' cy='21' r='1'/><path d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h7.8a2 2 0 0 0 2-1.6L23 6H6'/></svg>") center / contain no-repeat;
}

.zg-header-cart__count {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--zg-bronze, #a6764c);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
	box-sizing: border-box;
}

.zg-header-cart__count[hidden] {
	display: none !important;
}

.zg-header-cart-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(360px, calc(100% - 24px));
	min-width: 280px;
	padding: 0;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 2px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
	z-index: 50;
}

/* Hover bridge so cursor can reach the panel */
.zg-header-cart-dropdown::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	right: 0;
	height: 12px;
}

.zg-header-cart-wrap:hover .zg-header-cart-dropdown,
.zg-header-cart-wrap:focus-within .zg-header-cart-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.zg-header-cart-dropdown__list {
	list-style: none;
	margin: 0;
	padding: 0.55rem 0;
	max-height: 320px;
	overflow: auto;
}

.zg-header-cart-dropdown__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	padding: 0.55rem 0.85rem;
}

.zg-header-cart-dropdown__item + .zg-header-cart-dropdown__item {
	border-top: 1px solid #f0f0f0;
}

.zg-header-cart-dropdown__thumb {
	display: block;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: #f5f5f5;
	border: 1px solid #ececec;
	line-height: 0;
}

.zg-header-cart-dropdown__thumb img,
.zg-header-cart-dropdown__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.zg-header-cart-dropdown__info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.zg-header-cart-dropdown__name {
	color: #222;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.zg-header-cart-dropdown__name:hover {
	color: var(--zg-bronze, #a6764c);
}

.zg-header-cart-dropdown__meta {
	color: #6b6b6b;
	font-size: 0.8rem;
	font-weight: 600;
}

.zg-header-cart-dropdown__meta .woocommerce-Price-amount {
	color: #222;
	font-weight: 800;
}

.zg-header-cart-dropdown__footer {
	padding: 0.75rem 0.85rem 0.9rem;
	border-top: 1px solid #e8e8e8;
	background: #fafafa;
}

.zg-header-cart-dropdown__sum {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 0.65rem;
	font-size: 0.85rem;
	color: #6b6b6b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
}

.zg-header-cart-dropdown__sum strong {
	color: #222;
	font-size: 1.05rem;
	letter-spacing: 0;
	text-transform: none;
}

.zg-header-cart-dropdown__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.75rem 1rem;
	background: #222;
	border: 1px solid #222;
	color: #fff !important;
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none !important;
	border-radius: 2px;
	transition: background 0.2s ease, border-color 0.2s ease;
	box-sizing: border-box;
}

.zg-header-cart-dropdown__btn:hover {
	background: var(--zg-bronze, #a6764c);
	border-color: var(--zg-bronze, #a6764c);
	color: #fff !important;
}

.zg-header-cart-dropdown__btn--ghost {
	background: transparent;
	border-color: #d0d0d0;
	color: #222 !important;
	margin: 0 0.85rem 0.9rem;
	width: calc(100% - 1.7rem);
}

.zg-header-cart-dropdown__btn--ghost:hover {
	border-color: var(--zg-bronze, #a6764c);
	color: var(--zg-bronze, #a6764c) !important;
	background: #fff;
}

.zg-header-cart-dropdown__empty {
	margin: 0;
	padding: 1.25rem 0.85rem 0.75rem;
	text-align: center;
	color: #6b6b6b;
	font-size: 0.92rem;
}

/* Keep bronze menu under new header */
.main-navigation {
	margin-top: 0 !important;
}

/* Catalog dropdown inside existing header menu */
.zg-menu-catalog > a {
	font-weight: 800 !important;
}

.zg-menu-catalog__dropdown {
	max-height: min(70vh, 520px);
	overflow-y: auto;
}

.zg-menu-catalog__dropdown .menu-item a {
	white-space: normal;
}

