/*
Theme Name:     Atelierenfan
Theme URI:      https://atelierenfan.it.com
Description:    Tema figlio di Twenty Twenty-Five per il negozio e noleggio Atelierenfan.
Author:         Atelierenfan
Author URI:     https://atelierenfan.it.com
Template:       twentytwentyfive
Version:        1.0.4
Text Domain:    atelierenfan
*/

/* Solo ciò che theme.json non copre. Colori, font e spaziature stanno in theme.json. */

.wp-site-blocks > * { margin-block-start: 0; }
.entry-content > :not(.alignfull):first-child { margin-top: var(--wp--preset--spacing--50); }
.entry-content > :not(.alignfull):last-child { margin-bottom: var(--wp--preset--spacing--60); }
.wp-element-button, .wp-block-button__link { transition: background-color .18s ease, color .18s ease, border-color .18s ease; }

/* Stile blocco: occhiello */
p.is-style-ae-occhiello {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 1rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
	color: var(--wp--preset--color--accent-1); margin-bottom: -.4rem;
}
.has-contrast-background-color p.is-style-ae-occhiello,
.has-accent-3-background-color p.is-style-ae-occhiello { color: var(--wp--preset--color--accent-2); }

/* Stile blocco: titolo con traccia */
.is-style-ae-traccia::after {
	content: ""; display: block; width: 64px; height: var(--wp--custom--traccia);
	margin-top: .55rem; background: var(--wp--preset--color--accent-1); transform-origin: left center;
}
.has-text-align-center.is-style-ae-traccia::after { margin-inline: auto; transform-origin: center; }
.wp-block-heading mark { background: none; color: var(--wp--preset--color--accent-1); }

