/* ================================
   ROOT VARIABLES
================================ */
:root {
    --primary-bg: #050505;
    --text-main: #eaeaea;
    --text-muted: #9a9a9a;
    --dark-accent: #5f7f6e;
  }
  
  /* ================================
     GLOBAL STYLES
  ================================ */
  * { box-sizing: border-box; }
  
  body {
    margin: 0;
    padding: 0;
    font-family: 'Archivo', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  a { color: inherit; }
  
  /* ================================
     SITE LAYOUT (DEFAULT PAGES)
  ================================ */
  .site-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    padding: 80px 4vw;
  }
  
  /* ================================
     LOGO COLUMN (DEFAULT PAGES)
  ================================ */
  .logo-column { position: relative; }
  
  .site-logo {
    position: fixed;
    top: 80px;
    left: 4vw;
    width: 260px;
    height: auto;
    opacity: 0.9;
  }
  
  /* ================================
     CONTENT COLUMN (DEFAULT PAGES)
  ================================ */
  .content-column {
    max-width: 520px;
    padding-top: 40px;
  }
  
  /* ================================
     TYPOGRAPHY (DEFAULT PAGES)
  ================================ */
  .site-kicker {
    font-size: 13px;
    letter-spacing: 0.04em;
    margin-bottom: 40px;
    color: var(--text-muted);
  }
  
  .site-intro {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  /* ================================
     VERTICAL NAVIGATION (DEFAULT PAGES)
  ================================ */
  .vertical-nav {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  
  .vertical-nav a {
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
  }
  
  .vertical-nav a:hover { opacity: 0.6; }
  
  /* ================================
     FOOTER (DEFAULT PAGES)
  ================================ */
  footer {
    padding: 60px 4vw;
    padding-left: calc(320px + 4vw);
    font-size: 12px;
    color: var(--text-muted);
  }
  
  /* ================================
     RESPONSIVE (MOBILE) - DEFAULT PAGES
  ================================ */
  @media (max-width: 900px) {
    .site-layout {
      grid-template-columns: 1fr;
      padding: 60px 6vw;
    }
  
    .site-logo {
      position: static;
      width: 200px;
      margin-bottom: 20px;
    }
  
    footer { padding-left: 6vw; }

    /* HOME PAGE — mobile hero logo */
    .page-home .site-layout{
      padding: 26px 6vw 44px;
    }

    .page-home .site-logo{
      width: min(420px, 78vw);
      margin-bottom: 3px;
    }

    .page-home .content-column{
      padding-top: 0;
      max-width: 520px;
    }

    .page-home .site-kicker{
      margin-bottom: 16px;
    }

    .page-home .vertical-nav{
      margin-top: 18px;
      margin-bottom: 10px;
    }


  }
  
  /* ================================
     PAGE HEADERS (OPTIONAL / GENERIC)
  ================================ */
  .page-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 14px 0;
    letter-spacing: 0.01em;
  }
  
  .page-intro {
    font-size: 15px;
    margin: 0 0 34px 0;
    color: var(--text-muted);
  }
  
  /* ================================
     PROJECT GRID (OPTIONAL / GENERIC)
  ================================ */
  .project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 0 0 10px 0;
  }
  
  .project-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  
  .project-card:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  .project-thumb { background: rgba(255,255,255,0.03); }
  
  .project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .project-meta {
    padding: 14px 14px 14px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .project-title {
    margin: 0;
    font-size: 15px;
  }
  
  .project-sub {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
  }
  
  @media (max-width: 900px) {
    .project-card { grid-template-columns: 1fr; }
    .project-meta { padding: 14px; }
    .project-thumb img { height: 220px; }
  }
  
  /* ================================
     SHARED: CORNER LOGO (WOODWORK + PROJECT)
  ================================ */
  .logo-corner {
    position: fixed;
    top: 6px;
    left: 36px;
    z-index: 10;
    pointer-events: none;
  }
  
  .logo-corner-img {
    width: 120px;
    height: auto;
    opacity: 0.9;
  }
  
  /* ================================
   SHARED: OFFSET CONTENT BELOW CORNER LOGO
   (prevents overlap with breadcrumbs/titles/nav)
  ================================ */
  .page-woodwork .site-layout,
  .page-inspiration .site-layout,
  .page-inspiration-gallery .site-layout,
  .page-project .site-layout {
    padding-top: 140px; /* gives breathing room under the fixed corner logo */
  }


  /* ================================
     SHARED: BREADCRUMBS (WOODWORK + PROJECT)
  ================================ */
  .crumbs { font-size: 12px; }
  
  .crumbs a {
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  
  .crumb-sep,
  .crumbs span[aria-current="page"] {
    text-decoration: none;
    opacity: 0.9;
  }
  
  /* ================================
     WOODWORK PAGE
  ================================ */
  .page-woodwork .site-layout {
    grid-template-columns: 1fr;
    padding: 80px 4vw;   /* MATCH project page */
    min-height: 100vh;
  }  
  
  .page-woodwork .logo-column { display: none; }
  
  .page-woodwork .woodwork-content {
    padding-top: 24px;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }
  
  
  .page-woodwork .woodwork-top {
    position: relative;
    min-height: 44px;
    margin-bottom: 34px;
  }
  
  .page-woodwork .woodwork-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    margin: 0;
    font-size: 10px;
    opacity: 0.95;
    white-space: nowrap;
  }
  
  /* 7 images fit across */
  .page-woodwork .woodwork-gallery {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
  }
  
  .page-woodwork .piece {
    display: block;
    text-decoration: none;
    overflow: hidden;
    border-radius: 2px;
    background: transparent;
    height: min(260px, 34vh);
  }
  
  .page-woodwork .piece img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* show full image */
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  
  .page-woodwork .piece:hover img {
    transform: scale(1.02);
    opacity: 0.92;
  }
  
  .page-woodwork footer { display: none; }
  
  @media (max-width: 900px){
    .page-woodwork .site-layout,
    .page-inspiration .site-layout,
    .page-inspiration-gallery .site-layout,
    .page-project .site-layout {
      padding-top: 110px;
    }
  }  

  @media (max-width: 1300px) {
    .logo-corner-img { width: 105px; }
    .page-woodwork .woodwork-gallery { gap: 12px; }
    .page-woodwork .piece { height: min(240px, 32vh); }
  }
  
  @media (max-width: 1100px) {
    .logo-corner { top: 24px; left: 24px; }
    .logo-corner-img { width: 90px; }
  
    .page-woodwork .woodwork-content {
      padding-left: 0px;
      padding-right: 0px;
    }
  
    .page-woodwork .piece { height: min(210px, 28vh); }
  }
  
  @media (max-width: 900px) {

    /* Ensure woodwork page can scroll on mobile */
    body.page-woodwork {
      overflow-y: auto;
      height: auto;
    }

    .page-woodwork .site-layout {
      overflow: visible;
      height: auto;
      min-height: 100vh;
    }

    .page-woodwork .woodwork-content {
      padding-top: 60px;
      padding-left: 0px;
      padding-right: 0px;
    }
      
    .page-woodwork .woodwork-hint {
      position: static;
      transform: none;
      margin-top: 14px;
      opacity: 0.8;
      white-space: normal;
      text-align: left;
    }
  
    .page-woodwork .woodwork-gallery {
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }
    
    .page-woodwork .piece {
      height: min(240px, 32vh);
    }
    
    /* HERO tile — since your hero image is LAST in the HTML (7th) */
    .page-woodwork .piece:nth-child(7) {
      grid-column: 1 / -1;
      height: min(420px, 60vh);
    }
    
  }
  
  /* ================================
     PROJECT PAGE (CAROUSEL)
  ================================ */
  
  /* Hard lock: no scroll on project pages */
  body.page-project {
    height: 100%;
    overflow: hidden;
  }
  
  /* If supported, also lock the root when a project page is present */
  html:has(body.page-project) {
    height: 100%;
    overflow: hidden;
  }
  
  .page-project .site-layout.project-layout {
    grid-template-columns: 1fr;
    padding: 80px 4vw;
    height: 100vh;
    overflow: hidden;
  }
  
  .page-project .logo-column { display: none; }
  
  .page-project .project-content {
    width: 100%;
    max-width: none;
    padding-top: 24px;
  }
  
  .page-project .carousel { margin-top: 16px; }
  
  /* Make the carousel fit within the viewport (prevents scrolling) */
/* Make the carousel fit within the viewport (prevents scrolling) */

   .page-project .carousel-frame{
        position: relative;
        width: 100%;
        height: calc(100vh - 320px);
        display: grid;
        grid-template-columns: 44px 1fr 44px;
        align-items: center;
        gap: 14px;
        min-height: 260px;
        max-height: 520px;
    }
  
  
  .page-project .carousel-viewport {
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .page-project .carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  
  .page-project .carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
  }
  
  .page-project .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* NO CROP */
    display: block;
    background: transparent;
  }
  
  /* Buttons */
  .page-project .carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: transparent;
    color: var(--text-main);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
  }
  
  .page-project .carousel-btn:hover { opacity: 0.65; }
  
  .page-project .carousel-caption {
    margin: 16px auto 0 auto;  /* centers the block itself */
    max-width: 320px;          /* narrower, like your reference */
    width: 100%;
    text-align: left;          /* IMPORTANT: matches screenshot */
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-main);
  }
  
  
  .page-project .caption-title{
    font-size: 12px;
    color: var(--text-main);
    opacity: 0.95;
    letter-spacing: 0.01em;
    margin: 0 0 8px 0;
  }
  
  .page-project .caption-body{
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
  }
  
  
  
  /* Mobile */
  @media (max-width: 900px) {
    .page-project .site-layout.project-layout { padding: 60px 6vw; }
    .page-project .project-content { padding-top: 60px; }
  
    .page-project .carousel-frame {
      grid-template-columns: 40px 1fr 40px;
      height: calc(100vh - 240px);
    }
  }
  
  /* ================================
   INSPIRATION PAGE (TEXT INDEX)
================================ */

