/* ============================================================
   Grace Home — restyling strony OFERTY (szablon rodzica page-offer.php
   zostaje; tu tylko branding + sticky formularz agenta przy opisie).
   Scope: body.offer
   ============================================================ */
body.offer { --gc:#FBF7F0; --gc2:#EFE6D8; --gi:#33251E; --gi2:#5C4C40; --gm:#8C7A69;
  --gb:#B4884C; --gb2:#9A7038; --gd:#3E2C22;
  background:var(--gc); color:var(--gi); font-family:'Jost',sans-serif; -webkit-font-smoothing:antialiased;
  /* motyw daje body overflow-x:hidden + overflow-y:auto -> body = scroll container
     i position:sticky NIE dziala; clip przycina poziomo bez tworzenia scrollportu */
  overflow-x:clip !important; overflow-y:visible !important; }

/* --- hero-slider zdjec oferty (crossfade jak na stronie glownej) --- */
body.ghh .ghs-hero--offer { position:relative; height:72vh; min-height:520px; max-height:820px;
  padding:0; margin:0; overflow:hidden; background:var(--gd); }
body.ghh .ghs-hero--offer::before { z-index:1; }
body.ghh .ghs-hero--offer::after { z-index:1; }
.ghs-offer-galink { position:absolute; right:48px; bottom:34px; z-index:3; display:inline-flex; align-items:center;
  background:rgba(28,20,16,.68); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  border:1px solid rgba(239,203,172,.3); border-radius:4px; padding:11px 18px; color:#FBF7F0 !important;
  font-size:12px; letter-spacing:.16em; text-transform:uppercase; font-weight:500; transition:border-color .3s ease; }
.ghs-offer-galink:hover { border-color:rgba(239,203,172,.65); color:#FBF7F0; }

/* body.ghh zeruje marginesy p/h — przywracamy rytm w starych sekcjach oferty */
body.ghh.offer .the-content p { margin:0 0 12px; }
body.ghh.offer .the-content ul, body.ghh.offer .the-content ol { margin:0 0 14px; }
body.ghh.offer .the-content h1, body.ghh.offer .the-content h2 { margin:0 0 14px; }
body.ghh.offer .the-content h3, body.ghh.offer .the-content h4 { margin:0 0 14px; }
body.ghh.offer #title { padding-top:34px; }

/* --- typografia sekcji --- */
body.offer h1, body.offer h2, body.offer h3, body.offer h4 { font-family:'Cormorant Garamond',serif; color:var(--gi); }
body.offer #title h1 { font-size:clamp(30px,3vw,46px); font-weight:500; line-height:1.12; letter-spacing:-.01em; }
body.offer #title h1 span, body.offer #title h2 span { color:var(--gb2); }
body.offer #title h2 { font-family:'Jost',sans-serif; font-size:13px; letter-spacing:.2em; text-transform:uppercase;
  color:var(--gm); font-weight:500; margin-top:10px; }
body.offer #title .price p { font-family:'Cormorant Garamond',serif; font-size:clamp(28px,2.6vw,42px);
  font-weight:600; color:var(--gi); }
body.offer .content > section > h3, body.offer .content h3.lh3,
body.offer #description h3, body.offer #contact h3 { font-size:30px; font-weight:600; margin-bottom:18px; }
body.offer #description { font-size:15.5px; line-height:1.8; color:var(--gi2); font-weight:300; }
body.offer #description b, body.offer #description strong { color:var(--gi); font-weight:500; }

/* --- parametry --- */
body.offer .parameters { font-size:14.5px; }
body.offer .parameters dt { color:var(--gm); font-weight:400; text-transform:uppercase; font-size:11.5px; letter-spacing:.1em; }
body.offer .parameters dd { color:var(--gi); font-weight:500; }

