/*
 * Front-page rhythm and edges.
 *
 * The page was assembled from blocks that each carried their own padding,
 * their own inset and their own radius, so gaps ran from 72px to 200px and
 * content edges jumped between 36, 208 and 310px. This layer replaces that
 * with three tokens and one rule: every block spans the container, sits
 * --rb-gap below the previous one, and rounds its corners by --rb-radius.
 *
 * Loaded last because Elementor's per-element CSS and the earlier files in
 * this theme set the same properties.
 */

:root {
	--rb-gap: clamp(1.75rem, 3.2vw, 2.75rem);
	--rb-gap-tight: clamp(0.75rem, 1.6vw, 1.25rem);
	--rb-radius: clamp(14px, 1.8vw, 26px);
	--rb-edge: min(var(--wd-container-w, 1398px) - 30px, 100% - 30px);
}

/* --- Block spacing: margin below, no authored padding --------------------- */

.home .elementor-top-section.wd-negative-gap,
.home .elementor-inner-section.wd-negative-gap {
	padding-block: 0 !important;
	margin-block: 0 var(--rb-gap) !important;
}

/* Empty spacer rows that only existed to pull neighbours with negative margins. */
.home .elementor-element-8f2f4c0,
.home .elementor-element-b7678fb {
	display: none !important;
}

.home .elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
	padding-block: 0 !important;
}

.rb-hero {
	margin-block-end: var(--rb-gap);
	border-radius: var(--rb-radius);
}

/* Benefit strip: tight, it is a row of four short facts. */
.home .elementor-element-e0e29f3 {
	margin-block-end: var(--rb-gap-tight) !important;
}

/* The contact card keeps its own inner padding. */
.home .elementor-element-f479807.elementor-top-section {
	padding-block: clamp(1.25rem, 2.4vw, 1.75rem) !important;
	margin-block-end: var(--rb-gap) !important;
	border-radius: var(--rb-radius) !important;
}

/* --- One radius ----------------------------------------------------------- */

.home .elementor-element-c1d1892 .wd-banner,
.home .elementor-element-c1d1892 .banner-inner,
.home .elementor-element-c1d1892 img,
.home .elementor-element-1889c09,
.home .elementor-element-429db92 img {
	border-radius: var(--rb-radius);
}

.home .elementor-element-1889c09 {
	overflow: hidden;
}

/* --- Introductory headings: tighter, same rhythm everywhere --------------- */

.home .elementor-element-2d34afa .elementor-widget-heading,
.home .elementor-element-0e70451 .elementor-widget-heading {
	margin-block-end: 0.5rem !important;
}

.home .elementor-element-2d34afa .elementor-widget-text-editor,
.home .elementor-element-0e70451 .elementor-widget-text-editor {
	margin-block-end: var(--rb-gap-tight) !important;
}

/* --- Discounts: text and image share the container, no centred island ----- */

.home .elementor-element-57905ef > .elementor-container {
	align-items: center;
	gap: clamp(1.25rem, 4vw, 3rem);
}

.home .elementor-element-57905ef > .elementor-container {
	justify-content: space-between;
}

.home .elementor-element-57905ef > .elementor-container > .elementor-column {
	width: auto;
	min-width: 0;
}

.home .elementor-element-57905ef > .elementor-container > .elementor-column:first-child {
	flex: 1 1 0;
	max-width: 44rem;
}

@media (max-width: 767px) {
	.home .elementor-element-57905ef > .elementor-container {
		flex-direction: column;
		align-items: stretch;
	}

	.home .elementor-element-57905ef > .elementor-container > .elementor-column:first-child {
		flex: 0 0 auto;
		max-width: none;
	}

	.home .elementor-element-57905ef > .elementor-container > .elementor-column:last-child {
		flex: 0 0 auto;
		width: min(15rem, 100%);
	}
}

/* The photo exists at 300px wide only; stretching it wider would blur it. */
.home .elementor-element-57905ef > .elementor-container > .elementor-column:last-child {
	flex: 0 0 min(18.75rem, 40%);
}

