/* RF Geron – Catalogo (misure da Figma, frame 1440) */
.rfg {
	--rfg-orange: #ec7026;
	--rfg-orange-soft: #ffe4d4;
	--rfg-dark: #31322d;
	--rfg-dark-card: #30302f;
	--rfg-line: #d2c8c8;
	--rfg-row-a: #fdf3ea;
	--rfg-row-b: #e9e9e9;
	--rfg-cell-line: #dcdcdc;
	font-family: 'Poppins', sans-serif;
	color: #000;
	background: #fff;
}
.rfg *, .rfg *::before, .rfg *::after { box-sizing: border-box; }
.rfg p, .rfg h1, .rfg h2, .rfg ul { margin: 0; padding: 0; }
.rfg ul { list-style: none; }
.rfg a { text-decoration: none; color: inherit; }
.rfg img { max-width: 100%; height: auto; display: block; }
/* niente contorno al tocco/click, resta solo per chi naviga da tastiera */
.rfg button:focus:not(:focus-visible), .rfg a:focus:not(:focus-visible) { outline: none; }
.rfg button:focus-visible, .rfg a:focus-visible { outline: 2px solid var(--rfg-orange); outline-offset: 2px; }
/* azzera lo stile dei pulsanti del tema Hello (bordo e testo rosa) */
.rfg button, .rfg button:hover, .rfg button:focus {
	border: 0; border-radius: 0; box-shadow: none; outline-offset: 2px;
	font-family: 'Poppins', sans-serif; text-transform: none; letter-spacing: 0;
}

.rfg-wrap { width: 100%; max-width: 1312px; /* 1280 di contenuto + 16+16 di margine */ margin: 0 auto; padding: 0 16px; }

/* ---------- layout ---------- */
.rfg-layout {
	display: grid;
	grid-template-columns: 321px minmax(0, 1fr);
	gap: 38px;
	align-items: start;
	padding-top: 103px;
	padding-bottom: 73px;
}

