:root {
  --bg: #070b0d;
  --ink: #f4f1ea;
  --muted: #a6afac;
  --line: rgba(255, 255, 255, .16);
  --cyan: #55dcff;
  --violet: #aa7cff;
  --amber: #f4b85f;
  --green: #7de5ae;
  --danger: #ff7b73;
  --max: 1500px;
}

/* =========================================================
   LOFT DESIGN — INSPIRATION GALLERY APP STYLES
   Integrated from LOFT_DESIGN_V93_MOBILE_SERVICES_FIXED_SCROLL_LAYOUT.html
   Includes:
   - V29: Pinterest-style masonry pins, header, search, filter chips
   - V30: Direct full-screen lightbox gallery & overlay thumbnails
   - V32: Mobile gallery UX, inline chips & pulse feedback
   - V34: On-demand space filters panel
   - V35: Responsive multi-viewport harmony & drawer styling
   - V38: Image-first clean pins (no bottom meta text)
   - V40: Minimalist liquid-cyan & soft-green save action
   - V53: Gallery images only (clean immediate start)
   - V55 & V58: Persistent floating selection dock
   - LTR & RTL multi-language support
   ========================================================= */

/* Triggers & base state */
.desktopGalleryBtn{
  border:0;
  background:none;
  color:#c5cbc8;
  font:inherit;
  font-size:12px;
  padding:0;
  cursor:pointer;
  transition:color .2s ease;
}
.desktopGalleryBtn:hover{
  color:var(--cyan);
}
.galleryPill{
  border-color:rgba(244,184,95,.48)!important;
}
.galleryHeroBtn{
  border-color:rgba(244,184,95,.48)!important;
}
body.galleryOpen{
  overflow:hidden!important;
}
body.galleryOpen .nav{
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .18s ease, visibility .18s ease;
}

