/*
 * Theme Name:   Twenty Twenty-Five Child
 * Theme URI:    https://serigest.it
 * Description:  Child theme of Twenty Twenty-Five — custom WooCommerce gallery + serigest styles.
 * Author:       Serigest
 * Template:     twentytwentyfive
 * Version:      1.0.6
 * Text Domain:  twentytwentyfive-child
 */

/* ════════════════════════════════════════════════════════
   SERIGEST — Design System
   ════════════════════════════════════════════════════════ */

:root {
    --sg-font:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sg-bg:          #ffffff;
    --sg-radius:      10px;
    --sg-color-text:  #111111;
    --sg-color-muted: #6b7280;
    --sg-color-light: #f5f6f8;
    --sg-color-border:#e5e7eb;
    --sg-accent:       #111111;
    --sg-accent-hover: #333333;
    --sg-accent-soft:  rgba(17, 17, 17, 0.06);
}

/* Font globale su tutto il sito */
html,
body,
body *,
body input,
body textarea,
body select,
body button {
    font-family: var(--sg-font) !important;
}

/* ── PhotoSwipe UI nascosta ── */
.pswp__ui--hidden { display: none !important; }

/* ── Cart submit button ── */
.wc-block-cart__submit-button,
.wc-block-cart__submit-button.contained,
.wp-element-button.wc-block-cart__submit-button,
.wc-block-components-button.wc-block-cart__submit-button,
.wc-block-cart__submit-container .wc-block-cart__submit-button {
    color: #fff !important;
    background-color: #111 !important;
    background: #111 !important;
    --wp--custom--button--color--text: #fff !important;
    --wp--custom--color--text: #fff !important;
}
.wc-block-cart__submit-button span,
.wc-block-cart__submit-button .wc-block-components-button__text {
    color: #fff !important;
}

/* ── Product meta block (SKU, categories, tags) ── */
[data-block-name="woocommerce/product-meta"] { display: none !important; }

/* ── Rimuove outline dopo click (mantiene quello da tastiera per accessibilità) ── */
*:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* ── Excerpt ── */
.wp-block-post-excerpt__excerpt {
    font-size: 17px !important;
}
@media (max-width: 767px) {
    .wp-block-post-excerpt__excerpt {
        font-size: 15px !important;
    }
}

/* ── "Configura ora" CTA — single product ── */
.sg-configure-cta {
    margin: 18px 0 4px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
}

.sg-delivery-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #a5d6a7;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    box-sizing: border-box;
}

.sg-delivery-box svg {
    flex-shrink: 0;
    color: #388e3c;
}

.sg-delivery-box strong {
    font-weight: 700;
    color: #1b5e20;
}

.sg-configure-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    border: 2px solid #111;
    border-radius: 50px;
    padding: 10px 24px;
    letter-spacing: 0.1px;
    transition: background .18s, color .18s;
    cursor: pointer;
}

.sg-configure-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform .18s;
}

.sg-configure-btn:hover {
    background: #111;
    color: #fff;
    text-decoration: none;
}

.sg-configure-btn:hover svg {
    transform: translateY(3px);
}

@media ( max-width: 768px ) {
    .sg-configure-btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .sg-delivery-box {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ── WooCommerce tabs: completamente nascosti ── */
.woocommerce-tabs {
    display: none !important;
}

/* ── Single product: titolo allineato allo stile archivio categorie ── */

.single-product .wp-block-post-title,
.woocommerce.single-product h1.wp-block-post-title,
body.single-product .wp-block-post-title,
.single-product .alignwide.wp-block-post-title,
body.single-product .alignwide.wp-block-post-title {
    font-size: clamp(22px, 3vw, 32px) !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
    color: #111 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    border: none !important;
}

.single-product .wp-block-post-title::after,
body.single-product .wp-block-post-title::after,
.single-product .alignwide.wp-block-post-title::after,
body.single-product .alignwide.wp-block-post-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: #111;
    border-radius: 2px;
    margin-top: 8px;
}

/* ════════════════════════════════════════════════════════════════════════════
   PAGINE DI CONTENUTO (Privacy, T&C, Condizioni di utilizzo…)
   Riduce il font grande di TT5 (Manrope ~22px) a dimensioni
   più leggibili e allinea lo stile al resto del sito.
   Target: body.page:not(.home):not(.woocommerce-account) (esclude homepage, my account e WooCommerce)
   ════════════════════════════════════════════════════════════════════════════ */

/* Wrapper principale – reset font e larghezza */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content,
body.page:not(.home):not(.woocommerce-account) .entry-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    color: #374151 !important;
}