.home .elementor-element-57905ef .elementor-widget-text-editor .elementor-widget-container {
	padding-inline: 0 !important;
}

.home .elementor-element-57905ef .wd-image,
.home .elementor-element-57905ef .elementor-widget-wd_image_or_svg .elementor-widget-container {
	width: 100%;
}

.home .elementor-element-57905ef .wd-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--rb-radius);
}

/* --- Image pair: a deliberate wide crop, not a 400px slab ----------------- */

.home .elementor-element-429db92 .elementor-widget-image img {
	display: block;
	width: 100%;
	aspect-ratio: 2.2 / 1;
	object-fit: cover;
}

/* --- Catalogue block: one panel across the container ----------------------- */

.rb-catalog {
	/* Sits inside Elementor's container already, which has the page edges. */
	width: 100%;
	margin-block-end: var(--rb-gap);
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid rgba(169, 128, 58, 0.22);
	border-radius: var(--rb-radius);
	background: #fffdf9;
}

.rb-catalog__inner {
	display: grid;
	grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.25rem, 3.5vw, 2.75rem);
	max-width: none;
}

.rb-catalog__cover {
	width: 100%;
}

.rb-catalog__body {
	max-width: 46rem;
}

.rb-catalog__facts {
	margin-block-end: 1.1rem;
}

.rb-catalog__title {
	margin-block-end: 0.5rem;
}

.rb-catalog p {
	margin-block-end: 0.75rem;
	line-height: 1.85;
}

.rb-catalog__also {
	max-width: none;
	margin-block-start: clamp(1.1rem, 2.4vw, 1.5rem);
	padding-block-start: clamp(0.9rem, 2vw, 1.25rem);
}

@media (max-width: 767px) {
	.rb-catalog__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.rb-catalog__cover {
		width: min(13rem, 100%);
		margin-inline: auto;
	}
}

/* --- Products: smaller tiles, buy control under the price ----------------- */

.rb-products {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--rb-gap-tight) clamp(0.75rem, 1.6vw, 1.25rem);
	margin-block: var(--rb-gap-tight);
}

/* Twelve rows of two would be long on a phone: show six. */
.rb-products__item:nth-child(n + 7) {
	display: none;
}

@media (min-width: 768px) {
	.rb-products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rb-products__item:nth-child(n + 7) {
		display: flex;
	}

	.rb-products__item:nth-child(n + 9) {
		display: none;
	}
}

