
/* Hero Styles: match Home's top spacing beneath the fixed navigation. */
body.gallery-page-body .gallery-hero-shell {
  padding-top: 22px;
  align-content: start;
}
@media (max-width: 900px) {
  body.gallery-page-body .gallery-hero-shell { padding-top: 16px; }
}
@media (max-width: 640px) {
  body.gallery-page-body .gallery-hero-shell { padding-top: 12px; }
}
/* Hero Styles: just 10px below the last visible content, without the
   obsolete space once required for the floating favorites bar.
   Reserve only the real fixed bottom navigation height outside the gallery. */
body.gallery-page-body.kh-has-bottom-nav {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
body.gallery-page-body.kh-has-bottom-nav .gallery-main-section {
  padding-bottom: 10px;
}
body.gallery-page-body.kh-has-bottom-nav .load-more-wrap {
  margin-top: 20px;
  scroll-margin-bottom: calc(98px + env(safe-area-inset-bottom, 0px));
}
/* Do not leave an empty button row when all styles have been loaded. */
body.gallery-page-body.kh-has-bottom-nav .load-more-wrap:not(:has(> button:not([hidden]))) {
  display: none;
}
@media (max-width: 620px) {
  body.gallery-page-body.kh-has-bottom-nav {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
  body.gallery-page-body.kh-has-bottom-nav .load-more-wrap {
    scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
}

/* Art Style Gallery only: favorite summary next to the top hamburger menu. */
/* Header dimensions are owned by public-header.css. */
/* Header dimensions are owned by public-header.css. */
body.gallery-page-body .kh-header-favorites {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  gap: 9px;
  margin-left: auto;
  padding: 7px 11px 7px 7px;
  color: #fff;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px;
  text-decoration: none;
  line-height: 1.2;
  box-shadow: none;
  transition: background .18s ease, border-color .18s ease;
}
body.gallery-page-body .kh-header-favorites:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,211,109,.55);
}
body.gallery-page-body .kh-header-favorites:focus-visible {
  outline: 2px solid #ffd267;
  outline-offset: 3px;
}
body.gallery-page-body .kh-header-favorites-star {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffd267;
  color: #0b2450;
  font-size: 16px;
  font-weight: 900;
}
body.gallery-page-body .kh-header-favorites-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
  white-space: nowrap;
}
body.gallery-page-body .kh-header-favorites-copy small {
  font: 850 11px/1.2 system-ui, sans-serif;
  letter-spacing: .12em;
  color: #acbfdf;
}
body.gallery-page-body .kh-header-favorites-copy strong {
  display: block;
  font: 800 13px/1.25 system-ui, sans-serif;
  color: #fff;
}
@media (max-width: 720px) {
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
  body.gallery-page-body .kh-header-favorites { gap: 5px; padding: 5px 7px 5px 5px; border-radius: 11px; }
  body.gallery-page-body .kh-header-favorites-star { flex-basis: 23px; width: 23px; height: 26px; font-size: 12px; border-radius: 7px; }
  body.gallery-page-body .kh-header-favorites-copy { gap: 2px; }
  body.gallery-page-body .kh-header-favorites-copy small { font-size: 11px; letter-spacing: 0; }
  body.gallery-page-body .kh-header-favorites-copy strong { font-size: 12px; }
}
@media (max-width: 375px) {
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
  body.gallery-page-body .kh-header-favorites { padding: 5px; gap: 4px; }
  body.gallery-page-body .kh-header-favorites-star { flex-basis: 19px; width: 19px; height: 24px; font-size: 11px; }
  body.gallery-page-body .kh-header-favorites-copy small { font-size: 10px; }
  body.gallery-page-body .kh-header-favorites-copy strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  body.gallery-page-body .kh-header-favorites { transition: none; }
}
/* Single centered detail-modal action, shared by desktop and mobile. */
body.gallery-page-body .lightbox-info{grid-template-columns:minmax(0,1fr)}
body.gallery-page-body .lightbox-actions{display:flex;width:100%;justify-content:center}
body.gallery-page-body .lightbox-select-button{flex:0 1 auto;width:auto;max-width:100%;justify-content:center}
/* Sort selector: modern chevron without changing options or behavior. */
body.gallery-page-body #styleSort {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 43px;
  background-image: url("/portrait-chevron.svg");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px 17px;
  cursor: pointer;
}
body.gallery-page-body #styleSort:focus-visible {
  outline: 2px solid #3774C8;
  outline-offset: 2px;
}

/* Curated category discovery on desktop, without altering shared CSS. */
@media (min-width: 901px) {
  body.gallery-page-body .gallery-controls {
    grid-template-columns: minmax(225px, 1fr) minmax(150px, 190px) 170px minmax(100px, .45fr);
    gap: 14px;
  }
}
@media (min-width: 721px) and (max-width: 900px) {
  body.gallery-page-body .gallery-controls {
    grid-template-columns: minmax(195px, 1fr) minmax(150px, 185px) 160px;
  }
  body.gallery-page-body .gallery-result-copy {
    grid-column: 1 / -1;
  }
}
body.gallery-page-body .gallery-category select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 49px;
  min-width: 0;
  padding: 0 38px 0 13px;
  border: 1px solid #d8e1ed;
  border-radius: 13px;
  outline: 0;
  background: #f9fbfd;
  color: #17233d;
  font: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("/portrait-chevron.svg");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 17px;
}
body.gallery-page-body .gallery-category select:focus-visible {
  outline: 2px solid #3774C8;
  outline-offset: 2px;
}

/* Gallery discovery modal: self-contained so shared navigation and other pages
   keep their original appearance and behavior. */