/* Colonna contenuto pagine testuali: allineata a shop/header (~1200px), centrata nel layout a griglia TT5 */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content.is-layout-constrained > :not(.alignleft):not(.alignright):not(.alignfull),
body.page:not(.home):not(.woocommerce-account) .entry-content.is-layout-constrained > :not(.alignleft):not(.alignright):not(.alignfull) {
    max-width: min(1200px, 100%) !important;
    justify-self: center;
}

/* Titolo pagina */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-title {
    font-size: clamp(22px, 3vw, 32px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #111 !important;
    letter-spacing: -.4px !important;
    margin-bottom: 2rem !important;
}

/* H2 – titoli di sezione (esclusi titoli blocchi WooCommerce: .wc-block-components-title, .wc-block-cart__totals-title) */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content h2:not(.wc-block-components-title):not(.wc-block-cart__totals-title),
body.page:not(.home):not(.woocommerce-account) .entry-content h2:not(.wc-block-components-title):not(.wc-block-cart__totals-title) {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #111 !important;
    line-height: 1.3 !important;
    margin: 2.2em 0 .6em !important;
    padding-bottom: .4em !important;
    border-bottom: 1px solid #e4e7ec !important;
    letter-spacing: -.1px !important;
    font-family: inherit !important;
}

/* H3 */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content h3,
body.page:not(.home):not(.woocommerce-account) .entry-content h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.4 !important;
    margin: 1.6em 0 .4em !important;
    font-family: inherit !important;
}

/* H4 */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content h4,
body.page:not(.home):not(.woocommerce-account) .entry-content h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
    margin: 1.4em 0 .3em !important;
    font-family: inherit !important;
}

/* Paragrafi */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content p,
body.page:not(.home):not(.woocommerce-account) .entry-content p {
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: #374151 !important;
    margin-bottom: .9em !important;
    font-family: inherit !important;
}

/* Liste */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content ul,
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content ol,
body.page:not(.home):not(.woocommerce-account) .entry-content ul,
body.page:not(.home):not(.woocommerce-account) .entry-content ol {
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: #374151 !important;
    padding-left: 1.5em !important;
    margin-bottom: .9em !important;
}
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content li,
body.page:not(.home):not(.woocommerce-account) .entry-content li {
    margin-bottom: .3em !important;
}

/* Grassetto */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content strong,
body.page:not(.home):not(.woocommerce-account) .entry-content strong {
    color: #111 !important;
    font-weight: 600 !important;
}

/* Link nel testo */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content a,
body.page:not(.home):not(.woocommerce-account) .entry-content a {
    color: #111 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content a:hover,
body.page:not(.home):not(.woocommerce-account) .entry-content a:hover {
    color: #16a34a !important;
}

/* Separatore orizzontale */
body.page:not(.home):not(.woocommerce-account) .wp-block-post-content hr,
body.page:not(.home):not(.woocommerce-account) .entry-content hr {
    border: none !important;
    border-top: 1px solid #e4e7ec !important;
    margin: 2em 0 !important;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

footer,
.wp-block-template-part[data-slug="footer"],
footer .wp-block-group.alignfull,
.wp-block-template-part footer,
footer.wp-block-template-part > .wp-block-group,
.wp-block-template-part[class*="footer"] .wp-block-group.alignfull,
footer > .wp-block-group {
    background: #0d0d0d !important;
    border-top: none !important;
    padding: 48px 40px 32px !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* Testo e nav nel footer */
footer .wp-block-group.alignfull *,
footer > .wp-block-group * {
    color: #bbb !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

footer .wp-block-group.alignfull a,
footer > .wp-block-group a {
    color: #aaa !important;
    text-decoration: none !important;
    font-size: 13px !important;
    transition: color .15s !important;
}

footer .wp-block-group.alignfull a:hover,
footer > .wp-block-group a:hover {
    color: #fff !important;
}

/* Logo / nome brand */
footer .wp-block-site-title,
footer .wp-block-site-title a {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: -.3px !important;
}

/* Navigazione footer */
footer .wp-block-navigation__container,
footer .wp-block-navigation {
    gap: 20px !important;
    font-size: 13px !important;
}

/* Copyright / testo piccolo */
footer .wp-block-paragraph,
footer p {
    font-size: 12px !important;
    color: #555 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* Nascondi crediti default tema */
footer .wp-block-site-title,
footer .wp-block-site-credit {
    display: none !important;
}

/* Separatore */
footer hr,
footer .wp-block-separator {
    border-color: #2a2a2a !important;
    margin: 24px 0 !important;
    opacity: 1 !important;
    background: #2a2a2a !important;
}

/* My Account — menu laterale: vedi assets/css/my-account.css v3+ */

/* ══════════════════════════════════════════════════════════
   MY ACCOUNT — Login / Register page
   ══════════════════════════════════════════════════════════ */

.sg-login-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.sg-login-hero {
    text-align: center;
    padding: 48px 20px 40px;
}

.sg-login-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f5f6f8;
    border-radius: 50%;
    margin-bottom: 16px;
    color: #111;
}

.sg-login-hero__icon svg {
    width: 28px;
    height: 28px;
}

.sg-login-hero__title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #111 !important;
    margin: 0 0 10px !important;
    letter-spacing: -.4px;
    line-height: 1.2 !important;
}

.sg-login-hero__sub {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* ── Grid ─────────────────────────────────────────────────── */
.sg-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.sg-login-grid--single {
    grid-template-columns: minmax(0, 480px);
    justify-content: center;
}

/* ── Card ─────────────────────────────────────────────────── */
.sg-login-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}

.sg-login-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    margin-bottom: 6px;
}

.sg-login-card__title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #111 !important;
    margin: 0 0 24px !important;
}

/* ── Field ────────────────────────────────────────────────── */
.sg-field {
    margin-bottom: 16px;
}

.sg-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.sg-field label .required {
    color: #ef4444;
    margin-left: 2px;
}

.sg-input {
    width: 100% !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fafafa !important;
    color: #111 !important;
    box-shadow: none !important;
    transition: border-color .15s, background .15s !important;
    box-sizing: border-box !important;
}

.sg-input:focus {
    border-color: #111 !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(17,17,17,.07) !important;
}

.sg-input::placeholder {
    color: #c0c4cc !important;
}

/* Password toggle */
.sg-input-wrap {
    position: relative;
}

.sg-input-wrap .sg-input {
    padding-right: 44px !important;
}

.sg-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.sg-toggle-pw:hover {
    color: #111;
}

.sg-toggle-pw svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Nasconde il toggle password nativo di WooCommerce */
.sg-login-wrap .woocommerce-Input--password .woocommerce-Password-Toggle,
.sg-login-wrap .show-password-input,
.sg-login-wrap .woocommerce-password-input + .show-password-input {
    display: none !important;
}

/* ── Form actions row ─────────────────────────────────────── */
.sg-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.sg-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.sg-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #111;
    cursor: pointer;
}