/* --- przyciski/akcenty starego szablonu --- */
body.offer .btn, body.offer .button, body.offer input[type=submit].form-control, body.offer button[type=submit] {
  background:var(--gb); border-color:var(--gb); color:#fff; }
body.offer .btn:hover, body.offer .button:hover { background:var(--gb2); border-color:var(--gb2); }
body.offer a { color:var(--gb2); }

/* --- uklad: opis + sticky kontakt (grid budowany przez gh-offer.js) --- */
.gh-offer-cols { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:0 56px; align-items:start;
  max-width:1304px; margin:0 auto; padding:0 48px; }
.gh-offer-cols .gh-offer-main { min-width:0; }
.gh-offer-cols #description, .gh-offer-cols #params-lateral,
.gh-offer-cols #presentation, .gh-offer-cols #gallery-grid { width:auto !important; max-width:none !important;
  padding-left:0 !important; padding-right:0 !important; margin-left:0 !important; margin-right:0 !important; }
.gh-offer-aside { position:sticky; top:80px; }

/* --- karta kontaktu agenta w aside --- */
.gh-offer-aside #contact { margin:0; padding:0; background:none; }
.gh-offer-aside #contact .container, .gh-offer-aside #contact .width-3, .gh-offer-aside #contact .width-4 {
  width:auto !important; max-width:none !important; padding:0 !important; margin:0 !important; }
.gh-offer-aside #contact > div { background:#fff; border:1px solid rgba(51,37,30,.1); border-radius:4px;
  box-shadow:0 30px 60px -45px rgba(46,33,27,.4); padding:30px 28px; }
.gh-offer-aside #contact h3 { font-size:24px; margin-bottom:16px; }
.gh-offer-aside #contact .row { display:block; margin:0; }
.gh-offer-aside #contact .row > .col { width:100%; max-width:100%; padding:0; }
body.offer .agent-card { display:flex; gap:16px; align-items:center; margin-bottom:20px; }
body.offer .agent-card .image img { width:72px; height:72px; object-fit:cover; border-radius:8px; }
body.offer .agent-card .title h3 { font-size:21px; margin:0 0 2px; }
body.offer .agent-card .position { font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--gb); margin:0; }
body.offer .agent-card .license { font-size:11.5px; color:var(--gm); margin:2px 0 0; }
body.offer .agent-card .links { list-style:none; padding:0; margin:6px 0 0; font-size:13.5px; }
body.offer .agent-card .links a { color:var(--gi); }

/* --- formularz agenta --- */
body.offer .widget-contact-form label { display:block; font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--gi2); font-weight:500; margin-bottom:6px; }
body.offer .widget-contact-form .form-group { margin-bottom:14px; }
body.offer .widget-contact-form input.form-control, body.offer .widget-contact-form textarea.form-control,
body.offer .widget-contact-form select.form-control { width:100%; min-height:44px; border:1px solid #D8D0C0;
  border-radius:4px; background:#FBF9F4; padding:8px 13px; font-family:'Jost',sans-serif; font-size:14.5px;
  color:var(--gi); outline:none; transition:border-color .3s ease, box-shadow .3s ease; }
