/* V27 targeted corrections based strictly on latest client notes */

/* 1) Trust-strip typography to match the Kitchen Renovation Ajax feel more closely */
body.ak27-trust-match #trust .trust-grid{
  gap:0 !important;
}
body.ak27-trust-match #trust .trust-grid article{
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
  border:0 !important;
  border-left:1px solid rgba(255,255,255,.16) !important;
  padding:12px 18px !important;
}
body.ak27-trust-match #trust .trust-grid article:first-child{
  border-left:0 !important;
  padding-left:0 !important;
}
body.ak27-trust-match #trust .trust-no{
  display:block;
  color:#d7b267 !important;
  font:700 11px/1.2 Jost,Arial,sans-serif !important;
  letter-spacing:.18em !important;
  text-transform:uppercase;
}
body.ak27-trust-match #trust :is(h2,h3){
  margin:8px 0 9px !important;
  color:#e8c27c !important;
  font-family:"Cormorant Garamond",Georgia,serif !important;
  font-weight:500 !important;
  font-size:clamp(25px,1.9vw,31px) !important;
  line-height:1.08 !important;
  letter-spacing:0 !important;
}
body.ak27-trust-match #trust p{
  margin:0 !important;
  color:#cbd2dd !important;
  font:400 15px/1.55 Jost,Arial,sans-serif !important;
}

/* 2) Cabinet Refacing Ajax hero */
body.ak27-refacing-ajax #hero .hero-art img{object-position:center center !important;}

/* 3) Cabinet Refacing Scarborough scope image */
body.ak27-refacing-scarb #scope .rf21-portrait{max-height:none !important;}
body.ak27-refacing-scarb #scope .rf21-portrait img{
  display:block;
  width:100%;
  height:380px !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* 4) Custom Closets Scarborough fitted wardrobe image */
body.ak27-closets-scarb .sc18-closet-feature-a .sc18-feature-project{
  display:grid;
  grid-template-columns:minmax(340px,1.02fr) minmax(0,1fr);
  gap:28px;
  align-items:stretch;
}
body.ak27-closets-scarb .sc18-closet-feature-a .sc18-feature-project > img{
  display:block;
  width:100%;
  height:100%;
  min-height:420px;
  object-fit:cover;
  object-position:center center;
  border-radius:22px;
}

/* 5) Custom Laundry Ajax hero */
body.ak27-laundry-ajax #hero .hero-art img{object-position:center center !important;}

/* 6) Custom Bar Ajax hero */
body.ak27-bar-ajax #hero .hero-art img{object-position:center center !important;}

/* 7) Commercial Cabinetry Scarborough project cards */
body.ak27-commercial-scarb #projects .project-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
  align-items:stretch;
}
body.ak27-commercial-scarb #projects .project-card{
  display:flex;
  flex-direction:column;
  height:100%;
}
body.ak27-commercial-scarb #projects .project-image{
  height:320px !important;
  aspect-ratio:auto !important;
  overflow:hidden;
}
body.ak27-commercial-scarb #projects .project-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
}

/* 8) Kitchen Renovation Scarborough content images */
body.ak27-kitchen-scarb #services .ks20-wide-photo img{
  display:block;
  width:100%;
  height:520px !important;
  object-fit:cover !important;
  object-position:center center !important;
}
body.ak27-kitchen-scarb #design .ks20-photo img{
  display:block;
  width:100%;
  height:400px !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* 9) Laundry Scarborough section image heights + closing note placement */
/* Vanities Scarborough keeps its original image sizing. */
/* Bathroom Vanities Scarborough: display complete photos without cropping cabinet fronts or basins. */
body.ak27-vanities-scarb #detail-03 figure.v22-image-inset,
body.ak27-vanities-scarb #detail-06 figure.v22-image-inset{
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  margin:28px auto 30px !important;
}
body.ak27-vanities-scarb #detail-03 figure.v22-image-inset{max-width:640px !important;}
body.ak27-vanities-scarb #detail-06 figure.v22-image-inset{max-width:1000px !important;}
body.ak27-vanities-scarb #detail-03 figure.v22-image-inset > img,
body.ak27-vanities-scarb #detail-06 figure.v22-image-inset > img{
  display:block;
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center center !important;
}
/* Keep the three gallery images evenly framed while showing the full source photographs. */
body.ak27-vanities-scarb #projects .v22-photo{
  height:290px;
  background:#f2f0ec;
}
body.ak27-vanities-scarb #projects .v22-photo > img{
  display:block;
  width:100% !important;
  height:100% !important;
  max-height:none !important;
  max-width:none !important;
  object-fit:cover !important;
  object-position:center center;
}
body.ak27-vanities-scarb #projects .v22-project:nth-child(2) .v22-photo > img{
  object-position:center 58%;
}
@media(max-width:710px){
  body.ak27-vanities-scarb #projects .v22-photo{height:280px;}
}