.page-inspiration .site-layout.inspiration-layout{
  grid-template-columns: 1fr;
  padding: 80px 4vw;     /* same baseline as woodwork/project */
  min-height: 100vh;
}

.page-inspiration footer{
  display: none;         /* keeps it clean like your screenshot */
}

.page-inspiration .inspiration-content{
  width: 100%;
  padding-top: 24px;     /* aligns with project page spacing */
}

/* List layout */
.page-inspiration .inspo-list{
  margin-top: 28px;
  display: grid;
  gap: 68px;             /* the big vertical breathing room in your screenshot */
  max-width: 1200px;     /* keeps lines readable */
}

/* One line “label: description” */
.page-inspiration .inspo-item{
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
}

/* Underline only the category word */
.page-inspiration .inspo-link{
  text-decoration: underline;
  text-underline-offset: 5px;
}

.page-inspiration .inspo-colon{
  margin: 0 6px 0 6px;
  opacity: 0.95;
}

.page-inspiration .inspo-desc{
  color: var(--text-main);
  opacity: 0.95;
}

/* Responsive */
@media (max-width: 900px){
  .page-inspiration .site-layout.inspiration-layout{
    padding: 60px 6vw;
  }
  .page-inspiration .inspiration-content{
    padding-top: 48px;
  }  
  .page-inspiration .inspo-list{
    gap: 40px;
  }
  body.page-springville-stitch.page-inspiration-gallery .site-layout{
    padding-top: 83px;   /* matches your shared mobile offset */
  }
}

