/* October client review: catalogue hierarchy, product media and language polish. */

/* Side cart must sit above every sticky header/category row. */
body.gotto-client-redesign .cart-widget-side {
	z-index: 1402 !important;
}

body.gotto-client-redesign .wd-close-side {
	z-index: 1401 !important;
}

body.gotto-client-redesign .woocommerce-notices-wrapper,
body.gotto-client-redesign .woocommerce-message {
	scroll-margin-top: 210px;
}

/* Sold and unavailable use the client's black, text-width pill labels. */
html body.gotto-client-redesign .product-labels .out-of-stock,
html body.gotto-client-redesign .gotto-product-labels .out-of-stock,
html body.gotto-client-redesign .product-labels .gotto-label-sold,
html body.gotto-client-redesign .gotto-product-labels .gotto-label-sold,
html body.gotto-client-redesign .gotto-loop-card .gotto-label-sold {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: max-content !important;
	min-width: max-content !important;
	max-width: none !important;
	height: auto !important;
	min-height: 0 !important;
	padding: 5px 12px !important;
	border-radius: 999px !important;
	border-color: #000 !important;
	background: #000 !important;
	color: #fff !important;
	line-height: 1.2 !important;
	white-space: nowrap !important;
	aspect-ratio: auto !important;
}

html body.gotto-client-redesign .product-labels .gotto-label-new,
html body.gotto-client-redesign .gotto-product-labels .gotto-label-new {
	background: #27813b !important;
	border-color: #27813b !important;
	color: #fff !important;
}

/* WoodMart limits round out-of-stock labels to 50px in the parent theme. */
html body.gotto-client-redesign .product-label.wd-shape-round.out-of-stock {
	max-width: none !important;
}

/* Full catalogue product media: show the photographed blue-cardboard boundary. */
body.gotto-client-redesign-home .site-content .wd-product .wd-loop-prod-thumb,
body.gotto-client-redesign-home .site-content .gotto-loop-card .wd-loop-prod-thumb,
body.gotto-client-redesign-home .site-content .wd-product .wd-product-img-link,
body.gotto-client-redesign-home .site-content .gotto-loop-card .wd-product-img-link {
	background: #f3ede2 !important;
}

body.gotto-client-redesign-home .site-content .wd-product .wd-product-img-link img,
body.gotto-client-redesign-home .site-content .gotto-loop-card .wd-product-img-link img,
body.gotto-client-redesign-home .site-content .gotto-client-featured .wd-product-img-link img,
body.gotto-client-redesign-home .site-content .gotto-client-accessory-products .wd-product-img-link img {
	width: 100% !important;
	height: 100% !important;
	padding: 8px !important;
	object-fit: contain !important;
	object-position: center !important;
	transform: none !important;
	scale: 1 !important;
}

body.gotto-client-redesign-home .site-content .wd-product:hover .wd-product-img-link img,
body.gotto-client-redesign-home .site-content .gotto-loop-card:hover .wd-product-img-link img,
body.gotto-client-redesign-home .site-content .wd-product-img-link:hover img {
	transform: none !important;
	scale: 1 !important;
}

/* Homepage category imagery is a consistent, filled rectangle on warm paper. */
body.gotto-client-redesign-home .gotto-client-category-card__image {
	display: grid !important;
	overflow: hidden !important;
	width: 100% !important;
	aspect-ratio: 4 / 3 !important;
	place-items: center;
	background: #f1eadf !important;
}

body.gotto-client-redesign-home .gotto-client-category-card__image img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center !important;
	transform: none !important;
}

/* Continents are navigation screens: countries only, alphabetically. */
html body.gotto-continent-archive .gotto-archive-body.e-con,
body.gotto-continent-archive .woocommerce-info.woocommerce-no-products-found,
body.gotto-continent-archive .wd-products-per-page,
body.gotto-continent-archive .woocommerce-pagination {
	display: none !important;
}

body.gotto-continent-archive .gotto-archive-category-tiles-widget:has(.gotto-archive-category-section) {
	margin-bottom: 0 !important;
}