/* Laundry Scarborough: display both entire photographs, without cropping. */
body.ak27-laundry-scarb #detail-04 figure.v22-image-inset,
body.ak27-laundry-scarb #detail-05 figure.v22-image-inset{
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  margin:28px auto 30px !important;
}
body.ak27-laundry-scarb #detail-04 figure.v22-image-inset{
  max-width:900px !important;
}
body.ak27-laundry-scarb #detail-05 figure.v22-image-inset{
  max-width:520px !important;
}
body.ak27-laundry-scarb #detail-04 figure.v22-image-inset > img,
body.ak27-laundry-scarb #detail-05 figure.v22-image-inset > img{
  display:block;
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center center !important;
}
body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(280px,.92fr);
  gap:24px;
  align-items:start;
}
body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > article:nth-of-type(1){grid-column:1;}
body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > article:nth-of-type(2){grid-column:2;}
body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > .v22-note{
  grid-column:3;
  align-self:stretch;
  height:100%;
  margin:0;
}
body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > .v22-note p{margin-bottom:0;}

/* 10) Bathroom Vanities Scarborough image heights */
body.ak27-vanities-scarb #detail-03 .v22-image-inset,
body.ak27-vanities-scarb #detail-06 .v22-image-inset,
body.ak27-laundry-scarb #detail-04 .v22-image-inset,
body.ak27-laundry-scarb #detail-05 .v22-image-inset{
  max-height:none !important;
}

@media (max-width: 1100px){
  body.ak27-commercial-scarb #projects .project-grid{grid-template-columns:1fr;}
  body.ak27-closets-scarb .sc18-closet-feature-a .sc18-feature-project{grid-template-columns:1fr;}
  body.ak27-closets-scarb .sc18-closet-feature-a .sc18-feature-project > img{min-height:320px;}
  body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three{
    grid-template-columns:1fr 1fr;
  }
  body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > .v22-note{
    grid-column:1 / -1;
    height:auto;
  }
}

@media (max-width: 780px){
  body.ak27-trust-match #trust .trust-grid{grid-template-columns:1fr 1fr !important;gap:18px 0 !important;}
  body.ak27-trust-match #trust .trust-grid article:nth-child(odd){border-left:0 !important;padding-left:0 !important;}
  body.ak27-trust-match #trust .trust-grid article:nth-child(even){padding-left:13px !important;}
  body.ak27-refacing-scarb #scope .rf21-portrait img{height:300px !important;}
  body.ak27-kitchen-scarb #services .ks20-wide-photo img{height:360px !important;}
  body.ak27-kitchen-scarb #design .ks20-photo img{height:320px !important;}
  body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three{grid-template-columns:1fr;}
  body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > article:nth-of-type(1),
  body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > article:nth-of-type(2),
  body.ak27-laundry-scarb #detail-07 .v22-grid.v22-three > .v22-note{grid-column:auto;}
}

@media (max-width: 420px){
  body.ak27-trust-match #trust .trust-grid{grid-template-columns:1fr !important;}
  body.ak27-trust-match #trust .trust-grid article,
  body.ak27-trust-match #trust .trust-grid article:first-child{
    border-left:0 !important;
    padding:6px 0 !important;
    border-bottom:1px solid rgba(255,255,255,.15) !important;
  }
}

/* REVIEW FIX A: Replace the original too-tall portrait arrangement with balanced 4-by-2 details + a wide photo. */
body.ak27-refacing-scarb #scope .rf21-scope-layout{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:20px!important;align-items:start!important;
}
body.ak27-refacing-scarb #scope .rf21-scope-grid{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;
}
body.ak27-refacing-scarb #scope .rf21-portrait{
  position:relative!important;width:100%!important;height:340px!important;min-height:340px!important;
  max-height:340px!important;align-self:auto!important;
}
body.ak27-refacing-scarb #scope .rf21-portrait img{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-height:none!important;object-fit:cover!important;object-position:center!important;
}
/* REVIEW FIX B: The earlier contain!important style caused the project's internal empty bands. */
body.ak27-commercial-scarb #projects .project-image img{
  width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;
}
@media(max-width:1050px){
  body.ak27-refacing-scarb #scope .rf21-scope-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:650px){
  body.ak27-refacing-scarb #scope .rf21-scope-grid{grid-template-columns:1fr!important;}
  body.ak27-refacing-scarb #scope .rf21-portrait{height:300px!important;min-height:300px!important;max-height:300px!important;}
}