/* ================================
   INSPIRATION GALLERY PAGE (ARBORY)
================================ */

/* Hard lock: no page scroll */
body.page-project {
  height: 100%;
  overflow: hidden;
}

/* If supported, also lock the root when a project page is present */
html:has(body.page-project) {
  height: 100%;
  overflow: hidden;
}

/* Layout matches your other "static" pages */
.page-inspiration-gallery .site-layout {
  grid-template-columns: 1fr;
  padding: 80px 4vw;   /* matches your woodwork/project vibe */
  height: 100vh;
  overflow: hidden;
}

/* Content area */
.page-inspiration-gallery .ig-content{
  width: 100%;
  max-width: none;
  padding-top: 24px;   /* brings breadcrumb closer to logo */
}

/* Main gallery grid: arrows | hero | arrows */
.page-inspiration-gallery .ig-stage{
  margin-top: 28px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 14px;
  height: calc(100vh - 300px); /* leaves room for caption + thumbnails */
}

/* Force arrows to opposite ends of the stage grid */
.page-inspiration-gallery .ig-nav.prev{
  grid-column: 1;
  justify-self: start;
}

.page-inspiration-gallery .ig-viewport{
  grid-column: 2;
}

.page-inspiration-gallery .ig-nav.next{
  grid-column: 3;
  justify-self: end;
}