/* Portfolio 360 preview sheet */
.gallerySheet{
  position:fixed;
  inset:0;
  z-index:200;
  background:rgba(4,8,10,.96);
  backdrop-filter:blur(23px);
  transform:translateY(103%);
  transition:.34s cubic-bezier(.22,1,.36,1);
  overflow:auto;
  padding:18px;
}
.gallerySheet.open{transform:none}
.galleryClose{
  position:sticky;
  top:4px;
  z-index:4;
  margin:0 auto 12px;
  display:block;
  width:60px;
  height:33px;
  border:1px solid rgba(170,124,255,.6);
  background:linear-gradient(135deg,var(--amber),#ff8e51);
  color:#15100b;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}
.galleryInner{max-width:1150px;margin:auto}
.galleryHero{display:grid;grid-template-columns:1.15fr .85fr;gap:10px}
.galleryHero img{width:100%;height:450px;object-fit:cover;border-radius:19px}
.gallerySide{border:1px solid var(--line);border-radius:19px;background:#101517;padding:20px;display:flex;flex-direction:column;justify-content:center}
.gallerySide h3{font-size:31px;margin:7px 0}
.gallerySide p{color:#aeb6b3;line-height:1.55}
.thumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:7px}
.thumbs img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;transition:.24s}
.thumbs img:hover{transform:scale(1.025)}
@media(max-width:1100px){.galleryHero{grid-template-columns:1fr}.galleryHero img{height:330px}}
@media(max-width:840px){.gallerySheet{padding:9px}.galleryHero img{height:290px}.thumbs{grid-template-columns:1fr 1fr}}


/* =========================================================
   V29 — PINTEREST-INSPIRED GALLERY / CLIENT INSPIRATION BOARDS
   Keeps LOFT DESIGN visual identity while simplifying browsing.
   ========================================================= */

body.galleryOpen{overflow:hidden!important}

/* App shell */
.galleryApp{
  background:#070b0d!important;
}
.galleryAppBg{
  opacity:.24!important;
  filter:brightness(.18) saturate(.72) blur(1px)!important;
}
.galleryApp:after{
  background:
    linear-gradient(180deg,rgba(4,8,10,.88),rgba(4,8,10,.94)),
    radial-gradient(circle at 50% 0%,rgba(85,220,255,.06),transparent 38%)!important;
}
.galleryAppHeader{
  height:72px!important;
  display:grid!important;
  grid-template-columns:auto minmax(260px,1fr) auto!important;
  gap:18px!important;
  padding:0 max(18px,calc((100vw - 1500px)/2))!important;
  background:rgba(5,9,11,.94)!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  backdrop-filter:blur(22px) saturate(1.12)!important;
  position:relative!important;
  z-index:20!important;
}
.galleryBrand{
  cursor:pointer;
  min-width:max-content;
}
.galleryBrand:hover b{color:var(--cyan)}
.gallerySearchShell{
  min-width:0;
  height:44px;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  background:#151b1d;
  border:1px solid rgba(255,255,255,.09);
  transition:.18s;
}
.gallerySearchShell:focus-within{
  border-color:rgba(85,220,255,.55);
  background:#182125;
  box-shadow:0 0 0 3px rgba(85,220,255,.07);
}
.gallerySearchShell svg{width:18px;height:18px;stroke:#9ba6a2;fill:none;stroke-width:2}
.gallerySearchShell input{
  width:100%;
  border:0;
  outline:0;
  color:#fff;
  background:transparent;
  font-size:13px;
}
.gallerySearchShell input::placeholder{color:#7f8986}
.galleryHeaderActions{display:flex!important;align-items:center!important;gap:7px!important}
.galleryHeaderActions button{
  min-height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.13);
  background:#ffffff06;
  color:#e8eeec;
  padding:0 13px;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.galleryHeaderActions button:hover{
  border-color:rgba(85,220,255,.38);
  background:#ffffff0b;
}
#galleryFilterTop.active{border-color:rgba(85,220,255,.62);color:var(--cyan)}
.galleryCartTop{
  border-color:rgba(244,184,95,.42)!important;
}
.galleryCartTop span{
  background:var(--amber)!important;
}
.galleryHomeTop{
  border-color:rgba(125,229,174,.34)!important;
}

/* Body + search/filter toolbar */
.galleryAppBody{
  height:calc(100dvh - 72px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:18px max(18px,calc((100vw - 1500px)/2)) 96px!important;
  display:block!important;
}
.galleryBrowseHead{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  padding:2px 2px 13px;
}
.galleryBrowseHead small{
  display:block;
  color:var(--amber);
  font-size:8px;
  letter-spacing:.15em;
  font-weight:900;
  text-transform:uppercase;
}
.galleryBrowseHead h2{
  margin:5px 0 0;
  font-size:clamp(27px,3vw,44px);
  line-height:.96;
  font-weight:570;
  letter-spacing:-.035em;
}
.galleryBrowseHead p{
  margin:5px 0 0;
  color:#98a39f;
  font-size:10px;
}
.galleryResultsMeta{
  color:#8f9996;
  font-size:10px;
  white-space:nowrap;
  padding-bottom:4px;
}
.galleryFilterPanel{
  display:none;
  margin:0 0 15px;
  padding:13px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(11,17,19,.92);
  box-shadow:0 20px 55px rgba(0,0,0,.18);
}
.galleryFilterPanel.open{display:block}
.galleryFilterHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.galleryFilterHead strong{font-size:12px}
.galleryFilterHead small{font-size:9px;color:#87918e}
.galleryFilterChips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.galleryFilterChip{
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.13);
  background:#ffffff05;
  color:#bdc6c3;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}
.galleryFilterChip:hover{border-color:rgba(85,220,255,.32);color:#fff}
.galleryFilterChip.active{
  color:#061115;
  background:var(--cyan);
  border-color:var(--cyan);
  box-shadow:0 0 20px rgba(85,220,255,.13);
}
.galleryFilterChip.all.active{
  background:var(--amber);
  border-color:var(--amber);
  color:#171008;
}

/* Hide legacy horizontal category selector — filtering is now multi-select */
.gallerySpacesNav,.gallerySpaces{display:none!important}

/* Pinterest-style masonry */
.galleryCategoryGrid{
  display:block!important;
  width:100%!important;
  padding:0 0 80px!important;
  margin:0!important;
  column-count:6;
  column-gap:14px;
}
.galleryPin{
  display:inline-block;
  width:100%;
  margin:0 0 16px;
  break-inside:avoid;
  vertical-align:top;
}
.galleryPinMedia{
  position:relative;
  overflow:hidden;
  border-radius:20px;
  background:#11191c;
  cursor:zoom-in;
  transform:translateZ(0);
  box-shadow:0 1px 0 rgba(255,255,255,.04);
}
.galleryPinMedia img{
  display:block;
  width:100%;
  aspect-ratio:var(--pin-ratio,4/5);
  object-fit:cover;
  background:#11191c;
  transition:transform .28s cubic-bezier(.22,1,.36,1),filter .2s;
}
.galleryPin:hover .galleryPinMedia img{
  transform:scale(1.025);
  filter:brightness(.82);
}
.galleryPinOverlay{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:.18s;
  background:linear-gradient(180deg,rgba(0,0,0,.18),transparent 42%,rgba(0,0,0,.34));
}
.galleryPin:hover .galleryPinOverlay{opacity:1}
.galleryPinSave{
  position:absolute;
  z-index:4;
  right:11px;
  top:11px;
  min-height:42px;
  padding:0 17px;
  border:0;
  border-radius:999px;
  background:#e60023;
  color:white;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
  opacity:0;
  transform:translateY(-4px);
  transition:.18s;
  box-shadow:0 8px 24px rgba(0,0,0,.32);
}
.galleryPin:hover .galleryPinSave,
.galleryPinSave.saved{
  opacity:1;
  transform:none;
}
.galleryPinSave.saved{
  background:#f4b85f;
  color:#171008;
}
.galleryPinShare{
  position:absolute;
  z-index:4;
  right:11px;
  bottom:11px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  border:0;
  background:rgba(255,255,255,.94);
  color:#0b1113;
  cursor:pointer;
  opacity:0;
  transform:translateY(4px);
  transition:.18s;
}
.galleryPinShare svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.galleryPin:hover .galleryPinShare{opacity:1;transform:none}
.galleryPinOpenLabel{
  position:absolute;
  z-index:3;
  left:11px;
  bottom:12px;
  max-width:calc(100% - 62px);
  color:#fff;
  font-size:9px;
  font-weight:850;
  text-shadow:0 2px 14px #000;
  opacity:0;
  transition:.18s;
}
.galleryPin:hover .galleryPinOpenLabel{opacity:1}
.galleryPinMeta{
  padding:8px 4px 0;
}
.galleryPinMeta b{
  display:block;
  font-size:11px;
  line-height:1.3;
  color:#eef2f0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.galleryPinMeta small{
  display:block;
  margin-top:3px;
  color:#7f8a86;
  font-size:8.5px;
}
.galleryNoResults{
  column-span:all;
  display:grid;
  place-items:center;
  min-height:36dvh;
  text-align:center;
  color:#87918e;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:22px;
  padding:28px;
}
.galleryNoResults strong{display:block;color:#dfe7e4;font-size:18px;margin-bottom:5px}

/* Detail — Pinterest-style split card */
.galleryDetail{
  padding:18px!important;
  background:rgba(3,6,7,.88)!important;
  backdrop-filter:blur(24px)!important;
}
.galleryDetailPanel{
  width:min(1380px,calc(100vw - 56px))!important;
  max-width:1380px!important;
  min-height:min(760px,calc(100dvh - 46px))!important;
  margin:5px auto!important;
  border-radius:28px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  overflow:hidden!important;
  background:#0a0f11!important;
  box-shadow:0 34px 110px rgba(0,0,0,.62)!important;
}
.galleryDetailPinterest{
  min-height:inherit;
  display:grid;
  grid-template-columns:minmax(0,1.14fr) minmax(340px,.86fr);
}
.galleryDetailVisual{
  position:relative;
  min-height:680px;
  display:grid;
  place-items:center;
  background:#050708;
  overflow:hidden;
}
.galleryDetailVisual>img{
  width:100%;
  height:100%;
  max-height:calc(100dvh - 48px);
  object-fit:contain;
  background:#050708;
}
.galleryDetailVisual:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  box-shadow:inset -1px 0 rgba(255,255,255,.07);
}
.galleryDetailFullscreen{
  position:absolute;
  z-index:4;
  right:14px;
  bottom:14px;
  min-height:40px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.24);
  color:#fff;
  background:rgba(4,8,10,.72);
  backdrop-filter:blur(12px);
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.galleryDetailSide{
  min-width:0;
  display:flex;
  flex-direction:column;
  padding:24px 24px 18px;
  overflow:auto;
  max-height:calc(100dvh - 48px);
}
.galleryDetailTopActions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-bottom:18px;
}
.galleryDetailTopActions button{
  min-height:42px;
  padding:0 15px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.15);
  background:#ffffff06;
  color:#fff;
  font-size:9px;
  font-weight:900;
}
.galleryDetailTopActions .save{
  border:0;
  background:#e60023;
}
.galleryDetailTopActions .save.saved{
  background:var(--amber);
  color:#171008;
}
.galleryDetailBreadcrumb{
  color:var(--cyan);
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.galleryDetailSide h3{
  margin:7px 0 6px;
  font-size:clamp(28px,3vw,42px);
  line-height:.98;
  letter-spacing:-.035em;
}
.galleryDetailSide>p{
  color:#909b97;
  font-size:11px;
  line-height:1.55;
  margin:0 0 18px;
}
.galleryRelatedTitle{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding-top:15px;
  margin-top:2px;
  border-top:1px solid rgba(255,255,255,.09);
}
.galleryRelatedTitle strong{font-size:12px}
.galleryRelatedTitle small{font-size:8px;color:#7c8783}
.galleryRelatedStrip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.galleryRelatedPin{
  position:relative;
  min-height:120px;
  border:1px solid transparent;
  border-radius:15px;
  padding:0;
  overflow:hidden;
  background:#111;
  cursor:pointer;
}
.galleryRelatedPin img{
  width:100%;height:100%;min-height:120px;object-fit:cover;display:block;
}
.galleryRelatedPin.active{
  border-color:var(--cyan);
  box-shadow:0 0 0 2px rgba(85,220,255,.08);
}
.galleryRelatedPin span{
  position:absolute;
  left:8px;
  bottom:7px;
  min-width:21px;
  height:21px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(0,0,0,.62);
  color:#fff;
  font-size:7px;
}

/* Selection / boards drawer */
.galleryCartDrawer{
  width:min(470px,100vw)!important;
}
.galleryCartHead h3{font-size:22px!important}
.galleryBoardTools{
  padding:12px 15px;
  border-bottom:1px solid var(--line);
  display:grid;
  gap:8px;
}
.galleryBoardSelectRow{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:6px;
}
.galleryBoardSelect{
  min-width:0;
  height:41px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.13);
  background:#11191c;
  color:#fff;
  padding:0 10px;
}
.galleryBoardIconBtn{
  min-width:41px;
  height:41px;
  padding:0 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.13);
  background:#ffffff06;
  color:#fff;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.galleryBoardSecondary{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:6px;
}
.galleryBoardSecondary button{
  min-height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:#ffffff05;
  color:#dbe3e0;
  font-size:8px;
  font-weight:850;
}
.galleryBoardSecondary .upload{border-color:rgba(85,220,255,.30)}
.galleryBoardSecondary .rename{border-color:rgba(244,184,95,.28)}
.galleryBoardSecondary .delete{border-color:rgba(255,123,115,.25);color:#ffb1ac}
.galleryCartItems{padding:10px 14px!important}
.galleryCartItem{
  grid-template-columns:74px minmax(0,1fr) auto!important;
}
.galleryCartItem img{
  width:74px!important;height:68px!important;border-radius:12px!important;
}
.galleryCartItem button.preview{
  border:0;background:none;padding:0;cursor:pointer;
}
.galleryUploadTag{
  display:inline-block;
  margin-top:3px;
  color:var(--cyan);
  font-size:7px;
}
.galleryCartActions button.sendMain{
  border-color:rgba(125,229,174,.58)!important;
  background:rgba(25,84,58,.22)!important;
}
.galleryCartActions button.copyMain{
  border-color:rgba(85,220,255,.40)!important;
}

/* Full screen existing lightbox: sharpen hierarchy */
.galleryLightbox{background:rgba(2,4,5,.98)!important}
.galleryLightboxStage img{max-width:96vw!important;max-height:86dvh!important;object-fit:contain!important}

/* Toast */
.galleryToast{
  border-color:rgba(85,220,255,.35)!important;
  font-size:10px!important;
}

/* Responsive */
@media(max-width:1500px){.galleryCategoryGrid{column-count:5}}
@media(max-width:1220px){.galleryCategoryGrid{column-count:4}}
@media(max-width:940px){
  .galleryAppHeader{
    grid-template-columns:auto minmax(180px,1fr) auto!important;
    gap:8px!important;
  }
  .galleryBrand small{display:none}
  .galleryHeaderActions .galleryHomeTop{display:none}
  .galleryCategoryGrid{column-count:3}
  .galleryDetailPinterest{grid-template-columns:1fr 380px}
}
@media(max-width:840px){
  .galleryAppHeader{
    height:auto!important;
    min-height:58px!important;
    padding:7px 9px!important;
    grid-template-columns:auto 1fr auto!important;
    gap:7px!important;
  }
  .galleryBrand b{font-size:10px!important}
  .gallerySearchShell{height:40px;padding:0 12px}
  .gallerySearchShell input{font-size:11px}
  .galleryHeaderActions{gap:4px!important}
  .galleryHeaderActions button{min-height:38px;padding:0 10px;font-size:8px}
  #galleryFilterTop{display:none}
  .galleryCloseTop{width:38px!important;padding:0!important}
  .galleryAppBody{
    height:calc(100dvh - 58px)!important;
    padding:10px 9px 92px!important;
  }
  .galleryBrowseHead{align-items:flex-start;padding:2px 2px 9px}
  .galleryBrowseHead h2{font-size:25px}
  .galleryBrowseHead p{font-size:9px}
  .galleryResultsMeta{font-size:8px}
  .galleryFilterPanel{
    display:block!important;
    margin-bottom:10px;
    padding:9px;
    background:rgba(10,16,18,.86);
    overflow:hidden;
  }
  .galleryFilterHead{margin-bottom:7px}
  .galleryFilterChips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .galleryFilterChips::-webkit-scrollbar{display:none}
  .galleryFilterChip{flex:0 0 auto;min-height:32px;padding:0 11px;font-size:8px}
  .galleryCategoryGrid{column-count:2!important;column-gap:8px}
  .galleryPin{margin-bottom:10px}
  .galleryPinMedia{border-radius:15px}
  .galleryPinMeta{padding:6px 3px 0}
  .galleryPinMeta b{font-size:9.5px}
  .galleryPinMeta small{font-size:7.5px}
  .galleryPinSave{
    min-height:34px;padding:0 11px;font-size:8px;right:7px;top:7px;
    opacity:1;transform:none
  }
  .galleryPinShare{
    width:32px;height:32px;border-radius:10px;right:7px;bottom:7px;
    opacity:1;transform:none
  }
  .galleryPinOpenLabel{display:none}
  .galleryDetail{padding:0!important}
  .galleryDetailPanel{
    width:100vw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    border:0!important;
    border-radius:0!important;
    margin:0!important;
    overflow:auto!important;
  }
  .galleryDetailPinterest{
    min-height:100dvh;
    display:block;
  }
  .galleryDetailVisual{
    min-height:52dvh;
    height:52dvh;
  }
  .galleryDetailVisual>img{
    width:100%;height:100%;object-fit:contain;
  }
  .galleryDetailSide{
    max-height:none;
    padding:16px 13px 80px;
  }
  .galleryDetailTopActions{
    justify-content:flex-start;
    margin-bottom:12px;
  }
  .galleryDetailSide h3{font-size:28px}
  .galleryRelatedStrip{grid-template-columns:repeat(3,1fr)}
  .galleryRelatedPin,.galleryRelatedPin img{min-height:92px}
  .galleryDetailClose{
    position:fixed!important;
    right:8px!important;
    top:8px!important;
    z-index:30!important;
    background:rgba(3,7,9,.78)!important;
    backdrop-filter:blur(12px);
  }
  .galleryCartDrawer{width:100vw!important}
}
@media(max-width:430px){
  .galleryHeaderActions #galleryCartTop{padding:0 8px}
  .galleryCartTop .gallerySelectionLabel{display:none}
  .galleryBrand img{width:30px!important;height:30px!important}
  .galleryCategoryGrid{column-count:2!important}
  .galleryRelatedStrip{grid-template-columns:1fr 1fr}
}

/* =========================================================
   V30 — DIRECT FULL-SCREEN GALLERY
   Click image => full-screen immediately.
   Thumbnails overlay the image at the bottom.
   Send / Save / Close live on the image, top-right.
   ========================================================= */

.galleryDetail{display:none!important}

/* One full-screen canvas; no lower thumbnail row outside the image */
.galleryLightbox{
  position:fixed!important;
  inset:0!important;
  z-index:700!important;
  display:block!important;
  background:#020405!important;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}
.galleryLightbox.open{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

/* Image fills the available screen while keeping its ratio */
.galleryLightboxStage{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  padding:22px 64px!important;
  overflow:hidden!important;
}
.galleryLightboxStage:after{
  content:"";
  position:absolute;
  z-index:1;
  left:0;right:0;bottom:0;
  height:170px;
  pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.58));
}
.galleryLightboxStage img{
  position:relative!important;
  z-index:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  display:block!important;
  user-select:none!important;
  -webkit-user-drag:none!important;
}

/* Top-right controls float over the photograph */
.galleryLightboxTopActions{
  position:absolute;
  z-index:12;
  top:18px;
  right:18px;
  display:flex;
  align-items:center;
  gap:8px;
}
.galleryLightboxAction,
.galleryLightboxClose{
  position:static!important;
  width:auto!important;
  height:42px!important;
  min-height:42px!important;
  padding:0 16px!important;
  border-radius:999px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  background:rgba(6,10,12,.72)!important;
  color:#fff!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
  backdrop-filter:blur(14px)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.28)!important;
  cursor:pointer!important;
  transition:transform .18s,border-color .18s,background .18s!important;
}
.galleryLightboxAction:hover,
.galleryLightboxClose:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(85,220,255,.60)!important;
}
.galleryLightboxAction.save{
  border-color:#e60023!important;
  background:#e60023!important;
  padding:0 18px!important;
}
.galleryLightboxAction.save.saved{
  border-color:var(--amber)!important;
  background:var(--amber)!important;
  color:#171008!important;
}
.galleryLightboxClose{
  width:42px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  font-size:16px!important;
  background:rgba(6,10,12,.78)!important;
}

/* Previous / next stay over the photograph */
.galleryLightboxNav{
  position:absolute!important;
  z-index:10!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:48px!important;
  height:48px!important;
  border-radius:50%!important;
  border:1px solid rgba(255,255,255,.25)!important;
  background:rgba(5,9,11,.66)!important;
  color:#fff!important;
  font-size:30px!important;
  display:grid!important;
  place-items:center!important;
  backdrop-filter:blur(12px)!important;
  cursor:pointer!important;
}
.galleryLightboxNav.prev{left:16px!important}
.galleryLightboxNav.next{right:16px!important}
.galleryLightboxNav:hover{
  border-color:rgba(85,220,255,.62)!important;
  background:rgba(8,20,24,.82)!important;
}

/* Gallery thumbnails are ON TOP of the image, never underneath it */
.galleryLightboxThumbs{
  position:absolute!important;
  z-index:8!important;
  left:50%!important;
  bottom:18px!important;
  transform:translateX(-50%)!important;
  width:auto!important;
  max-width:min(900px,calc(100vw - 150px))!important;
  height:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:8px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:16px!important;
  background:rgba(3,7,9,.68)!important;
  backdrop-filter:blur(16px) saturate(1.1)!important;
  box-shadow:0 14px 40px rgba(0,0,0,.34)!important;
  scrollbar-width:none!important;
}
.galleryLightboxThumbs::-webkit-scrollbar{display:none!important}
.galleryLightboxThumb{
  flex:0 0 92px!important;
  width:92px!important;
  height:62px!important;
  padding:0!important;
  border-radius:11px!important;
  border:1px solid rgba(255,255,255,.20)!important;
  background:#111!important;
  overflow:hidden!important;
  opacity:.58!important;
  cursor:pointer!important;
  transition:opacity .18s,transform .18s,border-color .18s!important;
}
.galleryLightboxThumb:hover{
  opacity:.9!important;
  transform:translateY(-2px)!important;
}
.galleryLightboxThumb.active{
  opacity:1!important;
  border-color:var(--cyan)!important;
  box-shadow:0 0 0 2px rgba(85,220,255,.12)!important;
}
.galleryLightboxThumb img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

/* Full-screen mode keeps the controls available */
.galleryLightbox:fullscreen,
.galleryLightbox:-webkit-full-screen{
  background:#000!important;
}

/* Mobile */
@media(max-width:840px){
  .galleryLightboxStage{
    padding:0!important;
  }
  .galleryLightboxStage img{
    object-fit:contain!important;
  }
  .galleryLightboxTopActions{
    top:max(8px,env(safe-area-inset-top))!important;
    right:8px!important;
    gap:5px!important;
  }
  .galleryLightboxAction,
  .galleryLightboxClose{
    min-height:36px!important;
    height:36px!important;
    padding:0 11px!important;
    font-size:8px!important;
  }
  .galleryLightboxAction.save{padding:0 12px!important}
  .galleryLightboxClose{width:36px!important;padding:0!important}
  .galleryLightboxNav{
    width:39px!important;
    height:39px!important;
    font-size:24px!important;
    background:rgba(5,9,11,.55)!important;
  }
  .galleryLightboxNav.prev{left:7px!important}
  .galleryLightboxNav.next{right:7px!important}
  .galleryLightboxThumbs{
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    max-width:calc(100vw - 18px)!important;
    padding:6px!important;
    gap:5px!important;
    border-radius:13px!important;
  }
  .galleryLightboxThumb{
    flex-basis:66px!important;
    width:66px!important;
    height:48px!important;
    border-radius:8px!important;
  }
}

/* =========================================================
   V32 — MOBILE GALLERY UX
   Search icon + inline filters + animated selection feedback
   ========================================================= */

@media(max-width:840px){
  /* Header becomes one compact control rail */
  .galleryAppHeader{
    grid-template-columns:auto auto minmax(0,1fr) auto!important;
    align-items:center!important;
    min-height:56px!important;
    height:56px!important;
    padding:6px 8px!important;
    gap:6px!important;
  }

  .galleryBrand{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    overflow:hidden!important;
    border-radius:50%!important;
    display:grid!important;
    place-items:center!important;
  }
  .galleryBrand img{
    width:32px!important;
    height:32px!important;
    margin:0!important;
  }
  .galleryBrand>div{display:none!important}

  /* Search is reduced to magnifier by default */
  .gallerySearchShell{
    position:relative!important;
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    padding:0!important;
    border-radius:999px!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
    transition:width .25s cubic-bezier(.22,1,.36,1),background .2s,border-color .2s!important;
    flex:none!important;
  }
  .gallerySearchShell svg{
    position:absolute!important;
    left:10px!important;
    width:17px!important;
    height:17px!important;
    pointer-events:none!important;
  }
  .gallerySearchShell input{
    width:0!important;
    opacity:0!important;
    pointer-events:none!important;
    padding:0!important;
    font-size:10px!important;
    transition:opacity .18s!important;
  }
  .gallerySearchShell.mobileOpen{
    width:min(230px,55vw)!important;
    display:flex!important;
    justify-content:flex-start!important;
    padding:0 12px 0 34px!important;
    background:#151d20!important;
    z-index:30!important;
  }
  .gallerySearchShell.mobileOpen input{
    width:100%!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  /* Filter chips live next to the search icon in the same top row */
  .galleryHeaderInlineFilters{
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
    mask-image:linear-gradient(90deg,#000 0,#000 92%,transparent 100%);
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 92%,transparent 100%);
  }
  .galleryHeaderInlineFilters::-webkit-scrollbar{display:none!important}
  .galleryHeaderInlineFilters .galleryFilterChip{
    flex:0 0 auto!important;
    min-height:34px!important;
    height:34px!important;
    padding:0 10px!important;
    font-size:7.5px!important;
    white-space:nowrap!important;
    border-radius:999px!important;
  }

  /* Original filter panel no longer consumes vertical space */
  .galleryFilterPanel{
    display:none!important;
  }
  #galleryFilterTop{display:none!important}

  .galleryHeaderActions{
    flex:0 0 auto!important;
    gap:4px!important;
  }
  .galleryHeaderActions .galleryHomeTop{display:none!important}
  .galleryCartTop{
    min-height:38px!important;
    height:38px!important;
    padding:0 10px!important;
    position:relative!important;
    overflow:visible!important;
  }
  .galleryCartTop .gallerySelectionLabel{
    display:none!important;
  }
  .galleryCartTop span#galleryCartCount{
    min-width:20px!important;
    height:20px!important;
    border-radius:999px!important;
    display:grid!important;
    place-items:center!important;
    padding:0 5px!important;
    font-size:8px!important;
  }
  .galleryCloseTop{
    width:38px!important;
    height:38px!important;
    min-height:38px!important;
    padding:0!important;
  }

  /* Content starts immediately under compact top rail */
  .galleryAppBody{
    height:calc(100dvh - 56px)!important;
    padding:9px 8px 94px!important;
  }
  .galleryBrowseHead{
    padding:2px 1px 8px!important;
  }
  .galleryBrowseHead small{font-size:7px!important}
  .galleryBrowseHead h2{font-size:23px!important}
  .galleryBrowseHead p{display:none!important}

  /* Sticky selection CTA with stronger attention */
  .galleryMobileCart{
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    border-radius:17px!important;
    transition:transform .24s cubic-bezier(.22,1,.36,1),box-shadow .24s,border-color .24s!important;
    will-change:transform;
  }
  .galleryMobileCart.selectionPulse{
    animation:v32SelectionPulse .72s cubic-bezier(.22,1,.36,1);
  }
  .galleryMobileCart.selectionPulse strong{
    animation:v32SelectionText .72s ease;
  }

  /* Save feedback on the actual card */
  .galleryPin.v32Added .galleryPinMedia{
    animation:v32PinAdded .62s cubic-bezier(.22,1,.36,1);
  }
  .galleryPin.v32Added .galleryPinSave{
    animation:v32SavedButton .62s ease;
  }

  /* Counter bubble animation */
  .galleryCartTop.v32CartPulse,
  .galleryMobileCart.v32CartPulse{
    animation:v32CartBounce .68s cubic-bezier(.22,1,.36,1);
  }
  .galleryCartTop.v32CartPulse #galleryCartCount{
    animation:v32CountPop .68s cubic-bezier(.22,1,.36,1);
  }
}

@keyframes v32SelectionPulse{
  0%{transform:translateY(0) scale(1)}
  28%{transform:translateY(-7px) scale(1.025);box-shadow:0 0 0 3px rgba(85,220,255,.12),0 16px 40px rgba(0,0,0,.38)}
  55%{transform:translateY(0) scale(.99)}
  100%{transform:translateY(0) scale(1)}
}
@keyframes v32SelectionText{
  0%,100%{opacity:1}
  40%{opacity:.35}
}
@keyframes v32PinAdded{
  0%{transform:scale(1)}
  35%{transform:scale(.965)}
  70%{transform:scale(1.02)}
  100%{transform:scale(1)}
}
@keyframes v32SavedButton{
  0%{transform:scale(1)}
  40%{transform:scale(1.13)}
  100%{transform:scale(1)}
}
@keyframes v32CartBounce{
  0%{transform:scale(1)}
  30%{transform:scale(1.06)}
  60%{transform:scale(.985)}
  100%{transform:scale(1)}
}
@keyframes v32CountPop{
  0%{transform:scale(1)}
  38%{transform:scale(1.45) rotate(-8deg)}
  100%{transform:scale(1)}
}

@media(max-width:430px){
  .galleryHeaderInlineFilters .galleryFilterChip{
    padding:0 9px!important;
    min-height:32px!important;
    height:32px!important;
    font-size:7px!important;
  }
  .gallerySearchShell{
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
  }
  .gallerySearchShell.mobileOpen{
    width:min(210px,58vw)!important;
  }
}

/* =========================================================
   V34 — FILTERS ON DEMAND
   Space filters are hidden by default and shown only
   after clicking the "Filtres" button.
   ========================================================= */

/* Never show the inline chip rail permanently */
.galleryHeaderInlineFilters{
  display:none!important;
}

/* Keep the filter button available on desktop and mobile */
#galleryFilterTop{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
}

/* Filter panel is closed by default */
.galleryFilterPanel{
  display:none!important;
}

/* Open only after explicit click */
.galleryFilterPanel.open{
  display:block!important;
}

/* Desktop: compact floating-like panel */
@media(min-width:841px){
  .galleryFilterPanel{
    margin:0 0 15px!important;
    padding:13px!important;
    border-radius:18px!important;
    border:1px solid rgba(255,255,255,.10)!important;
    background:rgba(10,16,18,.96)!important;
    box-shadow:0 18px 52px rgba(0,0,0,.28)!important;
  }
}

/* Mobile: compact collapsible block directly below heading */
@media(max-width:840px){
  .galleryAppHeader{
    grid-template-columns:auto auto minmax(0,1fr)!important;
  }

  /* Search stays compact as a magnifier */
  .gallerySearchShell{
    grid-column:2!important;
  }

  .galleryHeaderActions{
    grid-column:3!important;
    justify-self:end!important;
  }

  #galleryFilterTop{
    display:inline-flex!important;
    min-height:38px!important;
    height:38px!important;
    padding:0 11px!important;
    border-radius:999px!important;
    font-size:8px!important;
  }

  .galleryFilterPanel{
    margin:0 0 10px!important;
    padding:10px!important;
    border-radius:16px!important;
    background:rgba(10,16,18,.97)!important;
    border:1px solid rgba(255,255,255,.11)!important;
    box-shadow:0 16px 42px rgba(0,0,0,.26)!important;
  }

  .galleryFilterPanel.open{
    display:block!important;
    animation:v34FilterOpen .20s cubic-bezier(.22,1,.36,1);
  }

  .galleryFilterHead{
    margin-bottom:8px!important;
  }

  .galleryFilterHead strong{
    font-size:10px!important;
  }

  .galleryFilterHead small{
    display:none!important;
  }

  .galleryFilterChips{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    gap:6px!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:1px!important;
  }

  .galleryFilterChips::-webkit-scrollbar{
    display:none!important;
  }

  .galleryFilterChip{
    flex:0 0 auto!important;
    min-height:32px!important;
    height:32px!important;
    padding:0 10px!important;
    font-size:7.5px!important;
    white-space:nowrap!important;
  }
}

@keyframes v34FilterOpen{
  from{opacity:0;transform:translateY(-5px) scale(.99)}
  to{opacity:1;transform:none}
}

/* =========================================================
   V35 — RESPONSIVE HARMONY / SELECTION VISIBILITY
   Goals:
   - "Ma sélection" is always easy to find.
   - No overlap/crossing on phone, tablet, laptop, desktop, TV.
   - Stable vertical/horizontal layouts with safe-area support.
   - Fluid masonry density by viewport width.
   ========================================================= */

:root{
  --gutter-fluid:clamp(8px,1.45vw,24px);
  --gallery-head-h:72px;
}

/* ---------- Global gallery geometry ---------- */
.galleryApp,
.galleryApp *{
  min-width:0;
}

.galleryAppHeader{
  width:100%!important;
  box-sizing:border-box!important;
}

.galleryAppBody{
  width:100%!important;
  box-sizing:border-box!important;
  overscroll-behavior-y:contain;
}

.galleryBrowseHead{
  min-width:0!important;
}
.galleryBrowseHead>div:first-child{
  min-width:0!important;
}
.galleryBrowseHead h2,
.galleryBrowseHead p{
  overflow-wrap:anywhere;
}

/* ---------- Desktop selection pill: always visible ---------- */
.galleryCartTop{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  position:relative!important;
  overflow:visible!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
  border-color:rgba(244,184,95,.46)!important;
  box-shadow:0 0 0 1px rgba(244,184,95,.03),0 8px 24px rgba(0,0,0,.16)!important;
  transition:transform .2s,border-color .2s,box-shadow .2s,background .2s!important;
}
.galleryCartTop:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(244,184,95,.76)!important;
}
.galleryCartTop.hasSelection{
  border-color:rgba(244,184,95,.76)!important;
  background:linear-gradient(135deg,rgba(244,184,95,.11),rgba(244,184,95,.035))!important;
  animation:v35SelectionBeacon 3.8s ease-in-out infinite;
}
.galleryCartTop.hasSelection #galleryCartCount{
  animation:v35CounterBreath 2.9s ease-in-out infinite;
}

