/*
 * Khareedna Store Kit: styles for the lm-* section classes and the [lm_*]
 * shortcode output used on the site's Elementor pages.
 *
 * Ported from the previous theme's main.css, with its colour variables mapped
 * to Lumora's (--lumora-*), so the sections follow the current theme design.
 *
 * Scope: every selector starts with an lm-* class. Nothing else on the site
 * (header, footer, shop, product pages, other Elementor sections) is touched.
 * No !important: grid layout wins over Elementor's container flex by
 * specificity, and decorative defaults sit inside :where() so any value set
 * in the Elementor panel still overrides them.
 */

.lm-sec,
.lm-cat-grid,
.lm-products,
.lm-contact-cards,
.lm-faq-list,
.lm-policy,
.lm-table,
.lm-empty {
	--lm-primary: var(--lumora-primary, #0b6e63);
	--lm-on-primary: var(--lumora-on-primary, #fff);
	--lm-heading: var(--lumora-heading, #101726);
	--lm-text: var(--lumora-text, #1b2230);
	--lm-muted: var(--lumora-muted, #5a6573);
	--lm-surface: var(--lumora-bg, #fff);
	--lm-soft: var(--lumora-surface, #f2f5f4);
	--lm-border: var(--lumora-border, #d9e1de);
	--lm-radius: 16px;
}

/* Sections ---------------------------------------------------------------- */

:where(.lm-sec) {
	padding-block: clamp(24px, 4vw, 44px);
}

.lm-section-title.e-con,
.lm-section-title {
	align-items: center;
	text-align: center;
}

:where(.lm-section-title) {
	margin-bottom: 28px;
}

.lm-section-title > .elementor-widget {
	width: 100%;
}

:where(.lm-section-title) :where(p) {
	max-width: 60ch;
	margin-inline: auto;
	color: var(--lm-muted);
}

:where(.lm-section-title) :where(p:last-child) {
	margin-bottom: 0;
}

/* Grid helpers (class set on boxed or full-width containers) -------------- */

.e-con.lm-grid-4 > .e-con-inner,
.e-con.lm-grid-3 > .e-con-inner,
.e-con-full.lm-grid-4,
.e-con-full.lm-grid-3 {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: stretch;
}

.e-con.lm-grid-3 > .e-con-inner,
.e-con-full.lm-grid-3 {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 760px) {
	.e-con.lm-grid-3 > .e-con-inner,
	.e-con-full.lm-grid-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.e-con.lm-grid-4 > .e-con-inner,
	.e-con-full.lm-grid-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Grid children fill their cell instead of using Elementor's flex widths. */
.lm-grid-4 > .e-con-inner > .elementor-element,
.lm-grid-3 > .e-con-inner > .elementor-element,
.e-con-full.lm-grid-4 > .elementor-element,
.e-con-full.lm-grid-3 > .elementor-element {
	width: auto;
	max-width: none;
	min-width: 0;
	margin: 0;
}

/* Hero slider ------------------------------------------------------------- */

:where(.lm-hero-slider) {
	width: 100%;
	padding: 0;
}

:where(.lm-hero-slider) :where(.elementor-widget-image-carousel) {
	width: 100%;
}

:where(.lm-hero-slider) :where(.swiper-slide-image) {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
}

/* Benefit cards (Elementor Icon Box) -------------------------------------- */

:where(.lm-benefits) {
	background: transparent;
}

.lm-benefit {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	text-align: center;
}

:where(.lm-benefit) {
	padding: 22px 16px;
	border: 1px solid var(--lm-border);
	border-radius: var(--lm-radius);
	background: var(--lm-surface);
}

.lm-benefit .elementor-icon-box-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
}

.lm-benefit .elementor-icon-box-icon {
	display: flex;
	margin: 0 auto;
}

:where(.lm-benefit) :where(.elementor-icon) {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--lm-soft);
	color: var(--lm-primary);
	font-size: 24px;
	line-height: 1;
}

:where(.lm-benefit) :where(.elementor-icon svg) {
	width: 24px;
	height: 24px;
	fill: var(--lm-primary);
}

.lm-benefit .elementor-icon-box-content {
	width: 100%;
}

:where(.lm-benefit) :where(.elementor-icon-box-title) {
	margin: 0 0 4px;
	font-size: 1.05rem;
	line-height: 1.3;
}

:where(.lm-benefit) :where(.elementor-icon-box-description) {
	max-width: 30ch;
	margin: 0 auto;
	color: var(--lm-muted);
	font-size: 0.95rem;
}

@media (max-width: 899px) {
	:where(.lm-benefit) {
		padding: 18px 12px;
	}

	:where(.lm-benefit) :where(.elementor-icon-box-description) {
		font-size: 0.875rem;
	}
}

/* Promo banners: dark overlay keeps white text readable over any image ---- */

.lm-promo {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

:where(.lm-promo) {
	min-height: 220px;
	padding: 28px 24px;
	border-radius: 20px;
	background-color: var(--lm-heading);
	background-size: cover;
	color: #fff;
	justify-content: flex-end;
	gap: 10px;
}

.lm-promo::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(16, 23, 38, 0.88), rgba(16, 23, 38, 0.45));
}

:where(.lm-promo) :where(h2, h3, .elementor-heading-title) {
	margin: 0;
	color: #fff;
}

:where(.lm-promo) :where(p) {
	color: rgba(255, 255, 255, 0.88);
}

:where(.lm-promo) :where(p:last-child) {
	margin-bottom: 0;
}

/* How ordering works ------------------------------------------------------ */

.lm-step {
	position: relative;
	height: 100%;
}

:where(.lm-step) {
	padding: 24px 22px;
	border: 1px solid var(--lm-border);
	border-radius: var(--lm-radius);
	background: var(--lm-surface);
}

.lm-step-n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: var(--lumora-primary, #0b6e63);
	color: var(--lumora-on-primary, #fff);
	font-weight: 700;
}

:where(.lm-step) :where(h3) {
	margin: 0 0 6px;
	font-size: 1.1rem;
}

:where(.lm-step) :where(p) {
	max-width: 38ch;
	margin: 0;
	color: var(--lm-muted);
}

@media (min-width: 760px) {
	.lm-steps > .e-con-inner > .lm-step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 42px;
		right: -21px;
		width: 22px;
		border-top: 2px dashed var(--lumora-border, #d9e1de);
	}
}

/* FAQ --------------------------------------------------------------------- */

:where(.lm-faq) :where(.elementor-heading-title) {
	text-align: center;
}

.lm-faq-list {
	width: 100%;
	max-width: 820px;
	margin-inline: auto;
}

.lm-faq-item {
	margin-bottom: 10px;
	border: 1px solid var(--lm-border);
	border-radius: 12px;
	background: var(--lm-surface);
}

.lm-faq-item > summary {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	font-weight: 600;
	color: var(--lm-heading);
	list-style: none;
}

.lm-faq-item > summary::-webkit-details-marker {
	display: none;
}

.lm-faq-item > summary::after {
	content: "+";
	flex: none;
	font-size: 1.3em;
	line-height: 1;
	color: var(--lm-primary);
}

.lm-faq-item[open] > summary::after {
	content: "\2212";
}

.lm-faq-a {
	padding: 0 16px 14px;
	color: var(--lm-muted);
}

.lm-faq-a p {
	margin: 0 0 0.6em;
}

.lm-faq-a p:last-child {
	margin-bottom: 0;
}

/* Category tiles ---------------------------------------------------------- */

.lm-cat-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 100%;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

@media (min-width: 700px) {
	.lm-cat-grid {
		gap: 20px;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.lm-cat-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.lm-cat-grid li {
	margin: 0;
}

.lm-cat-grid a {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: var(--lm-radius);
	background: var(--lm-heading);
	color: #fff;
	text-decoration: none;
}

.lm-cat-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.9;
	transition: transform 0.4s;
}

.lm-cat-grid a:hover img {
	transform: scale(1.05);
}

.lm-cat-grid a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(16, 23, 38, 0.82));
}

.lm-cat-name,
.lm-cat-count {
	position: absolute;
	right: 14px;
	left: 14px;
	z-index: 2;
}

.lm-cat-name {
	bottom: 30px;
	font-family: var(--lumora-font-heading, inherit);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
}

.lm-cat-count {
	bottom: 12px;
	font-size: 0.8rem;
	opacity: 0.9;
}

/* Product sections and empty state ---------------------------------------- */

.lm-products {
	width: 100%;
}

.lm-empty {
	width: 100%;
	padding: 28px 20px;
	border: 1px dashed var(--lm-border);
	border-radius: 12px;
	background: var(--lm-soft);
	color: var(--lm-muted);
	text-align: center;
}

.lm-empty p {
	margin: 0 0 8px;
}

.lm-empty__link {
	font-weight: 600;
	color: var(--lm-primary);
}

/* Contact cards ----------------------------------------------------------- */

.lm-contact-cards {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.lm-contact-cards li {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--lm-border);
	border-radius: var(--lm-radius);
	background: var(--lm-surface);
	overflow-wrap: anywhere;
}

.lm-contact-cards .lm-ic {
	width: 28px;
	height: 28px;
	color: var(--lm-primary);
}

.lm-contact-cards strong {
	color: var(--lm-heading);
}

.lm-support-note {
	color: var(--lumora-muted, #5a6573);
}

/* Policy / about text and delivery table ---------------------------------- */

.lm-policy {
	max-width: 820px;
	line-height: 1.65;
}

.lm-policy h2 {
	margin-top: 1.6em;
	font-size: 1.4em;
}

.lm-policy > :first-child {
	margin-top: 0;
}

.lm-policy ul,
.lm-policy ol {
	padding-left: 1.3em;
}

.lm-lead {
	max-width: 60ch;
	font-size: 1.1em;
	color: var(--lumora-muted, #5a6573);
}

.lm-table {
	width: 100%;
	margin: 0 0 1em;
	border-collapse: collapse;
	border-radius: 12px;
	overflow: hidden;
	background: var(--lm-surface);
}

.lm-table th,
.lm-table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--lm-border);
	text-align: left;
}

.lm-table th {
	width: 38%;
	font-weight: 600;
}

.lm-checkout-note {
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--lumora-surface, #f2f5f4);
	color: var(--lumora-text, #1b2230);
}