@media (min-width: 1100px) {
	.rb-products {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.rb-products__item:nth-child(n + 9) {
		display: flex;
	}
}

.rb-products__item {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.rb-products__media {
	border-radius: calc(var(--rb-radius) * 0.6);
}

.rb-products__name {
	margin-block-start: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rb-products__buy {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-block-start: auto;
}

.rb-products__price {
	font-size: 0.85rem;
}

.rb-products__cart,
.rb-products__status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.25rem;
	padding: 0 0.9rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.rb-products__cart {
	border: 1px solid #d1ab66;
	background: #d1ab66;
	color: #2a1c0f;
	transition: background-color 200ms ease, border-color 200ms ease;
}

.rb-products__cart:hover,
.rb-products__cart:focus-visible {
	background: #c29a52;
	border-color: #c29a52;
	color: #2a1c0f;
}

.rb-products__cart:focus-visible {
	outline: 3px solid #d1ab66;
	outline-offset: 2px;
}

.rb-products__cart.loading {
	opacity: 0.6;
}

.rb-products__cart.added {
	background: transparent;
}

.rb-products__status {
	justify-content: flex-start;
	padding: 0;
	color: rgba(42, 28, 15, 0.55);
	font-weight: 600;
}

/* --- Closing text: two columns across the container ----------------------- */

.rb-intro {
	width: var(--rb-edge);
	margin-inline: auto;
	padding: var(--rb-gap) 0 0;
}

.rb-intro__inner {
	max-width: none;
	margin-inline: 0;
}

@media (min-width: 1000px) {
	/* Columns, not a grid: the FAQ heading, its links and its answers must stay together. */
	.rb-intro__inner {
		column-count: 2;
		column-gap: clamp(2rem, 5vw, 4.5rem);
	}

	.rb-intro__inner > * {
		break-inside: avoid;
	}

	.rb-intro__inner > h2,
	.rb-intro__inner > h3 {
		break-after: avoid;
	}
}

/*
 * Category tiles: the first tile sat indented by its own wrapper. Only the
 * horizontal padding goes: the other four tiles have no height of their own and
 * stretch to this column, so its vertical padding is what sets the row height.
 */
.home .elementor-element-884ea1b > .elementor-widget-wrap {
	padding-inline: 0 !important;
}

/* --- Promo banner: text start-aligned, button at the far end, no overlap --- */

.home .elementor-element-1889c09 .elementor-element-2287525 {
	text-align: start;
}

.home .elementor-element-1889c09 .elementor-element-1f5e777 > .elementor-widget-wrap {
	justify-content: flex-end;
	align-content: center;
}

.home .elementor-element-1889c09 .elementor-element-b577a95 {
	width: auto;
	margin-inline-start: auto;
}

/*
 * Elementor offsets an inner section's container by -10px to cancel the
 * column padding it expects; here the parent has none, so the content sat
 * 10px outside the page edge on phones and 10px inside it on desktop.
 */
.home .elementor-element-57905ef {
	padding-inline: 0 !important;
}

.home .elementor-element-57905ef > .elementor-container {
	margin-inline: 0;
}

.home .elementor-element-884ea1b > .elementor-widget-wrap {
	margin-inline: 0;
}

.home .elementor-element-57905ef .elementor-widget-wrap,
.home .elementor-element-0e70451 .elementor-widget-wrap {
	padding-inline: 0 !important;
}

/* Woodmart appends a "view cart" link after an ajax add; the header cart already shows it. */
.rb-products .added_to_cart {
	display: none;
}

/* --- Confectionery catalogue: big enough to see ---------------------------- */

.rb-catalog__also {
	align-items: center;
	gap: 1rem clamp(1.25rem, 3vw, 2rem);
}

.rb-catalog__also img {
	width: clamp(6rem, 11vw, 8.5rem);
	height: auto;
	aspect-ratio: 1;
	border-radius: calc(var(--rb-radius) * 0.5);
	box-shadow: 0 0.6rem 1.4rem rgba(42, 28, 15, 0.16);
}

.rb-catalog__also-text {
	font-size: clamp(1rem, 1.3vw, 1.125rem);
	line-height: 1.8;
}

.rb-catalog__also-cta {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 1.25rem;
	border: 1px solid rgba(169, 128, 58, 0.5);
	border-radius: 999px;
	transition: background-color 200ms ease;
}

.rb-catalog__also:hover .rb-catalog__also-cta,
.rb-catalog__also:focus-visible .rb-catalog__also-cta {
	background: rgba(209, 171, 102, 0.14);
	text-decoration: none;
}

/* --- Promo banner: room between the text and the card's edge ---------------- */

.home .elementor-top-section.elementor-element-1889c09.wd-negative-gap {
	padding-block: clamp(1.5rem, 3vw, 2.25rem) !important;
}

.home .elementor-element-1889c09 > .elementor-container {
	padding-inline: clamp(1.5rem, 4vw, 3rem);
}

.home .elementor-element-1889c09 .elementor-element-2287525 .elementor-widget-container,
.home .elementor-element-1889c09 .elementor-element-2287525 p {
	text-align: start !important;
}

/* --- Discounts: a compact enclosed panel, text and photo as one group ------- */

.home .elementor-inner-section.elementor-element-57905ef.wd-negative-gap {
	overflow: hidden;
	border: 1px solid rgba(169, 128, 58, 0.22);
	border-radius: var(--rb-radius);
	background: #fffdf9;
	padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2rem) !important;
}

/* Centred as a group, so the photo sits beside the text rather than at the far edge. */
.home .elementor-element-57905ef > .elementor-container {
	justify-content: center;
	align-items: center;
	gap: clamp(1.5rem, 4vw, 3rem);
}

.home .elementor-element-57905ef > .elementor-container > .elementor-column:first-child {
	flex: 0 1 36rem;
	max-width: 36rem;
}

/* The photo exists at 300px wide only: native width, cropped in height. */
.home .elementor-element-57905ef > .elementor-container > .elementor-column:last-child {
	flex: 0 0 min(18.75rem, 40%);
}

.home .elementor-element-57905ef .wd-image img {
	height: clamp(13rem, 17vw, 15.5rem);
	object-fit: cover;
	border-radius: calc(var(--rb-radius) * 0.7);
}

@media (max-width: 767px) {
	.home .elementor-element-57905ef > .elementor-container > .elementor-column:first-child {
		flex: 0 0 auto;
		max-width: none;
	}

	.home .elementor-element-57905ef > .elementor-container > .elementor-column:last-child {
		flex: 0 0 auto;
		width: 100%;
	}

	.home .elementor-element-57905ef .wd-image img {
		height: 13rem;
	}
}

/* --- Closing contact card: the end of the page, with room below it --------- */

.rb-closing {
	width: var(--rb-edge);
	margin-inline: auto;
	margin-block-start: var(--rb-gap);
	padding-block-end: var(--rb-gap);
}

.rb-closing .elementor-element-f479807 {
	margin-block-end: 0 !important;
}

/*
 * Category strip: the first tile is a different object from the other four.
 * Elementor gives it 16px side margins, asymmetric corners and a shadow, and a
 * floating text card that covers only its top part, so its photo looked cut
 * off with a sliver showing underneath. Here it is a full-bleed tile like its
 * neighbours, with the label sitting on a scrim at its foot, and the whole
 * strip is rounded once, on the outside.
 */
.home .elementor-element-5fd7f0e {
	overflow: hidden;
	border-radius: var(--rb-radius);
}

.home .elementor-element-884ea1b > .elementor-widget-wrap.elementor-element-populated {
	margin: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background-position: center !important;
}

.home .elementor-element-cf18619.elementor-absolute {
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
}

/* Static, so the label below positions against the tile itself, not a zero-height wrapper. */
.home .elementor-element-cf18619 .wd-cat,
.home .elementor-element-cf18619 .wd-cat-inner {
	position: static;
	border-radius: 0;
}

.home .elementor-element-cf18619 .wd-cat-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	padding: 1rem;
	text-align: center;
}

.home .elementor-element-cf18619 .wd-cat-content::before {
	inset: 0;
	border-radius: 0;
	background: linear-gradient(to top, rgba(14, 9, 5, 0.78) 0%, rgba(14, 9, 5, 0.35) 55%, rgba(14, 9, 5, 0) 100%);
}

/*
 * Phones: Elementor wraps the five tiles two to a row, and the last three have
 * no height of their own (they borrow it from the first tile), so they were
 * 1px slivers. Each tile gets a height, and the odd fifth spans the row.
 */
@media (max-width: 767px) {
	.home .elementor-element-5fd7f0e .elementor-column > .elementor-widget-wrap {
		min-height: 7rem;
	}

	.home .elementor-element-5fd7f0e > .elementor-container > .elementor-column:last-child {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

.home .elementor-element-2d34afa .elementor-widget-wrap {
	padding-inline: 0 !important;
}

/* Tablet/phone: the outer section pads 16px and the container pulls back 10px; none of it is needed. */
.home .elementor-element-2d34afa,
.home .elementor-element-5fd7f0e {
	padding-inline: 0 !important;
}

.home .elementor-element-2d34afa > .elementor-container,
.home .elementor-element-5fd7f0e > .elementor-container {
	margin-inline: 0;
}

/* Space after the label: translation drops the one the Persian text had. */
.rb-closing bdi {
	margin-inline-start: 0.3em;
}