/* Strong one-shot feedback after adding/removing */
.galleryCartTop.selectionFlash,
.galleryMobileCart.selectionFlash{
  animation:v35SelectionFlash .72s cubic-bezier(.22,1,.36,1)!important;
}

/* ---------- Mobile/tablet persistent selection CTA ---------- */
.galleryMobileCart{
  isolation:isolate!important;
}
.galleryMobileCart.hasSelection{
  border-color:rgba(85,220,255,.68)!important;
  background:
    linear-gradient(135deg,rgba(8,20,24,.98),rgba(5,11,13,.98))!important;
  box-shadow:
    0 18px 50px rgba(0,0,0,.46),
    0 0 0 1px rgba(85,220,255,.07),
    0 0 28px rgba(85,220,255,.11)!important;
  animation:v35MobileBeacon 3.8s ease-in-out infinite;
}
.galleryMobileCart.hasSelection:before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:-1;
  border-radius:inherit;
  border:1px solid rgba(85,220,255,.32);
  opacity:.0;
  animation:v35Ring 3.8s ease-out infinite;
}
.galleryMobileCart #galleryMobileCount{
  display:inline-grid!important;
  place-items:center!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  margin-left:4px!important;
  border-radius:999px!important;
  background:var(--amber)!important;
  color:#171008!important;
  font-size:8px!important;
  font-weight:950!important;
}