/* Arrow buttons */
.page-inspiration-gallery .ig-nav{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: transparent;
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.page-inspiration-gallery .ig-nav:hover{ opacity: 0.65; }

/* Hero area */
.page-inspiration-gallery .ig-viewport{
  position: relative;
  width: 100%;
  height: 100%;
}

/* Slides */
.page-inspiration-gallery .ig-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: grid;
  place-items: center;
  padding-bottom: 60px;
}

.page-inspiration-gallery .ig-slide.is-active{
  opacity: 1;
  pointer-events: auto;
}

/* The hero image: NO CROP */
.page-inspiration-gallery .ig-slide img{
  max-width: 500px;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

/* Caption (centered under hero) */
.page-inspiration-gallery .ig-caption{
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--text-main);
  opacity: 0.95;
}


/* Thumbnails strip (horizontal scroll, page still fixed) */
.page-inspiration-gallery .ig-thumbs{
  margin-top: 36px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0 2px 0;
  scroll-snap-type: x mandatory;
}

/* Optional: hides scrollbar on WebKit (Safari/Chrome) */
.page-inspiration-gallery .ig-thumbs::-webkit-scrollbar{
  height: 0px;
}

.page-inspiration-gallery .ig-thumb{
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
  scroll-snap-align: center;
  flex: 0 0 auto;
}

.page-inspiration-gallery .ig-thumb:hover{
  opacity: 0.8;
}

.page-inspiration-gallery .ig-thumb.is-active{
  opacity: 1;
  transform: translateY(-1px);
}

/* Thumb images */
.page-inspiration-gallery .ig-thumb img{
  width: 60px;
  height: 40px;
  object-fit: cover;   /* thumbnails can crop, hero never crops */
  display: block;
}

/* Hide footer for fixed viewport */
.page-inspiration-gallery footer{
  display: none;
}

/* Mobile tweaks */
@media (max-width: 900px){
  .page-inspiration-gallery .site-layout{
    padding: 60px 6vw;
  }

  .page-inspiration-gallery .ig-stage{
    grid-template-columns: 40px 1fr 40px;
    height: calc(100vh - 280px);
  }

  .page-inspiration-gallery .ig-slide img{
    max-width: min(520px, 92%);
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }
  
}

