/* Configurator prelate remorci (front/configurator_prelate_remorci_v2.php).
   Portat din _demo/styles.css + _demo/site-ui.css, totul sub .pair-config-remorci.
   Header-ul site-ului e fix (65px, z-index 9999, header.css) — preview-ul sticky
   și drawer-ul de sumar de pe mobil țin cont de el. */

.pair-config-remorci{--ink:#1d280b;--text:#404348;--muted:#697077;--green:#6b8e23;--pale:#edf3df;--soft:#f6f8f0;--line:#dfe3df;--bg:#f7f7f8;--shadow:0 14px 34px rgba(29,40,11,.065);--f-head:'Unit-Pro-Medium','Roboto Condensed',Arial,sans-serif;--f-body:'Gesta-Reqular',Roboto,Arial,sans-serif}
.pair-config-remorci{background:var(--bg);color:var(--text);font-family:var(--f-body);line-height:1.5;padding:1px 0 0}
.pair-config-remorci *{box-sizing:border-box}
.pair-config-remorci button,.pair-config-remorci input,.pair-config-remorci select{font:inherit}
.pair-config-remorci button,.pair-config-remorci label,.pair-config-remorci input,.pair-config-remorci select{touch-action:manipulation}
.pair-config-remorci button{cursor:pointer}
.pair-config-remorci h1,.pair-config-remorci h2,.pair-config-remorci h3{letter-spacing:-.01em}

/* Intro */
.pair-config-remorci .intro{max-width:1140px;margin:0 auto;padding:46px 0 32px}
.pair-config-remorci .eyebrow{margin:0 0 8px;color:var(--green);font-size:12px;font-weight:700;letter-spacing:.08em}
.pair-config-remorci .intro h1{max-width:760px;margin:0;font:600 clamp(34px,4vw,48px)/1.16 var(--f-head);color:var(--ink);letter-spacing:-.015em}
.pair-config-remorci .intro>div>p:last-child{max-width:720px;margin:12px 0 0;font-size:16px;line-height:1.5;color:var(--muted)}
.pair-config-remorci .intro-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:20px}
.pair-config-remorci .intro-chips span{padding:6px 10px;border:1px solid #d8e2c8;background:#fff;color:var(--green);font-size:11px;font-weight:700;letter-spacing:.04em}

/* Layout */
.pair-config-remorci .workspace{max-width:1140px;margin:0 auto;padding:0 0 90px;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;align-items:start}
.pair-config-remorci .configurator{display:grid;gap:16px;position:relative;z-index:1;min-width:0}
.pair-config-remorci .config-section,.pair-config-remorci .preview-card{background:#fcfcfd;border:1px solid #e2e5e3;box-shadow:var(--shadow)}
.pair-config-remorci .config-section{padding:30px;overflow:hidden;min-width:0}
.pair-config-remorci .final-section{border-color:#b8c793}
.pair-config-remorci .section-heading{display:flex;gap:16px;align-items:flex-start;margin-bottom:25px}
.pair-config-remorci .section-heading>span{display:grid;place-items:center;flex:0 0 36px;height:36px;background:var(--green);color:#fff;font:600 14px/1 "Roboto Condensed",sans-serif}
.pair-config-remorci .section-heading h2,.pair-config-remorci .preview-header h2{margin:0;font:600 26px/1.2 var(--f-head);color:var(--ink)}
.pair-config-remorci .section-heading p{margin:5px 0 0;font-size:14px;line-height:1.5;color:var(--muted)}

/* Câmpuri */
.pair-config-remorci .field-grid,.pair-config-remorci .contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.pair-config-remorci .contact-grid+.contact-grid{margin-top:12px}
.pair-config-remorci .contact-grid.single{grid-template-columns:1fr;margin-top:18px}
.pair-config-remorci .field-grid label,.pair-config-remorci .contact-grid label,.pair-config-remorci .print-text{display:grid;gap:7px;color:var(--ink);font-size:12px;font-weight:700}
.pair-config-remorci .field-grid select,.pair-config-remorci .contact-grid input,.pair-config-remorci .contact-grid select,.pair-config-remorci .print-text input{appearance:none;width:100%;height:46px;padding:0 14px;border:1px solid #cfd5d7;border-radius:0;background-color:#fff;color:var(--ink);font-size:14px;font-weight:500;outline:none}
.pair-config-remorci .field-grid select,.pair-config-remorci .contact-grid select{padding-right:32px;background-image:linear-gradient(45deg,transparent 50%,var(--green) 50%),linear-gradient(135deg,var(--green) 50%,transparent 50%);background-position:calc(100% - 19px) 20px,calc(100% - 14px) 20px;background-size:5px 5px;background-repeat:no-repeat}
.pair-config-remorci .field-grid select:focus,.pair-config-remorci .contact-grid input:focus,.pair-config-remorci .contact-grid select:focus,.pair-config-remorci .print-text input:focus{border-color:var(--green);box-shadow:0 0 0 2px rgba(107,142,35,.15)}
.pair-config-remorci .status{margin-top:18px;padding:13px 16px;border-left:2px solid var(--green);background:#f4f7eb;display:grid;gap:2px;color:var(--ink)}
.pair-config-remorci .status strong{color:var(--green);font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.pair-config-remorci .status span{font-size:13px}
.pair-config-remorci .presets{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.pair-config-remorci .presets button{border:1px solid var(--line);background:#fff;padding:8px 12px;color:var(--muted);font-size:12px}
.pair-config-remorci .presets button:hover{border-color:var(--green);color:var(--ink);background:var(--soft)}
.pair-config-remorci .presets button[hidden]{display:none}

/* Carduri opțiuni */
.pair-config-remorci .option-subgroup{display:grid;gap:12px;margin-top:22px}
.pair-config-remorci .option-subgroup:first-of-type{margin-top:0}
.pair-config-remorci .option-subgroup h3{margin:0;font:600 17px/1.3 var(--f-head);color:var(--ink)}
.pair-config-remorci .option-grid{display:grid;gap:12px;min-width:0}
.pair-config-remorci .option-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.pair-config-remorci .option-grid.three,.pair-config-remorci .option-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.pair-config-remorci .option-card{position:relative;min-width:0;min-height:148px;overflow:hidden;padding:14px;border:1px solid #dfe3df;background:#fff;cursor:pointer;display:flex;flex-direction:column;transition:border-color .16s,box-shadow .16s,background .16s}
.pair-config-remorci .option-card:hover{border-color:#94ae5d;box-shadow:0 3px 12px rgba(29,40,11,.06)}
.pair-config-remorci .option-card:has(input:checked){border:2px solid var(--green);padding:13px;background:#f8faef;box-shadow:0 3px 12px rgba(29,40,11,.045)}
/* radio-ul rămâne în pagină (tastatură / cititoare de ecran), dar nu se vede — selecția se vede din chenarul cardului */
.pair-config-remorci .option-card input{position:absolute;top:0;left:0;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.pair-config-remorci .option-card:has(input:focus-visible){outline:2px solid var(--green);outline-offset:2px}
.pair-config-remorci .option-card b{margin-top:10px;font:600 16px/1.28 var(--f-head);color:var(--ink);overflow-wrap:anywhere}
.pair-config-remorci .option-card small{margin-top:3px;font:400 12px/1.45 var(--f-body);color:var(--muted);overflow-wrap:anywhere}
.pair-config-remorci .option-card.disabled{opacity:.42;cursor:not-allowed}
.pair-config-remorci .option-card em{margin-top:4px;font-style:normal;font-size:11px;font-weight:700;color:var(--green)}
.pair-config-remorci .material-sample{height:52px;background:#f3f6ed;display:flex;align-items:baseline;justify-content:center;gap:5px;padding-top:15px;color:var(--ink)}
.pair-config-remorci .material-sample>b{margin:0;font:700 21px "Roboto Condensed",sans-serif}
.pair-config-remorci .material-sample>small{margin:0;font-size:10px;color:var(--muted)}
.pair-config-remorci .option-card:has(.option-art){min-height:0;padding:10px}
.pair-config-remorci .option-card:has(.option-art):has(input:checked){padding:9px}
.pair-config-remorci .option-card:has(.option-art) b{margin-top:10px;font-size:14px}
.pair-config-remorci .option-card:has(.option-art) small{font-size:11px;line-height:1.45}
.pair-config-remorci .option-art{display:block;width:min(100%,120px);aspect-ratio:1;align-self:center;background:#f5f7f2;overflow:hidden}
.pair-config-remorci .option-art img{display:block;width:100%;height:100%;object-fit:contain}
.pair-config-remorci .option-art.empty{background:#f3f6ed}

/* Culori */
.pair-config-remorci .color-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.pair-config-remorci .color-option{position:relative;min-width:0;cursor:pointer}
.pair-config-remorci .color-option input{position:absolute;opacity:0}
.pair-config-remorci .color-option span{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px;text-align:center;border:1px solid var(--line);background:#fff;font-size:11px}
.pair-config-remorci .color-option i{display:block;width:40px;height:40px;flex:0 0 40px;border:1px solid rgba(0,0,0,.14)}
.pair-config-remorci .color-option b{font-size:12px;line-height:1.1}
.pair-config-remorci .color-option small{display:block;max-width:100%;font-size:9px;line-height:1.15;color:var(--muted);overflow-wrap:anywhere}
.pair-config-remorci .color-option input:checked+span{outline:2px solid var(--green);background:#f7faef;color:var(--ink);font-weight:700}
.pair-config-remorci .color-option input:focus-visible+span{outline:2px solid var(--ink)}

/* Acces lateral */
.pair-config-remorci .access-disabled-note{margin-bottom:16px;padding:14px 16px;border:1px solid #d6ddc7;background:#f4f6ef;display:grid;gap:3px}
.pair-config-remorci .access-disabled-note strong{font-size:12px;color:var(--ink)}
.pair-config-remorci .access-disabled-note span{font-size:12px;color:var(--muted)}
.pair-config-remorci .access-slant-note{margin:0 0 12px;font-size:12px;color:var(--muted)}
.pair-config-remorci .section-disabled .option-grid,.pair-config-remorci .section-disabled .check-grid{opacity:.38;filter:grayscale(.35)}
.pair-config-remorci .section-disabled .option-card,.pair-config-remorci .section-disabled .check-card{cursor:not-allowed}

/* Accesorii */
.pair-config-remorci .check-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pair-config-remorci .check-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);background:#fff;cursor:pointer}
.pair-config-remorci .check-card:has(input:checked){border-color:var(--green);background:#f7faef}
.pair-config-remorci .check-card input{width:18px;height:18px;accent-color:var(--green)}
.pair-config-remorci .check-card span{display:grid}
.pair-config-remorci .check-card b{font-size:13px;color:var(--ink)}
.pair-config-remorci .check-card small{font-size:11px;color:var(--muted)}
.pair-config-remorci .check-card em{font-style:normal;font-size:11px;font-weight:700;color:var(--green)}
.pair-config-remorci .check-card.disabled{opacity:.45;cursor:not-allowed}

/* Inscripționare */
.pair-config-remorci .print-row{display:grid;gap:16px}
.pair-config-remorci .segmented{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;background:#f0f3ed}
.pair-config-remorci .segmented label{position:relative;cursor:pointer}
.pair-config-remorci .segmented input{position:absolute;opacity:0}
.pair-config-remorci .segmented span{display:block;padding:11px;text-align:center;color:var(--muted);font-size:12px}
.pair-config-remorci .segmented input:checked+span{background:#fff;color:var(--ink);font-weight:700;box-shadow:0 2px 8px rgba(27,36,15,.1)}
.pair-config-remorci .segmented input:focus-visible+span{outline:2px solid var(--green)}
.pair-config-remorci .print-text input:disabled{background:#f3f4f1;color:#9ba198}

/* Trimitere */
.pair-config-remorci .primary-button{width:100%;min-height:50px;margin-top:24px;padding:12px 17px;border:0;background:var(--green);color:#fff;font-size:16px;font-weight:500;display:flex;align-items:center;justify-content:space-between;box-shadow:0 4px 4px rgba(29,40,11,.06)}
.pair-config-remorci .primary-button:hover{background:#5b7b1c}
.pair-config-remorci .primary-button:disabled{opacity:.6;cursor:not-allowed}
.pair-config-remorci .primary-button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.pair-config-remorci .submit-result{margin-top:14px;padding:14px 16px;background:#f3f6ea;color:var(--ink);font-size:13px}
.pair-config-remorci .submit-result.error{background:#fbeaea;color:#8a1f1f}

/* Preview */
.pair-config-remorci .preview-column{position:sticky;top:85px;z-index:0;min-width:0}
.pair-config-remorci .preview-card{padding:20px;max-height:calc(100vh - 100px);overflow-y:auto;overscroll-behavior:contain}
.pair-config-remorci .preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.pair-config-remorci .preview-header h2{font-size:24px}
.pair-config-remorci .preview-header button{border:0;background:transparent;color:var(--green);font-size:12px;text-decoration:underline}
.pair-config-remorci .model2d-view{margin-top:17px;border:1px solid var(--line);background:#fff;overflow:hidden}
.pair-config-remorci .model2d-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;border-bottom:1px solid var(--line);background:#fcfcfd}
.pair-config-remorci .model2d-caption:not(:first-child){border-top:1px solid var(--line)}
.pair-config-remorci .model2d-caption strong{font-size:13px;color:var(--ink)}
.pair-config-remorci .model2d-caption small{font-size:10px;color:var(--muted)}
.pair-config-remorci .model2d-stage{padding:12px 12px 5px;background:#fff;overflow:hidden}
.pair-config-remorci .model2d-stage svg{display:block;width:100%;height:auto;overflow:hidden}
.pair-config-remorci .model2d-stage .model2d-rear{width:min(78%,420px);margin:auto}
.pair-config-remorci .model2d-defs{position:absolute;width:0;height:0;overflow:hidden}
/* textul inscripționării, peste prelată (poziția/mărimea le setează JS-ul) */
.pair-config-remorci .model2d-print{fill:#fff;stroke:#000;stroke-opacity:.12;stroke-width:1;paint-order:stroke;font-family:"Roboto Condensed",sans-serif;font-weight:700;letter-spacing:1px;text-anchor:middle;dominant-baseline:middle;pointer-events:none}
.pair-config-remorci .model2d-dimensions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;border-top:1px solid var(--line);background:var(--line)}
.pair-config-remorci .model2d-dimensions span{display:grid;gap:1px;min-width:0;padding:9px 8px;background:#fff;text-align:center}
.pair-config-remorci .model2d-dimensions b{font-size:9px;line-height:1.1;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.pair-config-remorci .model2d-dimensions strong{font:700 12px/1.2 "Roboto Condensed",sans-serif;color:var(--ink);white-space:nowrap}
.pair-config-remorci .active-layers{display:flex;flex-wrap:wrap;gap:6px;min-height:29px;padding-top:10px}
.pair-config-remorci .active-layers span{padding:5px 8px;border:1px solid #dce5cd;background:#f6f8f0;color:var(--ink);font-size:10px;font-weight:700}
.pair-config-remorci .dimension-line{padding:10px 0 14px;text-align:center;color:var(--muted);font-size:12px;font-weight:500}
.pair-config-remorci .live-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pair-config-remorci .live-summary>div{display:grid;padding:12px;border-left:2px solid var(--green);background:#f3f6ea}
.pair-config-remorci .live-summary span{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.pair-config-remorci .live-summary strong{margin-top:2px;font:700 18px "Roboto Condensed",sans-serif;color:var(--ink)}
.pair-config-remorci .summary-list{list-style:none;margin:16px 0 0;padding:0;border-top:1px solid var(--line)}
.pair-config-remorci .summary-list li{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:12px}
.pair-config-remorci .summary-list span{color:var(--muted)}
.pair-config-remorci .summary-list b{text-align:right}
.pair-config-remorci .estimate-note{margin:14px 0 0;font-size:10px;color:var(--muted)}
.pair-config-remorci .summary-backdrop[hidden],.pair-config-remorci #summary-toggle,.pair-config-remorci #summary-close{display:none}

@media(max-width:1180px){
  .pair-config-remorci .intro{padding-left:24px;padding-right:24px}
  .pair-config-remorci .workspace{padding-left:24px;padding-right:24px;grid-template-columns:minmax(0,1fr) 340px}
  .pair-config-remorci .color-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:820px){
  .pair-config-remorci .intro{padding-top:32px}
  .pair-config-remorci .workspace{display:flex;flex-direction:column;padding-bottom:70px}
  .pair-config-remorci .configurator,.pair-config-remorci .preview-column{width:100%}
  .pair-config-remorci .option-grid.three,.pair-config-remorci .option-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pair-config-remorci .option-art{width:min(100%,96px)}
  .pair-config-remorci .config-section{scroll-margin-top:230px}
  /* preview compact, lipit sub header-ul fix */
  .pair-config-remorci .preview-column{position:sticky;top:65px;order:-1;align-self:flex-start;z-index:19}
  .pair-config-remorci .preview-card{max-height:none;overflow:visible;padding:9px 12px 10px;box-shadow:0 8px 20px rgba(29,40,11,.13)}
  .pair-config-remorci .preview-header{align-items:center}
  .pair-config-remorci .preview-header h2{font-size:17px}
  .pair-config-remorci .preview-header .eyebrow{display:none}
  .pair-config-remorci .preview-card .model2d-view{margin-top:5px}
  .pair-config-remorci .preview-card .model2d-stage{padding:0;display:grid;place-items:center}
  body:not(.pair-summary-open) .pair-config-remorci .preview-header,
  body:not(.pair-summary-open) .pair-config-remorci .model2d-caption,
  body:not(.pair-summary-open) .pair-config-remorci .model2d-rear-stage,
  body:not(.pair-summary-open) .pair-config-remorci .model2d-dimensions,
  body:not(.pair-summary-open) .pair-config-remorci .active-layers,
  body:not(.pair-summary-open) .pair-config-remorci .dimension-line,
  body:not(.pair-summary-open) .pair-config-remorci .live-summary,
  body:not(.pair-summary-open) .pair-config-remorci .summary-list,
  body:not(.pair-summary-open) .pair-config-remorci .estimate-note{display:none}
  body:not(.pair-summary-open) .pair-config-remorci .preview-card{padding:6px 10px 9px}
  body:not(.pair-summary-open) .pair-config-remorci .preview-card .model2d-view{margin:0;border:0}
  body:not(.pair-summary-open) .pair-config-remorci .preview-card .model2d-stage{min-height:126px}
  body:not(.pair-summary-open) .pair-config-remorci .preview-card .model2d-side{display:block;width:min(100%,230px);height:auto}
  .pair-config-remorci #summary-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;height:36px;margin-top:3px;padding:0 10px;border:1px solid var(--green);background:#fff;color:var(--green);font-size:13px;font-weight:600}
  .pair-config-remorci #summary-toggle span{font-size:18px}
  /* drawer deschis — peste header-ul fix (z-index 9999) */
  body.pair-summary-open{overflow:hidden}
  body.pair-summary-open .pair-config-remorci .preview-column{z-index:10001}
  body.pair-summary-open .pair-config-remorci .preview-card{position:fixed;inset:12px 12px max(12px,env(safe-area-inset-bottom));z-index:10001;max-height:none;overflow:auto;overscroll-behavior:contain;padding:18px;background:#fcfcfd;box-shadow:0 20px 70px rgba(0,0,0,.22)}
  body.pair-summary-open .pair-config-remorci .preview-header{gap:10px;margin-bottom:6px}
  body.pair-summary-open .pair-config-remorci .preview-header #reset-button{margin-left:auto}
  body.pair-summary-open .pair-config-remorci .model2d-side{width:100%;height:auto}
  body.pair-summary-open .pair-config-remorci #summary-toggle{display:none}
  body.pair-summary-open .pair-config-remorci #summary-close{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:var(--ink);font-size:12px;text-decoration:none}
  body.pair-summary-open .pair-config-remorci #summary-close span{font-size:22px;line-height:1}
  body.pair-summary-open .pair-config-remorci .summary-backdrop{display:block;position:fixed;inset:0;background:rgba(19,28,9,.64);z-index:10000}
}
@media(max-width:620px){
  .pair-config-remorci .model2d-dimensions{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .pair-config-remorci .intro{padding:30px 16px 22px}
  .pair-config-remorci .intro h1{font-size:34px}
  .pair-config-remorci .workspace{padding:0 12px 60px;gap:14px}
  .pair-config-remorci .config-section,.pair-config-remorci .preview-card{padding:18px}
  .pair-config-remorci .section-heading h2{font-size:23px}
  .pair-config-remorci .section-heading>span{flex-basis:34px;height:34px}
  .pair-config-remorci .field-grid,.pair-config-remorci .contact-grid,.pair-config-remorci .check-grid{grid-template-columns:1fr}
  .pair-config-remorci .option-card{padding:10px}
  .pair-config-remorci .option-card:has(input:checked){padding:9px}
  .pair-config-remorci .option-card b{font-size:14px}
  .pair-config-remorci .option-card small{font-size:11px}
  .pair-config-remorci .option-card:has(.option-art) b{font-size:13px}
  .pair-config-remorci .option-art{width:min(100%,88px)}
  .pair-config-remorci .option-grid.two .option-card{min-height:0}
  .pair-config-remorci .material-sample{height:44px;padding-top:10px}
  .pair-config-remorci .material-sample>b{font-size:18px}
  .pair-config-remorci .color-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .pair-config-remorci .color-option span{padding:5px;gap:3px}
  .pair-config-remorci .color-option i{width:27px;height:27px;flex-basis:27px}
  .pair-config-remorci .color-option b{font-size:10px}
  .pair-config-remorci .color-option small{font-size:8px}
  .pair-config-remorci .segmented{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  .pair-config-remorci .option-card{transition:none}
}
