/**
 * OAS Commerce — landlord packages, the fridge card, the category pointer and the
 * request forms. Retail look to match the shop cards: bordered white cards, the
 * price in the brand red, two buttons. Reads the theme's brand tokens (--oas-*),
 * with fallbacks so it still renders under another theme.
 *
 * @author Selman Selman @ Engineered Leads
 */

/* Packages block */
.oasc-offers { margin: 0 0 clamp(28px, 4vw, 40px); padding: clamp(20px, 3vw, 28px); border: 1px solid var(--oas-border, #e3e4e8); border-radius: var(--oas-radius-lg, 18px); background: var(--oas-light, #f5f5f5); scroll-margin-top: calc(var(--oas-header-h, 68px) + 16px); }
.oasc-offers__head { margin: 0 0 18px; }
.oasc-offers__title { margin: 0; color: var(--oas-dark, #1a1a1a); font-size: var(--oas-step-2, 1.6rem); font-weight: 800; line-height: 1.15; }
.oasc-offers__bulk { margin: 8px 0 0; color: var(--oas-dark, #1a1a1a); font-size: 15px; font-weight: 600; }
.oasc-offers__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .oasc-offers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .oasc-offers__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.oasc-offer { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--oas-border, #e3e4e8); border-radius: var(--oas-radius, 10px); background: var(--oas-white, #fff); }
.oasc-offer--fridge { border-style: dashed; }
.oasc-offer__name { margin: 0; color: var(--oas-dark, #1a1a1a); font-size: 18px; font-weight: 800; line-height: 1.25; }
.oasc-offer__price { margin: 6px 0 0; color: var(--oas-primary, #c8102e); font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.oasc-offer__note { margin: 8px 0 0; color: var(--oas-grey, #6b7280); font-size: 14px; line-height: 1.45; }
.oasc-offer__includes { flex: 1 1 auto; margin: 12px 0 16px; padding: 0; list-style: none; font-size: 14px; line-height: 1.4; }
.oasc-offer__includes li { position: relative; padding: 3px 0 3px 22px; }
.oasc-offer__includes li::before { content: ""; position: absolute; top: 8px; left: 2px; width: 12px; height: 7px; border-bottom: 2px solid var(--oas-primary, #c8102e); border-left: 2px solid var(--oas-primary, #c8102e); transform: rotate(-45deg); }
/* Same height and type size as the product cards' Add to cart + View, stacked: the
   four cards across are too narrow for two buttons side by side. */
.oasc-offer__actions { display: grid; gap: 8px; }
.oasc-offer__actions .oas-btn { width: 100%; min-height: 44px; padding: 8px 10px; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.oasc-offer__actions .oas-btn:hover { transform: none; }

/* Under the products on the shop page. */
.oas-shop__results .oasc-offers { margin: clamp(28px, 4vw, 40px) 0 0; }

/* One-line pointer on category pages */
.oasc-pointer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 16px; padding: 10px 14px; border-left: 4px solid var(--oas-primary, #c8102e); border-radius: 0 var(--oas-radius, 10px) var(--oas-radius, 10px) 0; background: var(--oas-light, #f5f5f5); font-size: 14px; font-weight: 600; }
.oasc-pointer a { color: var(--oas-primary, #c8102e); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* Dialog */
.oasc-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: var(--oas-radius-lg, 18px); background: var(--oas-white, #fff); color: var(--oas-dark, #1a1a1a); box-shadow: 0 24px 64px rgba(0, 0, 0, .3); }
.oasc-dialog::backdrop { background: rgba(16, 18, 22, .55); }
.oasc-dialog__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--oas-border, #e3e4e8); background: var(--oas-white, #fff); }
.oasc-dialog__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.oasc-dialog__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.oasc-dialog__close:hover { background: var(--oas-light, #f5f5f5); }
.oasc-dialog__close:focus-visible { outline: 2px solid var(--oas-primary, #c8102e); outline-offset: 2px; }
.oasc-dialog .oasc-form { padding: 16px 20px 24px; }

/* Form */
.oasc-form__title { margin: 0 0 8px; font-size: var(--oas-step-2, 1.6rem); font-weight: 800; }
.oasc-fridge-page { max-width: 720px; }
.oasc-form__intro { margin: 0 0 16px; color: var(--oas-grey, #6b7280); font-size: 15px; line-height: 1.5; }
.oasc-form__group { margin: 0 0 18px; padding: 0; border: 0; }
.oasc-form__legend { margin: 0 0 10px; padding: 0; font-size: 16px; font-weight: 800; }
.oasc-form__hint { margin: -4px 0 10px; color: var(--oas-grey, #6b7280); font-size: 14px; }
.oasc-form__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
@media (min-width: 560px) {
	.oasc-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.oasc-form__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.oasc-form .oas-field { grid-column: auto; margin-bottom: 12px; }
.oasc-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.oasc-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.oasc-form__call { color: var(--oas-dark, #1a1a1a); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.oasc-form__fine { margin: 10px 0 0; color: var(--oas-grey, #6b7280); font-size: 13px; line-height: 1.45; }
.oasc-form__result { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--oas-radius, 10px); font-weight: 700; }
.oasc-form__result.is-ok { background: #e8f5ec; color: #14532d; }
.oasc-form__result.is-error { background: #fdecee; color: #8a0b20; }
.oasc-form.is-sent .oasc-form__group,
.oasc-form.is-sent .oasc-form__actions,
.oasc-form.is-sent .oasc-form__intro,
.oasc-form.is-sent .oasc-form__fine { display: none; }

/* Colour and unit toggles */
.oasc-segments { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.oasc-segment { position: relative; }
.oasc-segment input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.oasc-segment span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--oas-border, #e3e4e8); border-radius: 999px; background: var(--oas-white, #fff); font-weight: 700; }
.oasc-segment input:checked + span { border-color: var(--oas-dark, #1a1a1a); background: var(--oas-dark, #1a1a1a); color: var(--oas-white, #fff); }
.oasc-segment input:focus-visible + span { outline: 2px solid var(--oas-primary, #c8102e); outline-offset: 2px; }
.oasc-segments--small { margin-bottom: 10px; }
.oasc-segments--small span { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* Fridge styles with their prices */
.oasc-fridge-options { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.oasc-fridge-options [hidden] { display: none; }
.oasc-fridge-option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 14px 10px 44px; border: 1px solid var(--oas-border, #e3e4e8); border-radius: var(--oas-radius, 10px); background: var(--oas-white, #fff); cursor: pointer; }
.oasc-fridge-option input { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; margin: 0; transform: translateY(-50%); accent-color: var(--oas-primary, #c8102e); }
.oasc-fridge-option:has(input:checked) { border-color: var(--oas-primary, #c8102e); box-shadow: 0 0 0 1px var(--oas-primary, #c8102e); }
.oasc-fridge-option__name { font-weight: 700; line-height: 1.3; }
.oasc-fridge-option__name small { display: block; color: var(--oas-grey, #6b7280); font-size: 13px; font-weight: 400; }
.oasc-fridge-option__price { flex: none; color: var(--oas-primary, #c8102e); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.oasc-estimate { margin: 0; font-size: 16px; font-weight: 800; }
.oasc-estimate:empty { display: none; }
.oasc-fit { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.oasc-fit:empty { display: none; }
.oasc-fit.is-ok { color: #14532d; font-weight: 700; }
.oasc-fit.is-tight { padding: 10px 12px; border-radius: var(--oas-radius, 10px); background: #fff6e5; color: #7a4b00; font-weight: 700; }

/* Price board under the home page hero: the flyer, one tile per option */
.oasc-board { padding: clamp(28px, 5vw, 56px) 0; background: var(--oas-white, #fff); scroll-margin-top: calc(var(--oas-header-h, 68px) + 8px); }
.oasc-board__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0 0 20px; }
.oasc-board__title { flex: 1 1 100%; margin: 0; color: var(--oas-dark, #1a1a1a); font-size: var(--oas-step-3, 2rem); font-weight: 800; line-height: 1.1; }
.oasc-board__deal { margin: 0; color: var(--oas-dark, #1a1a1a); font-size: 16px; font-weight: 700; }
.oasc-board__call { color: var(--oas-primary, #c8102e); font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.oasc-board__group { margin: 0 0 22px; border: 1px solid var(--oas-border, #e3e4e8); border-radius: var(--oas-radius-lg, 18px); overflow: hidden; background: var(--oas-light, #f5f5f5); }
.oasc-board__group-title { margin: 0; padding: 12px 18px; background: var(--oas-dark, #1a1a1a); color: var(--oas-white, #fff); font-size: 20px; font-weight: 800; line-height: 1.2; }
.oasc-board__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 12px; list-style: none; }
@media (min-width: 640px) { .oasc-board__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .oasc-board__grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.oasc-board__grid > li { display: flex; }
.oasc-board__option { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; gap: 6px; padding: 10px 10px 12px; border: 1px solid var(--oas-border, #e3e4e8); border-radius: var(--oas-radius, 10px); background: var(--oas-white, #fff); color: var(--oas-dark, #1a1a1a); text-align: center; text-decoration: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.oasc-board__option:hover { border-color: var(--oas-primary, #c8102e); box-shadow: 0 4px 14px rgb(0 0 0 / 0.08); }
.oasc-board__option:focus-visible { outline: 2px solid var(--oas-primary, #c8102e); outline-offset: 2px; }
.oasc-board__media { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--oas-light, #f5f5f5); }
.oasc-board__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.oasc-board__media:has(.oasc-board__empty) { display: flex; align-items: center; justify-content: center; padding: 0.75rem; border: 1px dashed var(--oas-border, #d1d5db); }
.oasc-board__empty { font-size: 0.8rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--oas-grey, #6b7280); }
.oasc-board__name { flex: 1 1 auto; font-size: 15px; font-weight: 700; line-height: 1.25; }
.oasc-board__price { display: inline-block; padding: 4px 12px; border-radius: 6px; background: var(--oas-primary, #c8102e); color: var(--oas-white, #fff); font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.oasc-board__stock { color: var(--oas-grey, #6b7280); font-size: 13px; }
.oasc-board .oasc-offers { margin: 4px 0 0; }

/* Fridge card: every option with its price, each opening the request form */
.oasc-offer__more { flex: 1 1 auto; margin: 12px 0 16px; font-size: 14px; }
.oasc-offer__more summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--oas-primary, #c8102e); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.oasc-offer__more summary::-webkit-details-marker { display: none; }
.oasc-offer__more summary::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 150ms ease; }
.oasc-offer__more[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.oasc-offer__more summary:focus-visible { outline: 2px solid var(--oas-primary, #c8102e); outline-offset: 2px; }
.oasc-offer__prices { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; }
.oasc-offer__prices li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dotted var(--oas-border, #e3e4e8); }
.oasc-offer__price-row { padding: 6px 0; border: 0; background: none; color: var(--oas-dark, #1a1a1a); font: inherit; text-align: left; cursor: pointer; }
.oasc-offer__price-row:hover { color: var(--oas-primary, #c8102e); text-decoration: underline; }
.oasc-offer__price-row:focus-visible { outline: 2px solid var(--oas-primary, #c8102e); outline-offset: 2px; }
.oasc-offer__row-price { flex: none; color: var(--oas-primary, #c8102e); font-weight: 800; font-variant-numeric: tabular-nums; }

/* Phones: each price group and the package cards become one swipeable row instead of
   a tall stack, so the home page reaches the products without minutes of scrolling.
   Only the row scrolls sideways, never the page. */
@media (max-width: 639px) {
	.oasc-board__grid,
	.oasc-offers__grid { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 12px; scrollbar-width: thin; }
	.oasc-board__grid > li { flex: 0 0 42%; scroll-snap-align: start; }
	.oasc-offers__grid { margin: 0 calc(-1 * clamp(20px, 3vw, 28px)); padding: 0 clamp(20px, 3vw, 28px) 4px; scroll-padding: 0 clamp(20px, 3vw, 28px); }
	.oasc-offers__grid > li { flex: 0 0 78%; scroll-snap-align: start; }
	.oasc-board__option { padding: 8px 8px 10px; }
	.oasc-board__name { font-size: 14px; }
	.oasc-board__price { font-size: 17px; }
}