/* =========================================
   WOODWORK — MOBILE: frozen header + scrolling gallery only
========================================= */
@media (max-width: 900px) {

  /* Lock the page itself (no body scroll) */
  html, body { height: 100%; }
  body.page-woodwork {
    height: 100%;
    overflow: hidden;
  }

  /* Make the main layout fill the viewport */
  .page-woodwork .site-layout {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  /* Stack header + gallery, and let gallery take remaining height */
  .page-woodwork .woodwork-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Keep your existing spacing intent */
    padding-top: 15px;
    padding-left: 10px;
  }

  /* Header area stays in normal flow (not inside the scroll container) */
  .page-woodwork .woodwork-top {
    flex: 0 0 auto;
    margin-bottom: 14px; /* keeps your hint from feeling cramped */
  }

  /* Only the gallery scrolls */
  .page-woodwork .woodwork-gallery {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain; /* prevents “scroll chaining” */
    padding-bottom: 10px;         /* small safety so last row isn't glued */
  }

  /* Keep your mobile grid + hero tile behavior */
  .page-woodwork .woodwork-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .page-woodwork .piece {
    height: min(240px, 32vh);
  }

  .page-woodwork .piece:nth-child(7) {
    grid-column: 1 / -1;
    height: min(420px, 60vh);
  }

  /* Your mobile hint formatting stays as you designed */
  .page-woodwork .woodwork-hint {
    position: static;
    transform: none;
    margin-top: 14px;
    opacity: 0.8;
    white-space: normal;
    text-align: left;
  }
}

/* =========================================
   PROJECT PAGES — MOBILE ONLY
   Tighten carousel + caption WITHOUT moving header
========================================= */
@media (max-width: 900px) {

  /* Pull carousel closer to the nav (nav stays fixed) */
  .page-project .carousel {
    margin-top: 6px; /* was 16px */
  }

  /* Bring description closer to the image */
  .page-project .carousel-caption {
    margin-top: 6px; /* was 16px */
  }

}