/* Stile blocco: riquadro del mosaico e scheda */
.wp-block-group.is-style-ae-riquadro { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.wp-block-group.is-style-ae-riquadro a { text-decoration: none; }
.wp-block-group.is-style-ae-riquadro .wp-block-heading a::after {
	content: "→"; display: inline-block; margin-left: .35em; transition: transform .2s ease;
}
.wp-block-group.is-style-ae-riquadro:hover .wp-block-heading a::after { transform: translateX(5px); }
.wp-block-group.is-style-ae-scheda {
	background: var(--wp--preset--color--bianco); border-radius: var(--wp--custom--raggio);
	box-shadow: 0 1px 0 var(--wp--preset--color--accent-6);
}
.ae-mosaico, .ae-mosaico .wp-block-columns { gap: 0; margin-block: 0; }
.ae-mosaico .wp-block-column { display: flex; flex-direction: column; }
.ae-mosaico .wp-block-column > * { flex: 1 1 auto; margin-block: 0; }
.ae-mosaico .wp-block-cover { border-radius: 0; }
@media (max-width: 781px) {
	.ae-mosaico .wp-block-columns { flex-wrap: nowrap !important; }
	.ae-mosaico .wp-block-columns > .wp-block-column { flex-basis: 50% !important; min-width: 0; }
	.ae-mosaico .wp-block-columns .wp-block-cover { min-height: 210px !important; }
	.ae-mosaico .wp-block-columns .is-style-ae-riquadro { padding: 18px !important; }
	.ae-mosaico .wp-block-columns .is-style-ae-riquadro .wp-block-heading { font-size: 1.35rem !important; }
	.ae-mosaico > .wp-block-column:first-child > .wp-block-cover { min-height: 0 !important; padding-top: 190px !important; }
}

/* Riquadri categoria con foto */
.is-style-ae-categoria.wp-block-cover { overflow: hidden; border-radius: var(--wp--custom--raggio); }
.is-style-ae-categoria .wp-block-cover__image-background { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.is-style-ae-categoria:hover .wp-block-cover__image-background { transform: scale(1.04); }
.is-style-ae-categoria a { text-decoration: none; }
.is-style-ae-categoria a::after { content: ""; position: absolute; inset: 0; z-index: 2; }

/* Stile blocco: listino (tabelle prezzi) */
.wp-block-table.is-style-ae-listino table, .wp-block-table.is-style-stripes table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wp-block-table.is-style-ae-listino thead, .wp-block-table.is-style-stripes thead { border-bottom: 0; }
.wp-block-table.is-style-ae-listino th, .wp-block-table.is-style-stripes th {
	background: var(--wp--preset--color--accent-3); color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: left;
}
.wp-block-table.is-style-ae-listino th, .wp-block-table.is-style-ae-listino td,
.wp-block-table.is-style-stripes th, .wp-block-table.is-style-stripes td { border: 0; padding: .72rem .9rem; }
.wp-block-table.is-style-ae-listino table.has-fixed-layout { table-layout: auto; }
.wp-block-table.is-style-ae-listino tbody tr { color: var(--wp--preset--color--contrast); background: var(--wp--preset--color--bianco); border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.wp-block-table.is-style-ae-listino td:not(:first-child), .wp-block-table.is-style-ae-listino th:not(:first-child) { text-align: center; }
.wp-block-table.is-style-ae-listino td:not(:first-child) { font-weight: 600; color: var(--wp--preset--color--accent-1); white-space: nowrap; }
.wp-block-table.is-style-stripes { border-bottom: 0; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--wp--preset--color--bianco); }
.wp-block-table.is-style-stripes tbody tr:nth-child(even) { background: transparent; }
.has-accent-5-background-color .wp-block-table.is-style-stripes tbody tr:nth-child(even) { background: var(--wp--preset--color--base); }
.wp-block-table { overflow-x: auto; }

/* FAQ */
.wp-block-details summary { cursor: pointer; font-weight: 600; padding-right: 1.5rem; }
.wp-block-details[open] summary { margin-bottom: .5rem; color: var(--wp--preset--color--accent-1); }

/* Testata */
.ae-testata { position: relative; z-index: 20; }
.ae-testata .wp-block-site-title { white-space: nowrap; }
.ae-testata .wc-block-mini-cart__button, .ae-testata .wc-block-customer-account__account-icon { color: inherit; }
@media (max-width: 1140px) { .ae-testata .ae-cta-testata { display: none; } }
@media (max-width: 600px) { .ae-barra-avvisi p:first-child { display: none; } }

/* Piè di pagina */
.ae-pie .wp-block-navigation a:hover, .ae-pie a:hover { color: var(--wp--preset--color--accent-2); }

/* Contact Form 7 */
.wpcf7 label { display: block; font-weight: 500; font-size: var(--wp--preset--font-size--small); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea {
	width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .7rem .8rem;
	font: inherit; font-size: var(--wp--preset--font-size--medium); color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--bianco); border: 1px solid var(--wp--preset--color--accent-6); border-radius: var(--wp--custom--raggio);
}
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 2px solid var(--wp--preset--color--accent-3); outline-offset: 1px; }
.wpcf7 form p { margin: 0 0 .9rem; }
.wpcf7 .ae-form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }
@media (max-width: 600px) { .wpcf7 .ae-form-grid { grid-template-columns: 1fr; } }
.wpcf7 .ae-form-consent { font-size: var(--wp--preset--font-size--small); }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 input[type="submit"] {
	cursor: pointer; border: 0; border-radius: var(--wp--custom--raggio); padding: .85rem 1.6rem;
	background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--bianco);
	font-family: var(--wp--preset--font-family--barlow-condensed); font-size: 1.12rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	transition: background-color .18s ease;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--contrast); }
.has-contrast-background-color .wpcf7 input[type="submit"]:hover, .has-accent-3-background-color .wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--accent-2); color: var(--wp--preset--color--contrast); }
.wpcf7 .ae-newsletter { display: flex; gap: .5rem; align-items: flex-end; margin-bottom: .6rem; }
.wpcf7 .ae-newsletter .wpcf7-form-control-wrap { flex: 1 1 auto; }
.wpcf7 .ae-newsletter input[type="email"] { margin-top: 0; }
.wpcf7 form .wpcf7-response-output { margin: .8rem 0 0; padding: .7rem .9rem; border-width: 1px; border-radius: var(--wp--custom--raggio); }

