/* ============================================================
   PAGINA MARCHIO — layout esteso (v4.7.0)
   Caricato solo su /brand/{marchio}/ con layout attivo (inc/brand-page.php)
   ============================================================ */

.tf-brand-hero-wrap,
.tf-brand-jump,
.tf-brand-lines,
.tf-brand-featured,
.tf-brand-seo,
.tf-brand-cta { --tf-navy: #0c2233; --tf-wa: #25D366; --tf-soft: #f5f7f9; }

html { scroll-behavior: smooth; }
.tf-brand-seo h2[id],
.tf-brand-seo .w4y-faq,
#prodotti { scroll-margin-top: 90px; }

/* ---------- Hero ---------- */
.tf-shop-hero.tf-brand-hero-wrap { text-align: left; padding: 52px 0 46px; }
.tf-brand-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.tf-brand-hero .tf-breadcrumb { margin-bottom: 14px; }
.tf-shop-hero.tf-brand-hero-wrap h1 { font-size: 40px; font-weight: 800; margin: 0 0 6px; color: #fff; text-align: left; }
.tf-shop-hero.tf-brand-hero-wrap p { max-width: 720px; margin: 0; }
.tf-shop-hero.tf-brand-hero-wrap .tf-brand-sub { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 500; color: #bfe9f5; opacity: 1; margin: 0 0 16px; }
.tf-shop-hero.tf-brand-hero-wrap .tf-brand-intro { font-size: 17px; line-height: 1.65; opacity: .95; margin: 0 0 22px; }
.tf-brand-trust { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.tf-brand-trust li { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: #fff; margin: 0; }
.tf-brand-trust li::before { content: '✓ '; }
.tf-brand-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.tf-shop-hero.tf-brand-hero-wrap .tf-brand-hint { font-size: 13.5px; opacity: .85; margin: 10px 0 0; }

.tf-brand-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 12px 20px; font-weight: 700; font-size: 15px; line-height: 1.3; text-decoration: none !important; border: 2px solid transparent; cursor: pointer; box-sizing: border-box; transition: transform .15s, box-shadow .15s; }
.tf-brand-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.tf-brand-btn-white { background: #fff; color: var(--tf-primary-dark, #023e8a) !important; }
.tf-brand-btn-wa { background: var(--tf-wa); color: #fff !important; }
.tf-brand-btn-outline { border-color: rgba(255,255,255,.6); color: #fff !important; background: transparent; }

.tf-brand-card { background: #fff; color: var(--tf-text-dark, #2d3436); border-radius: 14px; padding: 22px 24px; min-width: 280px; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.tf-brand-card-name { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 21px; color: var(--tf-navy); line-height: 1.2; }
.tf-brand-card-tag { font-size: 12px; color: #6b767b; text-transform: uppercase; letter-spacing: 1px; margin: 4px 0 12px; }
.tf-brand-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 14px; line-height: 1.45; }
.tf-brand-card dt { color: #6b767b; margin: 0; }
.tf-brand-card dd { margin: 0; font-weight: 600; }

/* ---------- Indice sezioni ---------- */
.tf-brand-jump { background: #fff; border-bottom: 1px solid var(--tf-border-light, #e8e8e8); }
.tf-brand-jump .container { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.tf-brand-jump .container::-webkit-scrollbar { display: none; }
.tf-brand-jump a { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--tf-navy); text-decoration: none; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 999px; padding: 7px 14px; background: var(--tf-soft); }
.tf-brand-jump a:hover { border-color: var(--tf-primary-blue, #0077b6); color: var(--tf-primary-blue, #0077b6); }

/* ---------- Linee di prodotto ---------- */
.tf-brand-lines { padding: 40px 0 6px; }
.tf-brand-section-title { font-family: 'Poppins', sans-serif; font-size: 24px; color: var(--tf-navy); margin: 0 0 18px; }
.tf-brand-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.tf-brand-section-head .tf-brand-section-title { margin: 0; }
.tf-brand-section-head a { font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--tf-primary-blue, #0077b6); }
.tf-brand-lines-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
@media (max-width: 600px) { .tf-brand-lines-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tf-brand-line { padding: 14px 12px; } }
.tf-brand-line { display: block; text-decoration: none !important; color: inherit; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 12px; padding: 18px 16px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tf-brand-line:hover { border-color: var(--tf-primary-blue, #0077b6); box-shadow: 0 6px 18px rgba(0,119,182,.12); transform: translateY(-2px); }
.tf-brand-line .tf-brand-line-ico { width: 40px; height: 40px; border-radius: 10px; background: #e6f4fa; color: var(--tf-primary-blue, #0077b6); display: grid; place-items: center; margin-bottom: 10px; }
.tf-brand-line strong { display: block; font-family: 'Poppins', sans-serif; font-size: 15px; color: var(--tf-navy); margin-bottom: 4px; }
.tf-brand-line > span:not(.tf-brand-line-ico) { font-size: 13px; color: #5f6b70; line-height: 1.45; display: block; }

/* ---------- Prodotti in evidenza ---------- */
.tf-brand-featured { padding: 34px 0 10px; }
.tf-brand-featured .tf-products-main ul.products.tf-brand-featured-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; margin: 0; padding: 0; list-style: none; }

/* ---------- Testo completo ---------- */
.tf-term-seo.tf-brand-seo { background: var(--tf-soft); padding: 56px 0; }
.tf-brand-seo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.tf-brand-seo .tf-term-seo-inner { max-width: none; margin: 0; }
.tf-brand-seo .tf-term-seo-inner > h2 { margin: 44px 0 14px; }
.tf-brand-seo .tf-term-seo-inner > h2:first-child { margin-top: 0; }
.tf-brand-seo .tf-answer { background: #fff; border-left: 4px solid var(--tf-primary-blue, #0077b6); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 0 0 22px; font-size: 16.5px; }
.tf-brand-seo .tf-answer strong { color: var(--tf-navy); }

.tf-brand-seo .tf-table-wrap { overflow-x: auto; margin: 6px 0 18px; border-radius: 10px; border: 1px solid var(--tf-border-light, #e8e8e8); background: #fff; }
.tf-brand-seo .tf-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0; }
.tf-brand-seo .tf-table th { background: #0c3b5e; color: #fff; text-align: left; font-family: 'Poppins', sans-serif; font-weight: 600; padding: 11px 14px; border: 0; }
.tf-brand-seo .tf-table td { padding: 11px 14px; border: 0; border-top: 1px solid var(--tf-border-light, #e8e8e8); vertical-align: top; }
.tf-brand-seo .tf-table tr:nth-child(even) td { background: #fafcfd; }
.tf-brand-seo .tf-table-note { font-size: 13px; color: #6b767b; margin-top: -8px; }

.tf-brand-seo ol.tf-steps { counter-reset: s; list-style: none; margin: 8px 0 18px; padding: 0; display: grid; gap: 12px; }
.tf-brand-seo ol.tf-steps li { counter-increment: s; position: relative; background: #fff; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 10px; padding: 14px 16px 14px 58px; margin: 0; }
.tf-brand-seo ol.tf-steps li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--tf-primary-blue, #0077b6); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }

.tf-brand-seo .tf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.tf-brand-seo .tf-chips a { font-size: 13.5px; text-decoration: none; background: #fff; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 999px; padding: 6px 13px; color: var(--tf-navy); font-weight: 600; }
.tf-brand-seo .tf-chips a:hover { border-color: var(--tf-primary-blue, #0077b6); color: var(--tf-primary-blue, #0077b6); }

.tf-brand-seo .tf-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 18px; }
.tf-brand-seo .tf-cards > div { background: #fff; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 10px; padding: 16px; font-size: 14.5px; }
.tf-brand-seo .tf-cards h3 { margin: 0 0 6px; font-size: 16px; }
.tf-brand-seo .tf-cards p { margin: 0; }
.tf-brand-seo .tf-cards strong.tf-card-title { display: block; font-family: 'Poppins', sans-serif; color: var(--tf-navy); margin-bottom: 2px; }

/* FAQ a scomparsa (il markup salvato resta h3 + p) */
.tf-brand-seo .w4y-faq .faq-item { background: #fff; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.tf-brand-seo .w4y-faq .faq-item h3 { margin: 0; font-size: 16px; }
.tf-brand-seo .w4y-faq .faq-item h3 button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--tf-navy); }
.tf-brand-seo .w4y-faq .faq-item h3 button:focus-visible { outline: 2px solid var(--tf-primary-blue, #0077b6); outline-offset: -2px; }
.tf-brand-seo .w4y-faq .faq-item h3 button::after { content: '+'; font-size: 22px; line-height: 1; color: var(--tf-primary-blue, #0077b6); transition: transform .2s; flex: 0 0 auto; }
.tf-brand-seo .w4y-faq .faq-item.open h3 button::after { transform: rotate(45deg); }
.tf-brand-seo .w4y-faq .faq-item > p { margin: 0; padding: 0 18px 16px; display: none; }
.tf-brand-seo .w4y-faq .faq-item.open > p { display: block; }

/* Colonna laterale */
.tf-brand-aside { position: sticky; top: 90px; display: grid; gap: 16px; }
.tf-brand-aside-box { background: #fff; border: 1px solid var(--tf-border-light, #e8e8e8); border-radius: 12px; padding: 18px; }
.tf-brand-aside-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; color: var(--tf-navy); margin: 0 0 10px; }
.tf-brand-aside-box ol { margin: 0; padding-left: 18px; font-size: 14px; }
.tf-brand-aside-box ol li { margin-bottom: 5px; }
.tf-brand-aside-box ol a { text-decoration: none; color: var(--tf-text-dark, #2d3436); }
.tf-brand-aside-box ol a:hover { color: var(--tf-primary-blue, #0077b6); }
.tf-brand-aside-help { background: #0c3b5e; border: 0; color: #fff; }
.tf-brand-aside-help .tf-brand-aside-title { color: #fff; }
.tf-brand-aside-help p { font-size: 14px; margin: 0 0 12px; opacity: .92; }
.tf-brand-aside-help .tf-brand-btn { width: 100%; margin-top: 8px; font-size: 14px; padding: 10px 14px; }

/* ---------- Fascia finale ---------- */
.tf-brand-cta { background: linear-gradient(135deg, #023e8a, #0077b6); color: #fff; padding: 44px 0; }
.tf-brand-cta .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.tf-brand-cta h2 { color: #fff; margin: 0 0 6px; font-size: 26px; font-family: 'Poppins', sans-serif; }
.tf-brand-cta p { margin: 0; opacity: .92; }
.tf-brand-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .tf-brand-featured .tf-products-main ul.products.tf-brand-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 1000px) {
    .tf-brand-seo-layout { grid-template-columns: minmax(0, 1fr); }
    .tf-brand-aside { position: static; }
}
@media (max-width: 900px) {
    .tf-brand-hero { grid-template-columns: minmax(0, 1fr); }
    .tf-brand-card { min-width: 0; max-width: none; }
    .tf-shop-hero.tf-brand-hero-wrap h1 { font-size: 30px; }
}
@media (max-width: 700px) {
    .tf-brand-seo .tf-cards { grid-template-columns: minmax(0, 1fr); }
    .tf-brand-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 640px) {
    .tf-brand-seo .tf-table thead { display: none; }
    .tf-brand-seo .tf-table tr { display: block; border-top: 1px solid var(--tf-border-light, #e8e8e8); padding: 10px 0; }
    .tf-brand-seo .tf-table tr:first-child { border-top: 0; }
    .tf-brand-seo .tf-table td { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 10px; border: 0; padding: 5px 14px; background: none !important; }
    .tf-brand-seo .tf-table td::before { content: attr(data-label); font-weight: 700; color: var(--tf-navy); font-size: 13px; }
    .tf-brand-ctas .tf-brand-btn { width: 100%; }
}
@media (max-width: 520px) {
    .tf-brand-featured .tf-products-main ul.products.tf-brand-featured-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
