/* ---- CMS additions on top of main.css — same design tokens, new block types ---- */

.content-block{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  align-items:start;
  max-width:1200px;
  margin:0 auto;
  padding:90px 40px;
}
.content-block-imgleft{ direction:rtl; }
.content-block-imgleft > *{ direction:ltr; }
.content-block-img{
  position:sticky;
  top:127px; /* clears the fixed topbar (38px) + nav (~89px) */
}
.content-block-img img{
  width:100%;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.content-block-body h2{ margin-bottom:18px; font-size: 38px;}
.content-block-body p{ color:var(--ash-2); }
.content-block-link{ display:inline-block; margin-top:20px; color:var(--sumi); }

@media (max-width:760px){
  .content-block{ grid-template-columns:1fr; gap:28px; padding:60px 20px; }
  .content-block-img{ position:static; }
}

/* Product badge */
.gallery-item{ position:relative; }
.gallery-item-link{ text-decoration:none; color:inherit; display:block; }
.product-badge{
  position:absolute;
  top:14px; left:14px;
  z-index:2;
  background:var(--ember);
  color:var(--washi);
  font-family:'Space Mono',monospace;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:6px 12px;
  border-radius:20px;
}
.gallery-photo-count{
  position:absolute;
  top:14px; right:14px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:rgba(20,18,16,.6);
  color:var(--washi);
  font-family:'Space Mono',monospace;
  font-size:12px;
  letter-spacing:.04em;
  padding:6px 11px;
  border-radius:20px;
}
.product-badge-lg{
  position:absolute;
  top:16px; left:16px;
  z-index:2;
}

/* Product detail page */
.page-hero-compact{ min-height:340px; }
.product-detail{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:60px;
  max-width:1200px;
  margin:0 auto;
  padding:70px 40px;
}
.product-detail-media{ position:relative; }
.product-detail-main-img{
  width:100%;
  aspect-ratio:4/5;
  max-height:560px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  background:var(--washi-dark);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.product-detail-main-img img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.product-detail-thumbs{
  display:flex;
  gap:12px;
  margin-top:14px;
  flex-wrap:wrap;
}
.product-thumb-btn{
  display:block;
  width:84px; height:84px;
  padding:0;
  border:2px solid transparent;
  border-radius:6px;
  background:none;
  cursor:pointer;
  opacity:.65;
  transition:opacity .2s, border-color .2s;
}
.product-thumb-btn:hover{ opacity:1; }
.product-thumb-btn.is-active{
  opacity:1;
  border-color:var(--ember);
}
.product-thumb-btn img{
  width:100%; height:100%;
  object-fit:cover;
  border-radius:4px;
  display:block;
}
.product-detail-info .gallery-meta{ display:block; margin-bottom:6px; }
.product-summary{ font-size:20px; font-weight:300; margin-top:6px; }
.product-description{ color:var(--ash-2); line-height:1.8; margin-top:16px; }
.product-features{ margin-top:30px; }
.product-features ul{ list-style:none; margin-top:12px; }
.product-features li{ padding:6px 0; color:var(--ash-2); }
.product-features li i{ color:var(--ember); margin-right:8px; }
.product-price{
  font-family:'Space Mono',monospace;
  font-size:20px;
  color:var(--cedar);
  margin-top:24px;
}
.product-enquire{ margin-top:28px; display:inline-block; }

@media (max-width:760px){
  .product-detail{ grid-template-columns:1fr; gap:30px; padding:40px 20px; }
}

.richtext-content{ line-height:1.8; }
.richtext-content p{ margin-top:14px; }
.richtext-content ul, .richtext-content ol{ margin-top:14px; padding-left:22px; }
.richtext-content li{ margin-bottom:6px; }
.richtext-content a{ color:var(--ember); }
.richtext-content h1, .richtext-content h2, .richtext-content h3{ margin-top:22px; margin-bottom:10px; }
.richtext-content strong{ font-weight:600; }

/* Gallery grid — card is now a <button> for accessibility, so reset its default styling */
.gallery-item-trigger{
  display:block;
  width:100%;
  border:none;
  background:none;
  padding:0;
  margin:0;
  font:inherit;
  text-align:left;
  cursor:pointer;
  color:inherit;
}

/* ---- Gallery modal / lightbox ---- */
.gallery-modal{
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:5vh 5vw;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s ease, visibility 0s linear .3s;
}
.gallery-modal.is-open{
  opacity:1;
  visibility:visible;
  transition:opacity .3s ease, visibility 0s linear 0s;
}
.gallery-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,13,12,.86);
  backdrop-filter:blur(4px);
}
.gallery-modal-dialog{
  position:relative;
  z-index:1;
  background:var(--washi);
  border-radius:var(--radius);
  max-width:1000px;
  width:100%;
  max-height:90vh;
  display:grid;
  grid-template-columns:1.3fr 1fr;
  overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.4);
  transform:translateY(16px) scale(.98);
  transition:transform .3s cubic-bezier(.2,.8,.2,1);
}
.gallery-modal.is-open .gallery-modal-dialog{ transform:translateY(0) scale(1); }
.gallery-modal-media{
  background:var(--sumi);
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:280px;
  max-height:90vh;
  overflow:hidden;
}
.gallery-modal-media img{
  width:100%;
  height:100%;
  max-height:90vh;
  object-fit:contain;
}
.gallery-modal-info{
  padding:34px 34px;
  overflow-y:auto;
}
.gallery-modal-badge{
  display:inline-block;
  background:var(--ember);
  color:var(--washi);
  font-family:'Space Mono',monospace;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:5px 12px;
  border-radius:20px;
  margin-bottom:14px;
}
.gallery-modal-badge:empty{ display:none; }
.gallery-modal-info h3{ font-size:26px; margin-bottom:6px; }
.gallery-modal-thumbs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.gallery-modal-thumb-btn{
  display:block;
  width:56px; height:56px;
  padding:0;
  border:2px solid transparent;
  border-radius:6px;
  background:none;
  cursor:pointer;
  opacity:.6;
  transition:opacity .2s, border-color .2s;
}
.gallery-modal-thumb-btn:hover{ opacity:1; }
.gallery-modal-thumb-btn.is-active{
  opacity:1;
  border-color:var(--ember);
}
.gallery-modal-thumb-btn img{
  width:100%; height:100%;
  object-fit:cover;
  border-radius:4px;
  display:block;
}
.gallery-modal-close, .gallery-modal-nav{
  position:absolute;
  z-index:2;
  border:none;
  background:rgba(15,13,12,.55);
  color:var(--washi);
  width:40px; height:40px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:15px;
  transition:background .2s ease;
}
.gallery-modal-close:hover, .gallery-modal-nav:hover{ background:var(--ember); }
.gallery-modal-close{ top:16px; right:16px; }
.gallery-modal-prev{ top:50%; left:16px; transform:translateY(-50%); }
.gallery-modal-next{ top:50%; right:16px; transform:translateY(-50%); }

