/* S4Y Fotos Drive – galeria e lightbox */
.s4y-fotos {
	--s4y-gap: 14px;
	--s4y-radius: 6px;
	--s4y-btn-bg: #111;
	--s4y-btn-fg: #fff;
	--s4y-btn-alt-bg: #fff;
	--s4y-btn-alt-fg: #111;
	margin: 1.5em 0;
}
.s4y-fotos__grid {
	display: grid;
	grid-template-columns: repeat(var(--s4y-cols, 4), minmax(0, 1fr));
	gap: var(--s4y-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
@media (max-width: 900px) { .s4y-fotos__grid { grid-template-columns: repeat(min(var(--s4y-cols, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 560px) { .s4y-fotos__grid { grid-template-columns: repeat(min(var(--s4y-cols, 4), 2), minmax(0, 1fr)); } }

.s4y-foto { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.s4y-foto__open {
	all: unset;
	display: block;
	cursor: zoom-in;
	border-radius: var(--s4y-radius);
	overflow: hidden;
	background: #eee;
	aspect-ratio: 1;
}
.s4y-foto__open:focus-visible { outline: 3px solid #2271b1; outline-offset: 2px; }
.s4y-foto__open img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform .35s ease;
	-webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.s4y-foto__open:hover img { transform: scale(1.04); }
.s4y-foto__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: space-between; }
.s4y-foto__sku { font-size: .8em; opacity: .7; word-break: break-all; }

.s4y-buy {
	appearance: none; border: 1px solid var(--s4y-btn-bg); cursor: pointer;
	background: var(--s4y-btn-bg); color: var(--s4y-btn-fg);
	border-radius: 999px; padding: .45em .9em; font-size: .82em; line-height: 1.2; font-weight: 600;
	transition: opacity .2s, transform .1s;
}
.s4y-buy:hover { opacity: .85; }
.s4y-buy:active { transform: scale(.97); }
.s4y-buy--alt { background: var(--s4y-btn-alt-bg); color: var(--s4y-btn-alt-fg); }
.s4y-buy.is-loading { opacity: .5; cursor: progress; }
.s4y-buy.is-added::after { content: " ✓"; }

.s4y-fotos__pagination { margin-top: 1.5em; text-align: center; }
.s4y-fotos__pagination .page-numbers { display: inline-block; padding: .35em .75em; margin: 0 2px; border-radius: 4px; text-decoration: none; }
.s4y-fotos__pagination .page-numbers.current { background: var(--s4y-btn-bg); color: var(--s4y-btn-fg); }
.s4y-fotos__more-wrap { text-align: center; margin-top: 1.5em; }
.s4y-fotos__more { appearance: none; border: 1px solid currentColor; background: transparent; padding: .7em 1.6em; border-radius: 999px; cursor: pointer; }
.s4y-fotos__count { font-size: .85em; opacity: .6; text-align: center; margin-top: .8em; }
.s4y-fotos__notice { padding: 1em; border-left: 4px solid #dba617; background: #fcf9e8; }

/* Lightbox */
html.s4y-lb-open { overflow: hidden; }
.s4y-lb {
	position: fixed; inset: 0; z-index: 999999;
	background: rgba(10, 10, 10, .94);
	display: grid; grid-template-columns: 60px 1fr 60px; grid-template-rows: 1fr auto;
	align-items: center; padding: 16px;
}
.s4y-lb[hidden] { display: none; }
.s4y-lb__figure { grid-column: 2; grid-row: 1; margin: 0; text-align: center; min-height: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.s4y-lb__img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; margin: 0 auto; -webkit-user-select: none; user-select: none; }
.s4y-lb__caption { color: #ddd; font-size: .9em; margin-top: 8px; display: flex; gap: 1em; justify-content: center; }
.s4y-lb__count { opacity: .6; }
.s4y-lb__nav, .s4y-lb__close { appearance: none; background: none; border: 0; color: #fff; cursor: pointer; font-size: 46px; line-height: 1; padding: 8px; opacity: .8; }
.s4y-lb__nav:hover, .s4y-lb__close:hover { opacity: 1; }
.s4y-lb__prev { grid-column: 1; grid-row: 1; }
.s4y-lb__next { grid-column: 3; grid-row: 1; }
.s4y-lb__close { position: absolute; top: 6px; right: 12px; font-size: 38px; }
.s4y-lb__actions { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-top: 12px; }
.s4y-lb__actions .s4y-buy { font-size: 1em; padding: .7em 1.4em; --s4y-btn-bg: #fff; --s4y-btn-fg: #111; --s4y-btn-alt-bg: transparent; --s4y-btn-alt-fg: #fff; border-color: #fff; }
.s4y-lb__actions .s4y-buy[hidden] { display: none; }
@media (max-width: 560px) {
	.s4y-lb { grid-template-columns: 36px 1fr 36px; padding: 8px; }
	.s4y-lb__nav { font-size: 34px; padding: 4px; }
}

/* Aviso */
.s4y-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
	background: #111; color: #fff; padding: .8em 1.2em; border-radius: 8px; z-index: 1000000;
	display: flex; gap: 1em; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
	transition: transform .3s ease; max-width: calc(100vw - 32px);
}
.s4y-toast.is-visible { transform: translate(-50%, 0); }
.s4y-toast a { color: #fff; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* Botão de impressão: nome da loja por baixo */
.s4y-buy__shop { display: block; font-weight: 400; font-size: .78em; opacity: .8; margin-top: 2px; }
.s4y-buy--alt { text-align: center; }

/* Álbuns, filtros e cartões */
.s4y-album { margin: 1.5em 0; }
.s4y-crumbs { font-size: .9em; margin-bottom: .6em; }
.s4y-by { margin: .2em 0 .8em; opacity: .8; }
.s4y-chips { list-style: none; margin: .4em 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.s4y-chips li { background: #f0f0f1; border-radius: 999px; padding: .15em .7em; font-size: .78em; margin: 0; }
.s4y-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 1em 0; padding: 12px; background: #f6f7f7; border-radius: 8px; }
.s4y-filters__f { display: flex; flex-direction: column; font-size: .85em; gap: 4px; }
.s4y-filters select { min-width: 160px; }
.s4y-filters__go { appearance: none; border: 1px solid #111; background: #111; color: #fff; border-radius: 999px; padding: .5em 1.2em; cursor: pointer; }
.s4y-results { font-size: .9em; opacity: .7; }
.s4y-cards { list-style: none; margin: 1em 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.s4y-card { margin: 0; }
.s4y-card a { display: block; text-decoration: none; color: inherit; }
.s4y-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #e5e5e5; }
.s4y-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.s4y-card a:hover .s4y-card__img img { transform: scale(1.04); }
.s4y-card__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #d8d8d8, #efefef); }
.s4y-card__title { display: block; font-weight: 600; margin-top: 6px; }
.s4y-card__sub { display: block; font-size: .8em; opacity: .7; }

/* Página do fotógrafo */
.s4yp { display: flex; gap: 24px; flex-wrap: wrap; margin: 1em 0 1.5em; align-items: flex-start; }
.s4yp__photo img { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; display: block; }
.s4yp__info { flex: 1; min-width: 220px; }
.s4yp__company { font-weight: 700; font-size: 1.1em; margin: 0 0 .4em; }
.s4yp__row { margin: .2em 0; }
.s4yp__links { list-style: none; margin: .6em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.s4yp__h { margin-top: 1.5em; }

/* Página inicial: secções por fotógrafo / últimos álbuns */
.s4y-home { display: flex; flex-direction: column; gap: 56px; }
.s4y-home__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 14px; border-bottom: 1px solid #e5e5e5; }
.s4y-home__who { display: flex; align-items: center; gap: 14px; }
.s4y-home__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: #e5e5e5; font-weight: 600; }
.s4y-home__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s4y-home__kicker { display: block; font-size: .72em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.s4y-home__title { margin: 0; font-size: 1.4em; }
.s4y-home__title.is-big { font-size: 1.7em; }
.s4y-home__title a { color: inherit; text-decoration: none; }
.s4y-home__all { font-weight: 600; padding: .6em .2em; }
.s4y-home__empty { opacity: .7; }

/* Lista compacta de álbuns (coluna lateral) */
.s4y-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.s4y-mini li { margin: 0; }
.s4y-mini a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.s4y-mini__img { width: 64px; height: 64px; flex: none; border-radius: 8px; overflow: hidden; background: #e5e5e5; display: block; }
.s4y-mini__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s4y-mini__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s4y-mini__title { font-weight: 600; line-height: 1.3; }
.s4y-mini__date { font-size: .8em; opacity: .7; }

/* Página de fotógrafos */
.s4y-phs { display: flex; flex-direction: column; gap: 24px; }
.s4y-ph { display: flex; flex-wrap: wrap; gap: 24px 36px; padding: 28px; border: 1px solid #e5e5e5; border-radius: 14px; background: #fff; }
.s4y-ph__photo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #e5e5e5; font-size: 2em; font-weight: 600; }
.s4y-ph__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s4y-ph__photo-link { flex: none; text-decoration: none; color: inherit; }
.s4y-ph__body { flex: 999 1 320px; min-width: 0; }
.s4y-ph__body > * { margin: 0 0 10px; }
.s4y-ph__name { font-size: 1.5em; }
.s4y-ph__name a { color: inherit; text-decoration: none; }
.s4y-ph__company { font-size: .9em; opacity: .75; }
.s4y-ph__contact { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.s4y-ph__bio { max-width: 64ch; line-height: 1.6; }
.s4y-ph__kicker { font-size: .72em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-top: 16px; }
.s4y-ph__thumbs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.s4y-ph__thumbs li { margin: 0; width: 100px; }
.s4y-ph__thumbs a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; font-size: .75em; line-height: 1.3; }
.s4y-ph__thumbs .s4y-mini__img { width: 100px; height: 100px; }
.s4y-ph__thumbs .s4y-mini__title { font-weight: 500; }
.s4y-ph__more { margin-top: 16px; }
.s4y-btn { display: inline-block; padding: .75em 1.4em; border-radius: 999px; background: #111; color: #fff; font-weight: 600; text-decoration: none; }

/* Serviços dos fotógrafos */
.s4y-serv__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.s4y-serv__tabs a { padding: .55em 1.1em; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; font-weight: 500; }
.s4y-serv__tabs a.is-current { background: #111; border-color: #111; color: #fff; }
.s4y-serv__group { margin: 0 0 36px; }
.s4y-serv__h { margin: 0 0 6px; font-size: 1.35em; }
.s4y-serv__h a { color: inherit; text-decoration: none; }
.s4y-serv__lead { margin: 0 0 10px; opacity: .8; max-width: 70ch; }
.s4y-serv__list { list-style: none; margin: 10px 0 0; padding: 0; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff; overflow: hidden; }
.s4y-serv__item { margin: 0; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; border-top: 1px solid #e5e5e5; }
.s4y-serv__item:first-child { border-top: 0; }
.s4y-serv__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.s4y-serv__name { font-weight: 600; }
.s4y-serv__desc { font-size: .88em; opacity: .75; }
.s4y-serv--ph { margin: 0 0 28px; }
.s4y-contact { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .9em; padding: .65em 1.3em; }

/* Janela do formulário de contacto */
.s4y-dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); color: inherit; }
.s4y-dialog::backdrop { background: rgba(10, 16, 36, .6); }
.s4y-dialog__form { padding: 24px; }
.s4y-dialog__form p { margin: 0 0 14px; }
.s4y-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.s4y-dialog__head h2 { margin: 0; font-size: 1.3em; }
.s4y-dialog__close { appearance: none; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 6px 10px; color: inherit; min-width: 44px; min-height: 44px; }
.s4y-dialog label { display: block; font-weight: 600; font-size: .9em; margin-bottom: 4px; }
.s4y-dialog input[type="text"], .s4y-dialog input[type="email"], .s4y-dialog input[type="tel"], .s4y-dialog textarea { width: 100%; box-sizing: border-box; font: inherit; }
.s4y-dialog__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.s4y-dialog__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.s4y-dialog__note { font-size: .82em; opacity: .75; }
.s4y-dialog__status { margin: 0 0 14px; font-weight: 600; }
.s4y-dialog__status:empty { display: none; }
.s4y-dialog__status.is-ok { color: #17663A; background: #EFF9F1; border: 1px solid #B7DFC2; border-radius: 8px; padding: 10px 14px; }
.s4y-dialog__status.is-err { color: #B42318; background: #FDF0F0; border: 1px solid #F0B8B8; border-radius: 8px; padding: 10px 14px; }
.s4y-dialog__actions { margin: 0; text-align: right; }
.s4y-dialog__actions .s4y-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.s4y-dialog__actions .s4y-btn:disabled { opacity: .6; cursor: progress; }

/* Pesquisa de álbuns */
.s4y-search { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 0 0 22px; padding: 16px; background: #f6f7f7; border-radius: 12px; }
.s4y-search label { display: flex; flex-direction: column; gap: 4px; font-size: .85em; font-weight: 600; flex: 1 1 160px; min-width: 0; }
.s4y-search select, .s4y-search input[type="search"] { width: 100%; box-sizing: border-box; min-height: 44px; font: inherit; }
.s4y-search__go { appearance: none; border: 0; background: #111; color: #fff; border-radius: 999px; padding: .7em 1.5em; min-height: 44px; cursor: pointer; font: inherit; font-weight: 600; }
.s4y-search__clear { align-self: center; padding: 10px 4px; }

/* Serviços: foto principal, galeria, preço e observações */
.s4y-serv__card { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-start; margin-bottom: 12px; }
.s4y-serv__main { flex: 0 1 300px; max-width: 100%; border-radius: 12px; overflow: hidden; background: #e5e5e5; aspect-ratio: 4 / 3; display: block; }
.s4y-serv__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s4y-serv__body { flex: 999 1 320px; min-width: 0; }
.s4y-serv__meta { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.s4y-serv__price, .s4y-serv__notes { font-size: .92em; }
.s4y-serv__label { font-weight: 600; }
.s4y-serv__price { font-weight: 600; }
.s4y-serv__price .s4y-serv__label { font-weight: 500; opacity: .75; }
.s4y-serv__thumb { flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #e5e5e5; display: block; }
.s4y-serv__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s4y-serv__item .s4y-serv__txt { gap: 4px; }
.s4y-serv__gal { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.s4y-serv__item .s4y-serv__gal { flex: 1 1 100%; margin-top: 4px; }
.s4y-serv__gal li { margin: 0; }
.s4y-serv__gal a { display: block; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: #e5e5e5; cursor: zoom-in; }
.s4y-serv__gal img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.s4y-serv__gal a:hover img { transform: scale(1.06); }
.s4y-viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; display: none; align-items: center; justify-content: center; }
.s4y-viewer[open] { display: flex; }
.s4y-viewer::backdrop { background: rgba(10, 16, 36, .92); }
.s4y-viewer img { max-width: calc(100vw - 120px); max-height: calc(100vh - 60px); object-fit: contain; border-radius: 6px; }
.s4y-viewer button { appearance: none; background: none; border: 0; color: #fff; cursor: pointer; font-size: 44px; line-height: 1; padding: 10px 14px; min-width: 48px; min-height: 48px; }
.s4y-viewer__close { position: absolute; top: 8px; right: 12px; font-size: 36px; }
.s4y-viewer button[hidden] { display: none; }
@media (max-width: 560px) { .s4y-viewer img { max-width: calc(100vw - 88px); } .s4y-viewer button { padding: 6px; min-width: 40px; } }