/* Negozio: scheda prodotto nel catalogo */
.wc-block-product-template .wc-block-product, .wc-block-product-template li.product { display: flex; flex-direction: column; }
.wc-block-product .wc-block-components-product-image, .wc-block-product .wp-block-woocommerce-product-image {
	background: var(--wp--preset--color--accent-5); padding: 10px; border-radius: var(--wp--custom--raggio); overflow: hidden;
}
.wc-block-product .wc-block-components-product-image img { transition: transform .45s cubic-bezier(.2,.7,.2,1); border-radius: 2px; }
.wc-block-product:hover .wc-block-components-product-image img { transform: scale(1.035); }
.wc-block-components-product-sale-badge, .wc-block-product .wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--bianco); border: 0; border-radius: 2px;
	font-family: var(--wp--preset--font-family--barlow-condensed); font-size: .95rem; letter-spacing: .06em;
}
.wc-block-components-product-price del, .price del { color: var(--wp--preset--color--accent-4); font-weight: 400; font-size: .8em; }
.wc-block-components-product-price ins, .price ins { text-decoration: none; }
.woocommerce-price-suffix { font-family: var(--wp--preset--font-family--barlow); font-size: .72rem; font-weight: 400; color: var(--wp--preset--color--accent-4); text-transform: none; letter-spacing: 0; }
.wc-block-components-product-rating__stars::before, .wc-block-components-product-rating__stars span::before, .star-rating span::before { color: var(--wp--preset--color--accent-2); }

/* Sezioni a tutta larghezza attaccate tra loro */
.wp-block-post-content > .alignfull { margin-block: 0; }
.ae-mosaico .wp-block-cover__inner-container > .wp-block-group { max-width: min(600px, 84%); }
@media (max-width: 781px) { .ae-mosaico .wp-block-cover__inner-container > .wp-block-group { max-width: 100%; } }
.ae-testata .wp-block-search__button { background: transparent; color: inherit; padding: 6px; margin: 0; }
.ae-testata .wp-block-search__button:hover { background: transparent; color: var(--wp--preset--color--accent-1); }
.ae-testata .wp-block-search__button svg { width: 26px; height: 26px; }
.wpcf7 .wpcf7-acceptance label { display: inline; font-weight: 400; }
.wpcf7 .wpcf7-acceptance input { margin-right: .4rem; }

.has-accent-3-background-color .wp-element-caption, .has-contrast-background-color .wp-element-caption { color: inherit; opacity: .8; }

/* Recensioni (blocco WooCommerce «Tutte le recensioni») in griglia */
.wc-block-all-reviews .wc-block-components-review-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: var(--wp--preset--spacing--30); margin: var(--wp--preset--spacing--40) 0 0; padding: 0; }
.wc-block-all-reviews .wc-block-components-review-list-item__item { margin: 0; padding: var(--wp--preset--spacing--40); background: var(--wp--preset--color--bianco); border-radius: var(--wp--custom--raggio); box-shadow: 0 1px 0 var(--wp--preset--color--accent-6); }
.wc-block-all-reviews .wc-block-components-review-list-item__product a { font-weight: 600; text-decoration: none; }
.wc-block-all-reviews .wc-block-components-review-list-item__info { margin-left: 0; }
.wc-block-all-reviews .wc-block-components-review-list-item__text { margin-left: 0; }

/* Catalogo e scheda prodotto */
.wc-block-product .wp-block-button, .wc-block-product .wc-block-components-product-button { text-align: left; justify-content: flex-start; align-items: flex-start; }
.woocommerce div.product div.images, .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery { width: 100%; max-width: 100%; }
.wp-block-woocommerce-product-image-gallery img { border-radius: var(--wp--custom--raggio); }
.woocommerce-ordering select, .wc-block-catalog-sorting select { padding: .45rem .6rem; border: 1px solid var(--wp--preset--color--accent-6); border-radius: var(--wp--custom--raggio); background: var(--wp--preset--color--bianco); font: inherit; font-size: var(--wp--preset--font-size--small); }
.wp-block-post-terms.is-style-ae-occhiello a { text-decoration: none; }
.wp-block-post-terms.is-style-ae-occhiello { font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); }
.wpcf7 .ae-newsletter p { display: flex; gap: .5rem; margin: 0; width: 100%; }
.wpcf7 .ae-newsletter br { display: none; }
.wpcf7 .ae-newsletter .wpcf7-spinner { display: none; }

/* Ritocchi mobile e badge */
.wp-block-table.is-style-stripes table.has-fixed-layout { table-layout: auto; }
.woocommerce span.onsale, .wp-block-woocommerce-product-image-gallery span.onsale {
	min-height: 0; min-width: 0; padding: .25rem .6rem; line-height: 1.3; border-radius: 2px;
	background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--bianco);
	font-family: var(--wp--preset--font-family--barlow-condensed); font-size: .95rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { font-size: 1.5rem; row-gap: 1rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { font-size: 1.05rem; }
.wp-block-group.is-style-ae-scheda a:not(.wp-element-button) { color: var(--wp--preset--color--contrast) !important; }
