/*
Theme Name: Sun Land Child
Template: generatepress
Version: 1.0.0
Text Domain: sunland-child
*/

/* ============================================================
   Sun Land — design system
   Palette: bordeaux #6b1d24 · oro #c8912a · crema #f7f3ea · inchiostro #2a2320
   ============================================================ */

body {
	background: #faf7f1;
	color: var(--sl-ink, #2a2320);
	line-height: 1.7;
}

h1, h2, h3, h4 {
	color: var(--sl-bordeaux, #6b1d24);
	line-height: 1.2;
}
h2 { margin-top: 2.6rem; }
a { color: var(--sl-amber, #c8912a); }
a:hover { color: var(--sl-bordeaux, #6b1d24); }

/* ---------- Header ---------- */
.site-header {
	background-color: #241d1a;
	background-size: 100% auto;
	background-position: center center;
	background-repeat: no-repeat;
	aspect-ratio: 550 / 229;
	position: relative;
	z-index: 20;
}
.inside-header {
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.site-logo {
	background: rgba(255, 255, 255, .90);
	padding: 10px 22px;
	border-radius: 10px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}
.site-logo img,
.header-image {
	max-height: 74px;
	width: auto;
	display: block;
}

/* ---------- Barra lingue ---------- */
.sl-topbar {
	background: #241d1a;
	font-size: 12px;
}
.sl-topbar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 6px 20px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
}
.sl-langs { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.sl-langs a {
	color: #cdc3b6;
	text-transform: uppercase;
	letter-spacing: .1em;
	text-decoration: none;
	font-weight: 600;
}
.sl-langs a:hover { color: #ffffff; }
.sl-langs .current-lang > a { color: var(--sl-amber, #c8912a); }

/* ---------- Navigazione ---------- */
.main-navigation {
	background: var(--sl-bordeaux, #6b1d24);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.main-navigation .inside-navigation {
	padding: 0;
}
.main-navigation .main-nav ul li a {
	color: #f5e9d6;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 7px 14px;
	transition: background .18s ease, color .18s ease;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li:focus-within > a {
	background: #8a2830;
	color: #ffffff;
}
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current_page_item > a {
	background: var(--sl-amber, #c8912a);
	color: #ffffff;
}
.main-navigation .main-nav ul ul {
	background: #ffffff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.main-navigation .main-nav ul ul li a { color: var(--sl-ink, #2a2320); text-transform: none; letter-spacing: 0; }
.main-navigation .menu-toggle { color: #fff; }

/* ---------- Contenuto ---------- */
.site-content { padding-top: 0; }
.inside-article { padding: 0; }
.entry-content { padding: 0 20px; }
.entry-content > p,
.entry-content > h2,
.entry-content > h3,
.entry-content > ul,
.entry-content > figure,
.entry-content > .wp-block-buttons,
.entry-content > .wp-block-image,
.entry-content > .wp-block-group { max-width: 1080px; margin-left: auto; margin-right: auto; }
.entry-content > h2 { text-align: left; }
.entry-title { text-align: center; margin: 1.6rem auto .6rem; }

/* Le immagini non escono mai dal contenitore */
img { max-width: 100%; height: auto; }
.entry-content img,
.wp-block-image img { border-radius: 10px; }

/* ---------- Bottoni ---------- */
.wp-block-button__link,
.sl-btn {
	background: var(--sl-bordeaux, #6b1d24) !important;
	color: #ffffff !important;
	border-radius: 999px !important;
	padding: .85rem 1.9rem !important;
	font-weight: 600 !important;
	font-size: 15px;
	letter-spacing: .03em;
	border: 2px solid var(--sl-bordeaux, #6b1d24);
	transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
	text-decoration: none;
	display: inline-block;
}
.wp-block-button__link:hover,
.sl-btn:hover {
	background: var(--sl-amber, #c8912a) !important;
	border-color: var(--sl-amber, #c8912a) !important;
	color: #ffffff !important;
	transform: translateY(-1px);
}
.sl-btn-ghost {
	background: transparent !important;
	border-color: rgba(255, 255, 255, .7);
	color: #ffffff !important;
}
.sl-btn-ghost:hover { background: rgba(255, 255, 255, .12) !important; border-color: #fff !important; }
.is-style-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--sl-bordeaux, #6b1d24) !important;
	border-color: var(--sl-bordeaux, #6b1d24) !important;
}
.is-style-outline .wp-block-button__link:hover {
	background: var(--sl-bordeaux, #6b1d24) !important;
	color: #fff !important;
}

/* ---------- Colonne / card ---------- */
.wp-block-columns { gap: 2rem; margin: 2rem auto; align-items: stretch; }
.wp-block-column {
	background: #ffffff;
	border: 1px solid rgba(107, 29, 36, .10);
	border-radius: 12px;
	padding: 1.6rem;
	box-shadow: 0 6px 22px rgba(42, 35, 32, .07);
	transition: transform .2s ease, box-shadow .2s ease;
}
.wp-block-column:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(42, 35, 32, .14); }
.wp-block-column h3 { margin-top: .8rem; color: var(--sl-bordeaux, #6b1d24); }

/* Box prodotto cliccabile (l'intero riquadro è un link) */
.wp-block-column { position: relative; cursor: pointer; }
.sl-card-link { color: inherit; text-decoration: none; }
.sl-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* ---------- Gallery ---------- */
.wp-block-gallery { margin: 2rem auto; }
.wp-block-gallery img { border-radius: 10px; }

/* ---------- Archivio Prodotti (lista a righe alternate) ---------- */
.archive .page-header { max-width: 1080px; margin: 2rem auto 1rem; padding: 0 20px; }
.archive .page-header h1 { margin: 0; }

.post-type-archive-prodotto #main {
	display: flex;
	flex-direction: column;
	gap: 2.4rem;
	max-width: 1100px;
	margin: 1.5rem auto 3rem;
	padding: 0 20px;
}
.post-type-archive-prodotto #main > article {
	margin: 0;
	padding-bottom: 2.4rem;
	border-bottom: 1px solid rgba(107, 29, 36, .12);
}
.post-type-archive-prodotto #main > article:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.post-type-archive-prodotto #main .inside-article {
	display: grid;
	grid-template-columns: 1fr 3fr; /* immagine 1/4, testo 3/4 */
	column-gap: 2.5rem;
	align-items: center;
}
.post-type-archive-prodotto .post-image { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
.post-type-archive-prodotto .entry-header { grid-column: 2; grid-row: 1; padding: 0; }
.post-type-archive-prodotto .entry-summary { grid-column: 2; grid-row: 2; padding: 0; margin-top: .6rem; }

/* Righe pari: immagine a destra, testo a sinistra */
.post-type-archive-prodotto #main > article:nth-of-type(even) .inside-article {
	grid-template-columns: 3fr 1fr; /* testo 3/4, immagine 1/4 */
}
.post-type-archive-prodotto #main > article:nth-of-type(even) .post-image { grid-column: 2; }
.post-type-archive-prodotto #main > article:nth-of-type(even) .entry-header,
.post-type-archive-prodotto #main > article:nth-of-type(even) .entry-summary { grid-column: 1; }

.post-type-archive-prodotto .post-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.post-type-archive-prodotto .entry-title { font-size: 1.4rem; margin: 0; line-height: 1.25; text-align: inherit; }
.post-type-archive-prodotto .entry-title a { color: var(--sl-bordeaux, #6b1d24); }
.post-type-archive-prodotto .entry-summary { font-size: 15.5px; color: #4a4038; }
.post-type-archive-prodotto .entry-summary p { margin: 0; }

/* Testo allineato dal lato opposto all'immagine:
   immagine a sinistra -> testo a destra; immagine a destra -> testo a sinistra */
.post-type-archive-prodotto .entry-header,
.post-type-archive-prodotto .entry-summary { text-align: right; }
.post-type-archive-prodotto #main > article:nth-of-type(even) .entry-header,
.post-type-archive-prodotto #main > article:nth-of-type(even) .entry-summary { text-align: left; }

.single-prodotto .entry-content { max-width: 900px; margin: 0 auto; }
.single-prodotto .entry-header { text-align: center; }

@media (max-width: 768px) {
	.post-type-archive-prodotto #main .inside-article,
	.post-type-archive-prodotto #main > article:nth-of-type(even) .inside-article {
		grid-template-columns: 1fr;
		row-gap: 1rem;
	}
	.post-type-archive-prodotto .post-image,
	.post-type-archive-prodotto #main > article:nth-of-type(even) .post-image { grid-column: 1; grid-row: 1; }
	.post-type-archive-prodotto .entry-header,
	.post-type-archive-prodotto #main > article:nth-of-type(even) .entry-header { grid-column: 1; grid-row: 2; }
	.post-type-archive-prodotto .entry-summary,
	.post-type-archive-prodotto #main > article:nth-of-type(even) .entry-summary { grid-column: 1; grid-row: 3; }
	.post-type-archive-prodotto .entry-header,
	.post-type-archive-prodotto .entry-summary { text-align: left; }
}

/* ---------- Footer ---------- */
.site-footer {
	background: #241d1a;
	color: #cdc3b6;
	margin-top: 3rem;
}
.site-footer .inside-site-info { padding: 26px 20px; }
.site-info { font-size: 14px; text-align: center; }
.sl-footer-info { line-height: 1.8; }
.sl-footer-info strong { color: #ffffff; letter-spacing: .03em; }
.sl-footer-info .sl-rights { color: #a99c8c; }
.site-footer a { color: var(--sl-amber, #c8912a); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.main-navigation .main-nav ul { text-align: left; }
}

/* ---------- Accessibilità ---------- */
a:focus-visible,
.wp-block-button__link:focus-visible,
.main-navigation a:focus-visible {
	outline: 3px solid var(--sl-amber, #c8912a);
	outline-offset: 2px;
}
