/* Foto Store — pagina pubblica album */

/* Il tema (es. WoodMart) rende il <main> come griglia content+sidebar: per il
   singolo album lo forziamo a blocco full-width, così le foto non si schiacciano. */
body.single-fs_album #main-content { display: block !important; }
body.single-fs_album .main-page-wrapper,
body.single-fs_album #main-content { padding-top: 0 !important; }

/* HERO: featured image come sfondo + nome album (replica fascia titolo del tema) */
.fs-hero {
	position: relative;
	width: 100vw;
	margin-left: calc( 50% - 50vw );
	min-height: 440px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}
.fs-hero::before { content: ""; position: absolute; inset: 0; background: rgba( 0, 0, 0, .45 ); }
.fs-hero-plain { background: #1e73be; }
.fs-hero-plain::before { display: none; }
.fs-hero-inner { position: relative; z-index: 1; padding: 100px 20px 56px; max-width: 1000px; }
.fs-hero-title { color: #fff; font-size: 42px; font-weight: 800; line-height: 1.1; margin: 0; }
.fs-hero-crumbs { margin-top: 12px; color: rgba( 255, 255, 255, .85 ); font-size: 14px; }
.fs-hero-crumbs a { color: rgba( 255, 255, 255, .85 ); text-decoration: none; }
.fs-hero-crumbs a:hover { color: #fff; text-decoration: underline; }
.fs-hero-sep { margin: 0 8px; opacity: .6; }
@media ( max-width: 768px ) {
	.fs-hero { min-height: 300px; }
	.fs-hero-inner { padding: 80px 16px 40px; }
	.fs-hero-title { font-size: 28px; }
}

/* Contenitore singolo album (il padding orizzontale lo dà il container del tema) */
.fs-single-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px 0 64px;
}
.fs-single-title { margin: 0 0 4px; }

/* I bottoni ereditano il font del tema (di default userebbero quello del browser) */
.fs-album button,
.fs-album input,
.fs-face button { font-family: inherit; }

.fs-album { margin: 24px 0 90px; }
.fs-album .fs-h {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-weight: 700;
	opacity: .55;
	margin: 36px 0 14px;
}
.fs-album .fs-empty,
.fs-album .fs-note { opacity: .7; font-style: italic; }

/* Pannello "Ordina le tue foto" (pescara) */
.fs-panel {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, .08 );
	padding: 18px 18px 20px;
	margin: 0 0 24px;
}
.fs-panel-h {
	font-size: 18px;
	font-weight: 700;
	color: #1e3a5f;
	margin: 0 0 14px;
	text-transform: none;
	letter-spacing: 0;
}

/* Card modalità acquisto — stile pescara (colonne uguali, larghe) */
.fs-cards {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 12px;
}
@media ( max-width: 640px ) { .fs-cards { grid-template-columns: repeat( 2, 1fr ); } }
/* .fs-album prefisso + !important per battere gli stili dei <button> del tema */
.fs-album .fs-card {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	padding: 18px 14px !important;
	border: 2px solid #e5e7eb !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: none !important;
	cursor: pointer;
	text-align: center;
	color: #4b5563 !important;
	transition: border-color .15s, background .15s, color .15s;
}
.fs-album .fs-card:hover { border-color: #cbd5e1 !important; background: #fff !important; }
.fs-card .fs-card-ico { line-height: 0; margin-bottom: 2px; }
.fs-card .fs-card-ico svg { width: 24px; height: 24px; }
.fs-card .fs-card-ttl { font-weight: 700; font-size: 13px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; }
.fs-card .fs-card-meta { font-size: 12px; color: #6b7280; }
.fs-card .fs-card-price { font-size: 15px; font-weight: 800; color: #111827; margin-top: 3px; }
.fs-album .fs-card.active {
	border-color: #1e3a5f !important;
	background: rgba( 30, 58, 95, .05 ) !important;
	color: #1e3a5f !important;
}
.fs-card.active .fs-card-price { color: #1e3a5f; }

.fs-hint { margin: 12px 0 0; font-size: 14px; opacity: .75; transition: color .15s; }
.fs-hint.fs-flash { color: #d97700; opacity: 1; font-weight: 600; }

/* Toggle Digitale / Stampa — stile bottoni del sito (WoodMart) */
.fs-toggle { display: inline-flex; gap: 8px; margin: 0 0 18px; }
.fs-album .fs-toggle-btn {
	border: 2px solid var( --btn-accented-bgcolor, #ddd ) !important;
	background: transparent !important;
	color: inherit !important;
	width: auto !important;
	height: auto !important;
	padding: 10px 24px !important;
	border-radius: var( --btn-default-brd-radius, 30px ) !important;
	box-shadow: none !important;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.fs-album .fs-toggle-btn:hover { background: rgba( 0, 0, 0, .04 ) !important; }
.fs-album .fs-toggle-btn.active {
	background: var( --btn-accented-bgcolor, #ff8a00 ) !important;
	color: var( --btn-accented-color, #fff ) !important;
	border-color: var( --btn-accented-bgcolor, #ff8a00 ) !important;
}
.fs-group[hidden] { display: none; }

/* Griglia foto — 5 colonne, righe piene in ordine; le foto mantengono la forma */
.fs-grid {
	display: grid;
	grid-template-columns: repeat( 5, 1fr );
	gap: 12px;
	align-items: start;
}
@media ( max-width: 1024px ) { .fs-grid { grid-template-columns: repeat( 4, 1fr ); } }
@media ( max-width: 768px )  { .fs-grid { grid-template-columns: repeat( 3, 1fr ); gap: 10px; } }
@media ( max-width: 480px )  { .fs-grid { grid-template-columns: repeat( 2, 1fr ); } }

.fs-ph {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #f2f2f2;
	border: 1px solid rgba( 0, 0, 0, .08 ); /* cornice leggerissima */
	cursor: pointer;
	transition: box-shadow .18s ease;
}
.fs-ph:hover { box-shadow: 0 3px 10px rgba( 0, 0, 0, .10 ); }
.fs-ph img { width: 100%; height: auto; display: block; transition: transform .4s ease; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.fs-ph:hover img { transform: scale( 1.04 ); }
.fs-ph .fs-ph-check {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba( 0, 0, 0, .55 );
	border: 2px solid rgba( 255, 255, 255, .85 );
	color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	cursor: pointer;
	transition: background .15s, transform .15s;
}
.fs-ph .fs-ph-check:hover { background: rgba( 0, 0, 0, .8 ); transform: scale( 1.1 ); }
.fs-ph.sel { border-color: var( --btn-accented-bgcolor, #ff8a00 ); box-shadow: 0 0 0 2px var( --btn-accented-bgcolor, #ff8a00 ); }
.fs-ph.sel .fs-ph-check { background: var( --btn-accented-bgcolor, #ff8a00 ); border-color: var( --btn-accented-bgcolor, #ff8a00 ); color: #fff; }

/* Barra acquisto */
.fs-bar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 18px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, .12 );
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba( 0, 0, 0, .12 );
}
.fs-bar-info { flex: 1; font-weight: 600; }
.fs-bar-total { font-size: 22px; font-weight: 800; color: #d97700; min-width: 60px; text-align: right; }
.fs-bar .fs-buy {
	border: 0 !important;
	border-radius: var( --btn-default-brd-radius, 10px ) !important;
	width: auto !important;
	padding: 12px 24px !important;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	background: var( --btn-accented-bgcolor, #ff8a00 ) !important;
	color: var( --btn-accented-color, #1a1206 ) !important;
}
.fs-bar .fs-buy:hover { background: var( --btn-accented-bgcolor-hover, #ffa030 ) !important; }
.fs-bar .fs-buy:disabled { opacity: .4; cursor: not-allowed; }
.fs-bar .fs-buy.loading { opacity: .6; cursor: wait; }

/* Lightbox — stile pescara. NB: i selettori sono prefissati con .fs-lb e usano
   !important per battere gli stili globali dei <button> del tema (WoodMart),
   che altrimenti rendono X/frecce come bottoncini grigi in linea. */
.fs-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba( 0, 0, 0, .92 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.fs-lb[hidden] { display: none; }
.fs-lb img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	user-select: none;
	-webkit-user-select: none;
	pointer-events: none;
}

/* reset comune dei controlli a bottone dentro il modale */
.fs-lb .fs-lb-x,
.fs-lb .fs-lb-nav,
.fs-lb .fs-lb-pick {
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1 !important;
}

.fs-lb .fs-lb-count {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translateX( -50% );
	color: rgba( 255, 255, 255, .6 );
	font-size: 14px;
	z-index: 10;
}
.fs-lb .fs-lb-x {
	position: absolute !important;
	top: 12px !important;
	right: 16px !important;
	width: auto !important;
	height: auto !important;
	padding: 4px !important;
	font-size: 34px !important;
	background: transparent !important;
	border: 0 !important;
	color: #fff !important;
	cursor: pointer;
	z-index: 10;
}
.fs-lb .fs-lb-x:hover { color: #d1d5db !important; }
.fs-lb .fs-lb-nav {
	position: absolute !important;
	top: 50% !important;
	transform: translateY( -50% ) !important;
	width: auto !important;
	height: auto !important;
	padding: 10px !important;
	font-size: 38px !important;
	background: transparent !important;
	border: 0 !important;
	color: rgba( 255, 255, 255, .7 ) !important;
	cursor: pointer;
	z-index: 10;
}
.fs-lb .fs-lb-nav:hover { color: #fff !important; }
.fs-lb .fs-lb-nav[hidden] { display: none !important; }
.fs-lb .fs-lb-prev { left: 14px !important; right: auto !important; }
.fs-lb .fs-lb-next { right: 14px !important; left: auto !important; }
@media ( max-width: 640px ) {
	.fs-lb .fs-lb-nav { display: none !important; } /* su mobile: swipe */
}
.fs-lb-bar {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX( -50% );
	z-index: 10;
}
.fs-lb .fs-lb-pick {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	width: auto !important;
	height: auto !important;
	padding: 9px 18px !important;
	border: 0 !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-weight: 600;
	cursor: pointer;
	background: #fff !important;
	color: #111827 !important;
}
.fs-lb .fs-lb-pick:hover { background: #f3f4f6 !important; }
.fs-lb .fs-lb-pick.is-sel { background: #16a34a !important; color: #fff !important; }
.fs-lb .fs-lb-pick.is-sel:hover { background: #15803d !important; }
.fs-lb .fs-lb-pick.disabled { background: rgba( 255, 255, 255, .5 ) !important; color: #9ca3af !important; cursor: not-allowed; }

/* Toast */
.fs-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX( -50% ) translateY( 20px );
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 14px;
	background: #222;
	color: #fff;
	padding: 12px 18px;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba( 0, 0, 0, .3 );
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s, transform .25s;
}
.fs-toast.show { opacity: 1; transform: translateX( -50% ) translateY( 0 ); pointer-events: auto; }
.fs-toast.ok { background: #1f8a5b; }
.fs-toast-link { color: #fff; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* Ricerca facciale */
.fs-face {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding: 16px 18px;
	margin: 0 0 6px;
	border: 1px solid rgba( 0, 0, 0, .12 );
	border-radius: 14px;
	background: linear-gradient( 135deg, #fff7ec, #fdfdfd );
}
.fs-face-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.fs-face-txt strong { font-size: 15px; }
.fs-face-txt span { font-size: 13px; opacity: .65; }
.fs-face-btn {
	border: 0;
	border-radius: 10px;
	padding: 11px 16px;
	font-weight: 700;
	cursor: pointer;
	background: #ff8a00;
	color: #1a1206;
}
.fs-face-btn:hover { background: #ffa030; }
.fs-face-btn:disabled { opacity: .5; cursor: wait; }
.fs-face-clear {
	border: 1px solid rgba( 0, 0, 0, .2 );
	border-radius: 10px;
	padding: 11px 14px;
	background: #fff;
	cursor: pointer;
}
.fs-ph.mine { box-shadow: 0 0 0 3px #ffce4d inset; }

@media ( max-width: 600px ) {
	.fs-bar-total { font-size: 18px; }
	.fs-buy { padding: 10px 14px; font-size: 14px; }
}