/* ---------- Header: large screens / TV ---------- */
@media(min-width:1441px){
  .galleryAppHeader{
    grid-template-columns:minmax(180px,260px) minmax(360px,760px) minmax(430px,1fr)!important;
    padding-inline:max(28px,calc((100vw - 1680px)/2))!important;
    gap:clamp(14px,1.5vw,28px)!important;
  }
  .gallerySearchShell{
    width:100%!important;
    max-width:760px!important;
    justify-self:center!important;
  }
  .galleryHeaderActions{
    justify-self:end!important;
    flex-wrap:nowrap!important;
  }
}

/* Very large displays / TVs */
@media(min-width:1920px){
  :root{--gallery-head-h:82px}
  .galleryAppHeader{
    height:82px!important;
    min-height:82px!important;
    padding-inline:max(40px,calc((100vw - 1900px)/2))!important;
  }
  .galleryBrand img{width:42px!important;height:42px!important}
  .galleryBrand b{font-size:13px!important}
  .galleryBrand small{font-size:9px!important}
  .gallerySearchShell{height:48px!important}
  .galleryHeaderActions button{min-height:44px!important;padding-inline:15px!important}
  .galleryAppBody{
    height:calc(100dvh - 82px)!important;
    padding-inline:max(34px,calc((100vw - 1900px)/2))!important;
  }
  .galleryBrowseHead h2{font-size:clamp(42px,2.5vw,58px)!important}
}