body.offer .widget-contact-form input.form-control:focus, body.offer .widget-contact-form textarea.form-control:focus {
  border-color:var(--gb); background:#fff; box-shadow:0 0 0 3px rgba(180,136,76,.16); }
body.offer .widget-contact-form input[type=submit], body.offer .widget-contact-form button[type=submit] {
  display:inline-flex; align-items:center; padding:13px 28px; background:var(--gb); color:#fff; border:none;
  border-radius:2px; font-family:'Jost',sans-serif; font-size:12.5px; letter-spacing:.16em; text-transform:uppercase;
  font-weight:500; cursor:pointer; transition:background .35s ease; }
body.offer .widget-contact-form input[type=submit]:hover { background:var(--gb2); }
body.offer .widget-contact-form .clausule, body.offer .widget-contact-form .data-info { font-size:11px; color:var(--gm); }

/* --- kompaktowanie karty (ma miescic sie w viewport przy sticky) --- */
.gh-offer-aside #contact > div { padding:16px 20px 14px; }
.gh-offer-aside #contact h3 { font-size:18px; margin-bottom:8px; }
/* karta agenta poziomo, bez rozrostu */
.gh-offer-aside .agent-card { margin-bottom:10px; align-items:flex-start; }
.gh-offer-aside .agent-card .image { flex:0 0 128px; }
.gh-offer-aside .agent-card .image img { width:128px !important; height:128px !important; max-width:128px; border-radius:8px !important; }
.gh-offer-aside .agent-card .title h3 { font-size:17px; margin:0; }
.gh-offer-aside .agent-card .position { font-size:10px; }
.gh-offer-aside .agent-card .license { font-size:10.5px; margin:0; }
.gh-offer-aside .agent-card .links { margin:4px 0 0 !important; padding:0 !important; font-size:12.5px; }
.gh-offer-aside .agent-card .links li { display:inline-block; margin:0 12px 0 0 !important; }
/* marginesy z motywu (selektory z ID) rozpychaly karte */
.gh-offer-aside .agent-card .title h3 { margin:0 0 2px !important; padding:0 !important; line-height:1.2 !important; }
.gh-offer-aside .agent-card .title p { margin:0 !important; padding:0 !important; line-height:1.35 !important; }
.gh-offer-aside .agent-card .title { margin:0 !important; padding:0 !important; }
.gh-offer-aside .agent-card .info > * { margin-top:0 !important; }
/* pola formularza w 2 kolumnach; wiadomosc/zgody/captcha/submit na calosc */
.gh-offer-aside .widget-contact-form form > .row { display:grid !important; grid-template-columns:1fr 1fr; gap:0 10px; }
.gh-offer-aside .widget-contact-form .form-group { width:100%; max-width:100%; padding:0; margin-bottom:6px; }
.gh-offer-aside .widget-contact-form .form-group.message, .gh-offer-aside .widget-contact-form .form-group.meeting,
.gh-offer-aside .widget-contact-form .form-group.clausule, .gh-offer-aside .widget-contact-form .form-group.captcha,
.gh-offer-aside .widget-contact-form .form-group.submit { grid-column:1 / -1; }
.gh-offer-aside .widget-contact-form label { margin-bottom:3px; font-size:10px; }
.gh-offer-aside .widget-contact-form input.form-control { min-height:34px; padding:3px 10px; font-size:13px; }
.gh-offer-aside .widget-contact-form textarea.form-control { height:50px; min-height:50px; max-height:50px; font-size:13px; }
.gh-offer-aside .widget-contact-form .clausule, .gh-offer-aside .widget-contact-form .data-info,
.gh-offer-aside .widget-contact-form .clausule label { font-size:10px; line-height:1.4; letter-spacing:0; text-transform:none; color:var(--gm); font-weight:300; }
.gh-offer-aside .widget-contact-form .data-info { max-height:36px; overflow-y:auto; }
.gh-offer-aside .widget-contact-form input[type=submit] { padding:9px 22px; font-size:11.5px; width:100%; justify-content:center; }
.gh-offer-aside .widget-contact-form .form-group.captcha input { width:110px; }

/* --- dobicie specyficznosci (motyw styluje przez #contact) --- */
.gh-offer-aside #contact h3 { text-align:left !important; }
.gh-offer-aside #contact .agent-card { display:flex !important; gap:14px !important; align-items:flex-start !important;
  text-align:left !important; }
.gh-offer-aside #contact .agent-card .info { text-align:left !important; flex:1; }
.gh-offer-aside #contact .agent-card .title h3 { font-size:19px !important; color:var(--gi) !important;
  text-align:left !important; margin:0 0 2px !important; line-height:1.2 !important; }
.gh-offer-aside #contact .agent-card .position { font-family:'Jost',sans-serif !important; font-size:10px !important;
  letter-spacing:.14em !important; text-transform:uppercase !important; color:var(--gb) !important;
  margin:0 !important; text-align:left !important; font-weight:500 !important; line-height:1.5 !important; }
.gh-offer-aside #contact .agent-card .license { font-size:10.5px !important; color:var(--gm) !important;
  margin:0 !important; text-align:left !important; }