/* Country pages show results first and their subdivisions afterwards. */
body.gotto-country-archive .gotto-archive-inner {
	display: flex !important;
	flex-direction: column !important;
}

body.gotto-country-archive .gotto-archive-heading {
	order: 1;
}

body.gotto-country-archive .gotto-archive-body {
	order: 2;
}

body.gotto-country-archive .gotto-archive-category-tiles-widget {
	order: 3;
	margin-top: 44px !important;
}

.gotto-country-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding: 9px 14px;
	border: 1px solid #d9c49e;
	border-radius: 999px;
	color: #82581d !important;
	background: #f5eee2;
	font: 700 11px/1.3 "Manrope", Arial, sans-serif;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* Flags remain visible even where the artwork itself contains white. */
.gotto-client-redesign-archive .gotto-archive-category-tile--country,
.gotto-client-redesign-archive .gotto-archive-category-tile--country .gotto-archive-category-tile__media {
	background: #eee5d8 !important;
}

.gotto-client-redesign-archive .gotto-archive-category-tile--country .gotto-archive-category-tile__media {
	padding: 10px !important;
}

.gotto-client-redesign-archive .gotto-archive-category-tile--country .gotto-archive-category-tile__media img {
	padding: 0 !important;
	border: 1px solid rgba(8, 42, 76, .14);
	object-fit: contain !important;
	box-shadow: 0 2px 8px rgba(8, 42, 76, .08);
}

/* Product tiles and controls form even rows across every catalogue archive. */
body.gotto-client-redesign-archive .gotto-archive-products .wd-products {
	align-items: stretch !important;
	grid-auto-rows: 1fr;
}

body.gotto-client-redesign-archive .gotto-archive-products .wd-products > .wd-product {
	display: flex !important;
	align-self: stretch !important;
	height: auto !important;
	min-height: 100% !important;
	flex-direction: column !important;
}

body.gotto-client-redesign-archive .gotto-archive-products .wd-product-wrapper,
body.gotto-client-redesign-archive .gotto-archive-products .gotto-loop-card {
	display: flex !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
}

body.gotto-client-redesign-archive .gotto-archive-products .gotto-loop-body {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
}

body.gotto-client-redesign-archive .gotto-archive-products .gotto-loop-commerce,
body.gotto-client-redesign-archive .gotto-archive-products .wd-product-footer {
	margin-top: auto !important;
}

/* Keep price, availability and actions together at the foot of every loop card. */
html body .gotto-loop-body > .wd-loop-prod-price {
	margin-top: auto !important;
	padding-top: 14px;
}
html body.gotto-client-redesign .gotto-loop-body > .gotto-loop-commerce,
html body.gotto-client-redesign-archive .gotto-archive-products .gotto-loop-commerce {
	margin-top: 12px !important;
}
html body .gotto-loop-body > .wd-loop-prod-stock-status {
	flex: 0 0 auto;
}
/* Standard WoodMart cards used by home grids and cross-sells. */
html body.gotto-client-redesign .wd-product .product-element-bottom {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}
html body.gotto-client-redesign .wd-product .product-element-bottom > .price {
	margin-top: auto !important;
	padding-top: 10px;
}

@media (max-width: 767px) {
	body.gotto-client-redesign .woocommerce-notices-wrapper,
	body.gotto-client-redesign .woocommerce-message {
		scroll-margin-top: 135px;
	}

	body.gotto-country-archive .gotto-archive-category-tiles-widget {
		margin-top: 28px !important;
	}

	.gotto-country-back-link {
		margin-bottom: 13px;
		font-size: 9px;
	}
}

