/* ==========================================================================
   Commercial category landing sections — ECO-Fridge design.
   Colours/fonts come from the --efb-* tokens (blocks.css → theme --ef-*),
   so they follow Customizer → Global Colors.
   ========================================================================== */
.efbl {
	--efbl-brand: var(--efb-brand, var(--ef-brand, #1f821f));
	--efbl-brand-dark: var(--efb-brand-dark, #1b6f1b);
	--efbl-brand-light: var(--efb-brand-light, #81c784);
	--efbl-tint: #eef6ee;              /* light green surface */
	--efbl-text: var(--efb-text, #333);
	--efbl-muted: #6b7280;
	--efbl-border: var(--efb-border, #e5e7eb);
	--efbl-surface: #fafafa;
	--efbl-star: #f5a623;
	--efbl-no: #c62828;
	--efbl-radius: 4px;
	--efbl-gap: 3rem;
	--efbl-head: var(--efb-font-head, "Oswald", "Helvetica Neue", Arial, sans-serif);
}

.efbl-landing { clear: both; margin-top: var(--efbl-gap); }
/* flow-root: floated images inside a section stay inside it. */
.efbl-section { display: flow-root; clear: both; margin: 0 0 var(--efbl-gap); }
.efbl-section__title {
	margin: 0 0 1.25rem; padding: 0 0 10px;
	font-family: var(--efbl-head); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.25;
	text-transform: uppercase; letter-spacing: .02em; color: var(--efbl-text);
	border-bottom: 2px solid var(--efbl-border);
	position: relative;
}
.efbl-section__title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: var(--efbl-brand); }

/* ---------- Features ---------- */
.efbl-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(230px, calc((100% - 40px) / 3)), 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.efbl-feature {
	display: flex; flex-direction: column; margin: 0; padding: 24px 22px 22px;
	background: #fff; border: 1px solid var(--efbl-border); border-top: 3px solid var(--efbl-brand); border-radius: var(--efbl-radius);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.efbl-feature:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .08); border-color: var(--efbl-brand-light); border-top-color: var(--efbl-brand); }
.efbl-feature__icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin: 0 0 14px; color: var(--efbl-brand); background: var(--efbl-tint); border-radius: 50%; }
.efbl-feature__icon svg { display: block; width: 28px; height: 28px; }
.efbl-feature__title { margin: 0 0 8px; font-family: var(--efbl-head); font-size: 1.15rem; font-weight: 500; line-height: 1.3; text-transform: uppercase; letter-spacing: .02em; color: var(--efbl-text); }
.efbl-feature__text { font-size: .95rem; line-height: 1.6; }
.efbl-feature__text > :last-child { margin-bottom: 0; }
@media (max-width: 575px) {
	.efbl-features { grid-template-columns: 1fr; gap: 14px; }
	.efbl-feature { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; padding: 18px; }
	.efbl-feature__icon { flex: 0 0 46px; width: 46px; height: 46px; margin: 0; }
	.efbl-feature__title { flex: 1; margin: 0; }
	.efbl-feature__text { flex: 0 0 100%; margin-top: 10px; }
}

/* ---------- FAQ (same look as the site's "Warranty" toggle) ---------- */
.efbl-faq__item { margin: 0 0 10px; background: #fff; border: 1px solid var(--efbl-brand-light); border-radius: var(--efbl-radius); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.efbl-faq__item:hover { box-shadow: 0 6px 16px -10px rgba(0,0,0,.25); }
.efbl-faq__item[open] { border-color: var(--efbl-brand); box-shadow: 0 8px 20px -12px rgba(0,0,0,.3); }
.efbl-faq__q { display: block; padding: 14px 16px; cursor: pointer; list-style: none; }
.efbl-faq__q::-webkit-details-marker { display: none; }
.efbl-faq__q::marker { content: ""; }
.efbl-faq__q:hover, .efbl-faq__item[open] > .efbl-faq__q { background: var(--efbl-tint); }
.efbl-faq__q:focus-visible { outline: 2px solid var(--efbl-brand); outline-offset: -3px; }
.efbl-faq__title { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; font-family: var(--efbl-head); font-size: 1.05rem; font-weight: 500; line-height: 1.4; letter-spacing: .02em; color: var(--efbl-text); }
.efbl-faq__icon { position: relative; flex: 0 0 22px; width: 22px; height: 22px; color: var(--efbl-brand); }
.efbl-faq__icon::before, .efbl-faq__icon::after { content: ""; position: absolute; left: 4px; top: 50%; width: 14px; height: 3px; margin-top: -1.5px; background: currentColor; border-radius: 1px; }
.efbl-faq__icon::after { transform: rotate(90deg); transition: transform .3s, opacity .3s; }
.efbl-faq__item[open] > .efbl-faq__q .efbl-faq__icon::after { transform: rotate(0deg); opacity: 0; }
/* Padding on the inner box, so the slide animation can close the answer to zero height. */
.efbl-faq__a-inner { padding: 4px 16px 16px 50px; }
.efbl-faq__a-inner > :last-child { margin-bottom: 0; }
.efbl-faq__item.is-animating > .efbl-faq__a { overflow: hidden; transition: height .3s ease; }

/* ---------- Comparison table (same look as the product spec tables) ---------- */
.efbl-table-wrap { overflow-x: auto; border: 1px solid var(--efbl-brand-light); border-radius: var(--efbl-radius); }
.efbl-table-wrap:focus-visible { outline: 2px solid var(--efbl-brand); }
.efbl-table { width: 100%; margin: 0; border-collapse: collapse; border-style: hidden; font-size: .95rem; }
.efbl-table th, .efbl-table td { padding: 11px 14px; text-align: left; vertical-align: middle; border: 1px solid var(--efbl-border); }
.efbl-table thead th { background: var(--efbl-brand); color: #fff; font-family: var(--efbl-head); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.efbl-table tbody th { position: sticky; left: 0; z-index: 1; min-width: 9rem; background: var(--efbl-tint); font-weight: 700; }
.efbl-table tbody tr:nth-child(even) td { background: var(--efb-stripe, #f8f9fa); }
.efbl-table a { color: var(--efbl-brand); }
.efbl-yes, .efbl-no { font-weight: 700; font-size: 1.25em; line-height: 1; }
.efbl-yes { color: var(--efbl-brand); }
.efbl-no { color: var(--efbl-no); }

/* ---------- Related articles (blog cards) ---------- */
.efbl-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.efbl-article { margin: 0; }
.efbl-article__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none !important; background: #fff; border: 1px solid var(--efbl-brand-light); border-radius: var(--efbl-radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.efbl-article__link:hover, .efbl-article__link:focus-visible { transform: translateY(-4px); box-shadow: var(--ef-card-shadow-hover, 0 12px 26px rgba(0, 0, 0, .10)); border-color: var(--efbl-brand); }
.efbl-article__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; height: auto; margin: 0 !important; }
.efbl-article__img--empty { background: var(--efbl-surface); }
.efbl-article__body { display: flex; flex-direction: column; gap: .4rem; padding: 14px 16px 18px; }
.efbl-article__date { font-size: .8rem; color: var(--efbl-muted); text-transform: uppercase; letter-spacing: .04em; }
.efbl-article__title { font-family: var(--efbl-head); font-size: 1.05rem; font-weight: 500; line-height: 1.3; color: var(--efbl-text); }
.efbl-article__link:hover .efbl-article__title { color: var(--efbl-brand); }
.efbl-article__excerpt { font-size: .9rem; color: var(--efbl-muted); }

/* ---------- Related categories (same cards as the subcategory carousel) ---------- */
.efbl-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.efbl-cat { margin: 0; }
.efbl-cat__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none !important; background: #fff; border: 1px solid var(--efbl-border); border-radius: 6px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.efbl-cat__link:hover, .efbl-cat__link:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0, 0, 0, .10); border-color: var(--efbl-brand-light); }
.efbl-cat__img { display: block; width: 100%; height: 150px !important; object-fit: contain; margin: 0 !important; padding: 12px; background: #fff; }
.efbl-cat__name { display: block; padding: 12px 10px 4px; text-align: center; font-family: var(--efbl-head); font-size: .95rem; line-height: 1.3; color: var(--efbl-text); border-top: 1px solid var(--efbl-border); background: var(--efbl-surface); }
.efbl-cat__count { display: block; margin-top: auto; padding: 0 10px 12px; text-align: center; font-size: .8rem; color: var(--efbl-muted); background: var(--efbl-surface); }
.efbl-cat__link:hover .efbl-cat__name { color: var(--efbl-brand); }

/* ---------- Product carousel ("All products in this range", spare parts) ---------- */
.efbl-carousel { --efbl-per-view: 5; --efbl-card-gap: 16px; position: relative; margin: 0 0 1.25rem; }
.efbl-carousel__track {
	display: grid; grid-auto-flow: column; gap: var(--efbl-card-gap); margin: 0; padding: 4px 2px 12px; list-style: none;
	grid-auto-columns: calc((100% - (var(--efbl-per-view) - 1) * var(--efbl-card-gap)) / var(--efbl-per-view));
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin;
}
.efbl-card { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 12px; scroll-snap-align: start; background: #fff; border: 1px solid var(--efbl-border); border-radius: 6px; transition: box-shadow .2s, border-color .2s; }
.efbl-card:hover { border-color: var(--efbl-brand-light); box-shadow: 0 12px 26px rgba(0, 0, 0, .10); }
.efbl-card__link { display: flex; flex-direction: column; color: inherit; text-decoration: none !important; }
.efbl-card__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; margin: 0 0 10px; background: #fff; overflow: hidden; }
.efbl-card__img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; margin: 0 !important; }
.efbl-card__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(3 * 1.35em); font-family: var(--efbl-head); font-size: .95rem; line-height: 1.35; color: var(--efbl-text); }
.efbl-card__link:hover .efbl-card__title { color: var(--efbl-brand); }
.efbl-card__price { display: block; margin: 8px 0 10px; font-weight: 700; }
.efbl-card__price del { font-weight: 400; color: var(--efbl-muted); }
.efbl-card__buy { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-top: auto; }
.efbl-qty { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--efbl-border); border-radius: var(--efbl-radius); overflow: hidden; background: #fff; }
.efbl-qty__btn { width: 32px; padding: 0; color: var(--efbl-brand); font-size: 18px; font-weight: 700; line-height: 1; background: var(--efbl-tint); border: 0; cursor: pointer; }
.efbl-qty__btn:hover { background: var(--efbl-brand-light); color: #fff; }
.efbl-qty__btn:focus-visible, .efbl-qty__input:focus-visible { outline: 2px solid var(--efbl-brand); outline-offset: -2px; }
.efbl-qty__input { width: 42px; min-height: 38px; padding: 0; text-align: center; font-weight: 600; border: 0; -moz-appearance: textfield; appearance: textfield; }
.efbl-qty__input::-webkit-outer-spin-button, .efbl-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.efbl-card .efbl-card__add { flex: 1 1 90px; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin: 0; padding: 6px 10px; font-size: .85rem; line-height: 1.2; text-align: center; white-space: normal; }
.efbl-card__stock { flex: 0 0 100%; color: var(--efbl-no); font-size: .85rem; font-weight: 600; }
.efbl-card .added_to_cart { flex: 0 0 100%; font-size: .85rem; text-align: center; }
.efbl-carousel__nav {
	position: absolute; top: 38%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
	color: var(--efbl-text); font-size: 1.6rem; line-height: 1; background: #fff; border: 1px solid var(--efbl-border); border-radius: 50%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .10); cursor: pointer; transition: opacity .2s, color .2s;
}
.efbl-carousel__nav:hover:not(:disabled) { color: var(--efbl-brand); }
.efbl-carousel__nav[hidden] { display: none; }
.efbl-carousel__nav:disabled { opacity: .3; cursor: default; }
.efbl-carousel__nav--prev { left: -14px; }
.efbl-carousel__nav--next { right: -14px; }
.efbl-carousel__nav span { margin-top: -3px; }
@media (max-width: 1199px) { .efbl-carousel { --efbl-per-view: 4; } }
@media (max-width: 991px) { .efbl-carousel { --efbl-per-view: 3; } }
@media (max-width: 767px) {
	.efbl-carousel { --efbl-per-view: 2; --efbl-card-gap: 10px; }
	.efbl-card { padding: 8px; }
	.efbl-carousel__nav { width: 34px; height: 34px; font-size: 1.3rem; }
	.efbl-carousel__nav--prev { left: -6px; }
	.efbl-carousel__nav--next { right: -6px; }
}
@media (prefers-reduced-motion: reduce) {
	.efbl-carousel__track { scroll-behavior: auto; }
	.efbl-feature, .efbl-article__link, .efbl-cat__link { transition: none; }
	.efbl-feature:hover, .efbl-article__link:hover, .efbl-cat__link:hover { transform: none; }
}

/* ---------- Spare parts ---------- */
.efbl-parts__browse { margin: 0 0 .6rem; color: var(--efbl-muted); font-size: .92em; }
.efbl-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.efbl-chips li { margin: 0; }
.efbl-chip { display: inline-block; padding: 7px 18px; border-radius: 999px; background: var(--efbl-brand); color: #fff !important; font-family: var(--efbl-head); font-size: .9rem; letter-spacing: .02em; text-decoration: none !important; transition: background .2s; }
.efbl-chip:hover, .efbl-chip:focus-visible { background: var(--efbl-brand-dark); }
.efbl-chip--all { background: var(--efbl-text); }

/* ---------- Long description ---------- */
.efbl-long-desc > :last-child { margin-bottom: 0; }

/* ---------- Stars ---------- */
.efbl-stars { --efbl-rating: 0; position: relative; display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: .1em; font-family: Arial, sans-serif; white-space: nowrap; }
.efbl-stars::before { content: "★★★★★"; color: var(--efbl-border); }
.efbl-stars::after { content: "★★★★★"; position: absolute; top: 0; left: 0; overflow: hidden; width: calc(var(--efbl-rating) / 5 * 100%); color: var(--efbl-star); }

/* ---------- Reviews ---------- */
.efbl-reviews__summary { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 2rem; align-items: center; padding: 1.5rem; margin-bottom: 1.5rem; background: var(--efbl-tint); border-radius: var(--efbl-radius); }
.efbl-reviews__score { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.efbl-reviews__avg { font-family: var(--efbl-head); font-size: 3rem; font-weight: 500; line-height: 1; color: var(--efbl-text); }
.efbl-reviews__score .efbl-stars { font-size: 1.35rem; }
.efbl-reviews__count { color: var(--efbl-muted); font-size: .9em; }
.efbl-reviews__bars { display: grid; gap: .35rem; }
.efbl-bar { display: grid; grid-template-columns: 4.5rem 1fr 3rem; align-items: center; gap: .75rem; width: 100%; margin: 0; padding: .25rem .4rem; background: none !important; border: 1px solid transparent; border-radius: var(--efbl-radius); color: inherit !important; font: inherit; font-size: .9em; text-align: left; text-transform: none; letter-spacing: normal; cursor: pointer; box-shadow: none; }
.efbl-bar:hover:not(:disabled), .efbl-bar[aria-pressed="true"] { border-color: var(--efbl-brand-light); background: rgba(255, 255, 255, .7) !important; }
.efbl-bar[aria-pressed="true"] { font-weight: 700; }
.efbl-bar:disabled { cursor: default; opacity: .5; }
.efbl-bar:focus-visible { outline: 2px solid var(--efbl-brand); }
.efbl-bar__track { height: .55rem; background: var(--efbl-border); border-radius: 99px; overflow: hidden; }
.efbl-bar__fill { display: block; height: 100%; background: var(--efbl-star); }
.efbl-bar__n { text-align: right; color: var(--efbl-muted); }
.efbl-reviews__toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.efbl-reviews__status { margin: 0; color: var(--efbl-muted); font-size: .9em; }
.efbl-reviews__sort-label { display: flex; align-items: center; gap: .5rem; font-size: .9em; }
.efbl-reviews__sort { width: auto; }
.efbl-reviews__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; transition: opacity .2s; }
.efbl-reviews.is-loading .efbl-reviews__list { opacity: .5; }
.efbl-reviews__empty { grid-column: 1 / -1; color: var(--efbl-muted); }
.efbl-review { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: 1.25rem; background: #fff; border: 1px solid var(--efbl-border); border-radius: var(--efbl-radius); }
.efbl-review__product { display: flex; align-items: center; gap: .6rem; color: inherit; font-size: .85em; font-weight: 600; text-decoration: none !important; }
.efbl-review__product:hover span { color: var(--efbl-brand); }
.efbl-review__product img { flex: none; width: 48px !important; height: 48px !important; max-width: none; object-fit: contain; margin: 0 !important; border-radius: var(--efbl-radius); background: #fff; }
.efbl-review__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85em; color: var(--efbl-muted); }
.efbl-review__title { margin: 0; font-weight: 700; }
.efbl-review__text > :last-child { margin-bottom: 0; }
.efbl-review__author { margin: auto 0 0; font-size: .85em; font-weight: 600; }
.efbl-review__verified { margin-left: .35rem; font-weight: 400; color: var(--efbl-brand); }
.efbl-review__verified::before { content: "✓ "; }
.efbl-reviews__more { display: block; margin: 1.5rem auto 0; }
.efbl-reviews__more[hidden] { display: none; }

@media (max-width: 640px) {
	.efbl { --efbl-gap: 2rem; }
	.efbl-reviews__summary { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; }
	.efbl-reviews__list { grid-template-columns: 1fr; }
	.efbl-table td { white-space: nowrap; }
	.efbl-table th, .efbl-table td { padding: 10px 12px; }
	.efbl-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.efbl-cat__img { height: 120px !important; }
	.efbl-faq__a-inner { padding-left: 16px; }
}
