/* Main gallery styles; desktop information positioning is explicitly scoped below. */
.fy-gs-host { --fy-gs-gap: 10px; --fy-gs-bg: #f7f7f5; position: static !important; height: auto !important; padding: 0 !important; display: block !important; }
.fy-gs-host > :not(.fy-gs) { display: none !important; }
.fy-gs { width: var(--fy-gs-width, 100%); margin-inline: auto; min-width: 0; color: #171717; }
.fy-gs * { box-sizing: border-box; }
.fy-gs button { font: inherit; color: inherit; border-radius: 0; letter-spacing: normal; text-transform: none; }
.fy-gs button:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.fy-gs-photo { display: block; width: 100%; padding: 0; border: 0; background: var(--fy-gs-bg); cursor: zoom-in; }
.fy-gs-photo img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; margin: 0; }
.fy-gs-list { display: grid; gap: var(--fy-gs-gap); }
.fy-gs[data-mode="grid"] .fy-gs-list { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
.fy-gs[data-mode="grid"] .fy-gs-list .fy-gs-photo:last-child:nth-child(odd) { grid-column: 1 / -1; }
.fy-gs[data-mode="rail"] .fy-gs-stage { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: var(--fy-gs-gap); align-items: start; }
.fy-gs-thumbs { display: flex; flex-direction: column; gap: var(--fy-gs-gap); max-height: 620px; overflow-y: auto; padding: 3px; }
.fy-gs-thumb { flex: none; padding: 0; background: #f7f7f5; border: 1px solid transparent; cursor: pointer; }
.fy-gs-thumb img { display: block; width: 54px; height: 68px; object-fit: contain; }
.fy-gs-thumb[aria-pressed="true"] { outline: 1px solid #171717; outline-offset: 1px; }
.fy-gs-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.fy-gs-arrow { background: white; border: 1px solid #ddd; height: 40px; min-width: 44px; cursor: pointer; }
.fy-gs-counter { font: 11px Arial,sans-serif; letter-spacing: .12em; }
.fy-gs-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.fy-gs-dot { width: 28px; height: 28px; border: 0; padding: 8px; background: transparent; cursor: pointer; }
.fy-gs-dot::after { content: ''; display: block; width: 8px; height: 8px; border: 1px solid #888; border-radius: 50%; }
.fy-gs-dot[aria-pressed="true"]::after { background: #171717; border-color: #171717; }
.fy-gs-zoom { border: 0; padding: 44px 16px 16px; background: white; max-width: 96vw; max-height: 96dvh; }
.fy-gs-zoom::backdrop { background: #000b; }
.fy-gs-zoom img { display: block; max-width: 88vw; max-height: 80dvh; width: auto; height: auto; object-fit: contain; }
.fy-gs-close { position: absolute; top: 8px; right: 10px; background: white; border: 1px solid #ccc; padding: 5px 12px; cursor: pointer; color: #171717; }
.fy-gs-preview-bar { position: fixed; z-index: 99999; bottom: 12px; left: 12px; right: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: #fff; color: #111; border: 1px solid #ccc; padding: 12px; box-shadow: 0 6px 30px #0002; font: 12px Arial,sans-serif; }
.fy-gs-preview-bar a { padding: 7px 9px; background: #f3f3f3; color: #111; text-decoration: none; }
.fy-gs-preview-bar a[aria-current="page"] { background: #111; color: #fff; }
@media(max-width:767px) {
 .fy-gs[data-mode="grid"] .fy-gs-list { grid-template-columns: repeat(var(--fy-gs-mobile-columns,1),minmax(0,1fr)); }
 .fy-gs[data-mode="rail"] .fy-gs-stage { display: flex; flex-direction: column-reverse; gap: var(--fy-gs-gap); }
 .fy-gs[data-mode="rail"] .fy-gs-stage > .fy-gs-photo { width: 100%; }
 .fy-gs-thumbs { flex-direction: row; max-width: 100%; overflow-x: auto; max-height: none; }
 .fy-gs-preview-bar { max-height: 30dvh; overflow: auto; }
}

/* Desktop only: keep existing product information alongside the photo gallery. */
@media (min-width:1200px) {
 .product-summary-wrapper > .fy-gs-sticky-row { align-items: stretch !important; overflow: visible !important; }
 .fy-gs-sticky-row > .fy-gs-info-column { align-self: stretch !important; overflow: visible !important; min-width: 0; }
 .fy-gs-info-column > .fy-gs-sticky-info {
  position: sticky !important;
  top: var(--fy-gs-sticky-top,112px) !important;
  bottom: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
 }
}

/* In original-mobile-slider mode, the untouched native gallery is revealed. */
.fy-gs[hidden] { display: none !important; }