.gh-offer-aside #contact .agent-card .links { text-align:left !important; }
.gh-offer-aside #contact .widget-contact-form input.form-control,
.gh-offer-aside #contact .widget-contact-form textarea.form-control {
  border:1px solid #D8D0C0 !important; border-radius:4px !important; background:#FBF9F4 !important;
  box-shadow:none !important; padding:4px 10px !important; }
.gh-offer-aside #contact .widget-contact-form input.form-control:focus,
.gh-offer-aside #contact .widget-contact-form textarea.form-control:focus {
  border-color:var(--gb) !important; background:#fff !important; box-shadow:0 0 0 3px rgba(180,136,76,.16) !important; }
.gh-offer-aside #contact .widget-contact-form label { text-align:left !important; }

/* --- RWD --- */
@media (max-width: 1100px) {
  .gh-offer-cols { display:block; padding:0 22px; }
  .gh-offer-aside { position:static; margin-top:40px; }
}

/* --- data+czas spotkania w jednym rzedzie; klauzula zgody drobna --- */
.gh-offer-aside .widget-contact-form .form-group.meeting { display:flex; flex-wrap:wrap; gap:4px 8px; }
.gh-offer-aside .widget-contact-form .form-group.meeting label { flex:0 0 100%; }
.gh-offer-aside .widget-contact-form .form-group.meeting input { flex:1 1 0; width:auto; min-width:0; }
.gh-offer-aside .widget-contact-form .form-group.clausule.data-processing { font-size:9.5px; line-height:1.35; }
.gh-offer-aside .widget-contact-form .form-group.clausule.data-processing label { font-size:9.5px !important; line-height:1.35 !important; }

/* --- finalne domkniecie wysokosci karty (cala na ekranie 900px) --- */
.gh-offer-aside #contact > h3, .gh-offer-aside #contact > div > h3 { display:none; }
.gh-offer-aside .widget-contact-form .form-group { margin-bottom:5px; }
.gh-offer-aside .widget-contact-form textarea.form-control { height:44px; min-height:44px; max-height:44px; }
.gh-offer-aside .widget-contact-form label { margin-bottom:2px; }
.gh-offer-aside { top:76px; }
.gh-offer-aside #contact > div { padding:12px 18px 12px; }
.gh-offer-aside .widget-contact-form .data-info { max-height:26px; }
.gh-offer-aside .agent-card { margin-bottom:8px; }
.gh-offer-aside { top:70px; }

/* --- oddech karty: wiekszy padding (zdjecie z odstepem od krawedzi);
   bilans wysokosci: label daty zbedny (placeholdery mowia same) --- */
.gh-offer-aside #contact > div { padding:22px 24px 18px !important; }
.gh-offer-aside .agent-card { margin-bottom:14px !important; }
.gh-offer-aside .widget-contact-form .form-group.meeting label { display:none; }

/* --- FIX: reset .container{padding:0!important} (spec 1,2,0) wygrywal z
   '#contact > div' (spec 1,1,1) — dlatego karta miala 0 paddingu i zdjecie
   dotykalo krawedzi. Nadpisujemy ten sam selektor, pozniej w zrodle. --- */
.gh-offer-aside #contact > .container,
.gh-offer-aside #contact > .width-3,
.gh-offer-aside #contact > .width-4 { padding:20px 22px 16px !important; }
/* odzysk wysokosci, by karta z realnym paddingiem miescila sie na 1 ekranie */
.gh-offer-aside .widget-contact-form .form-group { margin-bottom:4px; }
.gh-offer-aside .widget-contact-form input.form-control { min-height:32px; }
.gh-offer-aside .widget-contact-form textarea.form-control { height:40px; min-height:40px; max-height:40px; }

/* --- meeting: data+czas OBOK siebie, ikony datepickera schowane (afordancja
   w placeholderach); message: niski textarea. Odzysk ~95px+. --- */
