/* Sharp Floors: isolate new category improvements and project gallery from legacy site CSS */
.sf-scroll-safe{overflow-x:clip!important;overflow-y:auto!important}
.sf-floor-qualities{background:#f7f4ef;padding:30px 0;border-bottom:1px solid #e7e0d5;color:#28241e}
.sf-floor-intro{max-width:790px;margin:0 auto 20px!important;text-align:center;font-size:1rem;line-height:1.65;color:#4c453d}
.sf-floor-chips{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:9px}
.sf-floor-chips span{font-size:.79rem;font-weight:650;padding:9px 14px;border:1px solid #ded3c1;background:#fff;border-radius:4px;white-space:normal;text-align:center}
.sf-engineered-projects .ef-hero{position:relative;isolation:isolate;min-height:440px;color:white;display:flex;align-items:center;background:#25211c;overflow:hidden}
.sf-engineered-projects .ef-hero-image,.sf-engineered-projects .ef-hero-shade{position:absolute;inset:0;width:100%;height:100%;z-index:-2}
.sf-engineered-projects .ef-hero-image{object-fit:cover;object-position:48% 49%}
.sf-engineered-projects .ef-hero-shade{z-index:-1;background:linear-gradient(90deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.55) 45%,rgba(0,0,0,.07) 100%)}
.sf-engineered-projects .ef-hero-inner{padding:65px 0;position:relative}
.sf-engineered-projects .ef-kicker{font-size:.78rem;font-weight:700;letter-spacing:2.4px;color:#e6c27c}
.sf-engineered-projects .ef-hero h1{max-width:840px;font:400 clamp(2.4rem,4.7vw,4rem)/1.08 Georgia,serif;letter-spacing:-.035em;margin:15px 0 20px;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.35)}
.sf-engineered-projects .ef-hero p{max-width:590px;line-height:1.62;font-size:1rem;color:#f5f0e5;margin:0 0 22px;text-shadow:0 1px 6px #000}
.sf-engineered-projects .ef-crumb{padding:22px 0;color:#696052;display:flex;gap:12px;align-items:center;font-size:.84rem}
.sf-engineered-projects .ef-crumb a{text-decoration:underline;text-underline-offset:3px;color:#80612b}
.sf-engineered-projects .ef-section{background:#fff;padding:27px 0 83px}
.sf-engineered-projects .ef-section h2{color:#1e1c19;font:400 clamp(2rem,3.2vw,3.1rem)/1.1 Georgia,serif;margin:0 0 12px}
.sf-engineered-projects .ef-project-intro{color:#6b645c;margin:0 0 28px;font-size:.95rem}
.sf-engineered-projects .ef-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.sf-engineered-projects .ef-project-card{border:1px solid #e5dfd6;border-radius:6px;background:#fff;cursor:pointer;text-align:left;padding:0;color:#221f1a;overflow:hidden;box-shadow:0 5px 19px rgba(20,15,8,.07);transition:transform .15s,box-shadow .15s}
.sf-engineered-projects .ef-project-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(20,15,8,.13)}
.sf-engineered-projects .ef-project-card:focus-visible{outline:3px solid #e2b448;outline-offset:3px}
.sf-engineered-projects .ef-project-card>img{display:block;width:100%;height:255px;object-fit:contain;object-position:center;background:#f7f4ef}
.sf-engineered-projects .ef-card-info{padding:19px 20px 19px;min-height:190px;display:flex;flex-direction:column;align-items:flex-start}
.sf-engineered-projects .ef-card-name{font-size:.83rem;font-weight:750;color:#8b652e;letter-spacing:.2px;margin-bottom:6px}
.sf-engineered-projects .ef-card-info h3{font:400 1.5rem/1.16 Georgia,serif;margin:0 0 11px;color:#251f17}
.sf-engineered-projects .ef-card-info p{font-size:.85rem;line-height:1.55;color:#615b50;margin:0 0 20px}
.sf-engineered-projects .ef-card-action{margin-top:auto;width:100%;display:flex;align-items:center;justify-content:space-between;font-size:.82rem;font-weight:700}
.sf-engineered-projects .ef-card-action b{display:grid;place-items:center;border-radius:50%;width:33px;height:33px;background:#e8bd58;font-size:1.1rem;color:#17130c}
.sf-engineered-projects .ef-service-areas{font-size:.82rem;color:#645d54;margin:32px 0 0}
.ef-gallery[hidden]{display:none!important}
.ef-gallery{position:fixed;inset:0;z-index:5000;background:rgba(9,9,8,.79);display:flex;align-items:center;justify-content:center;padding:22px}
.ef-gallery-panel{width:min(1110px,100%);max-height:93dvh;overflow:auto;overscroll-behavior:contain;background:white;border-radius:8px;position:relative;color:#24211d}
.ef-gallery-close{position:sticky;top:12px;margin:12px 12px -35px auto;z-index:6;display:grid;place-items:center;width:40px;height:40px;border:none;border-radius:50%;font-size:1.7rem;background:#111;color:#fff;cursor:pointer}
.ef-gallery-content{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,.9fr);gap:23px;padding:20px 30px 30px}
.ef-gallery-images{min-width:0}.ef-gallery-company{font-size:.84rem;font-weight:800;color:#88632c;margin-bottom:6px}
.ef-gallery-images h2{font:400 2rem Georgia,serif;color:#28231e;margin:0 0 5px}.ef-gallery-color{font-weight:650;font-size:.91rem;margin-bottom:17px}
.ef-large-img-box{width:100%;height:375px;display:grid;place-items:center;background:#f5f2ed;border-radius:5px;overflow:hidden}
.ef-large-img-box img{height:100%;width:100%;object-fit:contain;display:block}
.ef-gallery-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:13px 0;font-size:.84rem}
.ef-gallery-actions button{cursor:pointer;border:0;background:#e7bd58;color:#16130e;font-weight:750;border-radius:4px;padding:9px 13px}
.ef-thumbs{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:8px;margin:10px 0 3px;padding:4px 3px 11px;scrollbar-width:thin;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.ef-thumbs button{flex:1 0 0;min-width:48px;max-width:105px;padding:0;border:3px solid transparent;cursor:pointer;background:#f7f5f1;border-radius:4px;overflow:hidden;scroll-snap-align:center;aspect-ratio:4 / 3}
.ef-thumbs button:focus-visible{outline:3px solid #ad8a3d}.ef-thumbs button.selected{border-color:#d9a63f}
.ef-thumbs img{display:block;width:100%;height:100%;object-fit:cover}
.ef-gallery-details{background:#f8f4ee;padding:24px 20px;border-radius:6px;align-self:start}
.ef-gallery-details h3{font:400 1.6rem Georgia,serif;margin:0 0 12px;color:#29241d}
.ef-specrow{display:flex;justify-content:space-between;align-items:baseline;gap:10px;border-bottom:1px solid #e1d9cd;padding:9px 0;font-size:.82rem}
.ef-specrow span{color:#655d52}.ef-specrow strong{text-align:right;font-weight:700}
.ef-details-foot{font-size:.78rem;color:#625a4e;line-height:1.56;margin:14px 0 20px}
.ef-contact,.ef-directions{display:flex;align-items:center;justify-content:center;min-height:43px;padding:9px;border-radius:4px;text-align:center;font-size:.83rem;font-weight:750}
.ef-contact{background:#e7bb57;color:#1c160a}.ef-directions{margin-top:8px;border:1px solid #9f8149;color:#68502b}
.ef-viz-note{margin:12px 0 0;color:#655f54;font-size:.74rem;line-height:1.5}
@media(max-width:850px){.sf-engineered-projects .ef-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ef-gallery-content{grid-template-columns:1fr}.ef-large-img-box{height:330px}}
@media(max-width:650px){
 .sf-floor-qualities{padding:24px 0}.sf-floor-intro{font-size:.86rem;margin-bottom:14px!important}.sf-floor-chips{gap:7px}.sf-floor-chips span{font-size:.73rem;padding:7px 9px}
 .sf-engineered-projects .ef-hero{min-height:405px;align-items:flex-start}.sf-engineered-projects .ef-hero-image{object-position:55% 35%}
 .sf-engineered-projects .ef-hero-shade{background:linear-gradient(180deg,rgba(0,0,0,.77),rgba(0,0,0,.43) 58%,rgba(0,0,0,.16))}
 .sf-engineered-projects .ef-hero-inner{padding:40px 0 55px}.sf-engineered-projects .ef-hero h1{font-size:clamp(2rem,8.1vw,2.65rem);line-height:1.08}
 .sf-engineered-projects .ef-hero p{font-size:.89rem;line-height:1.51;max-width:410px}
 .sf-engineered-projects .ef-crumb{padding:18px 0;font-size:.75rem}.sf-engineered-projects .ef-section{padding:22px 0 53px}
 .sf-engineered-projects .ef-section h2{font-size:2rem}.sf-engineered-projects .ef-project-intro{font-size:.86rem}
 .sf-engineered-projects .ef-project-grid{grid-template-columns:1fr;gap:17px}
 .sf-engineered-projects .ef-project-card>img{height:225px}.sf-engineered-projects .ef-card-info{min-height:auto;padding:17px 18px}
 .ef-gallery{padding:4px}.ef-gallery-panel{max-height:98dvh}.ef-gallery-content{padding:18px 14px 25px;gap:12px}
 .ef-gallery-images h2{font-size:1.75rem}.ef-gallery-close{width:36px;height:36px}
 .ef-large-img-box{height:270px}.ef-gallery-actions{font-size:.75rem}.ef-gallery-actions button{padding:8px 9px}
 .ef-thumbs{gap:7px}.ef-thumbs button{flex:0 0 87px;min-width:87px;max-width:87px}.ef-gallery-details{padding:19px 15px}
}
@media(prefers-reduced-motion:reduce){.ef-project-card{transition:none!important}}


/* Desktop: show complete project photographs at their original proportions.
   Do not crop or zoom portrait photos: customers must see the entire floor and room.
   Keep the mobile gallery unchanged. */
@media (min-width: 851px) {
  .ef-large-img-box { position:relative; height:clamp(360px,48vh,475px); background:#eeeae4; }
  .ef-large-img-box img { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center; }
  .sf-engineered-projects .ef-project-card[data-project="2"] > img,
  .sf-engineered-projects .ef-project-card[data-project="3"] > img,
  .ef-gallery[data-active-project="2"] .ef-thumbs img,
  .ef-gallery[data-active-project="3"] .ef-thumbs img { object-position:center 65%; }
}

/* Six-project expansion: brief showroom invitation appears as plain copy, not an extra button. */
.sf-engineered-projects .ef-card-info .ef-card-showroom{font-size:.77rem;line-height:1.5;color:#756a59;padding-top:10px;margin:0 0 18px;border-top:1px solid #eee9e1;width:100%}
.sf-engineered-projects .ef-card-info .ef-card-action{margin-top:auto}
.ef-showroom-invite{font-size:.82rem;line-height:1.5;color:#62584b;margin:14px 0 18px}
.ef-gallery-details .ef-details-foot[hidden]{display:none}
/* Enforce contain and prevent any desktop zoom/crop, while retaining approved responsive layout. */
.ef-gallery .ef-large-img-box img{object-fit:contain!important;object-position:center!important}
@media(max-width:650px){.sf-engineered-projects .ef-card-info .ef-card-showroom{margin:0 0 14px}}


/* v12 — final six-project phone/tablet photo fit correction.
   Full photo is visible in project cards, slideshow and thumbnails, including tall
   portrait photos. Never use object-fit:cover for customer project photos on phones.
   Desktop slideshow keeps the approved proportional, noncropping layout. */
.ef-gallery .ef-thumbs img {
  object-fit: contain !important;
  object-position: center !important;
  background: #f7f4ef;
  transform: none !important;
}
.ef-gallery .ef-large-img-box img {
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
@media (max-width: 850px) {
  .ef-gallery .ef-large-img-box {
    position: relative;
    height: auto !important;
    min-height: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f4ef;
  }
  .ef-gallery .ef-large-img-box img {
    position: static !important;
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: min(62svh, 550px) !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    margin: 0 auto;
  }
  .sf-engineered-projects .ef-project-card > img {
    object-fit: contain !important;
    object-position: center !important;
    background: #f7f4ef;
    transform: none !important;
  }
}
@media (max-width: 650px) {
  .sf-engineered-projects .ef-project-card > img {
    width: 100%;
    height: clamp(265px, 80vw, 350px);
    max-width: 100%;
    object-fit: contain !important;
  }
  .ef-gallery-panel {
    max-height: 98dvh;
    max-width: 100%;
    overscroll-behavior: contain;
  }
  .ef-gallery-content { min-width: 0; }
  .ef-gallery-images { min-width: 0; }
  .ef-gallery .ef-large-img-box { width: 100%; }
  .ef-gallery .ef-large-img-box img { max-height: min(62svh, 550px) !important; }
}

/* Project 1 onward: no clipping, enlargement or unwanted image crops on either device. */
.sf-engineered-projects .ef-project-card > img,
.ef-gallery .ef-thumbs img,
.ef-gallery .ef-large-img-box img {
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}
.ef-gallery .ef-large-img-box { overflow: hidden; }
@media (min-width: 851px) {
  .ef-gallery .ef-large-img-box { height: min(52vh, 460px); }
  .ef-gallery .ef-large-img-box img { height:100% !important; width:100% !important; max-width:100% !important; max-height:100% !important; }
}
@media (max-width: 850px) {
  .ef-gallery .ef-large-img-box { height:auto !important; }
  .ef-gallery .ef-large-img-box img { width:auto !important; height:auto !important; max-width:100% !important; max-height:min(62svh,550px) !important; }
}
