[x-cloak] { display: none !important; }

.heedo-cfg-page-main {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
}

.heedo-cfg {
	--heedo-pulse: #111;
	--heedo-bg: #fff;
	--heedo-border: #e5e5e5;
	--heedo-text: #111;
	--heedo-muted: #777;

	display: grid !important;
	grid-template-columns: 1fr !important;
	grid-auto-flow: row !important;
	gap: 32px !important;
	padding: 24px 24px 96px !important; /* spazio sotto per la sticky bar */
	max-width: 1200px !important;
	margin: 0 auto !important;
	color: var(--heedo-text);
	font-family: inherit;
	box-shadow: none;
	background: transparent;
}

form.heedo-cfg { /* override regole tema su form/.cart/.variations_form */
	border: none;
	box-shadow: none;
	background: transparent;
}

.heedo-cfg__hidden {
	display: none !important;
}

/* Il div .single_variation viene riempito automaticamente da wc-add-to-cart-variation.js
 * quando ascolta found_variation: lo nascondiamo per evitare prezzo duplicato. */
.heedo-cfg .single_variation,
.heedo-cfg .woocommerce-variation-price,
.heedo-cfg .woocommerce-variation-availability,
.heedo-cfg .woocommerce-variation-description {
	display: none !important;
}

@media (min-width: 900px) {
	.heedo-cfg {
		grid-template-columns: 1fr 1.2fr !important;
		align-items: start !important;
	}
	.heedo-cfg__controls { order: 1; }
	.heedo-cfg__stage    { order: 2; }
}