/* ---------- sidebar (Figma 61:563, 321x1360) ---------- */
.rfg-side {
	border: 2px solid var(--rfg-orange);
	border-radius: 30px;
	overflow: hidden;
	background: #fff;
}
.rfg .rfg-side__head {
	display: flex; align-items: center;
	width: 100%; height: 96px; padding: 0 33px;
	background: var(--rfg-orange); color: #fff; border: 0; border-radius: 0;
	font: 600 24px/24px 'Poppins', sans-serif; text-align: left; cursor: default;
}
.rfg .rfg-side__head:hover, .rfg .rfg-side__head:focus { background: var(--rfg-orange); color: #fff; }
.rfg-side__body { padding: 21px 16px 26px; }

/* righe di separazione rientrate (x35 -> x288), anche dopo l'ultima voce */
.rfg-side__top { position: relative; }
.rfg-side__top + .rfg-side__top::before,
.rfg-side__top:last-child::after {
	content: ''; position: absolute; left: 17px; right: 16px; height: 0;
	border-top: .5px solid var(--rfg-line);
}
.rfg-side__top + .rfg-side__top::before { top: 0; }
.rfg-side__top:last-child::after { bottom: 0; }
.rfg-side__top.is-open::before, .rfg-side__top.is-open:last-child::after { display: none; }

.rfg-side__row {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 57px; padding: 0 0 0 17px; border-radius: 10px;
}
.rfg-side__row > a {
	flex: 1; padding: 16px 0;
	font-weight: 600; font-size: 13px; line-height: 18px; text-transform: uppercase;
}
.rfg-side__row > a:hover { color: var(--rfg-orange); }
.rfg .rfg-side__plus {
	position: relative; flex: 0 0 28px; width: 28px; height: 57px; margin: 0 5px 0 0;
	background: none; border: 0; padding: 0; cursor: pointer; color: var(--rfg-orange);
}
.rfg-side__plus::before, .rfg-side__plus::after {
	content: ''; position: absolute; left: 50%; top: 50%;
	width: 13px; height: 1.3px; background: currentColor; transform: translate(-50%, -50%);
}
.rfg-side__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.rfg .rfg-side__plus:hover, .rfg .rfg-side__plus:focus { background: none; color: var(--rfg-orange); }

.rfg-side__top.is-open > .rfg-side__row { background: var(--rfg-orange); min-height: 58px; }
.rfg-side__top.is-open > .rfg-side__row > a { color: #fff; font-size: 18px; line-height: 24px; }
.rfg .rfg-side__top.is-open .rfg-side__plus { color: #fff; height: 58px; }

.rfg .rfg-side__sub { display: none; padding: 21px 0 12px; }
.rfg .rfg-side__top.is-open > .rfg-side__sub { display: block; }
.rfg-side__sub li { margin: 0; }
.rfg-side__sub a {
	display: block; padding: 11px 12px 11px 45px; border-radius: 10px;
	font-size: 13px; line-height: 18px;
}
.rfg-side__sub a:hover { color: var(--rfg-orange); }
.rfg-side__sub .is-active a { background: var(--rfg-orange-soft); }

.rfg-help {
	width: 276px; max-width: calc(100% - 3px);
	margin: 23px 0 0 3px; padding: 31px 29px 20px;
	background: var(--rfg-dark-card); border-radius: 24px; color: #fff;
}
.rfg .rfg-help__title { font-weight: 600; font-size: 18px; line-height: 18px; margin-bottom: 19px; }
.rfg .rfg-help__text { font-size: 14px; line-height: 14px; margin-bottom: 29px; }
.rfg-help__link { display: block; width: max-content; font-weight: 600; font-size: 14px; line-height: 14px; color: var(--rfg-orange) !important; }
.rfg-help__link:hover { text-decoration: underline; }

/* ---------- contenuto ---------- */
.rfg-cat { display: inline-block; font-weight: 600; font-size: 18px; line-height: 20px; text-transform: uppercase; margin-bottom: 26px; }
.rfg-cat:hover { color: var(--rfg-orange); }
.rfg-title { overflow-wrap: anywhere; font-weight: 600; font-size: 45px; line-height: 50px; text-transform: uppercase; color: #000; margin-bottom: 8px; }
.rfg-sub { font-size: 18px; line-height: 24px; }
.rfg-sub::first-letter { text-transform: uppercase; }
.rfg-line { border: 0; height: 3px; background: var(--rfg-orange); margin: 14px 0 49px; opacity: 1; }

.rfg-card {
	position: relative; display: flex; align-items: center;
	min-height: 328px; padding: 56px 28px 56px 54px;
	border: 2px solid #d7d7d7; border-radius: 30px; background: #fff;
}
.rfg-card__img { width: 640px; max-width: 62%; }
.rfg-card__img img { width: 100%; max-height: 520px; object-fit: contain; object-position: left center; }
.rfg-btn {
	position: absolute; right: 28px; bottom: 39px;
	display: flex; align-items: center; justify-content: space-between;
	width: 286px; height: 58px; padding: 0 26px;
	background: var(--rfg-orange); color: #fff !important; border-radius: 10px;
	font-weight: 600; font-size: 18px; line-height: 24px;
	transition: background .2s;
}
.rfg-btn:hover { background: #d45f18; }
.rfg-btn__arrow { font-size: 26px; line-height: 1; }

/* ---------- pagina categoria ---------- */
.rfg-title--cat { font-size: 50px; line-height: 50px; margin: 4px 0 0; }
.rfg-cat-desc { font-size: 16px; line-height: 1.5; margin: -24px 0 32px; }
.rfg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 12px; }
.rfg-tile {
	display: flex; flex-direction: column; height: 100%; min-height: 218px;
	padding: 20px 20px 16px; background: #fff;
	border: 1.2px solid #d7d7d7; border-radius: 12px;
	transition: border-color .2s, box-shadow .2s;
}
.rfg-tile:hover { border-color: var(--rfg-orange); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.rfg-tile__img { display: flex; align-items: center; justify-content: center; height: 117px; margin-bottom: 14px; }
.rfg-tile__img img { max-height: 117px; width: auto; max-width: 100%; object-fit: contain; }
.rfg-tile__name { overflow-wrap: anywhere; font-weight: 700; font-size: 14px; line-height: 15px; letter-spacing: .02em; text-transform: uppercase; color: #000; }
.rfg-tile__more { margin-top: auto; padding-top: 12px; font-weight: 700; font-size: 12px; line-height: 14px; color: var(--rfg-orange); }
.rfg-tile:hover .rfg-tile__more { text-decoration: underline; }
.rfg-empty { font-size: 16px; }
.rfg-404__actions { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }

/* tabella: intestazione fissa, righe che scorrono */
.rfg-table {
	margin-top: 21px;
	max-height: min(760px, calc(100vh - 140px));
	overflow: auto;
	border: 2px solid var(--rfg-orange); border-radius: 24px;
	background: #fff;
}
.rfg-table table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; }
.rfg-table th, .rfg-table td {
	padding: 10px 12px; text-align: center; vertical-align: middle;
	border: 0; border-right: 1px solid var(--rfg-cell-line);
}
.rfg-table th:last-child, .rfg-table td:last-child { border-right: 0; }
.rfg-table thead th {
	position: sticky; top: 0; z-index: 1;
	height: 76px; background: var(--rfg-orange); color: #fff;
	font-weight: 600; font-size: 13px; line-height: 16px; text-transform: uppercase;
	border-right-color: rgba(255, 255, 255, .35);
}
.rfg-table tbody td { height: 58px; font-size: 14px; line-height: 18px; color: #222; }
.rfg-table tbody tr:nth-child(odd) td { background: var(--rfg-row-a); }
.rfg-table tbody tr:nth-child(even) td { background: var(--rfg-row-b); }
.rfg-table tbody td:first-child { color: var(--rfg-orange); font-weight: 700; }
.rfg-table tbody td:last-child { font-weight: 600; color: #000; }
.rfg-table:focus { outline: 2px solid var(--rfg-orange); outline-offset: 2px; }

.rfg-content { margin-top: 32px; font-size: 16px; line-height: 1.6; }

/* ---------- tablet / mobile ---------- */
@media (max-width: 1024px) {
	.rfg-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 40px; }
	.rfg-main { min-width: 0; }
	.rfg .rfg-side__head { height: 64px; padding: 0 24px; font-size: 20px; cursor: pointer; justify-content: space-between; }
	.rfg-side__head::after { content: '+'; font-weight: 300; font-size: 28px; }
	.rfg-side__head[aria-expanded="true"]::after { content: '–'; }
	.rfg-side .rfg-side__body { display: none; }
	.rfg-side.is-open .rfg-side__body { display: block; }
	.rfg-card { flex-direction: column; align-items: stretch; gap: 24px; padding: 28px; min-height: 0; }
	.rfg-card__img { width: 100%; max-width: 100%; }
	.rfg-btn { position: static; width: 100%; max-width: 320px; }
}
@media (max-width: 767px) {
	.rfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.rfg-tile { min-height: 0; padding: 14px 12px 12px; }
	.rfg-tile__img { height: 90px; }
	.rfg-tile__img img { max-height: 90px; }
	.rfg-tile__name { font-size: 12px; line-height: 14px; }
	.rfg-title--cat { font-size: 34px; line-height: 36px; }
	.rfg-title { font-size: 30px; line-height: 34px; }
	.rfg-cat { font-size: 15px; margin-bottom: 14px; }
	.rfg-sub { font-size: 16px; }
	.rfg-line { margin-bottom: 28px; }
	.rfg-table { border-radius: 16px; max-height: 70vh; }
	.rfg-table thead th { height: 56px; font-size: 11px; padding: 8px; }
	.rfg-table tbody td { height: 48px; font-size: 13px; padding: 8px; white-space: nowrap; }
}