.sg-lost-pw {
    font-size: 12.5px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color .15s;
}

.sg-lost-pw:hover {
    color: #111;
}

/* ── Buttons ──────────────────────────────────────────────── */
.sg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
    letter-spacing: 0.01em;
    font-family: var(--sg-font);
}

.sg-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sg-btn:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

.sg-btn--primary {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: none;
}

.sg-btn--primary:hover {
    background: #333;
    border-color: #333;
    transform: none;
    color: #fff;
}

.sg-btn--primary:active {
    transform: none;
    background: #000;
    border-color: #000;
}

.sg-btn--outline {
    background: transparent;
    color: #111;
    border-color: #111;
}

.sg-btn--outline:hover {
    background: #111;
    color: #fff;
}

/* ── Benefits list ────────────────────────────────────────── */
.sg-login-benefits {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sg-login-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.sg-login-benefits__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f5f6f8;
    border-radius: 8px;
    flex-shrink: 0;
    color: #111;
}

.sg-login-benefits__icon svg {
    width: 15px;
    height: 15px;
}

/* ── Info notes ───────────────────────────────────────────── */
.sg-pw-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f5f6f8;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 16px;
}

.sg-pw-note svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #6b7280;
}

.sg-privacy-note {
    font-size: 11.5px;
    color: #9ca3af;
    text-align: center;
    margin-top: 12px;
}

.sg-privacy-note a {
    color: #6b7280;
    text-decoration: underline;
}

.sg-back-login {
    text-align: center;
    margin-top: 16px;
}

.sg-back-login a {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: color .15s;
}

.sg-back-login a:hover {
    color: #111;
}

.woocommerce-privacy-policy-text {
    font-size: 13px !important;
}

.woocommerce-privacy-policy-text a {
    font-size: 13px !important;
}

/* ── Hide WooCommerce default page title ──────────────────── */
.woocommerce-account:not(.logged-in) .entry-title,
.woocommerce-account:not(.logged-in) h1.wp-block-post-title {
    display: none !important;
}

/* ── Blocca scroll orizzontale su single product (mobile) ── */
@media (max-width: 768px) {
    html:has(body.single-product),
    body.single-product {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ── Disabilita auto-zoom iOS su input/select/textarea ───── */
@media (max-width: 768px) {
    input,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sg-login-grid {
        grid-template-columns: 1fr;
    }

    .sg-login-card {
        padding: 24px 20px;
    }

    .sg-login-hero__title {
        font-size: 22px !important;
    }

    .sg-login-hero {
        padding: 32px 20px 28px;
    }
}