/* ---------- Responsive masonry density ---------- */
@media(min-width:2200px){
  .galleryCategoryGrid{column-count:7!important;column-gap:16px!important}
}
@media(min-width:1800px) and (max-width:2199px){
  .galleryCategoryGrid{column-count:6!important;column-gap:15px!important}
}
@media(min-width:1450px) and (max-width:1799px){
  .galleryCategoryGrid{column-count:5!important;column-gap:14px!important}
}
@media(min-width:1180px) and (max-width:1449px){
  .galleryCategoryGrid{column-count:4!important;column-gap:13px!important}
}
@media(min-width:900px) and (max-width:1179px){
  .galleryCategoryGrid{column-count:3!important;column-gap:11px!important}
}
@media(min-width:620px) and (max-width:899px){
  .galleryCategoryGrid{column-count:3!important;column-gap:9px!important}
}
@media(max-width:619px){
  .galleryCategoryGrid{column-count:2!important;column-gap:8px!important}
}

/* ---------- Laptop / tablet landscape ---------- */
@media(min-width:841px) and (max-width:1180px){
  .galleryAppHeader{
    grid-template-columns:auto minmax(220px,1fr) auto!important;
    gap:8px!important;
    padding:0 12px!important;
  }
  .galleryBrand small{display:none!important}
  .galleryBrand b{font-size:10px!important}
  .gallerySearchShell{
    max-width:none!important;
    width:100%!important;
  }
  .galleryHeaderActions{
    gap:5px!important;
  }
  .galleryHeaderActions button{
    padding-inline:10px!important;
    font-size:8px!important;
  }
  .galleryHomeTop{display:none!important}
  .galleryBrowseHead{
    gap:10px!important;
  }
  .galleryBrowseHead h2{
    font-size:clamp(30px,3.4vw,40px)!important;
  }
}

