/* Resto Italia product pages (Gradus Jack, Tecpro) — scoped .ri-* styles on top of styles.css */

/* Faded GSI mark behind TEXT blocks only. Photos sit in opaque tiles/figures and never get the mark behind them. */
.ri-wm { position: relative; isolation: isolate; }
.ri-wm::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url('/assets/img/gsi-mark.png') center 35% / min(78%, 520px) no-repeat;
  opacity: .055;
  pointer-events: none;
}

.ri-eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 10px; display: block; }
.ri-section { padding: 84px 0; border-bottom: 1px solid var(--hairline); }
.ri-section h2 { font-family: 'Cinzel', serif; font-weight: 600; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; margin-bottom: 12px; color: var(--text-primary); }
.ri-sub { color: var(--text-muted); max-width: 660px; margin-bottom: 36px; }
.ri-note { font-size: 13px; color: var(--text-faint); margin-top: 14px; }

/* Hero image tile (opaque) */
.ri-hero-img { background: #2d3134; border: 1px solid var(--hairline); border-radius: var(--radius-md); overflow: hidden; }
/* .light no longer means cream: product photos sit on the dark stage (owner rule 10); brochure pages use .paper */
.ri-hero-img img { width: 100%; height: auto; display: block; }

/* Showcase: oven + what it bakes */
.ri-show { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ri-tile { position: relative; background: #101213; border: 1px solid var(--hairline); border-radius: var(--radius-md); overflow: hidden; margin: 0; }
.ri-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ri-tile.sq { aspect-ratio: 4 / 3; }
.ri-tile.big { grid-row: 1 / span 2; display: flex; flex-direction: column; background: #2d3134; min-height: 520px; }
.ri-tile.big img { flex: 1; min-height: 0; object-fit: contain; }
.ri-tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #f2efe9; background: linear-gradient(0deg, rgba(16,18,19,.92), rgba(16,18,19,0)); }
.ri-tile.big figcaption { position: static; background: #101213; padding: 10px 14px; }

/* Multi-angle viewer */
.ri-gal { display: grid; grid-template-columns: 1fr 112px; gap: 16px; }
.ri-stage { position: relative; background: #101213; border: 1px solid var(--hairline); border-radius: var(--radius-md); aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in; display: grid; place-items: center; }
.ri-stage.paper { background: #f3f1ec; }
.ri-stage img { position: absolute; inset: 0; margin: auto; max-width: min(100%, var(--mw, 100%)); max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .25s ease; transform-origin: 50% 50%; user-select: none; -webkit-user-drag: none; }
.ri-stage.zoom { cursor: zoom-out; }
.ri-stage.zoom img { transform: scale(var(--z, 1.6)); }
.ri-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid var(--hairline-strong); background: rgba(26,26,26,.82); color: var(--text-primary); font-size: 20px; cursor: pointer; z-index: 3; border-radius: 50%; }
.ri-nav.prev { left: 12px; } .ri-nav.next { right: 12px; }
.ri-count { position: absolute; right: 14px; bottom: 10px; font-size: 12px; letter-spacing: .14em; color: var(--text-faint); z-index: 3; background: rgba(26,26,26,.75); padding: 2px 8px; }
.ri-thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow: auto; }
.ri-thumbs button { border: 1px solid var(--hairline); background: #101213; padding: 0; cursor: pointer; aspect-ratio: 4 / 3; opacity: .6; display: grid; place-items: center; border-radius: 6px; overflow: hidden; }
.ri-thumbs.paper button { background: #f3f1ec; }
.ri-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--gold); }
.ri-thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ri-cap { margin-top: 12px; font-size: 14px; color: var(--text-muted); min-height: 44px; }
.ri-cap b { color: var(--text-primary); font-weight: 600; }

/* Cards, lists, tables */
.ri-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ri-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.ri-card { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 24px; }
.ri-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-primary); }
.ri-card p { color: var(--text-muted); font-size: 15px; }
.ri-tag { display: inline-block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 10px; }
.ri-list { list-style: none; color: var(--text-muted); font-size: 15px; }
.ri-list li { padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.ri-list li::before { content: "— "; color: var(--gold); }
.ri-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 8px; }
.ri-scroll .comparison-table { min-width: 760px; }
.ri-table-title { font-size: 20px; margin: 34px 0 12px; color: var(--text-primary); }
.ri-prose h3 { margin: 28px 0 10px; }
.ri-prose p { margin-bottom: 14px; }

@media (max-width: 860px) {
  .ri-section { padding: 56px 0; }
  .ri-show, .ri-grid3, .ri-grid2, .ri-gal { grid-template-columns: 1fr; }
  .ri-tile.big { grid-row: auto; min-height: 380px; }
  .ri-thumbs { flex-direction: row; max-height: none; overflow-x: auto; }
  .ri-thumbs button { flex: 0 0 96px; }
}

/* FAQ */
.ri-faq { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.ri-faq summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; color: var(--text-primary); list-style: none; position: relative; }
.ri-faq summary::-webkit-details-marker { display: none; }
.ri-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--gold); }
.ri-faq[open] summary::after { content: "\2212"; }
.ri-faq p { color: var(--text-muted); padding: 0 0 18px; max-width: 760px; }
.ri-table-title + .ri-scroll { margin-top: 0; }
.comparison-table small { color: var(--text-faint); }

/* Showroom: contain (never crop) Resto Italia photos; low-res sources are shown smaller, not blown up */
.ri-contain .sr-viewer-main { display: grid; place-items: center; background: #101213; }
.ri-contain .sr-viewer-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ri-contain .sr-thumb img { object-fit: contain; background: #101213; }
.ri-lowres .sr-viewer-main { background: #101213; }
.ri-lowres .sr-viewer-main img { position: absolute; inset: 0; margin: auto; width: auto; height: 100%; max-width: min(100%, 540px); object-fit: contain; }
.ri-lowres .sr-thumb img { background: #101213; }
/* catalogue tiles: caption below the image, image uncropped */
.ri-tile.cat{display:flex;flex-direction:column;aspect-ratio:auto}
.ri-tile.cat img{position:static;height:auto;aspect-ratio:1871/2634;object-fit:contain}
.ri-tile.cat figcaption{position:static;background:var(--surface-1,#1c1b19);color:var(--text-2,#cfc9bd);font-size:.78rem;padding:10px 12px;text-transform:none;letter-spacing:0}
/* Genus Dei colour swatches */
.gd-colors{list-style:none;padding:0;margin:24px 0 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.gd-colors li{display:flex;align-items:center;gap:10px;color:var(--text-2,#cfc9bd);font-size:.85rem}
.gd-sw{width:34px;height:34px;border-radius:50%;background:var(--c);border:1px solid rgba(255,255,255,.18);flex:none}

/* ===== Virtual showroom (public/showroom.html, /js/showroom.js; grid generated by scripts/build-showroom.js) ===== */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.sr-hero{padding:72px 0 36px;border-bottom:1px solid var(--hairline)}
.sr-hero h1{font-family:'Cinzel',serif;font-weight:600;font-size:clamp(30px,4.6vw,52px);line-height:1.12;margin-bottom:16px;color:var(--text-primary)}
.sr-hero p{color:var(--text-muted);max-width:720px;font-size:17px}
.sr-hero .sr-hero-note{font-size:14px;color:var(--text-faint);margin-top:12px}
.sr-tabs-bar{border-bottom:1px solid var(--hairline);background:var(--surface-1)}
.sr-tabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.sr-tab{flex:none;background:none;border:0;border-bottom:2px solid transparent;color:var(--text-muted);font:inherit;font-size:15px;font-weight:600;padding:16px 16px 14px;cursor:pointer;white-space:nowrap}
.sr-tab:hover{color:var(--text-primary)}
.sr-tab[aria-selected="true"]{color:var(--text-primary);border-bottom-color:var(--gold)}
.sr-tab:focus-visible,.sr-card:focus-visible,.sr-close:focus-visible{outline:2px solid var(--gold-light);outline-offset:2px}
.sr-tab-count{display:inline-block;min-width:22px;margin-left:6px;padding:0 6px;border-radius:11px;background:var(--surface-3);color:var(--text-faint);font-size:12px;line-height:20px;text-align:center}
.sr-js .sr-panel:not(.is-active){display:none}
.sr-panel{padding:48px 0 72px}
.sr-intro{padding:8px 0 4px;margin-bottom:24px}
.sr-intro h2{font-family:'Cinzel',serif;font-weight:600;font-size:clamp(24px,3.2vw,36px);color:var(--text-primary);margin-bottom:10px}
.sr-intro p{color:var(--text-muted);max-width:720px}
.sr-intro .sr-brands{font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold-light);margin-top:10px}
.sr-empty{color:var(--text-muted)}
.sr-brand{margin-top:28px}
.sr-brand-name{font-size:13px;letter-spacing:.2em;text-transform:uppercase;color:var(--text-faint);font-weight:600;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}
.sr-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.sr-card{display:flex;flex-direction:column;height:100%;background:var(--surface-1);border:1px solid var(--hairline);border-radius:var(--radius-md);overflow:hidden;color:inherit;text-decoration:none;transition:border-color .2s ease,transform .2s ease}
.sr-card:hover{border-color:var(--gold);transform:translateY(-2px)}
.sr-card[aria-expanded="true"]{border-color:var(--gold)}
.sr-card-img{display:grid;place-items:center;aspect-ratio:4/3;background:#101213;padding:10px}
.sr-card-img img{display:block;width:auto;height:auto;max-width:min(100%,var(--w,100%));max-height:100%;object-fit:contain}
.sr-card-body{display:flex;flex-direction:column;gap:2px;padding:12px 14px 14px}
.sr-card-name{color:var(--text-primary);font-weight:600;font-size:15px;line-height:1.35}
.sr-card-meta{color:var(--text-faint);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.sr-viewer{margin-top:20px;padding:20px;background:var(--surface-1);border:1px solid var(--hairline-strong);border-radius:var(--radius-md);scroll-margin-top:96px;outline:none}
.sr-viewer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.sr-viewer-title{font-size:20px;color:var(--text-primary);line-height:1.3}
.sr-viewer-brand{margin-bottom:4px}
.sr-close{flex:none;width:44px;height:44px;border-radius:50%;border:1px solid var(--hairline-strong);background:transparent;color:var(--text-primary);font-size:24px;line-height:1;cursor:pointer}
.sr-close:hover{border-color:var(--gold)}
.sr-viewer .ri-thumbs[hidden]{display:none}
.sr-viewer .ri-gal{min-width:0}
.sr-viewer .ri-gal > div{min-width:0}
.ri-lowres-note{font-size:13px;color:var(--text-faint);margin-top:8px}
.sr-viewer-foot{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
@media (max-width:860px){
  .sr-viewer .ri-gal{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:600px){
  .sr-hero{padding:44px 0 24px}
  .sr-panel{padding:32px 0 56px}
  .sr-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .sr-card-body{padding:10px}
  .sr-card-name{font-size:14px}
  .sr-viewer{padding:14px;margin-left:-8px;margin-right:-8px}
  .sr-viewer-foot .btn{flex:1 1 100%;text-align:center}
}
/* Genus Dei smallwares (trays, glass racks, category): swatch flags, uncropped card media, narrow tables */
.gd-flag{display:inline-block;margin-left:4px;padding:0 5px;font-size:10px;line-height:16px;letter-spacing:.08em;text-transform:uppercase;color:var(--gold-light);border:1px solid var(--hairline-strong);border-radius:3px;white-space:nowrap}
.gd-flag.std{color:var(--text-primary)}
.equip-card .equip-media.gd-contain img{object-fit:contain}
.ri-scroll .comparison-table.gd-narrow{min-width:0}
.sr-viewer .ri-stage{max-height:min(72vh,620px);width:100%}
.sr-viewer .ri-thumbs{max-height:min(72vh,620px)}
/* Brand hubs (/brands/*): breadcrumb on dark hero, uncropped card images never enlarged, link cards */
.ri-hub-hero .breadcrumbs{padding:0 0 14px}
.ri-hub-hero .breadcrumbs,.ri-hub-hero .breadcrumbs a{color:rgba(255,255,255,.6)}
.ri-hub-hero .breadcrumbs a:hover{color:var(--gold-light)}
.ri-hub-models .product-card-img img{width:auto;height:auto;max-width:90%;max-height:90%;object-fit:contain}
a.ri-hub-link{display:block;text-decoration:none;transition:border-color .2s}
a.ri-hub-link:hover{border-color:var(--gold)}

/* ===== Maintenance plans, enrollment form and agreement page (pm-*) ===== */
.hp-field{position:absolute!important;left:-10000px!important;top:auto;width:1px;height:1px;overflow:hidden}
.pm-compare th[scope="row"]{text-align:left;font-weight:600}
.pm-compare td{text-align:center}
.pm-enroll-form fieldset{border:none;border-top:1px solid var(--hairline);padding:26px 0 6px;margin:0;min-width:0}
.pm-enroll-form fieldset:first-of-type{border-top:none;padding-top:0}
.pm-enroll-form legend{font-family:'Cinzel',Georgia,serif;font-size:1.02rem;font-weight:700;color:var(--text-primary);letter-spacing:.04em;padding-right:12px;margin-bottom:14px}
.pm-eq-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:12px;align-items:end;padding:12px 0;border-bottom:1px solid var(--hairline)}
.pm-eq-row .form-group{margin-bottom:0}
.pm-eq-remove{background:transparent;border:1px solid var(--hairline-strong);color:var(--text-muted);border-radius:6px;padding:10px 14px;cursor:pointer;font:inherit;font-size:.85rem;min-height:44px}
.pm-eq-remove:hover{border-color:var(--red-light);color:var(--text-primary)}
.pm-eq-add{margin:16px 0 6px;min-height:44px}
.pm-form-error{display:block;margin:6px 0 14px;font-size:.92rem}
.pm-agreement [hidden],.pm-enroll-form [hidden]{display:none!important}
.pm-agreement-status{max-width:860px;margin:0 auto 24px;color:var(--text-muted)}
.pm-agreement-mount{margin-bottom:32px}
.pm-sign{margin-top:8px}
.pm-sign-title{font-size:1.5rem;margin-bottom:8px}
.pm-agree{display:flex;gap:10px;align-items:flex-start;margin:6px 0 16px;color:var(--text-muted);font-size:.95rem;cursor:pointer}
.pm-agree input{width:20px;height:20px;margin-top:2px;flex:none;accent-color:var(--gold)}
.pm-signed{text-align:center}
@media (max-width:700px){
  .pm-eq-row{grid-template-columns:1fr}
  .pm-eq-remove{justify-self:start}
}
/* Brochure flipbooks (/brochures/<name>): portrait page stage, never larger than the rendered page */
.ri-flip-title { font-family: 'Cinzel', serif; font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin-bottom: 12px; color: var(--text-primary); }
.ri-gal.ri-flip .ri-stage { aspect-ratio: auto; height: min(82vh, 1330px); cursor: zoom-in; }
.ri-gal.ri-flip .ri-stage img { max-height: 100%; object-fit: contain; }
.ri-gal.ri-flip .ri-thumbs button { aspect-ratio: 5 / 7; }
@media (max-width: 860px) { .ri-gal.ri-flip .ri-stage { height: min(72vh, 900px); } }
/* Secondary "PDF" link beside the View brochure button */
.ri-pdf-link { align-self: center; font-size: 14px; letter-spacing: .08em; color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

/* Cut-out product photos sit on a dark spotlight stage, never a white or cream panel (overrides the .light panels above) */
.ri-stage.light, .ri-hero-img.light, .sr-card-img.light, .ri-lowres .sr-viewer-main {
  background: radial-gradient(ellipse 80% 72% at 50% 40%, #3a3935 0%, #1f1e1c 60%, #121211 100%);
}
.ri-thumbs.light button, .ri-lowres .sr-thumb img { background: #1c1b19; }
/* Thumbnail buttons keep their 4:3 shape in long galleries (they were shrinking to ~28px tall) */
.ri-thumbs button { flex-shrink: 0; }

/* Pizza Group pages */
.pg-mosaic{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:22px}
.pg-mosaic .ri-tile.sq{aspect-ratio:4/3;background:#fff}
.pg-mosaic .ri-tile.sq img{object-fit:contain}
@media (max-width:768px){.pg-mosaic{grid-template-columns:repeat(2,minmax(0,1fr))}}
.hero-ctas .ri-pdf-link{align-self:center}
.benefits-grid.pg-g3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){.benefits-grid.pg-g3{grid-template-columns:1fr}}
.pg-logo{display:inline-block;background:#000;border-radius:8px;padding:10px 16px;margin:6px 0 14px}
.pg-logo img{height:46px;width:auto;display:block}
.pg-logo.light{background:#fff}
.pg-logo.light img{height:64px}
.ri-hub-models .pg-group{margin:34px 0 14px;text-align:left}
.pg-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.pg-grid .product-card-img{background:#1c1b19}
.pg-grid .product-card-img img{object-fit:contain}
.pg-brs{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px;margin-top:22px}
.pg-br{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:inherit}
.pg-br img{width:100%;aspect-ratio:595/842;object-fit:cover;border-radius:6px;border:1px solid var(--hairline,#333);transition:transform .2s}
.pg-br:hover img{transform:translateY(-3px)}
.pg-br span{font-size:.85rem;font-weight:600}
/* Hub hero: logo tile on its own line above the badge (both are inline-block and ran into each other) */
.ri-hub-hero .pg-logo{display:block;width:fit-content}

/* Related-product card buttons: wrap to a second line instead of clipping in narrow cards */
.product-card-ctas{flex-wrap:wrap}
.product-card-ctas .btn{flex:1 1 auto}