.gh-offer-aside .widget-contact-form .form-group.meeting { display:flex; flex-wrap:wrap; gap:0 8px; }
.gh-offer-aside .widget-contact-form .form-group.meeting > label { flex:0 0 100%; display:none; }
.gh-offer-aside .widget-contact-form .form-group.meeting input.form-control { flex:1 1 0; width:auto; min-width:0; }
.gh-offer-aside .widget-contact-form .form-group.meeting > span { display:none; }
.gh-offer-aside .widget-contact-form .form-group.message textarea.form-control {
  height:38px !important; min-height:38px !important; max-height:38px !important; }

/* ============================================================
   LISTA KATEGORII (child page-offers.php) — hero + branding kart
   ============================================================ */
body.offers { --gc:#FBF7F0; --gc2:#EFE6D8; --gi:#33251E; --gi2:#5C4C40; --gm:#8C7A69;
  --gb:#B4884C; --gb2:#9A7038; --gd:#3E2C22;
  background:var(--gc); color:var(--gi); font-family:'Jost',sans-serif; -webkit-font-smoothing:antialiased;
  overflow-x:clip !important; overflow-y:visible !important; }

/* hero listy */
body.ghh .ghs-hero--catlist { position:relative; background:var(--gd); padding:180px 48px 70px; margin:0; overflow:hidden; }
body.ghh .ghs-hero--catlist::after { content:""; position:absolute; right:-140px; bottom:-200px; width:520px; height:520px;
  border-radius:50%; background:radial-gradient(circle, rgba(180,136,76,.22), transparent 68%); pointer-events:none; }
body.ghh .ghs-hero--catlist .ghh-wrap { position:relative; z-index:1; max-width:1304px; margin:0 auto; }
.ghh .ghs-hero--catlist h1 { font-family:'Cormorant Garamond',serif; font-weight:500; color:var(--gc);
  font-size:clamp(38px,4.6vw,66px); line-height:1.05; letter-spacing:-.01em; }
.ghs-hero--catlist .ghh-lead { color:rgba(251,247,240,.78); max-width:56ch; margin-top:18px; }

/* kontener listy */
body.offers #primary { max-width:1304px; margin:0 auto; padding:64px 48px 90px; }
body.offers #list { width:auto !important; }
body.offers #list > header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  flex-wrap:wrap; margin-bottom:36px; padding-bottom:20px; border-bottom:1px solid rgba(51,37,30,.14); }
body.offers #list > header .info { font-size:13px; letter-spacing:.02em; color:var(--gm); margin:0; }
body.offers #list > header .info .title { font-family:'Cormorant Garamond',serif; font-size:26px; font-weight:600;
  color:var(--gi); letter-spacing:0; text-transform:none; }
body.offers #list > header .info .count { color:var(--gb2); font-weight:600; }
body.offers .sorting select, body.offers .group select { border:1px solid #D8D0C0; border-radius:4px; background:#FBF9F4;
  padding:9px 34px 9px 14px; font-family:'Jost',sans-serif; font-size:13px; color:var(--gi); }