/* ---------- Phone / tablet portrait ---------- */
@media(max-width:840px){
  :root{--gallery-head-h:56px}

  .galleryAppHeader{
    height:56px!important;
    min-height:56px!important;
    grid-template-columns:36px 38px minmax(0,1fr) auto!important;
    padding:6px 8px!important;
    gap:6px!important;
  }

  .galleryBrand{
    grid-column:1!important;
    width:34px!important;
    min-width:34px!important;
  }

  .gallerySearchShell{
    grid-column:2!important;
    width:38px!important;
    min-width:38px!important;
  }

  /* Inline filters remain hidden until Filters is clicked */
  .galleryHeaderInlineFilters{
    display:none!important;
  }

  .galleryHeaderActions{
    grid-column:3 / 5!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    overflow:visible!important;
  }

  /* Top "Ma sélection" is intentionally removed on phone:
     persistent bottom CTA is larger and cannot overlap the header. */
  .galleryCartTop{
    display:none!important;
  }

  .galleryHomeTop{
    display:none!important;
  }

  #galleryFilterTop{
    flex:0 0 auto!important;
    min-width:auto!important;
    height:38px!important;
    padding:0 11px!important;
  }

  .galleryCloseTop{
    flex:0 0 38px!important;
    width:38px!important;
  }

  .galleryAppBody{
    height:calc(100dvh - 56px)!important;
    padding:
      8px
      8px
      calc(82px + env(safe-area-inset-bottom))
      8px!important;
  }

  .galleryBrowseHead{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:end!important;
    gap:8px!important;
  }
  .galleryBrowseHead h2{
    font-size:clamp(20px,6.2vw,26px)!important;
    line-height:1!important;
  }
  .galleryResultsMeta{
    align-self:end!important;
    padding-bottom:2px!important;
  }

  /* Filter panel expands in normal document flow, never over cards */
  .galleryFilterPanel.open{
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    max-width:100%!important;
    z-index:2!important;
  }

  /* Persistent CTA: guaranteed visible and safe */
  .galleryMobileCart{
    display:flex!important;
    position:fixed!important;
    z-index:620!important;
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    min-width:0!important;
    height:56px!important;
    min-height:56px!important;
    padding:0 8px 0 15px!important;
    border-radius:18px!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
  }
  .galleryMobileCart>span{
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:10px!important;
    font-weight:850!important;
  }
  .galleryMobileCart>strong{
    flex:0 0 auto!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 13px!important;
    white-space:nowrap!important;
  }

  .galleryPinMedia{
    border-radius:clamp(12px,3.3vw,16px)!important;
  }
  .galleryPinMeta b{
    font-size:clamp(9px,2.7vw,11px)!important;
  }
  .galleryPinMeta small{
    font-size:clamp(7px,2vw,8.5px)!important;
  }

  /* No action collision on small cards */
  .galleryPinSave{
    top:7px!important;
    right:7px!important;
    max-width:calc(100% - 14px)!important;
    min-height:33px!important;
    height:33px!important;
    padding:0 10px!important;
    font-size:7.5px!important;
  }
  .galleryPinShare{
    right:7px!important;
    bottom:7px!important;
    width:32px!important;
    height:32px!important;
  }
}

/* Small phones */
@media(max-width:390px){
  .galleryAppHeader{
    grid-template-columns:34px 36px minmax(0,1fr) auto!important;
    padding-inline:6px!important;
    gap:4px!important;
  }
  #galleryFilterTop{
    padding:0 9px!important;
    font-size:7px!important;
  }
  .galleryCloseTop{
    width:36px!important;
    flex-basis:36px!important;
  }
  .galleryBrowseHead small{display:none!important}
  .galleryBrowseHead h2{font-size:20px!important}
  .galleryResultsMeta{font-size:7px!important}
  .galleryMobileCart{
    left:6px!important;
    right:6px!important;
    height:54px!important;
    min-height:54px!important;
    border-radius:16px!important;
  }
  .galleryMobileCart>strong{
    height:38px!important;
    min-height:38px!important;
    padding:0 10px!important;
    font-size:7px!important;
  }
}

/* Phone landscape: maximize usable vertical space */
@media(max-height:520px) and (orientation:landscape) and (max-width:1000px){
  :root{--gallery-head-h:48px}
  .galleryAppHeader{
    height:48px!important;
    min-height:48px!important;
    padding-block:4px!important;
  }
  .galleryBrand,
  .galleryBrand img{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
  }
  .gallerySearchShell,
  #galleryFilterTop,
  .galleryCloseTop{
    height:34px!important;
    min-height:34px!important;
  }
  .galleryAppBody{
    height:calc(100dvh - 48px)!important;
    padding-bottom:65px!important;
  }
  .galleryBrowseHead{
    display:none!important;
  }
  .galleryCategoryGrid{
    column-count:3!important;
  }
  .galleryMobileCart{
    height:48px!important;
    min-height:48px!important;
    bottom:6px!important;
  }
  .galleryMobileCart>strong{
    height:34px!important;
    min-height:34px!important;
  }
}

/* ---------- Full-screen gallery harmony ---------- */
.galleryLightboxTopActions{
  max-width:calc(100vw - 28px)!important;
}
.galleryLightboxThumbs{
  overscroll-behavior-x:contain!important;
}
@media(max-width:840px){
  .galleryLightboxStage{
    padding:
      max(50px,calc(env(safe-area-inset-top) + 44px))
      0
      max(70px,calc(env(safe-area-inset-bottom) + 62px))
      0!important;
  }
  .galleryLightboxTopActions{
    left:auto!important;
    max-width:calc(100vw - 16px)!important;
  }
}

/* ---------- Drawer harmony ---------- */
.galleryCartDrawer{
  max-width:100vw!important;
}
.galleryCartHead,
.galleryBoardTools,
.galleryCartItems,
.galleryCartActions{
  box-sizing:border-box!important;
}
@media(max-width:840px){
  .galleryCartDrawer{
    width:100vw!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
  }
}

/* ---------- Reduced motion ---------- */
@media(prefers-reduced-motion:reduce){
  .galleryCartTop.hasSelection,
  .galleryMobileCart.hasSelection,
  .galleryMobileCart.hasSelection:before,
  .galleryCartTop.hasSelection #galleryCartCount{
    animation:none!important;
  }
}

/* ---------- Selection animations ---------- */
@keyframes v35SelectionBeacon{
  0%,72%,100%{
    box-shadow:0 8px 24px rgba(0,0,0,.16),0 0 0 rgba(244,184,95,0);
  }
  82%{
    box-shadow:0 8px 24px rgba(0,0,0,.18),0 0 22px rgba(244,184,95,.16);
  }
  90%{
    box-shadow:0 8px 24px rgba(0,0,0,.16),0 0 8px rgba(244,184,95,.07);
  }
}
@keyframes v35MobileBeacon{
  0%,72%,100%{transform:translateY(0)}
  82%{transform:translateY(-2px)}
  90%{transform:translateY(0)}
}
@keyframes v35Ring{
  0%,70%{opacity:0;transform:scale(1)}
  78%{opacity:.5}
  94%{opacity:0;transform:scale(1.025)}
  100%{opacity:0}
}
@keyframes v35CounterBreath{
  0%,70%,100%{transform:scale(1)}
  82%{transform:scale(1.12)}
  90%{transform:scale(1)}
}
@keyframes v35SelectionFlash{
  0%{transform:scale(1)}
  28%{transform:scale(1.07)}
  58%{transform:scale(.985)}
  100%{transform:scale(1)}
}

/* =========================================================
   V38 — GALLERY: IMAGES ONLY
   Remove all titles / subtitles / metadata displayed below
   Pinterest-style gallery images.
   ========================================================= */

.galleryPinMeta{
  display:none!important;
}

/* Keep the masonry clean and compact after removing captions */
.galleryPin{
  margin-bottom:12px!important;
}