.heedo-cfg__stage {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--heedo-bg);
	border: 1px solid var(--heedo-border);
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.heedo-cfg__preview {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.heedo-cfg__controls {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.heedo-cfg__title {
	font-family: 'Cormorant Garamond', serif !important;
	font-size: 2.75rem !important;
	font-weight: 700 !important;
	color: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.1 !important;
	margin: 0 0 12px !important;
}

.heedo-cfg__label {
	font-family: inherit !important;
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	color: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.3 !important;
	margin: 0 0 10px !important;
}

/* ============ Dropdown rettangolari ============ */

.heedo-cfg__dropdown {
	position: relative;
}

.heedo-cfg__dropdown-trigger,
.heedo-cfg__dropdown-trigger:hover,
.heedo-cfg__dropdown-trigger:focus,
.heedo-cfg__dropdown-trigger:active {
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 64px;
	margin: 0;
	padding: 10px 16px;
	background: #fff !important;
	color: var(--heedo-text) !important;
	border: 1px solid var(--heedo-border);
	border-radius: 4px;
	font: inherit;
	font-size: 0.95rem;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.heedo-cfg__dropdown-trigger:hover,
.heedo-cfg__dropdown-trigger:focus {
	border-color: var(--heedo-text);
}

.heedo-cfg__dropdown.is-open .heedo-cfg__dropdown-trigger {
	border-color: var(--heedo-text);
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.heedo-cfg__dropdown-current {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.heedo-cfg__dropdown-current img,
.heedo-cfg__dropdown-option img {
	width: 44px;
	height: 44px;
	border-radius: 3px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.heedo-cfg__dropdown-name {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.heedo-cfg__dropdown-placeholder {
	flex: 1;
	color: var(--heedo-muted);
	font-weight: 500;
}

.heedo-cfg__dropdown-caret {
	width: 12px;
	height: 8px;
	color: var(--heedo-muted);
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.heedo-cfg__dropdown.is-open .heedo-cfg__dropdown-caret {
	transform: rotate(180deg);
}

.heedo-cfg__dropdown-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 10;
	background: #fff;
	border: 1px solid var(--heedo-text);
	border-top: none;
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	max-height: 320px;
	overflow-y: auto;
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.heedo-cfg__dropdown-option,
.heedo-cfg__dropdown-option:hover,
.heedo-cfg__dropdown-option:focus,
.heedo-cfg__dropdown-option:active {
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 10px 16px;
	background: #fff !important;
	color: var(--heedo-text) !important;
	border: none;
	border-radius: 0;
	font: inherit;
	font-size: 0.95rem;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	outline: none;
	transition: background 0.12s ease;
}

.heedo-cfg__dropdown-option:hover,
.heedo-cfg__dropdown-option:focus {
	background: #f6f6f6 !important;
}

.heedo-cfg__dropdown-option.is-selected,
.heedo-cfg__dropdown-option.is-selected:hover {
	background: #f0f0f0 !important;
	font-weight: 600;
}

/* ============ Pulsations + dimensioni ============ */

.heedo-cfg__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.heedo-cfg__size,
.heedo-cfg__size:hover,
.heedo-cfg__size:focus,
.heedo-cfg__size:active {
	box-sizing: border-box;
	cursor: pointer;
	margin: 0;
	padding: 10px 18px;
	background: #fff !important;
	color: var(--heedo-text) !important;
	border: 1px solid var(--heedo-border);
	border-radius: 3px;
	font: inherit;
	font-size: 0.9rem;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	outline: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.heedo-cfg__size:hover,
.heedo-cfg__size:focus {
	border-color: var(--heedo-text);
}

.heedo-cfg__size.is-selected,
.heedo-cfg__size.is-selected:hover,
.heedo-cfg__size.is-selected:focus {
	background: var(--heedo-text) !important;
	color: #fff !important;
	border-color: var(--heedo-text);
}

.heedo-cfg__group.is-pulsing .heedo-cfg__dropdown-trigger,
.heedo-cfg__group.is-pulsing .heedo-cfg__sizes .heedo-cfg__size {
	animation: heedo-pulse 1.6s ease-in-out infinite;
}

@keyframes heedo-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.45); }
	50%      { box-shadow: 0 0 0 8px rgba(17, 17, 17, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.heedo-cfg__group.is-pulsing .heedo-cfg__dropdown-trigger,
	.heedo-cfg__group.is-pulsing .heedo-cfg__size {
		animation: none;
	}
}

/* ============ Quantità + prezzo ============ */

.heedo-cfg__qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 0;
	margin-bottom: 8px;
}

.heedo-cfg__qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--heedo-border);
	border-radius: 3px;
	overflow: hidden;
}

.heedo-cfg__qty-btn,
.heedo-cfg__qty-btn:hover,
.heedo-cfg__qty-btn:focus,
.heedo-cfg__qty-btn:active {
	box-sizing: border-box;
	cursor: pointer;
	width: 32px;
	padding: 0;
	margin: 0;
	background: #fff !important;
	color: var(--heedo-text) !important;
	border: none;
	border-radius: 0;
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1;
	box-shadow: none;
	outline: none;
}

.heedo-cfg__qty-btn:not(:disabled):hover { background: #f4f4f4 !important; }
.heedo-cfg__qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.heedo-cfg__qty-input {
	box-sizing: border-box;
	width: 40px;
	padding: 8px 0;
	background: #fff;
	color: var(--heedo-text);
	border: none;
	border-left: 1px solid var(--heedo-border);
	border-right: 1px solid var(--heedo-border);
	font: inherit;
	font-size: 0.9rem;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
	outline: none;
}
.heedo-cfg__qty-input::-webkit-outer-spin-button,
.heedo-cfg__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.heedo-cfg__price {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--heedo-text);
	line-height: 1.1;
}
.heedo-cfg__price ins { text-decoration: none; }
.heedo-cfg__price del { opacity: 0.55; margin-right: 6px; font-weight: 400; }
.heedo-cfg__price .screen-reader-text {
	position: absolute !important;
	clip: rect(1px,1px,1px,1px);
	width: 1px; height: 1px;
	overflow: hidden;
}

/* ============ CTA + express + info ============ */

.heedo-cfg__cta,
.heedo-cfg__cta:hover,
.heedo-cfg__cta:focus,
.heedo-cfg__cta:active {
	box-sizing: border-box;
	cursor: pointer;
	display: block;
	width: 100%;
	margin: 28px 0 0;
	padding: 16px 26px;
	background: var(--heedo-text) !important;
	color: #fff !important;
	border: none;
	border-radius: 4px;
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	outline: none;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.heedo-cfg__cta:disabled { opacity: 0.4; cursor: not-allowed; }
.heedo-cfg__cta:not(:disabled):hover,
.heedo-cfg__cta:not(:disabled):focus { background: #000 !important; }

.heedo-cfg__express,
.heedo-cfg__messaging {
	min-height: 0;
}
.heedo-cfg__express:empty,
.heedo-cfg__messaging:empty { display: none; }
.heedo-cfg__messaging { margin-top: 4px; }

.heedo-cfg__info-btn,
.heedo-cfg__info-btn:hover,
.heedo-cfg__info-btn:focus,
.heedo-cfg__info-btn:active {
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 12px 20px;
	background: #fff !important;
	color: var(--heedo-text) !important;
	border: 1px solid var(--heedo-border);
	border-radius: 4px;
	font: inherit;
	font-weight: 500;
	font-size: 0.95rem;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease;
}
.heedo-cfg__info-btn:hover { border-color: var(--heedo-text); }
.heedo-cfg__info-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* ============ Sticky bar in basso ============ */

.heedo-cfg__bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	background: #fff;
	border-top: 1px solid var(--heedo-border);
	padding: 12px 24px;
	display: flex;
	align-items: center;
	gap: 20px;
	box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.04);
}

.heedo-cfg__bar-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

.heedo-cfg__bar-title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.heedo-cfg__bar-summary {
	font-size: 0.85rem;
	color: var(--heedo-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.heedo-cfg__bar-price {
	font-size: 1.1rem;
	font-weight: 600;
	white-space: nowrap;
}
.heedo-cfg__bar-price ins { text-decoration: none; }
.heedo-cfg__bar-price del { opacity: 0.55; margin-right: 6px; font-weight: 400; }

.heedo-cfg__bar-cta,
.heedo-cfg__bar-cta:hover,
.heedo-cfg__bar-cta:focus,
.heedo-cfg__bar-cta:active {
	box-sizing: border-box;
	cursor: pointer;
	margin: 0;
	padding: 12px 24px;
	background: var(--heedo-text) !important;
	color: #fff !important;
	border: none;
	border-radius: 4px;
	font: inherit;
	font-weight: 600;
	font-size: 0.9rem;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	outline: none;
	min-width: 160px;
	transition: background 0.15s ease, opacity 0.15s ease;
}
.heedo-cfg__bar-cta:disabled { opacity: 0.4; cursor: not-allowed; }
.heedo-cfg__bar-cta:not(:disabled):hover { background: #000 !important; }

@media (max-width: 600px) {
	.heedo-cfg__bar { padding: 10px 14px; gap: 12px; }
	.heedo-cfg__bar-cta { min-width: 0; padding: 10px 16px; font-size: 0.85rem; }
	.heedo-cfg__bar-summary { display: none; }
}

/* ============ Modal descrizione ============ */

.heedo-cfg__modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.heedo-cfg__modal-card {
	position: relative;
	background: #fff;
	color: var(--heedo-text);
	max-width: 720px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 6px;
	padding: 36px 40px 32px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.heedo-cfg__modal-close,
.heedo-cfg__modal-close:hover,
.heedo-cfg__modal-close:focus {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	cursor: pointer;
	background: transparent !important;
	color: var(--heedo-muted) !important;
	border: none;
	border-radius: 50%;
	font-size: 1.6rem;
	line-height: 1;
	padding: 0;
	margin: 0;
	box-shadow: none;
	outline: none;
}
.heedo-cfg__modal-close:hover { background: #f4f4f4 !important; color: var(--heedo-text) !important; }

.heedo-cfg__modal-title {
	margin: 0 0 16px;
	font-size: 1.6rem;
	font-weight: 600;
}

.heedo-cfg__modal-body {
	font-size: 1rem;
	line-height: 1.6;
}
.heedo-cfg__modal-body p { margin: 0 0 14px; }
.heedo-cfg__modal-body img { max-width: 100%; height: auto; }