/* =========================================
   PROJECT PAGES — MOBILE ONLY: allow scroll to read description
========================================= */
@media (max-width: 900px) {

  /* Re-enable page scrolling on mobile project pages */
  body.page-project {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Undo the root scroll lock on mobile */
  html:has(body.page-project) {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Let the layout grow with content (caption) */
  .page-project .site-layout.project-layout {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Optional: tighten spacing (does NOT move nav/logo) */
  .page-project .carousel { margin-top: 6px; }
  .page-project .carousel-caption { margin-top: 6px; }
}

/* =========================================
   PROJECT PAGES — MOBILE ONLY
   Make corner logo scroll away (NOT fixed)
========================================= */
@media (max-width: 900px) {
  .page-project .logo-corner {
    position: absolute; /* was fixed */
    z-index: 10;
  }
}

/* =========================================
   INSPIRATION PAGES — MOBILE ONLY
   Make corner logo scroll away (not fixed)
========================================= */
@media (max-width: 900px) {

  .page-inspiration .logo-corner,
  .page-inspiration-gallery .logo-corner {
    position: absolute; /* override fixed */
    z-index: 10;
  }

}

/* =========================================
   INSPIRATION GALLERY — MOBILE ONLY
   Move breadcrumb nav down slightly
   (does NOT affect logo or carousel)
========================================= */
@media (max-width: 900px) {

  .page-inspiration-gallery .crumbs {
    margin-top: 18px; /* adjust 12–24px to taste */
  }
  .page-inspiration-gallery.page-springville-stitch .crumbs {
    margin-top: 0; /* cancels the 18px */
  }
}

/* =========================================
   INSPIRATION GALLERY — MOBILE LANDSCAPE FULLSCREEN OVERLAY
   (ALL galleries except Springville Stitch)
   - pins to top (true fullscreen)
   - hides all UI
   - swipe still works via JS
========================================= */
@media (max-width: 900px) and (orientation: landscape) {

  /* No scroll: pure viewer */
  html, body { height: 100%; overflow: hidden; }

  body.page-inspiration-gallery:not(.page-springville-stitch) {

    /* Hide everything except the viewport */
    .logo-corner,
    .crumbs,
    .ig-nav,
    .ig-caption,
    .ig-thumbs {
      display: none !important;
    }

    /* Fullscreen overlay pinned to screen edges */
    .ig-viewport {
      position: fixed !important;
      inset: 0 !important;      /* <-- guarantees it hits the top */
      width: 100vw !important;
      height: 100vh !important;
      z-index: 9999 !important;
      background: #000 !important;
    }

    /* Slides fill the overlay */
    .ig-slide {
      position: absolute !important;
      inset: 0 !important;
      margin: 0 !important;
      padding: 0 !important;

      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    /* Full image, no crop (letterboxing allowed), centered */
    .ig-slide img {
      width: auto !important;
      height: auto !important;
      max-width: 100vw !important;
      max-height: 100vh !important;
      object-fit: contain !important;
    }
  }
}

/* =========================================
   INSPIRATION GALLERY — MOBILE PORTRAIT EXPANDED VIEW
   - Tap expand icon -> fullscreen overlay
   - Rotates image 90deg
   - No crop (contain)
   - ~10px inset + safe-area padding
========================================= */
@media (max-width: 900px) and (orientation: portrait) {

  /* Expand button (bottom-right of hero viewport) */
  .page-inspiration-gallery .ig-viewport {
    position: relative; /* ensure absolute button anchors */
  }

  .page-inspiration-gallery .ig-expand {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.35);
    color: var(--text-main);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: grid;
    place-items: center;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .page-inspiration-gallery .ig-expand:hover { opacity: 0.8; }
  .page-inspiration-gallery .ig-expand:active { opacity: 0.7; }

  /* Expanded overlay state */
  html.ig-expanded,
  body.ig-expanded {
    height: 100%;
    overflow: hidden;
  }

  body.ig-expanded.page-inspiration-gallery {

    /* Hide non-essential UI while expanded */
    .logo-corner,
    .crumbs,
    .ig-nav,
    .ig-caption,
    .ig-thumbs {
      display: none !important;
    }
  
    /* Fullscreen viewport overlay */
    .ig-viewport {
      position: fixed !important;
      inset: 0 !important;
      z-index: 9999 !important;
      background: #000 !important;
  
      /* ~10px inset + safe-area support */
      padding-top: max(10px, env(safe-area-inset-top));
      padding-right: max(10px, env(safe-area-inset-right));
      padding-bottom: max(10px, env(safe-area-inset-bottom));
      padding-left: max(10px, env(safe-area-inset-left));
    }
  
    /* Center slides */
    .ig-slide {
      position: absolute !important;
      inset: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
  
    /* Rotated, no-crop image */
    .ig-slide img {
      transform: rotate(90deg) !important;
      transform-origin: center center !important;
      width: auto !important;
      height: auto !important;
      max-width: calc(100vh - 20px) !important;
      max-height: calc(100vw - 20px) !important;
      object-fit: contain !important;
    }
  
    /* 🔑 THIS IS THE IMPORTANT NEW PART */
    /* Allow JS-controlled horizontal swipes only */
    .ig-viewport,
    .ig-slide,
    .ig-slide img {
      touch-action: pan-y;
    }
  
    /* Close button */
    .ig-close {
      position: fixed !important;
      top: max(10px, env(safe-area-inset-top));
      right: max(10px, env(safe-area-inset-right));
      width: 30px;
      height: 30px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.22);
      background: rgba(0,0,0,0.35);
      color: var(--text-main);
      font-size: 12px;
      display: grid;
      place-items: center;
      z-index: 10000 !important;
    }

      /* Hide expand button while in expanded view */
    .ig-expand {
      display: none !important;
    }
  }  
}
/* =========================================
   INSPIRATION GALLERY — DESKTOP
   Hide expand button entirely
========================================= */
@media (min-width: 901px) {
  .page-inspiration-gallery .ig-expand {
    display: none !important;
  }
}

