/**
 * RosaFood Product Options — FazFood-inspired tokens
 */
:root {
	--rf-primary: #d71920;
	--rf-secondary: #ffcc19;
	--rf-accent: #ffcc19;
	--rf-dark: #111111;
	--rf-light: #f4f1ea;
	--rf-cream: #f4f1ea;
	--rf-bg: #f4f1ea;
	--rf-surface: #ffffff;
	--rf-text: #212121;
	--rf-muted: #777777;
	--rf-border: #e5e0d8;
	--rf-radius: 20px;
	--rf-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.rfpo-options { margin: 1.5rem 0 6rem; }
.rfpo-section__title {
	font-size: 1.125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--rf-text);
	margin: 0 0 0.75rem;
}
.rfpo-size-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr));
	gap: 0.625rem;
}
.rfpo-size-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	min-height: 5.25rem;
	padding: 0.65rem 0.5rem;
	border: 2px solid var(--rf-border);
	border-radius: var(--rf-radius);
	background: var(--rf-surface);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
	text-align: center;
}
.rfpo-size-btn input { position: absolute; opacity: 0; pointer-events: none; }
.rfpo-size-btn.is-active, .rfpo-size-btn:has(input:checked) {
	border-color: var(--rf-primary);
	background: var(--rf-light);
	box-shadow: var(--rf-shadow);
}
.rfpo-size-btn__name {
	font-weight: 800;
	font-size: 0.9375rem;
	line-height: 1.15;
}
.rfpo-size-btn__label {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rf-muted);
	line-height: 1.2;
}
.rfpo-size-btn__price {
	display: block;
	width: 100%;
	margin-top: 0.15rem;
	font-size: 0.8125rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--rf-primary);
}
.rfpo-size-btn__price .woocommerce-Price-amount,
.rfpo-size-btn__price .woocommerce-Price-currencySymbol {
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
}
.rfpo-size-btn__price .amount {
	display: inline-block;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.rfpo-accordion { border: 1px solid var(--rf-border); border-radius: var(--rf-radius); margin-bottom: 0.5rem; background: var(--rf-surface); overflow: hidden; }
.rfpo-accordion__title { padding: 1rem; font-weight: 700; cursor: pointer; list-style: none; }
.rfpo-option-list { padding: 0 1rem 1rem; }
.rfpo-option-item { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem; border-radius: 8px; cursor: pointer; }
.rfpo-option-item:hover { background: var(--rf-light); }
.rfpo-option-item__price { margin-left: auto; font-weight: 700; color: var(--rf-primary); font-size: 0.875rem; }
.rfpo-price-summary { background: var(--rf-surface); border-radius: var(--rf-radius); padding: 1rem 1.25rem; box-shadow: var(--rf-shadow); border: 1px solid var(--rf-border); }
.rfpo-quota-hint { margin: 0 0 1rem; padding: 0.75rem 1rem; background: #fff8e6; border: 1px solid #f0d78a; border-radius: var(--rf-radius); font-size: 0.9375rem; color: #5c4a00; }
.rfpo-total-display { color: var(--rf-primary); font-size: 1.5rem; }
.rfpo-validation-notice {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	background: #fdecec;
	border: 1px solid #f0a8a8;
	border-radius: var(--rf-radius);
	font-size: 0.9375rem;
	color: #8a1111;
}
.rfpo-validation-notice ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.rfpo-group.is-invalid { outline: 2px solid #d71920; outline-offset: 2px; border-radius: var(--rf-radius); }
.rfpo-required-badge {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: #fff0f0;
	color: #b42318;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	vertical-align: middle;
}
.rfpo-sticky-bar { display: none; }
.rfpo-sticky-bar__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}
.rfpo-sticky-qty .quantity_wrap {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}
.rfpo-sticky-qty .quantity-text {
	margin: 0;
	white-space: nowrap;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.85rem;
}
.rfpo-sticky-qty .quantity { margin: 0; min-width: 7rem; }
.rfpo-sticky-bar__actions { flex-shrink: 0; }
.rfpo-upsell-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.rfpo-upsell-card { display: flex; flex-direction: column; align-items: center; padding: 0.75rem; background: var(--rf-surface); border: 1px solid var(--rf-border); border-radius: var(--rf-radius); text-decoration: none; color: var(--rf-text); }
.rfpo-search-input, .rfpo-note-input { width: 100%; padding: 0.75rem; border: 1px solid var(--rf-border); border-radius: var(--rf-radius); margin-bottom: 0.5rem; min-height: 44px; }

@media (max-width: 480px) {
	.rfpo-size-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.rfpo-size-btn {
		min-height: 4.75rem;
	}
}

@media (max-width: 768px) {
	body.rfpo-has-sticky .rfpo-sticky-bar,
	body.rfpo-has-sticky .rfpo-options + .rfpo-sticky-bar {
		display: flex; align-items: center; justify-content: space-between; gap: 1rem;
		position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
		padding: 0.75rem 1rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
		background: var(--rf-surface); border-top: 1px solid var(--rf-border); box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
	}
	body.rfpo-has-sticky .rfpo-sticky-add {
		min-height: 44px;
		background: var(--rf-primary) !important;
		color: #fff !important;
		border-radius: 999px;
		font-weight: 800;
		padding: 0.55rem 0.85rem;
		font-size: 0.6875rem;
		letter-spacing: 0.02em;
		white-space: nowrap;
		flex-shrink: 0;
	}
	body.rfpo-has-sticky .rfpo-sticky-add::before {
		font-size: 0.8125rem !important;
		margin-right: 0.25rem !important;
	}
	body.rfpo-has-sticky form.cart > .quantity_wrap,
	body.rfpo-has-sticky form.cart > .quantity {
		display: none;
	}
	.rfpo-options--accordion .rfpo-options { margin-bottom: 5rem; }
}

.rfpo-sheet-backdrop[hidden] { display: none; }
.rfpo-sheet-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 1000;
}
.rfpo-open-sheet {
	width: 100%;
	margin-bottom: 1rem;
}
@media (max-width: 768px) {
	.rfpo-options--sheet {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1001;
		max-height: 85vh;
		overflow-y: auto;
		background: var(--rf-surface);
		border-radius: var(--rf-radius) var(--rf-radius) 0 0;
		padding: 1.25rem;
		transform: translateY(100%);
		transition: transform 0.3s ease;
		box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
	}
	.rfpo-options--sheet.is-open {
		transform: translateY(0);
	}
	body.rfpo-sheet-open {
		overflow: hidden;
	}
}
@media (min-width: 769px) {
	.rfpo-open-sheet { display: none; }
	body.rfpo-has-sticky-desktop .rfpo-sticky-bar--desktop,
	body.rfpo-has-sticky-desktop .rfpo-options + .rfpo-sticky-bar,
	.rfpo-options--sheet + .rfpo-sticky-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
	}
	body.rfpo-has-sticky-desktop form.cart > .quantity_wrap,
	body.rfpo-has-sticky-desktop form.cart > .quantity {
		display: none;
	}
	body.rfpo-has-sticky form.cart > .single_add_to_cart_button,
	body.rfpo-has-sticky-desktop form.cart > .single_add_to_cart_button {
		display: none;
	}
}

.rfpo-option-select {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--rf-border);
	border-radius: 12px;
	background: var(--rf-surface);
	font-size: 0.9375rem;
}

.rosafood-shipping-hint {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	background: #fff9e6;
	border: 1px solid #f0e0a0;
	border-radius: 12px;
	font-size: 0.875rem;
}

.rosafood-shipping-hint p {
	margin: 0;
}

