/* Main navigation: desktop mega menus (.tz-mega) and the mobile menu (.tz-mmenu). */

/* Collection accents on charcoal (lighter, for the mobile menu). */
[data-collection="japan"]      { --accent-dark: #e39486; }
[data-collection="california"] { --accent-dark: #e09a72; }
[data-collection="portugal"]   { --accent-dark: #c9a57f; }
[data-collection="rio"]        { --accent-dark: #86b6ce; }
[data-collection="bali"]       { --accent-dark: #8dbba9; }

/* ---------- Desktop bar ---------- */
.tz-header .tz-mega { flex: 1; align-self: stretch; display: flex; justify-content: center; }
.tz-mega__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: var(--wp--preset--spacing--60); }
.tz-mega__item { display: flex; }
.tz-mega__top {
	display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
	color: rgba(247,245,241,.78); text-decoration: none;
	font-family: inherit; font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
	transition: color .15s ease;
}
.tz-header .tz-mega__top { color: rgba(247,245,241,.78); }
.tz-header .tz-mega__top:hover,
.tz-header .tz-mega__top:focus-visible,
.tz-header .tz-mega__item.is-open > .tz-mega__top { color: var(--tz-surface); }
.tz-header .tz-mega__item.is-current > .tz-mega__top { color: var(--tz-surface); }
.tz-mega__top:focus-visible { outline-offset: 4px; }
.tz-mega__top svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.tz-mega__item.is-open > .tz-mega__top svg { transform: rotate(180deg); }

/* ---------- Panels ---------- */
/* Panels sit under the whole header bar, full width. Nothing between the item and .tz-header is positioned. */
.tz-mega__panel {
	position: absolute; left: 0; right: 0; top: 100%; z-index: 2;
	background: var(--tz-surface); color: var(--tz-ink); box-shadow: 0 8px 24px rgba(28,28,26,.10);
	border-top: 1px solid var(--tz-line);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.tz-mega__item.is-open > .tz-mega__panel { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.tz-mega.is-switching .tz-mega__panel { transition: none; }
/* No JavaScript: open on hover and keyboard focus. */
.tz-mega:not(.is-ready) .tz-mega__item:hover > .tz-mega__panel,
.tz-mega:not(.is-ready) .tz-mega__item:focus-within > .tz-mega__panel { opacity: 1; visibility: visible; transform: none; }

.tz-mega__scrim {
	position: fixed; left: 0; right: 0; bottom: 0; top: var(--tz-header-h); z-index: 1;
	background: rgba(28,28,26,.45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
.tz-mega.has-open .tz-mega__scrim { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }

.tz-mega__inner {
	box-sizing: border-box; display: grid; align-items: start;
	padding: 48px max(var(--tz-gutter, 48px), calc((100% - 1320px) / 2)) 52px;
}
.tz-mega__inner--links { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.7fr); gap: 48px; }
.tz-mega__inner--collections { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }

.tz-mega a { color: var(--tz-ink); text-decoration: none; }
.tz-mega__panel :focus-visible { outline-color: var(--tz-forest); }
.tz-mega__eyebrow, .tz-mega__heading {
	display: block; margin: 0; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--tz-muted);
}
.tz-mega__title { margin: 0; font-family: var(--wp--preset--font-family--display); font-size: 36px; line-height: 42px; font-weight: 500; color: var(--tz-ink); }
.tz-mega__title--sm { font-size: 30px; line-height: 36px; }
.tz-mega__text { display: block; margin: 0; font-size: 15px; line-height: 24px; color: var(--tz-muted); }

/* Arrow links ("Explore", "Shop now") */
.tz-mega__cta {
	display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
	font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--tz-ink);
}
.tz-mega__cta--line { padding-bottom: 3px; border-bottom: 1px solid var(--tz-sand); }
a.tz-mega__cta--line, .tz-mega__intro .tz-mega__cta { font-size: 13px; margin-top: 8px; }
a:hover > .tz-mega__cta::after, a.tz-mega__cta:hover::after, .tz-mega__card:hover .tz-mega__cta::after, .tz-mega__feature:hover .tz-mega__cta::after { transform: translateX(3px); }

/* Link columns (Shop, Help) */
.tz-mega__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tz-mega__heading { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--tz-line); }
.tz-mega__col a { display: inline-block; padding: 6px 0; font-size: 15px; line-height: 22px; color: #3a3833; text-underline-offset: 4px; }
.tz-mega__col a:hover { color: var(--tz-ink); text-decoration: underline; text-decoration-color: var(--tz-sand); }

/* Featured product (Shop) */
.tz-mega__feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.tz-mega__feature-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tz-stone); }
.tz-mega__feature-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tz-mega__feature:hover .tz-mega__feature-media img { transform: scale(1.03); }
.tz-mega__feature-body { display: flex; flex-direction: column; gap: 10px; }
.tz-mega__feature-title { font-family: var(--wp--preset--font-family--display); font-size: 26px; line-height: 32px; font-weight: 500; }
.tz-mega__text + .tz-mega__price { margin-top: -2px; }
.tz-mega__price { font-size: 15px; line-height: 22px; color: var(--tz-ink); }
.tz-mega__price del { color: var(--tz-muted); margin-right: 6px; }
.tz-mega__price ins { text-decoration: none; }
.tz-mega__feature-body .tz-mega__cta { margin-top: 6px; font-size: 12px; }

/* Customer care card (Help) */
.tz-mega__care { display: flex; flex-direction: column; gap: 14px; padding: 32px; background: var(--tz-stone); }
.tz-mega__care-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.tz-mega a.tz-mega__btn { color: var(--wp--preset--color--white); background: var(--tz-olive); }
.tz-mega a.tz-mega__btn:hover, .tz-mega a.tz-mega__btn:focus-visible { background: var(--tz-forest); }
.tz-mega a.tz-mega__care-link { font-size: 14px; line-height: 20px; color: var(--tz-forest); text-decoration: underline; text-underline-offset: 3px; }
.tz-mega a.tz-mega__care-link:hover { color: var(--tz-ink); }

/* Collections */
.tz-mega__intro { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.tz-mega__collections { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tz-mega__card { display: flex; flex-direction: column; gap: 14px; }
.tz-mega__tile {
	display: flex; align-items: center; justify-content: center; height: 210px; padding: 24px 16px; box-sizing: border-box;
	background: var(--tz-stone); border-bottom: 2px solid var(--accent, var(--tz-sand)); color: var(--accent, var(--tz-ink));
	transition: background-color .2s ease;
}
.tz-mega__lockup { display: block; height: 104px; width: auto; max-width: 100%; transition: transform .35s ease; }
.tz-mega__card:hover .tz-mega__tile { background: #ddd7cd; }
.tz-mega__card:hover .tz-mega__lockup { transform: translateY(-3px); }
.tz-mega__tagline { min-height: 40px; font-size: 14px; line-height: 20px; color: var(--tz-muted); }

@media (max-width: 1240px) {
	.tz-mega__list { gap: 24px; }
	.tz-mega__inner--links { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 32px; }
	.tz-mega__feature { grid-template-columns: 1fr; gap: 16px; }
	.tz-mega__inner--collections { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
	.tz-mega__title { font-size: 30px; line-height: 36px; }
	.tz-mega__tile { height: 180px; }
	.tz-mega__lockup { height: 88px; }
}

@media (prefers-reduced-motion: reduce) {
	.tz-mega__panel, .tz-mega__scrim, .tz-mega__top svg, .tz-mega__lockup, .tz-mega__feature-media img { transition: none !important; }
}

/* ---------- Mobile menu ---------- */
.tz-mmenu { display: none; }
.tz-mmenu button svg, .tz-mmenu__foot svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tz-mmenu__open, .tz-mmenu__close { background: none; border: 0; color: inherit; padding: 10px; margin: 0 0 0 -10px; cursor: pointer; display: inline-flex; }
.tz-mmenu__close { margin: 0 -10px 0 0; }
.tz-mmenu__panel {
	margin: 0; width: min(420px, 100vw); max-width: none; height: 100dvh; max-height: none; padding: 0; border: 0;
	background: var(--tz-ink); color: var(--tz-surface); overflow-y: auto; overscroll-behavior: contain;
}
.tz-mmenu__panel::backdrop { background: rgba(28,28,26,.55); }
.tz-mmenu__panel[open] { animation: tz-slide-in .2s ease-out; }
@keyframes tz-slide-in { from { transform: translateX(-100%); } to { transform: none; } }
.tz-mmenu__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--tz-header-h); padding: 0 16px 0 20px; border-bottom: 1px solid #3e3c37; }
.tz-mmenu__top .tz-logo__word { display: block; }
.tz-mmenu :focus-visible { outline: 2px solid var(--tz-sand); outline-offset: 2px; }
.tz-mmenu a { color: var(--tz-surface); text-decoration: none; }

.tz-mmenu__nav { padding: 8px 20px 0; }
.tz-mmenu__list, .tz-mmenu__list ul { list-style: none; margin: 0; padding: 0; }
.tz-mmenu__list > li { border-bottom: 1px solid #3e3c37; }
.tz-mmenu__item {
	display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0; border: 0; background: none;
	color: var(--tz-surface); cursor: pointer; text-align: left;
	font-family: var(--wp--preset--font-family--display); font-size: 26px; line-height: 32px; font-weight: 500;
}
.tz-mmenu a.tz-mmenu__item[aria-current="page"] { color: var(--tz-sand); }
.tz-mmenu button.tz-mmenu__toggle svg { width: 20px; height: 20px; color: var(--tz-sand); transition: transform .2s ease; }
.tz-mmenu__toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.tz-mmenu__sub { padding: 4px 0 20px; }
.tz-mmenu__sub[hidden] { display: none; }
.tz-mmenu__sub--links { display: flex; flex-direction: column; gap: 18px; }
.tz-mmenu__heading { margin: 0 0 6px; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--taupe); }
.tz-mmenu__group a { display: block; padding: 7px 0; font-size: 16px; line-height: 22px; }
.tz-mmenu__group a:hover { color: var(--tz-sand); }

.tz-mmenu__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tz-mmenu__tile {
	display: flex; align-items: center; justify-content: center; height: 112px; padding: 14px; box-sizing: border-box;
	background: #262623; border-bottom: 2px solid var(--accent-dark, var(--tz-sand)); color: var(--tz-sand);
}
.tz-mmenu__lockup { display: block; height: 64px; width: auto; max-width: 100%; }
.tz-mmenu a.tz-mmenu__tile--all {
	gap: 8px; background: none; border: 1px solid #3e3c37;
	font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; text-align: center; color: var(--tz-surface);
}
.tz-mmenu__tile--all::after {
	content: ""; flex: none; width: 12px; height: 9px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5h11.5M8.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5h11.5M8.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.tz-mmenu__tile:hover { background: #2e2d2a; }

.tz-mmenu__foot { display: flex; flex-direction: column; gap: 4px; padding: 24px 20px 32px; }
.tz-mmenu__foot a, .tz-mmenu__search { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.tz-mmenu__foot svg { width: 20px; height: 20px; flex: none; }
.tz-mmenu__foot a:hover { color: var(--tz-sand); }
.tz-mmenu__search input[type="search"] {
	flex: 1; min-width: 0; min-height: 40px; padding: 0 0 2px; border: 0; border-bottom: 1px solid #3e3c37; border-radius: 0;
	background: none; color: var(--tz-surface); font-size: 15px;
}
.tz-mmenu__search input[type="search"]::placeholder { color: var(--tz-surface); opacity: 1; }
.tz-mmenu__search input[type="search"]:focus { border-color: var(--tz-sand) !important; box-shadow: none !important; }
.tz-mmenu__search input[type="search"]:focus::placeholder { color: var(--wp--preset--color--taupe); }

@media (prefers-reduced-motion: reduce) {
	.tz-mmenu__panel[open] { animation: none; }
	.tz-mmenu button.tz-mmenu__toggle svg { transition: none; }
}

/* Mobile menu takes over below this width (six items plus the tools no longer fit). */
@media (max-width: 1080px) {
	.tz-header .tz-mega { display: none; }
	/* Toggle sits at the far right, after the cart (Jim, 9 Nov); the panel slides in from the right to match. */
	.tz-mmenu { display: block; order: 3; }
	.tz-header__inner > .tz-logo { order: 1; margin-right: auto; }
	.tz-header__inner > .tz-header__tools { order: 2; }
	.tz-mmenu__open { margin: 0 -10px 0 0; }
	.tz-mmenu__panel { margin: 0 0 0 auto; }
	.tz-mmenu__panel[open] { animation-name: tz-slide-in-right; }
}
@keyframes tz-slide-in-right { from { transform: translateX(100%); } to { transform: none; } }