@media(max-width:840px){
  .galleryPin{
    margin-bottom:8px!important;
  }
}

/* The card itself remains fully clickable.
   Save / share / open-gallery actions remain on-image only. */
.galleryPinMedia{
  margin:0!important;
}

/* =========================================================
   V40 — MINIMAL GALLERY ACTIONS / SELECTION UI
   - Removes ""
   - Recolors Save action
   - Makes "Ma sélection" more visible, refined and minimalist
   ========================================================= */

/* ---------- Gallery save button ---------- */
.galleryPinSave{
  background:rgba(235,246,247,.96)!important;
  color:#071113!important;
  border:1px solid rgba(255,255,255,.78)!important;
  box-shadow:
    0 10px 26px rgba(0,0,0,.24),
    inset 0 0 0 1px rgba(255,255,255,.30)!important;
  backdrop-filter:blur(12px)!important;
  transition:
    transform .18s cubic-bezier(.22,1,.36,1),
    background .18s,
    color .18s,
    border-color .18s,
    box-shadow .18s!important;
}
.galleryPinSave:hover{
  transform:translateY(-1px) scale(1.02)!important;
  background:#6fe7ff!important;
  color:#041014!important;
  border-color:#6fe7ff!important;
  box-shadow:
    0 12px 30px rgba(0,0,0,.28),
    0 0 0 3px rgba(111,231,255,.10)!important;
}
.galleryPinSave.saved{
  background:#95e5b8!important;
  color:#07120c!important;
  border-color:#95e5b8!important;
  box-shadow:
    0 10px 26px rgba(0,0,0,.24),
    0 0 20px rgba(149,229,184,.10)!important;
}
.galleryPinSave.saved:hover{
  background:#a8efc7!important;
  border-color:#a8efc7!important;
}

/* Save action in full-screen viewer follows same visual language */
.galleryLightboxAction.save{
  background:#6fe7ff!important;
  color:#041014!important;
  border-color:#6fe7ff!important;
}
.galleryLightboxAction.save.saved{
  background:#95e5b8!important;
  color:#07120c!important;
  border-color:#95e5b8!important;
}

/* ---------- Desktop "Ma sélection" ---------- */
.galleryCartTop{
  min-height:42px!important;
  height:42px!important;
  padding:0 8px 0 14px!important;
  gap:9px!important;
  border-radius:999px!important;
  background:rgba(11,17,20,.76)!important;
  border:1px solid rgba(111,231,255,.32)!important;
  color:#eefafa!important;
  box-shadow:
    0 10px 28px rgba(0,0,0,.18),
    inset 0 0 0 1px rgba(255,255,255,.025)!important;
  backdrop-filter:blur(16px) saturate(1.05)!important;
}
.galleryCartTop:before{
  content:"";
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:#6fe7ff;
  box-shadow:0 0 12px rgba(111,231,255,.65);
}
.galleryCartTop .gallerySelectionLabel{
  display:inline!important;
  font-size:8.5px!important;
  font-weight:850!important;
  letter-spacing:.015em!important;
  color:#f2fbfc!important;
}
.galleryCartTop #galleryCartCount{
  min-width:26px!important;
  height:26px!important;
  padding:0 7px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:999px!important;
  background:#e9f7f8!important;
  color:#061012!important;
  font-size:8px!important;
  font-weight:950!important;
  box-shadow:none!important;
}
.galleryCartTop:hover{
  border-color:rgba(111,231,255,.66)!important;
  background:rgba(14,23,26,.90)!important;
  transform:translateY(-1px)!important;
}
.galleryCartTop.hasSelection{
  border-color:rgba(111,231,255,.55)!important;
  background:rgba(10,19,22,.90)!important;
  animation:v40SelectionBreath 3.6s ease-in-out infinite!important;
}

/* ---------- Mobile persistent selection bar ---------- */
.galleryMobileCart{
  background:rgba(8,14,17,.94)!important;
  border:1px solid rgba(111,231,255,.32)!important;
  color:#f4fbfc!important;
  box-shadow:
    0 18px 50px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(255,255,255,.025)!important;
  backdrop-filter:blur(18px)!important;
}
.galleryMobileCart>span{
  position:relative;
  padding-left:14px;
}
.galleryMobileCart>span:before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:7px;
  height:7px;
  transform:translateY(-50%);
  border-radius:50%;
  background:#6fe7ff;
  box-shadow:0 0 12px rgba(111,231,255,.65);
}
.galleryMobileCart #galleryMobileCount{
  background:#e9f7f8!important;
  color:#061012!important;
}
.galleryMobileCart>strong{
  border-radius:999px!important;
  background:#6fe7ff!important;
  color:#041014!important;
  border:0!important;
  box-shadow:none!important;
}
.galleryMobileCart.hasSelection{
  border-color:rgba(111,231,255,.60)!important;
  background:rgba(8,16,19,.97)!important;
  animation:v40MobileSelectionBreath 3.6s ease-in-out infinite!important;
}

/* ---------- About cards: cleaner text block after removing helper note ---------- */

/* ---------- Motion ---------- */
@keyframes v40SelectionBreath{
  0%,72%,100%{
    box-shadow:
      0 10px 28px rgba(0,0,0,.18),
      0 0 0 rgba(111,231,255,0);
  }
  84%{
    box-shadow:
      0 10px 30px rgba(0,0,0,.22),
      0 0 20px rgba(111,231,255,.11);
  }
}
@keyframes v40MobileSelectionBreath{
  0%,72%,100%{transform:translateY(0)}
  84%{transform:translateY(-2px)}
  92%{transform:translateY(0)}
}

/* ---------- Compact responsive tuning ---------- */
@media(max-width:840px){
  .galleryPinSave{
    min-height:32px!important;
    height:32px!important;
    padding:0 10px!important;
    font-size:7.5px!important;
  }
  .galleryMobileCart{
    min-height:54px!important;
    height:54px!important;
  }
  .galleryMobileCart>strong{
    min-height:38px!important;
    height:38px!important;
    padding:0 12px!important;
  }
}

/* =========================================================
   V53 — GALLERY: IMAGES ONLY
   Remove gallery intro / title / subtitle / count.
   Keep search, filters, selection, home and masonry images.
   ========================================================= */

/* Hide the inspiration intro block shown above the masonry grid */
#galleryApp .galleryBrowseHead,
#galleryApp .galleryIntro,
#galleryApp .galleryHero,
#galleryApp .galleryTitleBlock,
#galleryApp .galleryBrowseTitle,
#galleryApp .galleryBrowseIntro{
  display:none!important;
}

/* Defensive selectors for the current headings/text */
#galleryApp [class*="eyebrow"],
#galleryApp [class*="Eyebrow"]{
  display:none!important;
}

/* Hide only the main heading/description area, not card content */
#galleryApp .galleryAppBody > h1,
#galleryApp .galleryAppBody > h2,
#galleryApp .galleryAppBody > p,
#galleryApp .galleryAppBody > .galleryBrowseHead{
  display:none!important;
}

/* Hide inspiration counter such as "56 inspirations" */
#galleryApp .galleryCount,
#galleryApp .galleryBrowseCount,
#galleryApp [data-gallery-count]{
  display:none!important;
}

/* Tighten the space after the top toolbar */
#galleryApp .galleryAppBody{
  padding-top:10px!important;
}
#galleryApp .galleryCategoryGrid,
#galleryApp .galleryMasonry,
#galleryApp .galleryGrid{
  margin-top:0!important;
  padding-top:0!important;
}

/* If a hidden heading container still reserves height */
#galleryApp .galleryBrowseHead + *,
#galleryApp .galleryIntro + *{
  margin-top:0!important;
}

/* Desktop: images begin immediately under the search / action bar */
@media(min-width:841px){
  #galleryApp .galleryAppBody{
    padding-top:8px!important;
  }
}

/* Mobile: maximize visual area for images */
@media(max-width:840px){
  #galleryApp .galleryAppBody{
    padding-top:6px!important;
  }
}

/* =========================================================
   V55 — PERSISTENT GALLERY SELECTION
   One floating "Ma sélection" control, always visible while
   browsing the gallery, gallery detail or fullscreen viewer.
   ========================================================= */

/* Remove the old selection buttons from the gallery flow/header.
   We use one viewport-fixed control instead, so there is no duplicate. */