@media (max-width:760px){
  .gallery-modal{ padding:0; }
  .gallery-modal-dialog{ grid-template-columns:1fr; max-height:100vh; border-radius:0; grid-template-rows:auto 1fr; }
  .gallery-modal-media{ min-height:220px; max-height:42vh; }
  .gallery-modal-info{ padding:22px 20px 30px; }
  .gallery-modal-prev{ left:10px; }
  .gallery-modal-next{ right:10px; }
}

/* ---- Top utility bar (email / phone / social) above the main nav ---- */
.topbar{
  position:fixed;
  top:0; left:0; right:0;
  z-index:101;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 5vw;
  background:var(--sumi);
  border-bottom:1px solid rgba(255,255,255,.08);
  font-family:'Space Mono',monospace;
  font-size:12.5px;
  letter-spacing:.02em;
}
.topbar-contact{ display:flex; gap:26px; }
.topbar-social{ display:flex; gap:16px; }
.topbar a{
  color:var(--washi-dark);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:7px;
  opacity:.85;
}
.topbar a:hover{ color:var(--ember-bright); opacity:1; }
.topbar-social a{ font-size:14px; }
.topbar-contact a i{ font-size:11px; }

/* Push the main nav down below the topbar, and give fixed-position
   headers below it (page-hero) enough clearance to match. */
nav{ top:38px; }
.page-hero{ padding-top:198px; }

@media (max-width:760px){
  .topbar{ height:32px; padding:0 4vw; }
  .topbar-contact{ gap:16px; }
  .topbar-social{ gap:12px; }
  .topbar-contact span{ display:none; } /* icons only on small screens, keeps the bar slim */
  nav{ top:32px; }
  .page-hero{ padding-top:182px; min-height:44vh; }
}