body.offers .btn, body.offers .button { background:var(--gb); border-color:var(--gb); color:#fff; border-radius:2px; }
body.offers .btn:hover, body.offers .button:hover { background:var(--gb2); border-color:var(--gb2); }

/* siatka kart */
body.offers .offers, body.offers .holder { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
body.offers .property { background:#fff; border:1px solid rgba(51,37,30,.1); border-radius:4px; overflow:hidden;
  box-shadow:0 26px 55px -42px rgba(46,33,27,.4); transition:transform .5s ease, box-shadow .5s ease; margin:0; }
body.offers .property:hover { transform:translateY(-4px); box-shadow:0 34px 66px -40px rgba(46,33,27,.5); }
body.offers .property .inner { display:flex; flex-direction:column; height:100%; }
body.offers .property .image { position:relative; height:230px; overflow:hidden; }
body.offers .property .image img { width:100%; height:100%; object-fit:cover; }
body.offers .property .info { padding:22px 22px 24px; display:flex; flex-direction:column; flex:1; }
body.offers .property .location { display:flex; gap:6px; flex-wrap:wrap; font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--gb); font-weight:500; margin-bottom:8px; }
body.offers .property .location .street { color:var(--gm); }
body.offers .property .name { font-family:'Cormorant Garamond',serif; font-size:22px; font-weight:600; color:var(--gi);
  line-height:1.2; margin:0 0 16px; }
body.offers .property .params { display:flex; gap:20px; margin:0 0 16px; padding:14px 0;
  border-top:1px solid rgba(51,37,30,.1); border-bottom:1px solid rgba(51,37,30,.1); }
body.offers .property .params dt { font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--gm); font-weight:400; }
body.offers .property .params dd { font-size:15px; color:var(--gi); font-weight:500; margin:2px 0 0; }
body.offers .property .prices { margin-top:auto; }
body.offers .property .price { font-family:'Cormorant Garamond',serif; font-size:26px; font-weight:600; color:var(--gi); margin:0; }
body.offers .property .price-m2 { font-size:12px; color:var(--gm); margin:2px 0 0; }
body.offers .property .links { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
body.offers .property .link-offer { flex:1; text-align:center; }
body.offers .property .bookmark { color:var(--gb); }

/* paginacja */
body.offers .pagination, body.offers .pager { display:flex; gap:8px; justify-content:center; margin-top:48px; }
body.offers .pagination a, body.offers .pagination span { min-width:42px; height:42px; display:inline-flex;
  align-items:center; justify-content:center; border:1px solid rgba(51,37,30,.16); border-radius:4px; color:var(--gi);
  font-size:14px; }
body.offers .pagination .current, body.offers .pagination a:hover { background:var(--gb); border-color:var(--gb); color:#fff; }

/* tresc opisu kategorii pod lista */
body.offers #secondary { max-width:1304px; margin:0 auto; padding:0 48px 80px; }
body.offers #secondary .the-content { font-size:15.5px; line-height:1.8; color:var(--gi2); font-weight:300; }

@media (max-width: 1100px) {
  body.offers .offers, body.offers .holder { grid-template-columns:repeat(2,1fr); }
  body.offers #primary { padding:48px 22px 70px; }
  body.ghh .ghs-hero--catlist { padding:150px 22px 56px; }
}
@media (max-width: 680px) {
  body.offers .offers, body.offers .holder { grid-template-columns:1fr; }
}

/* --- FIX: .holder ma display:flex z motywu (ignoruje grid) + karty za szerokie --- */
body.offers #primary { max-width:1304px !important; margin:0 auto !important; padding:64px 48px 90px !important; }
body.offers .holder { display:grid !important; grid-template-columns:repeat(3,1fr) !important; gap:28px !important;
  width:auto !important; }
body.offers .property { margin:0 !important; width:auto !important; max-width:none !important; float:none !important; }
/* zdjecie agenta w karcie oferty: kadr od gory (nie obcinac glowy) */
.gh-offer-aside .agent-card .image img { object-position:top center !important; }

/* --- kontener listy do 1304 (motyw daje .holder ujemne marginesy -> overflow) --- */
body.offers #primary { padding:0 !important; max-width:none !important; }
body.offers #list { max-width:1304px !important; margin:0 auto !important; padding:64px 48px 90px !important; width:auto !important; }
body.offers .holder { margin:0 !important; }
body.offers #list > header { margin-left:0 !important; margin-right:0 !important; }

/* --- HERO listy = slider pierwszych zdjec ofert (crossfade gh-home.js) --- */
body.ghh .ghs-hero--offerslist { position:relative; height:58vh; min-height:440px; max-height:680px;
  padding:0; margin:0; overflow:hidden; background:var(--gd); display:flex; align-items:flex-end; }
body.ghh .ghs-hero--offerslist .ghs-slides { position:absolute !important; inset:0; z-index:0; margin:0 !important; }
body.ghh .ghs-hero--offerslist .ghh-wrap { position:relative; z-index:2; max-width:1304px; width:100%;
  margin:0 auto; padding:0 48px 60px; }
body.ghh .ghs-hero--offerslist .ghh-eyebrow--light { color:var(--ghh-peach); }
@media (max-width:760px){ body.ghh .ghs-hero--offerslist .ghh-wrap { padding:0 22px 40px; } }
