/* ==========================================================================
   Deals tabs · build-your-own box · purchased products · newsletter consent
   ========================================================================== */
.lg-tabs__nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 34px; }
.lg-tabs__btn {
	min-height: 46px; padding: 0 22px; border-radius: 8px;
	background: var(--lg-cream-soft) !important; color: var(--lg-ink) !important; border: 1px solid transparent !important;
	font-family: var(--lg-font); font-size: 18px; cursor: pointer; white-space: normal;
}
.lg-tabs__btn.is-active { background: var(--lg-ink) !important; color: #fff !important; }
.lg-tabs__btn:focus-visible { outline: 3px solid var(--lg-taupe); outline-offset: 2px; }

/* ---------- box builder ---------- */
.lg-box { display: grid; gap: 28px; }
.lg-box__head { display: grid; gap: 10px; }
.lg-box__title { margin: 0; font-family: var(--lg-font); font-weight: 400; color: var(--lg-ink); font-size: clamp(32px, 3.4vw, 48px); text-align: right; }
.lg-box__lead { margin: 0; color: var(--lg-ink-soft); font-size: 18px; }
.lg-box__sizes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.lg-box__size {
	min-height: 46px; padding: 0 20px; border-radius: 8px; cursor: pointer;
	background: #fff !important; color: var(--lg-ink) !important; border: 1px solid var(--lg-line) !important;
	font-family: var(--lg-font); font-size: 17px; white-space: normal;
}
.lg-box__size.is-active { background: var(--lg-ink) !important; color: #fff !important; border-color: var(--lg-ink) !important; }

.lg-box__slots {
	display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 16px;
	padding: 26px; border-radius: 10px 10px 10px 80px;
	background: var(--lg-cream) url("https://legima.ussl.co/wp-content/uploads/2026/09/legima-vine-shadow.webp") right top / cover no-repeat;
	background-blend-mode: multiply;
}
.lg-box__slots[data-size="2"] { --n: 2; }
.lg-box__slots[data-size="6"] { --n: 6; }
.lg-box__slot {
	position: relative; aspect-ratio: 3 / 4; min-width: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	border: 1.5px dashed rgba(122,31,43,.35); border-radius: 14px; background: rgba(255,255,255,.45);
	color: var(--lg-ink-soft); font-family: var(--lg-font);
}
.lg-box__slot-plus { font-size: 34px; line-height: 1; }
.lg-box__slot-hint { font-size: 14px; }
.lg-box__slot.is-full {
	border-style: solid; border-color: transparent; background: rgba(255,255,255,.7); cursor: pointer;
	padding: 12px 8px 10px; isolation: isolate;
}
.lg-box__slot.is-full img { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; mix-blend-mode: darken; }
.lg-box__slot-name { font-size: 13px; line-height: 1.25; color: var(--lg-ink); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lg-box__slot-x { position: absolute; top: 8px; inset-inline-start: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--lg-ink); color: #fff; display: grid; place-items: center; font-size: 17px; line-height: 1; }

.lg-box__bar {
	position: sticky; bottom: 12px; z-index: 5;
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding: 14px 18px; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(66,19,28,.12);
}
.lg-box__total { font-size: 18px; color: var(--lg-ink); }
.lg-box__total strong { font-size: 24px; font-weight: 400; margin-inline: 6px; }
.lg-box__total span { color: var(--lg-ink-soft); font-size: 15px; }
.lg-box__submit { min-height: 50px; padding: 0 26px; border-radius: 8px !important; background: var(--lg-ink) !important; color: #fff !important; border: 0 !important; font-family: var(--lg-font); font-size: 18px; cursor: pointer; }
.lg-box__submit:disabled { opacity: .45; cursor: not-allowed; }

.lg-box__search input { width: 100%; min-height: 52px; border-radius: 10px; border: 1px solid var(--lg-line); padding: 0 18px; font-size: 17px; background: #fff; }
.lg-box__results { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-top: 18px; }
.lg-box__results.is-loading { opacity: .5; }
.lg-box__item {
	display: grid; grid-template-rows: 200px auto auto auto; gap: 6px; text-align: right;
	padding: 12px 12px 14px; border-radius: 14px; cursor: pointer; white-space: normal;
	background: var(--lg-cream) !important; border: 1px solid transparent !important; color: var(--lg-ink) !important; isolation: isolate;
	transition: transform .2s ease, border-color .2s ease;
}
.lg-box__item:hover { transform: translateY(-3px); border-color: var(--lg-taupe) !important; }
.lg-box__item.is-full-warn { border-color: #b4574a !important; }
.lg-box__item-img { display: flex; align-items: flex-end; justify-content: center; }
.lg-box__item-img img { max-height: 200px; width: auto; max-width: 100%; mix-blend-mode: darken; }
.lg-box__item-name { font-size: 15px; line-height: 1.25; }
.lg-box__item-price { font-size: 17px; }
.lg-box__item-add { font-size: 13px; color: var(--lg-taupe-deep); text-decoration: underline; text-underline-offset: 3px; }
.lg-box__empty { color: var(--lg-ink-soft); }

/* link at the top of the gift-box category */
.lg-box-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin: 0 0 30px; padding: 22px 28px; border-radius: 10px 10px 10px 60px;
	background: var(--lg-cream) url("https://legima.ussl.co/wp-content/uploads/2026/09/legima-vine-shadow.webp") right top / cover no-repeat;
	background-blend-mode: multiply; color: var(--lg-ink) !important; font-size: 17px;
}
.lg-box-cta strong { display: block; font-family: var(--lg-font); font-weight: 400; font-size: 26px; margin-bottom: 2px; }
.lg-box-cta__go { width: 46px; height: 46px; border-radius: 50%; background: var(--lg-ink); color: #fff; display: grid; place-items: center; font-size: 20px; flex: none; }

/* purchased products + consent */
.lg-purchased { margin-top: 48px; }
.lg-purchased__title { font-family: var(--lg-font); font-weight: 400; color: var(--lg-ink); font-size: clamp(26px, 2.6vw, 38px); text-align: right; }
.lg-purchased__empty { color: var(--lg-ink-soft); }
.lg-consent label, .wc-block-components-checkbox__label { font-size: 15px; color: var(--lg-ink-soft); line-height: 1.45; }
.lg-consent input { margin-inline-end: 8px; accent-color: var(--lg-ink); }

@media (max-width: 767px) {
	.lg-box__slots { padding: 16px; gap: 10px; border-radius: 8px 8px 8px 48px; }
	.lg-box__slots[data-size="6"] { --n: 3; }
	.lg-box__results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.lg-box__item { grid-template-rows: 150px auto auto auto; }
	.lg-box__item-img img { max-height: 150px; }
	.lg-box__bar { bottom: 70px; }
	.lg-box__submit { flex: 1 1 100%; }
	.lg-box-cta { padding: 18px; border-radius: 8px 8px 8px 40px; }
	.lg-box-cta strong { font-size: 21px; }
}

/* slots: compact, the empty frames read as a gift box, not as huge panels */
.lg-box__slots { grid-template-columns: repeat(var(--n, 3), minmax(0, 170px)); justify-content: center; background: var(--lg-cream); background-image: none; padding: 32px 26px; }
@media (max-width: 767px) { .lg-box__slots { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); } }

/* WoodMart styles every <button> as an inline flex row: the result cards must stay a vertical grid */
.lg-box .lg-box__item { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: 200px auto auto auto !important; align-items: start; justify-items: stretch; height: auto !important; min-height: 0 !important; line-height: 1.3; text-transform: none; letter-spacing: 0; font-weight: 400; }
.lg-box .lg-box__item-img { height: 200px; }
.lg-box .lg-box__item-img img { height: 100%; object-fit: contain; }
.lg-box .lg-box__slot.is-full { height: auto !important; line-height: 1.3; text-transform: none; }
.lg-box__search { display: block; margin: 0; }
.lg-box__search input { border-radius: 10px !important; border: 1px solid var(--lg-line) !important; }
@media (max-width: 767px) { .lg-box .lg-box__item { grid-template-rows: 150px auto auto auto !important; } .lg-box .lg-box__item-img { height: 150px; } }

/* ---------- WhatsApp ---------- */
.lg-wa {
	position: fixed; z-index: 390; inset-inline-start: 20px; bottom: 22px;
	display: inline-flex; align-items: center; gap: 8px;
	height: 52px; padding: 0 18px 0 14px; border-radius: 30px;
	background: #25D366; color: #fff !important; font-family: var(--lg-font); font-size: 16px;
	box-shadow: 0 10px 26px rgba(66,19,28,.22); transition: transform .25s ease;
}
.lg-wa:hover { transform: translateY(-3px); }
.lg-wa svg { width: 26px; height: 26px; flex: none; }
@media (max-width: 1024px) { .lg-wa { bottom: 76px; inset-inline-start: 14px; width: 52px; padding: 0; justify-content: center; } .lg-wa__label { display: none; } }

/* ---------- search shortcuts ---------- */
.lg-search-cats { max-width: 1192px; margin: 26px auto 0; padding: 0 16px; text-align: right; }
.lg-search-cats__title { display: block; font-size: 14px; color: var(--lg-ink-soft); margin-bottom: 12px; }
.lg-search-cats__list { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-search-cats__list a { padding: 8px 16px; border-radius: 30px; background: var(--lg-cream); color: var(--lg-ink) !important; font-size: 15px; transition: background-color .2s ease, color .2s ease; }
.lg-search-cats__list a:hover { background: var(--lg-ink); color: #fff !important; }

/* ---------- live search results ----------
   Full-screen search (header icon, desktop and phone). The theme let each photo take the whole tile
   width, so a slim cut-out bottle stood up to 660px tall and got clipped in the short scroll window
   under the shortcuts. Now the shortcuts step aside once products show, and the products are a grid of
   equal cream tiles on the shortcuts' width, each bottle whole inside its tile, name and price aligned. */
.wd-search-full-screen.wd-searched:has(.wd-suggestion) .lg-search-cats { display: none; }
.wd-search-full-screen .wd-search-results { padding-bottom: 64px; }
.wd-search-full-screen .wd-suggestions-group.wd-type-product {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 40px 24px;
	max-width: 1192px;
	margin-inline: auto;
	padding: 8px 16px 0;
}
.wd-search-full-screen .wd-type-product .wd-suggestion { flex: none; padding: 0; text-align: center; line-height: 1.35; }
.wd-search-full-screen .wd-type-product .wd-suggestion-thumb {
	isolation: isolate; /* the photo's white melts into the tile only */
	display: flex;
	align-items: flex-end;
	justify-content: center;
	aspect-ratio: 4 / 5;
	margin: 0 0 14px;
	padding: 14% 16% 10%;
	border-radius: 18px;
	background: var(--lg-cream);
	overflow: hidden;
}
.wd-search-full-screen .wd-type-product .wd-suggestion-thumb img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center bottom;
	border-radius: 0;
	mix-blend-mode: darken;
	transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.wd-search-full-screen .wd-type-product .wd-suggestion-thumb img.lg-cut { mix-blend-mode: normal; filter: drop-shadow(0 8px 10px rgba(66,19,28,.12)); }
.wd-search-full-screen .wd-type-product .wd-suggestion:hover .wd-suggestion-thumb img { transform: translateY(-4px); }
/* the tiles of a row share one height; the price sits at the bottom, so the prices of a row line up
   and a one-line name keeps its price close whenever no name in that row runs to two lines */
.wd-search-full-screen .wd-type-product .wd-suggestion-content { --wd-mb: 6px; display: flex; flex-direction: column; flex: 1 1 auto; }
.wd-search-full-screen .wd-type-product .wd-entities-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--lg-ink);
}
.wd-search-full-screen .wd-type-product .wd-entities-title strong { text-decoration: none; font-weight: 700; }
.wd-search-full-screen .wd-type-product .price { margin-top: auto; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--lg-ink); }
.wd-search-full-screen .wd-type-product .price del { font-size: .8em; font-weight: 400; color: var(--lg-ink-soft); }
.wd-search-full-screen .wd-not-found { padding: 32px 16px 8px; font-size: 17px; color: var(--lg-ink-soft); }
.wd-search-full-screen .wd-all-results {
	--wd-link-color: #fff;
	--wd-link-color-hover: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-width: 240px;
	height: 52px;
	margin: 48px auto 0;
	padding: 0 32px;
	border: 0;
	border-radius: 30px;
	background: var(--lg-ink);
	color: #fff;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	text-transform: none;
}
.wd-search-full-screen .wd-all-results:hover { background-color: var(--lg-hero) !important; }
@media (max-width: 1199px) {
	.wd-search-full-screen .wd-suggestions-group.wd-type-product { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.wd-search-full-screen .wd-suggestions-group.wd-type-product { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 16px; }
	.wd-search-full-screen .wd-type-product .wd-entities-title { font-size: 14px; }
	.wd-search-full-screen .wd-type-product .price { font-size: 15px; }
}
@media (max-width: 768.98px) {
	.wd-search-full-screen .wd-suggestions-group.wd-type-product { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
	.wd-search-full-screen .wd-suggestions-group.wd-type-product { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
	.wd-search-full-screen .wd-type-product .wd-suggestion-thumb { border-radius: 16px; }
	.wd-search-full-screen .wd-all-results { width: auto; min-width: 0; margin: 40px 16px 0; }
}
/* the accessibility button stays out of the way while the search is open (as in the phone menu) */
body:has(.wd-search-full-screen.wd-opened) #ea11y-root { display: none; }

/* Search inside the phone menu (drop-down list): the photo gets a small fixed frame, so a slim
   bottle no longer turns its row into a tall strip, and the shortcuts step aside while results show. */
.wd-search-form.wd-searched:has(.wd-dropdown-results.wd-opened .wd-suggestion) .lg-search-cats { display: none; }
.wd-dropdown-results .wd-type-product .wd-suggestion { align-items: center; }
.wd-dropdown-results .wd-type-product .wd-suggestion-thumb {
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 48px;
	width: 48px;
	max-width: none;
	height: 64px;
	padding: 4px;
	border-radius: 8px;
	background: var(--lg-cream);
}
.wd-dropdown-results .wd-type-product .wd-suggestion-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; mix-blend-mode: darken; }
.wd-dropdown-results .wd-type-product .wd-suggestion-thumb img.lg-cut { mix-blend-mode: normal; }
.wd-dropdown-results .wd-type-product .wd-entities-title { color: var(--lg-ink); line-height: 1.35; }
.wd-dropdown-results .wd-type-product .wd-entities-title strong { text-decoration: none; font-weight: 700; }

/* ---------- complete the set ---------- */
.lg-set { margin: 22px 0 6px; padding: 18px; border-radius: 10px 10px 10px 40px; background: var(--lg-cream-soft); }
.lg-set__title { margin: 0 0 12px; font-family: var(--lg-font); font-size: 19px; color: var(--lg-ink); }
.lg-set__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lg-set__item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px; border-radius: 10px; background: #fff; }
.lg-set__img { grid-row: 1 / 3; width: 56px; height: 64px; display: flex; align-items: center; justify-content: center; }
.lg-set__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lg-set__name { color: var(--lg-ink) !important; font-size: 15px; line-height: 1.3; }
.lg-set__price { grid-column: 2; font-size: 15px; color: var(--lg-ink-soft); }
.lg-set__price del { opacity: .5; font-size: .85em; }
.lg-set__add { grid-column: 3; grid-row: 1 / 3; min-height: 38px; padding: 0 14px !important; background: var(--lg-ink) !important; color: #fff !important; font-size: 14px !important; white-space: nowrap; }
.lg-set__add.added { background: var(--lg-taupe-deep) !important; }
.lg-set .added_to_cart { display: none !important; }

/* The theme's button and search rules come later with the same weight; its own variables carry our values:
   rounded size chips and cards, 46px chips with 17px text, a 50px submit button, a white search field. */
.lg-box__size { --btn-brd-radius: 8px; --btn-font-size: 17px; --btn-height: 46px; }
.lg-box__item { --btn-brd-radius: 14px; }
.lg-box__submit { --btn-height: 50px; --btn-font-size: 18px; }
.lg-box__search { --wd-form-bg: #fff; }
.lg-box .lg-box__search input { font-size: 17px; }
