/*!
 * CODWO Pro 2.0 - storefront order form
 * Everything is driven by CSS custom properties set on .cep-wrapper
 */

.cep-wrapper {
	--cep-primary: #111827;
	--cep-btn-color: #fff;
	--cep-radius-sm: 8px;
	--cep-ease: cubic-bezier(.2, .8, .2, 1);
	--cep-success: #059669;
	--cep-danger: #dc2626;

	box-sizing: border-box;
	width: 100%;
	max-width: var(--cep-max-w, 100%);
	margin: 20px auto;
	font-family: var(--cep-font, inherit);
	line-height: 1.5;
	color: var(--cep-in-color, #111827);
	text-align: start;
	-webkit-font-smoothing: antialiased;
	animation: cepIn .45s var(--cep-ease) both;
}
.cep-wrapper *,
.cep-wrapper *::before,
.cep-wrapper *::after { box-sizing: border-box; }
.cep-wrapper [hidden] { display: none !important; }
.cep-wrapper button { font-family: inherit; }
.cep-wrapper svg { flex-shrink: 0; }

@keyframes cepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Countdown ---------- */
.cep-countdown {
	display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
	padding: 10px 14px; margin-bottom: 12px;
	background: var(--cep-cd-bg, #fef2f2); color: var(--cep-cd-color, #b91c1c);
	border-radius: var(--cep-card-radius, 16px);
	font-weight: 700; font-size: 14px;
}
.cep-cd-clock { display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; }
.cep-cd-clock b {
	display: inline-block; min-width: 34px; padding: 4px 6px; border-radius: 8px;
	background: var(--cep-cd-color, #b91c1c); color: #fff; text-align: center; font-size: 15px;
}

/* ---------- Title & price bar ---------- */
.cep-title-outside {
	margin: 0 0 10px; font-weight: 800; letter-spacing: -.01em;
	font-size: var(--cep-title-fs, 20px); color: var(--cep-title-color, #111827); line-height: 1.35;
}
.cep-price-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 18px; margin-bottom: 12px;
	background: var(--cep-pb-bg, #111827);
	border: var(--cep-pb-bw, 0) var(--cep-pb-bs, none) var(--cep-pb-bc, transparent);
	border-radius: var(--cep-card-radius, 16px);
	box-shadow: var(--cep-card-shadow);
}
.cep-pb-title {
	font-size: var(--cep-pb-title-fs, 15px); color: var(--cep-pb-title, #fff); font-weight: 700;
	overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cep-pb-prices { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.cep-pb-price { font-size: var(--cep-pb-price-fs, 20px); color: var(--cep-pb-price, #fff); font-weight: 800; }
.cep-pb-regular { font-size: calc(var(--cep-pb-price-fs, 20px) * .65); color: var(--cep-pb-price, #fff); opacity: .72; font-weight: 600; text-decoration-thickness: 1.5px; }
/* Layout 2: centered stacked */
.cep-pb-layout_2 { flex-direction: column; text-align: center; gap: 4px; }
/* Layout 3: outlined */
.cep-pb-layout_3 { background: var(--cep-card-bg, #fff); border: 2px dashed var(--cep-pb-bg, #111827); box-shadow: none; }
.cep-pb-layout_3 .cep-pb-title { color: var(--cep-title-color, #111827); }
.cep-pb-layout_3 .cep-pb-price,
.cep-pb-layout_3 .cep-pb-regular { color: var(--cep-pb-bg, #111827); }

/* ---------- Card ---------- */
.cep-card {
	position: relative;
	background: var(--cep-card-bg, #fff);
	border: var(--cep-card-bw, 1px) var(--cep-card-bs, solid) var(--cep-card-bc, #e5e7eb);
	border-radius: var(--cep-card-radius, 16px);
	padding: var(--cep-card-pad, 20px);
	box-shadow: var(--cep-card-shadow);
	margin: 0;
}
.cep-subtitle {
	text-align: center; font-weight: 700; margin: 0 0 16px;
	font-size: var(--cep-sub-fs, 14px); color: var(--cep-sub-color, #555);
	background: var(--cep-sub-bg, transparent); padding: 8px 12px; border-radius: 10px;
}
.cep-sub-plain .cep-subtitle { padding: 0; background: none; }
.cep-section-title {
	font-weight: 800; margin: 0 0 10px; line-height: 1.4;
}
.cep-urgency {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	margin: -4px 0 14px; padding: 8px 12px; border-radius: 10px;
	background: #fff7ed; color: #c2410c; font-weight: 700; font-size: 13px;
	animation: cepPulseSoft 2s ease-in-out infinite;
}
@keyframes cepPulseSoft { 50% { opacity: .75; } }

/* ---------- Variations ---------- */
.cep-variations {
	background: var(--cep-var-bg, transparent);
	border-radius: 14px; margin-bottom: 16px;
	display: flex; flex-direction: column; gap: 14px;
}
.cep-var-title { font-size: var(--cep-var-title-fs, 16px); color: var(--cep-var-title, #111827); margin: 0; }
.cep-var-preview img {
	width: var(--cep-var-prev, 72px); height: var(--cep-var-prev, 72px); object-fit: cover; display: block;
	border-radius: 12px; border: 2px solid var(--cep-pill-bc, #e5e7eb); box-shadow: 0 6px 18px rgba(0,0,0,.08);
	animation: cepIn .3s var(--cep-ease);
}
.cep-attr { min-width: 0; }

/* Attribute header: [step] Label  ·  selected value */
.cep-attr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 24px; }
.cep-attr-label { font-size: var(--cep-var-label-fs, 14px); color: var(--cep-var-label, #1f2937); font-weight: 800; }
.cep-attr-selected {
	font-size: calc(var(--cep-var-label-fs, 14px) - 1px); font-weight: 700; color: var(--cep-pill-on-bg, #111827);
	background: color-mix(in srgb, var(--cep-pill-on-bg, #111827) 9%, transparent);
	padding: 2px 10px; border-radius: 999px; line-height: 1.6;
}
.cep-attr-selected:empty { display: none; }
.cep-step { display: none; }
.cep-var-numbered .cep-step {
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; line-height: 1;
	background: var(--cep-pill-on-bg, #111827); color: var(--cep-pill-on-color, #fff);
}
.cep-attr.is-done .cep-step { background: var(--cep-success); }

/* Layouts */
.cep-var-layout-boxed .cep-attr {
	padding: 12px 14px 14px; border-radius: calc(var(--cep-card-radius, 16px) * .7);
	border: 1px solid var(--cep-pill-bc, #e5e7eb); background: color-mix(in srgb, var(--cep-in-bg, #f9fafb) 70%, transparent);
	transition: border-color .2s;
}
.cep-var-layout-boxed .cep-attr.is-done { border-color: color-mix(in srgb, var(--cep-pill-on-bc, #111827) 45%, var(--cep-pill-bc, #e5e7eb)); }
.cep-var-layout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.cep-var-layout-grid > .cep-var-title,
.cep-var-layout-grid > .cep-var-preview,
.cep-var-layout-grid > .cep-var-stock,
.cep-var-layout-grid > .cep-attr.is-wide { grid-column: 1 / -1; }

/* Options - base button */
.cep-attr-options { display: flex; flex-wrap: wrap; gap: 8px; }
.cep-opt {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 48px; margin: 0;
	padding: var(--cep-pill-py, 10px) var(--cep-pill-px, 18px);
	font-family: inherit; font-size: var(--cep-pill-fs, 14px); font-weight: 600; line-height: 1.2;
	color: var(--cep-pill-color, #374151); background: var(--cep-pill-bg, #fff);
	border: 1.5px solid var(--cep-pill-bc, #e5e7eb);
	border-radius: var(--cep-pill-radius, 10px);
	cursor: pointer; user-select: none; text-align: center;
	transition: transform .15s var(--cep-ease), background .15s, border-color .15s, color .15s, box-shadow .15s;
	box-shadow: none; text-transform: none; letter-spacing: normal;
}
.cep-opt:hover { border-color: var(--cep-pill-on-bc, #111827); transform: translateY(-1px); }
.cep-opt:focus-visible { outline: 2px solid var(--cep-pill-on-bc, #111827); outline-offset: 2px; }
.cep-opt.is-selected {
	background: var(--cep-pill-on-bg, #111827); color: var(--cep-pill-on-color, #fff);
	border-color: var(--cep-pill-on-bc, #111827);
	box-shadow: 0 4px 14px -4px var(--cep-pill-on-bg, #111827);
}
.cep-opt.is-disabled {
	background: var(--cep-pill-off-bg, #f3f4f6); color: var(--cep-pill-off-color, #9ca3af);
	border-color: transparent; cursor: not-allowed; transform: none; box-shadow: none; opacity: .8;
}
.cep-opt.is-disabled .cep-opt-name { text-decoration: line-through; }
.cep-opt.is-hidden { display: none; }
.cep-opt-diff { font-size: .78em; font-weight: 700; opacity: .7; white-space: nowrap; }
.cep-opt-diff .cep-cur { font-size: .9em; }
.cep-opt-oos { display: none; font-size: .72em; font-weight: 800; color: var(--cep-danger); white-space: nowrap; }
.cep-opt.is-disabled .cep-opt-oos { display: inline; }
.cep-opt.is-disabled .cep-opt-diff { display: none; }
.cep-opt-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--cep-sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex-shrink: 0; }
.cep-no-diff .cep-opt-diff { display: none; }
.cep-opt-radio, .cep-opt-dot { display: none; }
.cep-attr-style-radio .cep-opt-radio { display: inline-block; }
.cep-attr-style-radio .cep-opt-dot, .cep-attr-style-cards .cep-opt-dot { display: inline-block; }
.cep-single-col .cep-fields { grid-template-columns: 1fr; }
.cep-single-col .cep-var-layout-grid { grid-template-columns: 1fr; }

/* Shapes */
.cep-attr-style-squares .cep-opt { border-radius: 6px; min-width: 52px; }
.cep-attr-style-rounded .cep-opt { border-radius: 999px; }
.cep-attr-style-pills .cep-opt.is-disabled .cep-opt-oos,
.cep-attr-style-squares .cep-opt.is-disabled .cep-opt-oos,
.cep-attr-style-rounded .cep-opt.is-disabled .cep-opt-oos,
.cep-attr-style-segmented .cep-opt.is-disabled .cep-opt-oos { display: none; }

/* Segmented: one joined control */
.cep-attr-style-segmented .cep-attr-options {
	display: flex; flex-wrap: nowrap; gap: 0; overflow: hidden;
	border: 1.5px solid var(--cep-pill-bc, #e5e7eb); border-radius: var(--cep-pill-radius, 10px); background: var(--cep-pill-bg, #fff);
}
.cep-attr-style-segmented .cep-opt {
	flex: 1 1 0; min-width: 0; border: 0; border-radius: 0; box-shadow: none; transform: none;
	border-inline-start: 1px solid var(--cep-pill-bc, #e5e7eb); padding-inline: 8px; flex-direction: column; gap: 2px;
}
.cep-attr-style-segmented .cep-opt:first-child { border-inline-start: 0; }
.cep-attr-style-segmented .cep-opt:hover { background: color-mix(in srgb, var(--cep-pill-on-bg, #111827) 6%, var(--cep-pill-bg, #fff)); }
.cep-attr-style-segmented .cep-opt.is-selected { box-shadow: none; }
.cep-attr-style-segmented .cep-opt.is-disabled { background: var(--cep-pill-off-bg, #f3f4f6); }

/* Cards: grid of tiles with price */
.cep-attr-style-cards .cep-attr-options { display: grid; grid-template-columns: repeat(var(--cep-cols, 4), minmax(0, 1fr)); gap: 8px; }
.cep-attr-style-cards .cep-opt { flex-direction: column; padding: 14px 10px; gap: 4px; min-height: 64px; }
.cep-attr-style-cards .cep-opt-name { font-weight: 800; }
.cep-attr-style-cards .cep-opt.is-selected::after,
.cep-attr-style-image .cep-opt.is-selected::after {
	content: ""; position: absolute; top: 6px; inset-inline-end: 6px; width: 16px; height: 16px; border-radius: 50%;
	background: var(--cep-pill-on-color, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Radio list: full-width rows */
.cep-attr-style-radio .cep-attr-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cep-attr-style-radio .cep-opt {
	width: 100%; justify-content: flex-start; gap: 10px; padding: 12px 14px; text-align: start;
	border-radius: calc(var(--cep-pill-radius, 10px) + 2px); transform: none;
}
.cep-attr-style-radio .cep-opt:hover { transform: none; background: color-mix(in srgb, var(--cep-pill-on-bg, #111827) 4%, var(--cep-pill-bg, #fff)); }
.cep-attr-style-radio .cep-opt-name { flex: 1; }
.cep-opt-radio {
	width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; position: relative;
	border: 2px solid var(--cep-pill-bc, #d1d5db); background: #fff; transition: .15s;
}
.cep-attr-style-radio .cep-opt.is-selected {
	background: color-mix(in srgb, var(--cep-pill-on-bg, #111827) 7%, var(--cep-pill-bg, #fff));
	color: var(--cep-pill-color, #374151); border-color: var(--cep-pill-on-bc, #111827);
	box-shadow: 0 0 0 1px var(--cep-pill-on-bc, #111827);
}
.cep-attr-style-radio .cep-opt.is-selected .cep-opt-name { font-weight: 800; color: var(--cep-var-label, #111827); }
.cep-attr-style-radio .cep-opt.is-selected .cep-opt-radio { border-color: var(--cep-pill-on-bg, #111827); background: var(--cep-pill-on-bg, #111827); box-shadow: inset 0 0 0 4px #fff; }
.cep-attr-style-radio .cep-opt-diff { opacity: .85; }

/* Color swatches */
.cep-opt.cep-opt-swatch {
	width: var(--cep-swatch, 38px); height: var(--cep-swatch, 38px); min-width: 0; padding: 3px;
	border-radius: 50%; background: var(--cep-pill-bg, #fff); border: 2px solid var(--cep-pill-bc, #e5e7eb);
}
.cep-sw-dot { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--cep-sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.cep-opt-swatch.is-selected { background: var(--cep-pill-bg, #fff); border-color: var(--cep-pill-on-bc, #111827); box-shadow: 0 0 0 2px var(--cep-card-bg, #fff), 0 0 0 4px var(--cep-pill-on-bc, #111827); }
.cep-opt-swatch.is-disabled { opacity: .35; background: var(--cep-pill-bg, #fff); }
.cep-opt-swatch.is-disabled::after { content: ""; position: absolute; inset: 45% -2px auto; height: 2px; background: var(--cep-pill-off-color, #9ca3af); transform: rotate(-45deg); }
.cep-tip {
	position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
	padding: 4px 8px; border-radius: 6px; background: #111827; color: #fff; font-size: 11px; white-space: nowrap;
	opacity: 0; pointer-events: none; transition: .15s; z-index: 5;
}
.cep-opt-swatch:hover .cep-tip { opacity: 1; transform: translateX(-50%); }

/* Image tiles */
.cep-attr-style-image .cep-attr-options { display: grid; grid-template-columns: repeat(var(--cep-cols, 4), minmax(0, 1fr)); gap: 8px; }
.cep-opt.cep-opt-image { flex-direction: column; gap: 6px; padding: 5px 5px 8px; min-width: 0; border-radius: calc(var(--cep-pill-radius, 10px) + 2px); }
.cep-opt-media { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--cep-pill-radius, 10px); overflow: hidden; background: var(--cep-pill-off-bg, #f3f4f6); }
.cep-opt-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cep-opt-media .cep-sw-dot { border-radius: 0; }
.cep-opt-image .cep-opt-name { font-size: .88em; font-weight: 700; line-height: 1.25; }
.cep-opt-image.is-selected { background: var(--cep-pill-bg, #fff); color: var(--cep-pill-color, #374151); box-shadow: 0 0 0 2px var(--cep-pill-on-bc, #111827); }
.cep-opt-image.is-selected::after { background-color: var(--cep-pill-on-bg, #111827); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); top: 10px; inset-inline-end: 10px; }
.cep-opt-image.is-disabled { opacity: .45; }
.cep-opt-image.is-disabled .cep-opt-media { filter: grayscale(1); }

.cep-var-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-top: -4px; }
.cep-var-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.cep-var-stock.is-in { color: var(--cep-success); }
.cep-var-stock.is-low { color: #ea580c; }
.cep-var-stock.is-out { color: var(--cep-danger); }
.cep-variations.has-error .cep-attr:not(.is-done) .cep-attr-options,
.cep-variations.has-error .cep-attr:not(.is-done) .cep-select-wrap { animation: cepShake .4s; }
.cep-variations.has-error .cep-attr:not(.is-done) .cep-attr-label { color: var(--cep-danger); }
.cep-variations.has-error .cep-attr:not(.is-done) .cep-opt:not(.is-disabled) { border-color: color-mix(in srgb, var(--cep-danger) 60%, var(--cep-pill-bc, #e5e7eb)); }

/* ---------- Fields ---------- */
.cep-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cep-field { min-width: 0; }
.cep-field.is-full { grid-column: 1 / -1; }
.cep-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--cep-var-label, #374151); }
.cep-label i { color: var(--cep-danger); font-style: normal; }
.cep-field-wrap { position: relative; }
.cep-field-ico {
	position: absolute; top: calc(var(--cep-in-h, 50px) / 2); inset-inline-start: 14px; transform: translateY(-50%);
	color: var(--cep-icon, #9ca3af); pointer-events: none; transition: color .15s; z-index: 1;
}
.cep-wrapper .cep-input {
	display: block; width: 100%; height: var(--cep-in-h, 50px); margin: 0;
	padding: 0 14px; padding-inline-start: 44px;
	font-family: inherit; font-size: var(--cep-in-fs, 14px); font-weight: 500;
	color: var(--cep-in-color, #111827); background: var(--cep-in-bg, #f9fafb);
	border: var(--cep-in-bw, 1px) var(--cep-in-bs, solid) var(--cep-in-bc, #e5e7eb);
	border-radius: var(--cep-in-radius, 12px);
	box-shadow: none; outline: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
	-webkit-appearance: none; appearance: none; line-height: normal;
}
.cep-no-icons .cep-input { padding-inline-start: 14px; }
.cep-no-icons .cep-field-ico { display: none; }
.cep-wrapper textarea.cep-input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.cep-wrapper .cep-input::placeholder { color: var(--cep-in-ph, #6b7280); opacity: 1; }
.cep-wrapper .cep-input:focus {
	border-color: var(--cep-in-focus, #111827); background: var(--cep-card-bg, #fff);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--cep-in-focus, #111827) 14%, transparent);
}
.cep-field-wrap:focus-within .cep-field-ico { color: var(--cep-in-focus, #111827); }
/* Phone inputs are LTR (digits) even inside RTL forms: use physical padding. */
.cep-wrapper[dir="rtl"] input[type="tel"].cep-input { text-align: right; padding-left: 14px; padding-right: 44px; }
.cep-wrapper[dir="rtl"].cep-no-icons input[type="tel"].cep-input { padding-right: 14px; }
.cep-wrapper[dir="rtl"] input[type="tel"].cep-input::placeholder { text-align: right; direction: rtl; }
.cep-wrapper[dir="ltr"] input[type="tel"].cep-input { text-align: left; }
.cep-select-wrap select.cep-input { padding-inline-end: 40px; cursor: pointer; }
.cep-select-wrap select.cep-input:disabled { opacity: .6; cursor: not-allowed; }
.cep-select-arrow {
	position: absolute; top: 50%; inset-inline-end: 14px; transform: translateY(-50%);
	color: var(--cep-icon, #9ca3af); pointer-events: none; display: flex;
}
.cep-attr .cep-select-wrap select.cep-input { padding-inline-start: 14px; }

/* Floating labels */
.cep-labels-floating .cep-float {
	position: absolute; top: calc(var(--cep-in-h, 50px) / 2); inset-inline-start: 44px; transform: translateY(-50%);
	font-size: var(--cep-in-fs, 14px); color: var(--cep-in-ph, #6b7280); pointer-events: none;
	transition: .15s var(--cep-ease); background: transparent; padding: 0 4px; line-height: 1;
}
.cep-labels-floating.cep-no-icons .cep-float { inset-inline-start: 12px; }
.cep-labels-floating .is-textarea .cep-float { top: 22px; inset-inline-start: 12px; }
.cep-labels-floating .cep-input:focus + .cep-float,
.cep-labels-floating .cep-input:not(:placeholder-shown) + .cep-float {
	top: 0; font-size: 11px; font-weight: 700; color: var(--cep-in-focus, #111827);
	background: var(--cep-card-bg, #fff); border-radius: 4px;
}

/* Errors */
.cep-field.has-error .cep-input { border-color: var(--cep-danger) !important; background: #fef2f2; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.cep-field.has-error .cep-field-ico { color: var(--cep-danger); }
.cep-error {
	display: flex; align-items: center; gap: 4px; margin: 6px 2px 2px;
	font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--cep-danger); animation: cepIn .2s;
}
.cep-field.is-valid .cep-input { border-color: color-mix(in srgb, var(--cep-success) 55%, var(--cep-in-bc, #e5e7eb)); }
@keyframes cepShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- Offers ---------- */
.cep-offers { margin-bottom: 16px; }
.cep-off-title {
	font-size: var(--cep-off-title-fs, 16px); color: var(--cep-off-title, #111827);
	background: var(--cep-off-title-bg, transparent); border-radius: 8px;
}
.cep-offer-list { display: flex; flex-direction: column; gap: 10px; }
.cep-offer {
	position: relative; display: flex; align-items: center; gap: 12px; margin: 0;
	padding: 14px 16px; cursor: pointer;
	background: var(--cep-off-bg, #fff); color: var(--cep-off-color, #111827);
	border: var(--cep-off-bw, 1px) var(--cep-off-bs, solid) var(--cep-off-bc, #e5e7eb);
	border-radius: calc(var(--cep-card-radius, 16px) * .75);
	font-size: var(--cep-off-fs, 14px);
	transition: border-color .15s, background .15s, box-shadow .2s, transform .15s var(--cep-ease);
}
.cep-offer:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(16,24,40,.25); }
.cep-offer input { position: absolute; opacity: 0; pointer-events: none; }
.cep-offer-radio {
	width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
	border: 2px solid var(--cep-off-bc, #d1d5db); background: #fff; position: relative; transition: .15s;
}
.cep-offer.is-active {
	background: var(--cep-off-on-bg, #fff7ed); border-color: var(--cep-off-on-bc, #f97316);
	box-shadow: 0 0 0 1px var(--cep-off-on-bc, #f97316), 0 10px 24px -14px var(--cep-off-on-bc, #f97316);
}
.cep-offer.is-active .cep-offer-radio { border-color: var(--cep-off-on-bc, #f97316); background: var(--cep-off-on-bc, #f97316); box-shadow: inset 0 0 0 4px #fff; }
.cep-offer input:focus-visible + .cep-offer-radio { outline: 2px solid var(--cep-off-on-bc, #f97316); outline-offset: 2px; }
.cep-offer-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cep-offer-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cep-offer-label { font-weight: 800; line-height: 1.35; }
.cep-offer-badge {
	display: inline-block; padding: 2px 9px; border-radius: 999px;
	background: var(--cep-off-badge-bg, #ef4444); color: var(--cep-off-badge-color, #fff);
	font-size: 11px; font-weight: 800; line-height: 1.6; letter-spacing: .01em;
}
.cep-offer:first-child .cep-offer-badge { animation: none; }
.cep-offer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cep-offer-tags:empty { display: none; }
.cep-offer-save {
	padding: 2px 8px; border-radius: 6px; background: var(--cep-off-save-bg, #10b981); color: var(--cep-off-save-color, #fff);
	font-size: var(--cep-off-save-fs, 11px); font-weight: 800; line-height: 1.6;
}
.cep-offer-ship {
	display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px;
	background: #ecfdf5; color: #047857; font-size: var(--cep-off-save-fs, 11px); font-weight: 800; line-height: 1.6;
}
.cep-offer-prices { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; text-align: end; }
.cep-offer-total { font-weight: 800; font-size: 1.08em; }
.cep-offer-old { font-size: .82em; opacity: .55; }

/* ---------- Summary ---------- */
.cep-summary {
	border: var(--cep-sum-bw, 1px) var(--cep-sum-bs, solid) var(--cep-sum-bc, #e5e7eb);
	border-radius: calc(var(--cep-card-radius, 16px) * .75); overflow: hidden; margin-bottom: 16px;
	background: var(--cep-sum-bg, #fff);
}
.cep-wrapper .cep-summary-toggle {
	display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 12px 16px;
	background: var(--cep-sum-head-bg, #f9fafb); color: var(--cep-sum-head-color, #111827);
	font-size: var(--cep-sum-head-fs, 14px); font-weight: 800; border: 0; border-radius: 0; cursor: pointer; text-align: start;
	box-shadow: none; text-transform: none; letter-spacing: normal; line-height: 1.4; min-height: 0;
}
.cep-summary-head { display: inline-flex; align-items: center; gap: 8px; flex: 1; }
.cep-summary-head-total { font-weight: 800; transition: opacity .2s; }
.cep-summary.is-open .cep-summary-head-total { opacity: 0; }
.cep-summary-arrow { display: flex; color: var(--cep-sum-arrow, #6b7280); transition: transform .25s var(--cep-ease); }
.cep-summary-arrow svg { width: var(--cep-sum-arrow-s, 20px); height: var(--cep-sum-arrow-s, 20px); }
.cep-summary.is-open .cep-summary-arrow { transform: rotate(180deg); }
.cep-summary-body {
	max-height: 0; overflow: hidden; transition: max-height .35s var(--cep-ease);
	color: var(--cep-sum-color, #374151); font-size: var(--cep-sum-fs, 13px);
}
.cep-summary.is-open .cep-summary-body { max-height: 420px; }
.cep-sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid color-mix(in srgb, var(--cep-sum-bc, #e5e7eb) 70%, transparent); }
.cep-sum-product { align-items: flex-start; }
.cep-sum-pname { display: flex; flex-direction: column; min-width: 0; }
.cep-sum-pt { font-weight: 700; color: var(--cep-sum-head-color, #111827); }
.cep-sum-var { opacity: .75; font-size: .92em; }
.cep-sum-pq { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cep-sum-qty { padding: 2px 8px; border-radius: 6px; background: var(--cep-sum-qty-bg, #f3f4f6); color: var(--cep-sum-qty-color, #374151); font-weight: 800; font-size: .92em; }
.cep-sum-price { font-weight: 700; color: var(--cep-sum-price, #111827); }
.cep-sum-discount span:last-child { color: var(--cep-success); font-weight: 800; }
.cep-sum-total {
	font-size: 1.18em; font-weight: 800; color: var(--cep-sum-total, #111827);
	border-top: 1.5px dashed var(--cep-sum-bc, #e5e7eb); padding-top: 12px; padding-bottom: 12px;
}
.cep-flash { animation: cepFlash .5s var(--cep-ease); }
@keyframes cepFlash { 40% { transform: scale(1.08); } }

/* ---------- Actions ---------- */
.cep-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cep-alert {
	display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; padding: 12px 14px; border-radius: 10px;
	background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-size: 13px; font-weight: 600; animation: cepIn .2s;
}
.cep-actions { display: flex; gap: 10px; align-items: stretch; }
.cep-qty {
	display: flex; align-items: stretch; flex-shrink: 0; overflow: hidden;
	height: var(--cep-btn-h, 56px);
	background: var(--cep-qty-bg, #fff); border: 1px solid var(--cep-qty-bc, #e5e7eb); border-radius: var(--cep-qty-radius, 12px);
}
.cep-wrapper .cep-qty-btn {
	width: 40px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0;
	background: var(--cep-qty-btn-bg, #f3f4f6); color: var(--cep-qty-btn-color, #374151); border: 0; border-radius: 0; cursor: pointer;
	transition: filter .15s; box-shadow: none; min-height: 0;
}
.cep-qty-btn:hover { filter: brightness(.95); }
.cep-wrapper .cep-qty-input {
	width: 44px; height: auto; border: 0; margin: 0; padding: 0; text-align: center; background: transparent;
	font-weight: 800; font-size: 16px; color: var(--cep-in-color, #111827); -moz-appearance: textfield; box-shadow: none;
}
.cep-qty-input::-webkit-outer-spin-button,
.cep-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cep-wrapper .cep-submit {
	position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
	min-height: var(--cep-btn-h, 56px); margin: 0; padding: 8px 18px;
	background: var(--cep-primary, #111827); color: var(--cep-btn-color, #fff);
	border: var(--cep-btn-bw, 0) var(--cep-btn-bs, none) var(--cep-btn-bc, transparent);
	border-radius: var(--cep-btn-radius, 12px);
	font-size: var(--cep-btn-fs, 18px); font-weight: 800; line-height: 1.2; cursor: pointer; overflow: hidden;
	box-shadow: 0 10px 24px -10px var(--cep-primary, #111827);
	transition: transform .15s var(--cep-ease), box-shadow .2s, filter .2s;
	text-transform: none; letter-spacing: normal; isolation: isolate;
}
.cep-submit:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 30px -12px var(--cep-primary, #111827); }
.cep-submit:active { transform: translateY(0) scale(.98); }
.cep-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--cep-primary) 40%, transparent); outline-offset: 3px; }
.cep-submit-inner { display: inline-flex; align-items: center; gap: 10px; transition: opacity .2s; }
.cep-submit-texts { display: flex; flex-direction: column; align-items: center; }
.cep-submit-sub { font-size: 12px; font-weight: 600; opacity: .85; margin-top: 2px; }
.cep-spinner {
	position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; border-radius: 50%;
	border: 3px solid color-mix(in srgb, var(--cep-btn-color, #fff) 35%, transparent); border-top-color: var(--cep-btn-color, #fff);
	opacity: 0; transition: opacity .2s; animation: cepSpin .7s linear infinite;
}
.cep-submit.is-loading { pointer-events: none; }
.cep-submit.is-loading .cep-submit-inner { opacity: 0; }
.cep-submit.is-loading .cep-spinner { opacity: 1; }
@keyframes cepSpin { to { transform: rotate(360deg); } }

/* Button animations */
.cep-btn-anim-pulse .cep-submit:not(.is-loading) { animation: cepPulse 2.2s infinite; }
@keyframes cepPulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cep-primary) 45%, transparent); }
	70% { box-shadow: 0 0 0 14px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}
.cep-btn-anim-shake .cep-submit:not(.is-loading) { animation: cepShakeBtn 4s infinite; }
@keyframes cepShakeBtn { 0%, 88%, 100% { transform: none; } 90%, 94%, 98% { transform: rotate(-2deg); } 92%, 96% { transform: rotate(2deg); } }
.cep-btn-anim-bounce .cep-submit:not(.is-loading) { animation: cepBounce 2.4s infinite; }
@keyframes cepBounce { 0%, 80%, 100% { transform: none; } 88% { transform: translateY(-5px); } 94% { transform: translateY(0); } 97% { transform: translateY(-2px); } }
.cep-btn-anim-shine .cep-submit::after {
	content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
	animation: cepShine 3s infinite;
}
@keyframes cepShine { 0% { left: -60%; } 40%, 100% { left: 120%; } }

/* ---------- Guarantees ---------- */
.cep-guarantees {
	display: grid; grid-template-columns: repeat(var(--cep-g-cols, 3), minmax(0, 1fr)); gap: 8px;
	margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--cep-card-bc, #e5e7eb);
}
.cep-g-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.cep-g-icon {
	display: flex; align-items: center; justify-content: center;
	width: calc(var(--cep-g-icon-s, 28px) + 16px); height: calc(var(--cep-g-icon-s, 28px) + 16px); border-radius: 50%;
	background: color-mix(in srgb, var(--cep-g-icon, #111827) 8%, transparent); color: var(--cep-g-icon, #111827);
}
.cep-g-icon svg { width: calc(var(--cep-g-icon-s, 28px) * .8); height: calc(var(--cep-g-icon-s, 28px) * .8); }
.cep-g-icon img { width: var(--cep-g-icon-s, 28px); height: var(--cep-g-icon-s, 28px); object-fit: contain; }
.cep-g-text { font-size: var(--cep-g-fs, 12px); color: var(--cep-g-color, #4b5563); font-weight: 700; line-height: 1.35; }

/* ---------- Success modal ---------- */
.cep-modal {
	position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 20px;
	background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); animation: cepFade .2s;
}
@keyframes cepFade { from { opacity: 0; } }
.cep-modal-box {
	width: 100%; max-width: 400px; padding: 32px 24px 24px; border-radius: 22px; background: #fff; text-align: center;
	box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); animation: cepPop .35s var(--cep-ease);
}
@keyframes cepPop { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.cep-modal-icon {
	width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: #dcfce7; color: #16a34a; box-shadow: 0 0 0 10px #f0fdf4;
}
.cep-modal-box h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: #111827; }
.cep-modal-box p { margin: 0 0 12px; color: #4b5563; font-size: 14px; }
.cep-modal-order { margin-bottom: 16px; font-weight: 700; color: #111827; font-size: 13px; }
.cep-modal-order:empty { display: none; }
.cep-wrapper .cep-modal-close {
	width: 100%; height: 48px; border: 0; border-radius: 12px; background: var(--cep-primary, #111827); color: var(--cep-btn-color, #fff);
	font-size: 15px; font-weight: 800; cursor: pointer; margin: 0;
}

/* ---------- Sticky bar ---------- */
.cep-sticky {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99998;
	font-family: var(--cep-font, inherit);
	background: var(--cep-sb-bg, #fff); color: var(--cep-sb-color, #111827);
	transform: translateY(120%); transition: transform .35s var(--cep-ease);
	box-shadow: 0 -10px 30px -10px rgba(16,24,40,.18);
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
}
.cep-sticky.is-visible { transform: none; }
.cep-sticky * { box-sizing: border-box; }
.cep-sticky-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cep-sticky-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cep-sticky-img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cep-sticky-info { display: flex; flex-direction: column; min-width: 0; }
.cep-sticky-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cep-sticky-price { font-size: 15px; font-weight: 800; }
.cep-sticky .cep-sticky-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; margin: 0;
	padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--cep-sb-btn-bg, #111827); color: var(--cep-sb-btn-color, #fff);
	font-family: inherit; font-size: var(--cep-sb-btn-fs, 14px); font-weight: 800; line-height: 1.2;
	box-shadow: 0 8px 20px -8px var(--cep-sb-btn-bg, #111827);
	animation: cepPulse 2.2s infinite;
}
.cep-sticky-style_2 .cep-sticky-product { display: none; }
.cep-sticky-style_2 .cep-sticky-btn { width: 100%; border-radius: 12px; padding: 15px; }
.cep-sticky-style_3 { left: 12px; right: 12px; bottom: 12px; border-radius: 18px; padding: 8px 8px 8px 12px; }
.cep-sticky-style_3 .cep-sticky-img { border-radius: 50%; }
@media (min-width: 1025px) { .cep-sticky.cep-hide-desktop { display: none !important; } }

/* ---------- WhatsApp float ---------- */
.cep-wa-float {
	position: fixed; z-index: 99997; bottom: var(--cep-wa-bottom, 20px);
	width: var(--cep-wa-size, 58px); height: var(--cep-wa-size, 58px); border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--cep-wa-bg, #25d366); color: var(--cep-wa-color, #fff);
	box-shadow: 0 10px 25px -6px rgba(37, 211, 102, .6); transition: transform .2s var(--cep-ease), bottom .35s var(--cep-ease);
}
.cep-wa-float::before {
	content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; z-index: -1; animation: cepRing 2s infinite;
}
@keyframes cepRing { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }
.cep-wa-float:hover { transform: scale(1.08); color: var(--cep-wa-color, #fff); }
.cep-wa-float svg { width: 56%; height: 56%; }
.cep-wa-right { right: 20px; }
.cep-wa-left { left: 20px; }
body.cep-sticky-on .cep-wa-float { bottom: calc(var(--cep-wa-bottom, 20px) + 74px); }

/* ---------- Responsive ---------- */
.cep-card { container-type: inline-size; container-name: cepcard; }
@container cepcard (max-width: 420px) {
	.cep-fields { grid-template-columns: 1fr; gap: 10px; }
	.cep-var-layout-grid { grid-template-columns: 1fr; }
	.cep-offer { padding: 12px; gap: 10px; }
	.cep-guarantees { gap: 4px; }
}
@container cepcard (max-width: 330px) {
	.cep-attr-style-cards .cep-attr-options, .cep-attr-style-image .cep-attr-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cep-attr-style-segmented .cep-attr-options { flex-wrap: wrap; }
}
@media (max-width: 520px) {
	.cep-wrapper { margin: 14px auto; }
	.cep-fields { grid-template-columns: 1fr; gap: 10px; }
	.cep-card { padding: calc(var(--cep-card-pad, 20px) * .8); }
	.cep-offer { padding: 12px; gap: 10px; }
	.cep-price-bar { padding: 12px 14px; }
	.cep-guarantees { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
	.cep-wrapper *, .cep-sticky, .cep-wa-float::before { animation: none !important; transition: none !important; }
}