/* October 14: spacious category artwork, not eight narrow cropped columns. */
html body.gotto-client-redesign-home .site-content .gotto-client-categories {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	grid-auto-rows: 1fr;
	gap: 24px !important;
	align-items: stretch !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card {
	height: auto !important;
	min-height: 0 !important;
	padding: 12px !important;
	gap: 0 !important;
	background: #f5f0e5 !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__image {
	aspect-ratio: 1 !important;
	flex: 0 0 auto !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: #f5f0e5 !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__image .elementor-widget-container,
html body.gotto-client-redesign-home .site-content .gotto-client-category-card__image a {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__image img {
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	padding: 0 !important;
	aspect-ratio: 1 !important;
	border: 0 !important;
	background: #f5f0e5 !important;
	object-fit: contain !important;
}

/* The coin artwork has a baked-in white margin; crop only that supplied artwork. */
html body.gotto-client-redesign-home .site-content .gotto-client-category-card__image img[src*="gotto-client-coins"] {
	transform: scale(1.205) translateX(-3.7%) !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__image img[src*="gotto-client-discounts"] {
	object-fit: cover !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__title {
	margin: 14px 0 0 !important;
	min-height: 2.6em !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__title .elementor-heading-title {
	font-size: 16px !important;
	line-height: 1.35 !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card__text {
	margin: 8px 0 12px !important;
	min-height: 0 !important;
}

html body.gotto-client-redesign-home .site-content .gotto-client-category-card .gotto-client-category-card__button {
	margin: auto 0 0 !important;
}

/* Every category selector, including all Hungarian banknote descendants. */
html body.gotto-client-redesign-archive .gotto-archive-category-tiles {
	align-items: stretch !important;
	grid-auto-rows: 1fr;
}

html body.gotto-client-redesign-archive .gotto-archive-category-tile {
	height: 100% !important;
	align-self: stretch !important;
}

html body.gotto-client-redesign-archive .gotto-archive-category-tile__media {
	flex-shrink: 0;
}

html body.gotto-client-redesign-archive .gotto-archive-category-tile__count {
	margin-top: auto !important;
	padding-top: 7px;
}

/* Category selection screens never render the archive results/filter container. */
html body.gotto-client-redesign-archive.gotto-category-selector-archive .gotto-archive-body.e-con,
html body.gotto-client-redesign-archive.gotto-category-selector-archive .gotto-archive-main,
html body.gotto-category-selector-archive .woocommerce-no-products-found {
	display: none !important;
}

html body.gotto-category-selector-archive .gotto-archive-category-tile--country .gotto-archive-category-tile__media {
	aspect-ratio: 1;
	height: auto !important;
}

html body.gotto-category-selector-archive .gotto-archive-category-tiles-widget {
	order: 2;
	margin-top: 0 !important;
}

html body.gotto-category-selector-archive .gotto-archive-category-section__aside,
html body.gotto-category-selector-archive .gotto-archive-category-tile__count {
	display: none;
}

/* Give the longer contact sentence its own wrapping row. */
@media (min-width: 1025px) {
	.gotto-reference-header__top-frame {
		flex-wrap: wrap;
		justify-content: center;
		gap: 0;
		padding-bottom: 8px;
	}
	.gotto-reference-header__contact {
		display: block;
		flex: 1 0 100%;
		min-height: 0;
		white-space: normal;
		text-align: center;
		font-size: 11px;
		line-height: 1.65;
	}
	.gotto-reference-header__contact a {
		display: inline;
		font-weight: 700;
		white-space: nowrap;
	}
}

.gotto-mobile-contact { display: none; }

@media (max-width: 1024px) {
	.gotto-mobile-contact {
		display: block;
		padding: 10px 16px;
		background: #f5f0e5;
		color: #18344e;
		font-size: 11px;
		line-height: 1.6;
		text-align: center;
	}
	.gotto-mobile-contact a { white-space: nowrap; font-weight: 700; }
}

@media (max-width: 767px) {
	html body.gotto-client-redesign-home .site-content .gotto-client-category-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}
	html body.gotto-client-redesign-home .site-content .gotto-client-category-card {
		padding: 9px !important;
	}
	html body.gotto-client-redesign-home .site-content .gotto-client-category-card__title .elementor-heading-title {
		font-size: 13px !important;
	}
}
