/**
 * 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-secondary); margin: 0 0 0.75rem; }
.rfpo-size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; }
.rfpo-size-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; padding: 0.75rem; border: 2px solid var(--rf-border); border-radius: var(--rf-radius); background: var(--rf-surface); cursor: pointer; transition: all 0.15s; }
.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; }
.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-total-display { color: var(--rf-primary); font-size: 1.5rem; }
.rfpo-sticky-bar { display: none; }
.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: 768px) {
	body.rfpo-has-sticky .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: 48px; background: var(--rf-primary) !important; color: #fff !important; border-radius: 999px; font-weight: 800; padding: 0 1.5rem;
	}
	.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; }
	.rfpo-options--sheet .rfpo-sticky-bar {
		display: flex;
	}
}