body.gallery-page-body .kh-bottom-nav-search {
  display: flex !important;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 720px) {
  /* On phones, the first visible content under the fixed top bar is artwork. */
  body.gallery-page-body .gallery-hero,
  body.gallery-page-body .gallery-controls-section { display: none !important; }
  body.gallery-page-body .gallery-main-section { padding-top: 10px !important; }
  body.gallery-page-body .kh-bottom-nav-search {
    display: flex !important;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
    color: #ffd267;
  }
  body.gallery-page-body .kh-bottom-nav-search .kh-bottom-nav-symbol {
    color: #0b2450;
    background: linear-gradient(145deg, #ffe99c, #ffca52);
    border-color: rgba(255, 228, 160, .95);
    box-shadow: 0 4px 15px rgba(255, 203, 72, .22);
  }
  body.gallery-page-body .kh-bottom-nav-search .kh-bottom-nav-label { color: #ffd267; }
  body.gallery-page-body .kh-bottom-nav-search:focus-visible { outline: 2px solid #ffe18b; outline-offset: 2px; }
  body.gallery-page-body .kh-bottom-nav-search[aria-expanded="true"] { background: rgba(255,255,255,.09); }
}
@media (max-height: 640px) {
  body.gallery-page-body .kh-gallery-filter-dialog { max-height: 94dvh; }
  body.gallery-page-body .kh-gallery-filter-heading { padding-top: 17px; padding-bottom: 17px; }
  body.gallery-page-body .kh-gallery-filter-form { gap: 10px; padding-top: 14px; padding-bottom: 14px; }
}
/* Match the formats scene-detail Close control, scoped to the image viewer. */
#styleLightbox .lightbox-dialog { grid-template-rows: auto minmax(0, 1fr) auto auto; }
#styleLightbox .lightbox-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 22px 22px 0;
  position: relative;
  z-index: 10;
}
#styleLightbox .lightbox-close {
  position: static;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 16px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #7189a6;
  border-radius: 11px;
  background: #ffffff06;
  color: #f1f6ff;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: normal;
  line-height: normal;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: none;
  backdrop-filter: none;
  transition: none;
}
#styleLightbox .lightbox-close:hover { transform: none; background: #ffffff06; }
#styleLightbox .lightbox-close:focus-visible { outline: 3px solid #ffe3a2; outline-offset: 4px; }
#styleLightbox .lightbox-stage { padding-top: 12px; }
@media (max-width: 720px) {
  #styleLightbox .lightbox-toolbar { padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 0; }
}

/* Independent pet catalog adapters. Reference CSS above is copied without provider code. */
body.gallery-page-body {background:#f8fafc}
/* Header dimensions are owned by public-header.css. */
body.gallery-page-body .kh-bottom-nav {grid-template-columns:repeat(6,minmax(0,148px))}
body.gallery-page-body .gallery-hero-shell {max-width:calc(1220px + 2 * var(--kh-page-gutter,24px));padding-inline:var(--kh-page-gutter,24px)}
body.gallery-page-body .gallery-controls-section {padding-inline:var(--kh-page-gutter,24px)}
body.gallery-page-body .gallery-main-section {padding-inline:var(--kh-page-gutter,24px)}
body.gallery-page-body .section-shell {max-width:1220px}
body.gallery-page-body .gallery-image-wrap {aspect-ratio:2/3}
body.gallery-page-body .gallery-image-wrap picture {display:block;width:100%;height:100%}
body.gallery-page-body .gallery-image-wrap picture img {display:block;width:100%;height:100%;object-fit:contain}
body.gallery-page-body .lightbox-image-frame picture {display:contents}
body.gallery-page-body .lightbox-image-frame img {object-fit:contain;aspect-ratio:2/3}
body.gallery-page-body [hidden] {display:none!important}
body.gallery-page-body .lightbox-help {flex-wrap:wrap}
body.gallery-page-body .gallery-result-copy {min-width:0}
@media(max-width:720px){/* Header dimensions are owned by public-header.css. */body.gallery-page-body .kh-bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr))}}

body.gallery-page-body #styleLightbox{z-index:6500}

/* Late rules emitted by original global-nav.php, previously missing. */

/* Hide the optional character-gender helper in the Search modal. */
body.gallery-page-body .kh-gallery-filter-modal .kh-gallery-filter-note { display: none !important; }
/* The gallery starts with its filters on desktop; phone layout stays unchanged. */
@media (min-width: 721px) {
  body.gallery-page-body main > section.gallery-hero { display: none !important; }
}
/* Remove only the gallery hero prompt, including its reserved grid column. */
body.gallery-page-body .gallery-hero > .gallery-hero-shell > .gallery-hero-badge { display: none !important; }
body.gallery-page-body .gallery-hero > .gallery-hero-shell { grid-template-columns: minmax(0, 1fr); }
/* Restore the shared header sizing after removing its gallery-only summary. */
/* Header dimensions are owned by public-header.css. */
/* Header dimensions are owned by public-header.css. */
/* Header dimensions are owned by public-header.css. */
@media (max-width: 720px) {
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
}
@media (max-width: 420px) {
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
  /* Header dimensions are owned by public-header.css. */
}

body.gallery-page-body .kh-bottom-nav{grid-template-columns:repeat(4,minmax(0,148px));gap:clamp(2px,.7vw,12px)}
@media(max-width:620px){body.gallery-page-body .kh-bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:1px}.kh-bottom-nav-label{font-size:10px}}

/* Pet type is a filter, separate from ordering. */
@media(min-width:901px){body.gallery-page-body .gallery-controls{grid-template-columns:minmax(200px,1fr) minmax(145px,190px) 130px 150px minmax(90px,.45fr)}}