/* REVIEW FIX C: Reference-exact trust strip typography from Kitchen Renovation Ajax. */
body.ak27-trust-match #trust .trust-no{
  color:#d7b369!important;
  font-family:Jost,Arial,sans-serif!important;
  font-size:11px!important;
  font-weight:700!important;
  line-height:normal!important;
  letter-spacing:.18em!important;
}
body.ak27-trust-match #trust :is(h2,h3){
  font-family:"Cormorant Garamond",Georgia,serif!important;
  font-size:clamp(25px,2.1vw,34px)!important;
  font-weight:500!important;
  line-height:1.1!important;
  letter-spacing:normal!important;
  color:#e7d6b3!important;
}
body.ak27-trust-match #trust p{
  font-family:Jost,Arial,sans-serif!important;
  font-size:16px!important;
  font-weight:400!important;
  line-height:1.6!important;
  color:#cbd2dd!important;
}
@media(max-width:420px){
 body.ak27-trust-match #trust :is(h2,h3){font-size:25px!important;}
}

/* REVIEW FIX D: Prevent the 6-item trust strips from wrapping as 5+1. */
body.ak27-trust-match:is(.ak27-refacing-scarb,.ak27-commercial-scarb,.ak27-kitchen-scarb,.ak27-vanities-scarb) #trust .trust-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px 0!important;
}
body.ak27-trust-match.ak27-laundry-scarb #trust .trust-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
}
body.ak27-trust-match:is(.ak27-refacing-scarb,.ak27-commercial-scarb,.ak27-kitchen-scarb,.ak27-vanities-scarb) #trust .trust-grid article:nth-child(3n+1){
  border-left:0!important;padding-left:0!important;
}
@media(max-width:900px){
 body.ak27-trust-match #trust .trust-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px 0!important;}
 body.ak27-trust-match #trust .trust-grid article:nth-child(odd){border-left:0!important;padding-left:0!important;}
 body.ak27-trust-match #trust .trust-grid article:nth-child(even){border-left:1px solid rgba(255,255,255,.16)!important;padding-left:13px!important;}
}
@media(max-width:420px){
 body.ak27-trust-match #trust .trust-grid{grid-template-columns:1fr!important;gap:8px!important;}
 body.ak27-trust-match #trust .trust-grid article{border-left:0!important;padding-left:0!important;}
}

/* Cabinet Refacing Ajax — client photo cards and project gallery (page-scoped). */
body.ak27-refacing-ajax :is(#scope,#styles,#projects) .v27-refacing-photo,
body.ak27-refacing-ajax #projects .v27-refacing-gallery-photo {
  display:block !important; position:relative; width:100% !important;
  height:auto !important; aspect-ratio:4 / 3 !important;
  min-height:0 !important; overflow:hidden !important; margin:0 !important;
  background:#eeeae4;
}
body.ak27-refacing-ajax :is(#scope,#styles,#projects) .v27-refacing-photo > img,
body.ak27-refacing-ajax #projects .v27-refacing-gallery-photo > img {
  display:block !important; width:100% !important; height:100% !important;
  max-width:100% !important; max-height:none !important;
  object-fit:cover !important; object-position:center center !important;
  transform:none !important; filter:none !important;
}
body.ak27-refacing-ajax #scope .v27-refacing-photo > img {object-position:center 43% !important;}
body.ak27-refacing-ajax :is(#scope,#styles,#projects) .v27-refacing-photo-card .v10-card-body {padding:22px 25px 25px;}

/* Bathroom Vanities Ajax — five client-uploaded images (page-scoped). */
body.ak24-vanity-ajax #projects .v10-project-image, body.ak24-vanity-ajax #projects .v10-project-image .v10-image {display:block!important;width:100%!important;height:auto!important;aspect-ratio:4/3!important;min-height:0!important;max-height:none!important;overflow:hidden!important;margin:0!important;background:#eae6df!important;}
body.ak24-vanity-ajax #projects .v10-project-image .v10-image > img {display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;object-position:center center!important;transform:none!important;filter:none!important;}
/* Fill the centre gallery frame without side gutters. */
body.ak24-vanity-ajax #projects .v10-project:nth-child(2) .v10-image > img {object-fit:cover!important;object-position:center center!important;background:#eae6df!important;}
@media (max-width:680px){body.ak24-vanity-ajax #projects .v10-project-image,body.ak24-vanity-ajax #projects .v10-project-image .v10-image{aspect-ratio:4/3!important;}}

/* Bathroom Vanities Ajax: equal-height original Function text cards (3 first row, 2 second). */
body.ak24-vanity-ajax #function .v10-card-grid {grid-auto-rows:minmax(0,1fr)!important;align-items:stretch!important;}
body.ak24-vanity-ajax #function .v10-card-grid > .v10-card {height:100%!important;min-height:0!important;box-sizing:border-box!important;}