#galleryApp .galleryCartTop,
#galleryApp .galleryMobileCart{
  display:none!important;
}

/* Floating selection dock */
#v55GallerySelectionDock{
  position:fixed;
  z-index:650;
  right:18px;
  bottom:18px;
  display:none;
  align-items:center;
  gap:11px;
  min-height:52px;
  padding:6px 7px 6px 16px;
  border:1px solid rgba(85,220,255,.42);
  border-radius:999px;
  background:rgba(5,12,14,.94);
  color:#f4f8f6;
  box-shadow:
    0 18px 46px rgba(0,0,0,.40),
    0 0 0 1px rgba(85,220,255,.045);
  backdrop-filter:blur(20px) saturate(1.15);
  -webkit-backdrop-filter:blur(20px) saturate(1.15);
  cursor:pointer;
  user-select:none;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

/* Visible throughout all gallery states, including detail/fullscreen */
body.galleryOpen #v55GallerySelectionDock{
  display:flex;
}

#v55GallerySelectionDock:hover{
  transform:translateY(-2px);
  border-color:rgba(85,220,255,.78);
  background:rgba(7,17,20,.98);
  box-shadow:
    0 20px 52px rgba(0,0,0,.44),
    0 0 24px rgba(85,220,255,.09);
}

#v55GallerySelectionDock .v55SelectionCopy{
  display:flex;
  flex-direction:column;
  min-width:0;
  text-align:left;
}
#v55GallerySelectionDock .v55SelectionCopy small{
  color:#7d8b86;
  font-size:9px;
  line-height:1.1;
  font-weight:700;
}
#v55GallerySelectionDock .v55SelectionCopy strong{
  margin-top:3px;
  color:#fff;
  font-size:13px;
  line-height:1.1;
  font-weight:900;
  white-space:nowrap;
}

#v55GallerySelectionDock .v55SelectionCount{
  min-width:38px;
  height:38px;
  padding:0 9px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--cyan);
  color:#041014;
  font-size:13px;
  font-weight:950;
  box-shadow:0 0 0 4px rgba(85,220,255,.07);
}

#v55GallerySelectionDock.hasSelection{
  border-color:rgba(244,184,95,.56);
}
#v55GallerySelectionDock.hasSelection .v55SelectionCount{
  background:var(--amber);
  color:#171008;
  box-shadow:0 0 0 4px rgba(244,184,95,.07);
}

/* One-shot feedback when the selection changes */
#v55GallerySelectionDock.selectionPulse{
  animation:v55SelectionPulse .62s cubic-bezier(.22,1,.36,1);
}
@keyframes v55SelectionPulse{
  0%{transform:scale(1)}
  34%{transform:scale(1.07)}
  68%{transform:scale(.985)}
  100%{transform:scale(1)}
}

/* Cart must be able to open above the fullscreen gallery viewer. */
.galleryCartDrawer{
  z-index:690!important;
}

/* Keep the dock under the open cart drawer, but above detail/lightbox. */
.galleryDetail{z-index:340!important}
.galleryLightbox{z-index:430!important}

/* Desktop / TV: compact floating CTA at lower-right */
@media(min-width:841px){
  #v55GallerySelectionDock{
    right:clamp(18px,2vw,34px);
    bottom:clamp(18px,2vw,30px);
  }
}

/* Mobile: larger touch target, still fixed to viewport and always reachable */
@media(max-width:840px){
  #v55GallerySelectionDock{
    right:10px;
    bottom:max(12px,env(safe-area-inset-bottom));
    min-height:58px;
    max-width:calc(100vw - 20px);
    padding:7px 7px 7px 14px;
    gap:10px;
    border-radius:17px;
  }

  #v55GallerySelectionDock .v55SelectionCopy small{
    font-size:10px;
  }
  #v55GallerySelectionDock .v55SelectionCopy strong{
    font-size:13px;
  }
  #v55GallerySelectionDock .v55SelectionCount{
    min-width:42px;
    height:42px;
    font-size:14px;
  }

  /* Leave breathing room at the bottom of scrollable gallery content */
  #galleryApp .galleryAppBody{
    padding-bottom:92px!important;
  }
}

/* Very small phones */
@media(max-width:390px){
  #v55GallerySelectionDock{
    left:8px;
    right:8px;
    justify-content:space-between;
  }
}

/* ---------------------------------------------------------
   A) MOBILE GALLERY — "Ma sélection" + count, compact at bottom-right
   --------------------------------------------------------- */
@media(max-width:840px){
  body.galleryOpen #v55GallerySelectionDock{
    left:auto!important;
    right:8px!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    min-width:132px!important;
    max-width:178px!important;
    height:52px!important;
    min-height:52px!important;
    padding:5px 6px 5px 14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    border-radius:999px!important;
    background:rgba(5,12,14,.96)!important;
    box-shadow:0 12px 34px rgba(0,0,0,.42)!important;
  }
  #v55GallerySelectionDock .v55SelectionCopy{
    display:block!important;
    min-width:0!important;
    text-align:left!important;
  }
  #v55GallerySelectionDock .v55SelectionCopy small{
    display:none!important;
  }
  #v55GallerySelectionDock .v55SelectionCopy strong{
    display:block!important;
    margin:0!important;
    color:#fff!important;
    font-size:13px!important;
    line-height:1!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }
  #v55GallerySelectionDock .v55SelectionCount{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    padding:0!important;
    flex:0 0 38px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:50%!important;
    font-size:13px!important;
  }
  #v55GallerySelectionDock::before{
    display:none!important;
  }
  #galleryApp .galleryAppBody{
    padding-bottom:20px!important;
  }
}


/* =========================================================
   RTL MULTI-LANGUAGE SUPPORT (ARABIC / RTL)
   ========================================================= */
[dir="rtl"] .galleryAppHeader{
  direction:rtl;
}
[dir="rtl"] .gallerySearchShell svg{
  margin-left:8px;
  margin-right:0;
}
[dir="rtl"] .galleryHeaderActions{
  flex-direction:row-reverse;
}
[dir="rtl"] .galleryPinSave{
  right:auto!important;
  left:11px!important;
}
[dir="rtl"] .galleryPinShare{
  right:auto!important;
  left:11px!important;
}
[dir="rtl"] .galleryPinOpenLabel{
  left:auto!important;
  right:11px!important;
}
[dir="rtl"] .galleryLightboxTopActions{
  right:auto!important;
  left:18px!important;
  flex-direction:row-reverse;
}
[dir="rtl"] .galleryLightboxNav.prev{
  left:auto!important;
  right:16px!important;
}
[dir="rtl"] .galleryLightboxNav.next{
  right:auto!important;
  left:16px!important;
}
[dir="rtl"] .galleryCartDrawer{
  right:auto!important;
  left:0!important;
  border-left:0!important;
  border-right:1px solid var(--line)!important;
  transform:translateX(-103%)!important;
}
[dir="rtl"] .galleryCartDrawer.open{
  transform:none!important;
}
[dir="rtl"] #v55GallerySelectionDock{
  right:auto!important;
  left:18px!important;
  padding:6px 16px 6px 7px!important;
}
[dir="rtl"] #v55GallerySelectionDock .v55SelectionCopy{
  text-align:right!important;
}

@media(max-width:840px){
  [dir="rtl"] .gallerySearchShell svg{
    left:auto;
    right:10px;
  }
  [dir="rtl"] .gallerySearchShell.mobileOpen{
    padding:0 34px 0 12px!important;
  }
  [dir="rtl"] .galleryPinSave{
    right:auto!important;
    left:7px!important;
  }
  [dir="rtl"] .galleryPinShare{
    right:auto!important;
    left:7px!important;
  }
  [dir="rtl"] .galleryLightboxTopActions{
    right:auto!important;
    left:8px!important;
  }
  [dir="rtl"] .galleryLightboxNav.prev{
    left:auto!important;
    right:7px!important;
  }
  [dir="rtl"] .galleryLightboxNav.next{
    right:auto!important;
    left:7px!important;
  }
  [dir="rtl"] body.galleryOpen #v55GallerySelectionDock{
    right:auto!important;
    left:8px!important;
    padding:5px 14px 5px 6px!important;
  }
  [dir="rtl"] #v55GallerySelectionDock .v55SelectionCopy{
    text-align:right!important;
  }
}
