/*
Theme Name:  AI Prompt Pack
Theme URI:   https://aipromptpack.it
Author:      AI Prompt Pack
Author URI:  https://aipromptpack.it
Description: Tema WordPress premium per la vendita di prodotti digitali AI. Integrazione WooCommerce completa con landing page ad alta conversione, checkout con order bump e thank you page con upsell automatico.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-prompt-pack
Tags:        woocommerce, e-commerce, digital-products, landing-page, dark, one-page

WC requires at least: 7.0
WC tested up to: 9.0
*/

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --purple:    #7C3AED;
  --purple-l:  #A78BFA;
  --purple-d:  #4C1D95;
  --gold:      #D97706;
  --gold-l:    #F59E0B;
  --gold-ll:   #FDE68A;
  --dark:      #0F0F1A;
  --dark2:     #1E1B4B;
  --green:     #10B981;
  --red:       #EF4444;
  --white:     #FFFFFF;
  --gray:      #6B7280;
  --light:     #F9FAFB;
  --text:      #1F2937;
  --radius:    12px;
  --shadow:    0 4px 20px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--light); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; transition: color .2s; }
a:hover { color: var(--purple-l); }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5,h6 { line-height: 1.15; font-weight: 800; }

/* ── UTILITY ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.container--mid { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.section { padding: 80px 20px; }
.section--dark { background: var(--dark); }
.section--dark2 { background: linear-gradient(135deg, var(--dark), var(--dark2)); }
.section--light { background: var(--light); }
.section--white { background: #fff; }
.section--gold { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); }
.section--purple { background: linear-gradient(135deg, #EDE9FE, #F5F3FF); }

/* ── BUTTONS ── */
.btn { display: inline-block; padding: 14px 28px; border-radius: var(--radius); font-weight: 700; font-size: 16px; cursor: pointer; border: none; transition: all .2s; text-align: center; }
.btn-primary { background: linear-gradient(135deg, var(--purple), #9333EA); color: #fff; box-shadow: 0 8px 25px rgba(124,58,237,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(124,58,237,.5); color: #fff; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-l)); color: var(--dark); box-shadow: 0 8px 25px rgba(245,158,11,.35); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(245,158,11,.5); color: var(--dark); }
.btn-lg { padding: 20px 36px; font-size: 19px; border-radius: 14px; }
.btn-block { display: block; width: 100%; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 5px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; letter-spacing: .8px; }
.badge-purple { background: rgba(124,58,237,.15); border: 1px solid rgba(167,139,250,.4); color: var(--purple-l); }
.badge-gold { background: var(--gold); color: var(--dark); }
.badge-green { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: var(--green); }

/* ── CARDS ── */
.card { background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow); border: 1px solid #E5E7EB; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(124,58,237,.12); }
.card--dark { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: #fff; }
.card--gold { background: linear-gradient(135deg, #1A1200, #251A00); border-color: var(--gold-l); }

/* ── SITE NAV ── */
.site-header { background: var(--dark); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 20px rgba(124,58,237,.25); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 40px; max-width: 1200px; margin: 0 auto; }
.site-logo { color: #fff; font-size: 19px; font-weight: 900; letter-spacing: -.5px; }
.site-logo span { color: var(--purple-l); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: #fff; }
.site-nav .nav-cta { background: var(--gold-l); color: var(--dark); padding: 10px 22px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.site-nav .nav-cta:hover { background: var(--gold-ll); color: var(--dark); }

/* ── SITE FOOTER ── */
.site-footer { background: var(--dark); padding: 44px 20px; text-align: center; color: var(--gray); font-size: 13px; line-height: 2; }
.site-footer a { color: var(--purple-l); }
.site-footer__logo { font-size: 18px; font-weight: 900; color: #fff; margin-bottom: 12px; }
.site-footer__logo span { color: var(--purple-l); }

/* ── TOPBAR ── */
.topbar { background: linear-gradient(90deg, var(--purple-d), var(--purple)); color: #fff; text-align: center; padding: 10px 20px; font-size: 14px; font-weight: 600; }
.topbar span { color: var(--gold-l); }

/* ── HERO (landing) ── */
.hero-landing { background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 60%, #2D1B69 100%); padding: 88px 20px 100px; text-align: center; position: relative; overflow: hidden; }
.hero-landing::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(124,58,237,.15), transparent 65%); pointer-events: none; }
.hero-landing h1 { font-size: clamp(32px,6vw,62px); color: #fff; margin-bottom: 20px; }
.hero-landing h1 em { color: var(--purple-l); font-style: normal; }
.hero-landing h1 strong { color: var(--gold-l); }
.hero-landing .sub { font-size: 18px; color: #C4B5FD; max-width: 580px; margin: 0 auto 36px; }
.hero-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 44px; }
.hero-feat { background: rgba(255,255,255,.08); border: 1px solid rgba(167,139,250,.3); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 14px; }
.hero-feat .ok { color: var(--green); }

/* ── CTA PRICE BOX ── */
.price-box { background: #fff; border-radius: 20px; padding: 36px 40px; max-width: 440px; margin: 0 auto; box-shadow: 0 25px 60px rgba(0,0,0,.4); }
.price-original { font-size: 15px; color: var(--gray); text-decoration: line-through; }
.price-current { font-size: 52px; font-weight: 900; color: var(--purple); line-height: 1; margin: 6px 0; }
.price-current small { font-size: 24px; }
.price-note { font-size: 13px; color: var(--gray); margin-bottom: 20px; }
.guarantee-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; font-size: 13px; color: #065F46; font-weight: 500; }

/* ── PROOF BAR ── */
.proof-bar { background: #fff; padding: 22px 20px; border-bottom: 1px solid #E5E7EB; }
.proof-bar__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; align-items: center; max-width: 900px; margin: 0 auto; }
.proof-item__num { font-size: 28px; font-weight: 900; color: var(--purple); }
.proof-item__lbl { font-size: 13px; color: var(--gray); }

/* ── INSIDE GRID ── */
.inside-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 24px; margin-top: 48px; }
.inside-card { background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow); border: 1px solid #E5E7EB; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.inside-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(180deg, var(--purple), var(--purple-l)); }
.inside-card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(124,58,237,.15); }
.inside-card .num { font-size: 32px; font-weight: 900; color: var(--purple); }
.inside-card h3 { font-size: 17px; font-weight: 700; margin: 6px 0 8px; }
.inside-card p { font-size: 14px; color: var(--gray); }
.inside-card ul { margin-top: 12px; list-style: none; }
.inside-card ul li { font-size: 13px; color: #374151; padding: 3px 0; }
.inside-card ul li::before { content: '→  '; color: var(--purple); font-weight: 700; }

/* ── TESTIMONIALS ── */
.test-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 24px; margin-top: 48px; }
.test-card { background: var(--light); border-radius: 16px; padding: 28px; border: 1px solid #E5E7EB; }
.test-stars { color: var(--gold-l); font-size: 18px; margin-bottom: 10px; }
.test-card p { font-size: 15px; line-height: 1.7; color: #374151; font-style: italic; margin-bottom: 16px; }
.test-author { display: flex; align-items: center; gap: 12px; }
.test-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--purple-l)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 16px; }
.test-name { font-weight: 700; font-size: 14px; }
.test-role { font-size: 12px; color: var(--gray); }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid #E5E7EB; padding: 20px 0; cursor: pointer; }
.faq-question { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.faq-icon { color: var(--purple); font-size: 22px; transition: transform .2s; }
.faq-answer { font-size: 14px; color: var(--gray); line-height: 1.7; margin-top: 12px; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── WC CHECKOUT ── */
.wc-checkout-wrap { max-width: 900px; margin: 0 auto; padding: 60px 20px; }
.wc-checkout-wrap h2 { font-size: 28px; margin-bottom: 8px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
@media(max-width:768px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-form .form-row { margin-bottom: 18px; }
.checkout-form label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 6px; }
.checkout-form input, .checkout-form select { width: 100%; padding: 12px 14px; border: 2px solid #E5E7EB; border-radius: 10px; font-size: 15px; transition: border-color .2s; }
.checkout-form input:focus, .checkout-form select:focus { outline: none; border-color: var(--purple); }
.order-bump { background: linear-gradient(135deg, #EDE9FE, #F5F3FF); border: 2px solid var(--purple); border-radius: 14px; padding: 20px; margin: 24px 0; position: relative; }
.order-bump__label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.order-bump__checkbox { width: 22px; height: 22px; accent-color: var(--purple); flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.order-bump__title { font-size: 14px; font-weight: 700; color: var(--purple-d); margin-bottom: 4px; }
.order-bump__desc { font-size: 13px; color: #4C1D95; line-height: 1.5; }
.order-bump__price { margin-top: 8px; font-size: 15px; font-weight: 900; color: var(--purple); }
.order-bump__price s { color: var(--gray); font-weight: 400; font-size: 13px; margin-left: 4px; }
.order-bump__badge { position: absolute; top: -12px; right: 16px; background: var(--gold); color: var(--dark); padding: 3px 12px; border-radius: 100px; font-size: 11px; font-weight: 800; }
.order-summary { background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow); border: 1px solid #E5E7EB; position: sticky; top: 100px; }
.order-summary h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; border-bottom: 1px solid #E5E7EB; padding-bottom: 12px; }
.order-line { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; }
.order-line.total { font-weight: 700; font-size: 17px; border-top: 2px solid #E5E7EB; margin-top: 8px; padding-top: 14px; }
.place-order-btn { display: block; width: 100%; padding: 18px; background: linear-gradient(135deg, var(--purple), #9333EA); color: #fff; border: none; border-radius: 12px; font-size: 18px; font-weight: 800; cursor: pointer; margin-top: 20px; transition: all .2s; box-shadow: 0 8px 25px rgba(124,58,237,.4); }
.place-order-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(124,58,237,.55); }
.secure-badges { display: flex; justify-content: center; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--gray); }

/* ── WC THANK YOU ── */
.ty-confirmed { background: linear-gradient(90deg, #065F46, var(--green)); color: #fff; text-align: center; padding: 14px 20px; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ty-confirmed .check-circle { width: 26px; height: 26px; background: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--green); font-size: 14px; font-weight: 900; flex-shrink: 0; }
.ty-hero { background: linear-gradient(135deg, var(--dark), var(--dark2)); padding: 56px 20px 64px; text-align: center; }
.ty-hero .icon-circle { width: 80px; height: 80px; background: linear-gradient(135deg, var(--green), #059669); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 36px; box-shadow: 0 0 40px rgba(16,185,129,.4); }
.ty-hero h1 { font-size: clamp(26px,5vw,42px); font-weight: 900; color: #fff; margin-bottom: 12px; }
.ty-hero h1 span { color: var(--green); }
.ty-hero .sub { font-size: 16px; color: #C4B5FD; max-width: 540px; margin: 0 auto 28px; }
.dl-box { background: rgba(255,255,255,.08); border: 1px solid rgba(167,139,250,.3); border-radius: 16px; padding: 22px 28px; max-width: 500px; margin: 0 auto; display: flex; align-items: center; gap: 16px; text-align: left; }
.dl-box .dl-name { font-size: 15px; font-weight: 700; color: #fff; }
.dl-box .dl-meta { font-size: 13px; color: #A78BFA; margin-top: 2px; }
.dl-box .dl-btn { background: var(--green); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap; flex-shrink: 0; transition: all .2s; }
.dl-box .dl-btn:hover { background: #059669; transform: translateY(-1px); color: #fff; }

/* countdown */
.countdown-bar { background: linear-gradient(135deg, var(--red), #DC2626); border-radius: 0 0 16px 16px; padding: 14px 24px; text-align: center; box-shadow: 0 8px 24px rgba(239,68,68,.3); }
.countdown-bar p { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.timer { display: flex; justify-content: center; gap: 6px; align-items: center; }
.timer__block { background: rgba(0,0,0,.3); border-radius: 8px; padding: 8px 14px; min-width: 52px; text-align: center; }
.timer__num { font-size: 28px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.timer__lbl { font-size: 9px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: 1px; }
.timer__sep { font-size: 24px; font-weight: 900; color: #fff; margin-top: -8px; }

/* upsell cta */
.upsell-cta-box { background: linear-gradient(135deg, #1A1200, #251A00); border: 2px solid var(--gold-l); border-radius: 20px; padding: 36px 32px; text-align: center; position: relative; overflow: hidden; }
.upsell-cta-box .offer-lbl { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
.upsell-price-row { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 6px; }
.upsell-price-now { font-size: 56px; font-weight: 900; color: var(--gold-l); line-height: 1; }
.upsell-price-now small { font-size: 28px; }
.upsell-price-was { font-size: 20px; color: var(--gray); text-decoration: line-through; }
.upsell-saving { font-size: 13px; color: var(--green); font-weight: 700; margin-bottom: 22px; }
.btn-upsell { display: block; width: 100%; max-width: 460px; margin: 0 auto 14px; background: linear-gradient(135deg, var(--gold), var(--gold-l)); color: var(--dark); padding: 20px 24px; border-radius: 14px; font-size: 19px; font-weight: 900; text-align: center; cursor: pointer; border: none; transition: all .2s; box-shadow: 0 10px 30px rgba(245,158,11,.4); }
.btn-upsell:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(245,158,11,.55); color: var(--dark); }
.btn-upsell .sub { font-size: 13px; font-weight: 500; opacity: .8; margin-top: 3px; }
.upsell-guarantee { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 14px 0; font-size: 13px; color: #A78BFA; }
.btn-decline { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--gray); cursor: pointer; background: none; border: none; width: 100%; }
.btn-decline:hover { color: #374151; }

/* ── HOMEPAGE ── */
.home-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 60%, #2D1B69 100%); padding: 100px 20px; text-align: center; position: relative; overflow: hidden; }
.home-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 60% 40%, rgba(124,58,237,.18), transparent 65%); pointer-events: none; }
.home-hero h1 { font-size: clamp(36px,7vw,70px); color: #fff; margin-bottom: 22px; }
.home-hero h1 em { color: var(--gold-l); font-style: normal; }
.home-hero p { font-size: 20px; color: #C4B5FD; max-width: 600px; margin: 0 auto 44px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); gap: 28px; margin-top: 56px; }
.product-card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.1); border: 1px solid #E5E7EB; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(124,58,237,.18); }
.product-card__header { padding: 32px; background: linear-gradient(135deg, var(--dark), var(--dark2)); text-align: center; }
.product-card__header.gold { background: linear-gradient(135deg, #1A1200, #251A00); }
.product-card__icon { font-size: 48px; margin-bottom: 14px; }
.product-card__title { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.product-card__subtitle { font-size: 14px; color: #C4B5FD; }
.product-card__subtitle.gold-text { color: var(--gold-ll); }
.product-card__body { padding: 28px; }
.product-card__price { font-size: 36px; font-weight: 900; color: var(--purple); margin-bottom: 16px; }
.product-card__price.gold-price { color: var(--gold); }
.product-card__price small { font-size: 16px; color: var(--gray); font-weight: 400; text-decoration: line-through; margin-left: 8px; }
.product-card__features { list-style: none; margin-bottom: 24px; }
.product-card__features li { font-size: 14px; color: #374151; padding: 5px 0; border-bottom: 1px solid #F3F4F6; }
.product-card__features li::before { content: '✓  '; color: var(--green); font-weight: 700; }

/* ── RESPONSIVE ── */
@media(max-width:768px) {
  .site-header__inner { padding: 12px 16px; }
  .site-nav { display: none; }
  .price-box { padding: 24px 18px; }
  .upsell-cta-box { padding: 28px 18px; }
  .upsell-price-now { font-size: 44px; }
  .dl-box { flex-direction: column; text-align: center; }
}

/* ============================================================
   SHOP CATALOG — archive-product.php
   ============================================================ */

/* Hero */
.shop-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 60%, #2D1B69 100%);
  padding: 60px 20px 50px;
  position: relative;
  overflow: hidden;
}
.shop-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(124,58,237,.18), transparent 65%);
  pointer-events: none;
}
.shop-hero .container { position: relative; z-index: 1; }
.shop-hero__title {
  font-size: clamp(28px, 5vw, 48px);
  color: #fff;
  margin-bottom: 12px;
}
.shop-hero__sub {
  font-size: 17px;
  color: #C4B5FD;
  max-width: 560px;
  margin-bottom: 24px;
}
.shop-hero__sub strong { color: var(--gold-l); }

/* Proof bar nel hero */
.shop-proof-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 6px;
}
.shop-proof-item { font-size: 14px; color: rgba(255,255,255,.75); }
.shop-proof-num { color: var(--gold-l); font-weight: 800; }
.shop-proof-sep { color: rgba(255,255,255,.3); }

/* Main shop area */
.shop-main { padding: 48px 0 80px; }
.shop-container { position: relative; }

/* Toolbar */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #E5E7EB;
}
.shop-results-count .woocommerce-result-count {
  font-size: 14px;
  color: var(--gray);
  margin: 0;
}
.shop-sort .orderby {
  padding: 8px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

/* Product loop grid */
.woocommerce ul.products,
.products.columns-3,
.products.columns-2 {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width: 640px) {
  .woocommerce ul.products { grid-template-columns: 1fr !important; }
}

/* Remove default WC product li styles */
.woocommerce ul.products li.product { margin: 0 !important; padding: 0 !important; }

/* Product Card */
.product-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s, box-shadow .22s;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(124,58,237,.14);
}

/* Image */
.product-card__img-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F3F0FF, #EDE9FE);
  aspect-ratio: 16 / 9;
}
.product-card__img-link { display: block; height: 100%; }
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-card__img { transform: scale(1.04); }
.product-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
}

/* Badge */
.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11px !important;
}

/* Hover overlay */
.product-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(76, 29, 149, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}
.product-card:hover .product-card__overlay { opacity: 1; }
.product-card__view-btn {
  background: #fff;
  color: var(--purple);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform .15s;
}
.product-card__view-btn:hover { transform: scale(1.04); color: var(--purple); }

/* Body */
.product-card__body { padding: 20px 20px 14px; flex: 1; }
.product-card__cats {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 8px;
}
.product-card__title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.25;
}
.product-card__title a { color: var(--text); }
.product-card__title a:hover { color: var(--purple); }
.product-card__excerpt {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.55;
  margin-bottom: 12px;
}
.product-card__rating { margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.product-card__rating .star-rating { font-size: 13px; }
.product-card__rating-count { font-size: 12px; color: var(--gray); }

/* Feature pills */
.product-card__feats { display: flex; flex-wrap: wrap; gap: 6px; }
.product-feat {
  background: #F5F3FF;
  color: var(--purple-d);
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* Footer */
.product-card__footer {
  padding: 14px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #F3F4F6;
}
.product-card__price { font-size: 20px; font-weight: 900; color: var(--purple); }
.product-card__price del { font-size: 13px; color: var(--gray); font-weight: 400; }
.product-card__price ins { text-decoration: none; }
.product-card__cta { padding: 9px 18px !important; font-size: 14px !important; }

/* No products */
.shop-no-products {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  background: #fff;
  border-radius: 16px;
  border: 2px dashed #E5E7EB;
}

/* Pagination */
.shop-pagination { margin-top: 48px; text-align: center; }
.woocommerce-pagination ul { list-style: none; display: flex; justify-content: center; gap: 8px; padding: 0; }
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.woocommerce-pagination ul li a:hover { background: var(--purple); color: #fff; border-color: var(--purple); }
.woocommerce-pagination ul li span.current { background: var(--purple); color: #fff; border-color: var(--purple); font-weight: 700; }

/* ============================================================
   SINGLE PRODUCT — content-single-product.php
   Completo rewrite. Override WooCommerce + layout custom.
   ============================================================ */

/* ── WooCommerce global resets on product pages ────────────────────────── */
.single-product #page,
.single-product .site-content,
.single-product #primary,
.single-product #main {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  float: none !important;
}
/* Rimuove il breadcrumb default WC */
.single-product .woocommerce-breadcrumb { display: none !important; }

/* ── 1. HERO ─────────────────────────────────────────────────────────────── */
.sp-hero {
  background: #fff;
  padding: 52px 0 60px;
  border-bottom: 1px solid #E5E7EB;
}
.sp-hero .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.sp-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 860px) {
  .sp-hero__grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Media column */
.sp-hero__media { position: sticky; top: 100px; }
.sp-hero__img-wrap {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(124,58,237,.18), 0 4px 16px rgba(0,0,0,.08);
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  line-height: 0;
}
.sp-hero__img {
  width: 100%;
  height: auto;
  display: block;
}
.sp-hero__img-placeholder {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--purple);
  font-size: 15px;
  font-weight: 600;
}
.sp-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.sp-trust-item {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

/* Info column */
.sp-hero__info { padding-top: 4px; }
.sp-breadcrumb {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.sp-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  color: #111827;
  line-height: 1.15;
  margin: 0 0 16px;
}

/* Rating */
.sp-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.sp-rating .star-rating {
  font-size: 15px !important;
  width: auto !important;
  overflow: visible !important;
}
.sp-rating .star-rating::before,
.sp-rating .star-rating span::before {
  color: #F59E0B !important;
  font-size: 15px !important;
  letter-spacing: 2px;
}
.sp-rating-text { font-size: 13px; color: #6B7280; }

/* Short description */
.sp-short-desc {
  font-size: 16px;
  color: #4B5563;
  line-height: 1.75;
  margin-bottom: 22px;
}
.sp-short-desc p { margin-bottom: 6px; }
.sp-short-desc ul { padding-left: 18px; margin-bottom: 8px; }
.sp-short-desc strong { color: var(--purple); }

/* Feature pills */
.sp-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.sp-feat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
  color: #4C1D95;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.sp-feat__icon { font-size: 15px; line-height: 1; }

/* Price block */
.sp-price-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px 20px;
  background: #FAFAF9;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
}
/* WooCommerce price override */
.sp-price-block .woocommerce-Price-amount,
.sp-price-block p.price,
.sp-price-block span.price {
  font-size: 38px !important;
  font-weight: 900 !important;
  color: var(--purple) !important;
  line-height: 1 !important;
  margin: 0 !important;
}
.sp-price-block .woocommerce-Price-amount bdi { font-size: inherit; }
.sp-price-block del .woocommerce-Price-amount,
.sp-price-block del {
  font-size: 16px !important;
  color: #9CA3AF !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
}
.sp-price-block ins {
  text-decoration: none !important;
  background: none !important;
}
.sp-sale-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-l));
  color: var(--dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Add to cart — WooCommerce form.cart override */
.sp-add-to-cart { margin-bottom: 16px; }
.sp-add-to-cart form.cart {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
}
.sp-add-to-cart .quantity {
  display: flex !important;
  align-items: center !important;
}
.sp-add-to-cart .qty,
.sp-add-to-cart input[type="number"] {
  width: 72px !important;
  height: 52px !important;
  padding: 0 12px !important;
  border: 2px solid #E5E7EB !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center !important;
  background: #fff !important;
  color: var(--text) !important;
  -moz-appearance: textfield !important;
}
.sp-add-to-cart .qty::-webkit-inner-spin-button,
.sp-add-to-cart .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sp-add-to-cart .qty:focus { outline: none !important; border-color: var(--purple) !important; }

.sp-add-to-cart .single_add_to_cart_button,
.sp-add-to-cart button[type="submit"],
.sp-add-to-cart .button {
  flex: 1 !important;
  padding: 16px 24px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, var(--purple), #9333EA) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(124,58,237,.38) !important;
  transition: all .2s !important;
  text-align: center !important;
  white-space: nowrap !important;
  letter-spacing: .2px !important;
  display: block !important;
  text-decoration: none !important;
}
.sp-add-to-cart .single_add_to_cart_button:hover,
.sp-add-to-cart button[type="submit"]:hover,
.sp-add-to-cart .button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 32px rgba(124,58,237,.52) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #6D28D9, #7C3AED) !important;
}
.sp-add-to-cart .single_add_to_cart_button:disabled,
.sp-add-to-cart .button.disabled {
  opacity: .6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Guarantee bar */
.sp-guarantee {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  font-size: 13px;
  color: #065F46;
  font-weight: 600;
  line-height: 1.4;
}
.sp-guarantee svg { color: #10B981; flex-shrink: 0; }

/* ── 2. SEZIONE TITOLI ───────────────────────────────────────────────────── */
.sp-section-title {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 900;
  color: #111827;
  margin: 0;
  line-height: 1.2;
}

/* ── 3. DESCRIZIONE COMPLETA ─────────────────────────────────────────────── */
.sp-desc-section {
  padding: 64px 0;
  border-bottom: 1px solid #F3F4F6;
}
.sp-desc-section .container--mid {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.sp-full-desc {
  font-size: 16px;
  line-height: 1.85;
  color: #374151;
  margin-top: 28px;
}
.sp-full-desc h2 { font-size: 22px; font-weight: 800; color: #111827; margin: 32px 0 12px; }
.sp-full-desc h3 { font-size: 18px; font-weight: 700; color: #1F2937; margin: 24px 0 10px; }
.sp-full-desc ul { padding-left: 20px; margin: 12px 0 18px; }
.sp-full-desc li { margin-bottom: 8px; }
.sp-full-desc p  { margin-bottom: 14px; }
.sp-full-desc strong { color: var(--purple); }

/* ── 4. ANTEPRIMA PDF ────────────────────────────────────────────────────── */
.sp-preview-section {
  padding: 72px 0;
  background: linear-gradient(135deg, #EDE9FE, #F5F3FF);
}
.sp-preview-section .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.sp-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 0;
}
.sp-preview-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.09);
  background: #fff;
  transition: transform .22s, box-shadow .22s;
}
.sp-preview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(124,58,237,.18);
}
.sp-preview-card img { width: 100%; display: block; }
.sp-preview-card--mock { }
.sp-mock-page { padding: 22px 22px 20px; }
.sp-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sp-mock-num {
  background: #EDE9FE;
  color: var(--purple);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.sp-mock-cat { font-size: 12px; color: #9CA3AF; font-weight: 500; }
.sp-mock-title { font-size: 15px; font-weight: 800; color: #111827; margin: 0 0 8px; line-height: 1.3; }
.sp-mock-desc  { font-size: 13px; color: #6B7280; line-height: 1.55; margin: 0 0 16px; }
.sp-mock-lines { display: flex; flex-direction: column; gap: 6px; }
.sp-mock-lines span {
  display: block; height: 8px;
  background: #F3F4F6; border-radius: 4px;
}
.sp-mock-lines span:nth-child(1) { width: 100%; }
.sp-mock-lines span:nth-child(2) { width: 80%; }
.sp-mock-lines span:nth-child(3) { width: 90%; }

/* ── 5. TESTIMONIANZE ────────────────────────────────────────────────────── */
.sp-testimonials-section { padding: 72px 0; background: #fff; }
.sp-testimonials-section .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
/* usa .test-grid e .test-card già definite nel tema */

/* ── 6. FAQ ──────────────────────────────────────────────────────────────── */
.sp-faq-section { padding: 72px 0; background: var(--light); }
.sp-faq-section .container--mid {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
.sp-faq-list {
  margin-top: 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  background: #fff;
  border: 1px solid #E5E7EB;
}
.sp-faq-item {
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background .15s;
}
.sp-faq-item:last-child { border-bottom: none; }
.sp-faq-item .faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  user-select: none;
}
.sp-faq-item .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F3F0FF;
  color: var(--purple);
  font-size: 18px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s, background .15s;
}
.sp-faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--purple);
  color: #fff;
}
.sp-faq-item .faq-answer {
  display: none;
  padding: 0 24px 20px;
  font-size: 14px;
  color: #4B5563;
  line-height: 1.75;
}
.sp-faq-item.open { background: #FAFAF9; }
.sp-faq-item.open .faq-answer { display: block; }

/* ── 7. CTA FINALE ───────────────────────────────────────────────────────── */
.sp-final-cta {
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 60%, #2D1B69 100%);
  text-align: center;
}
.sp-final-cta h2 {
  font-size: clamp(26px, 5vw, 44px);
  color: #fff;
  margin-bottom: 12px;
  font-weight: 900;
}
.sp-final-cta p { color: #C4B5FD; font-size: 17px; margin-bottom: 32px; max-width: 520px; margin-left: auto; margin-right: auto; }
.sp-final-cta .woocommerce-Price-amount { font-size: inherit !important; color: var(--gold-l) !important; }
.sp-final-cta .btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-l));
  color: var(--dark);
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(245,158,11,.45);
  transition: all .2s;
  border: none;
  cursor: pointer;
}
.sp-final-cta .btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(245,158,11,.6);
  color: var(--dark);
}
.sp-cta-guarantee {
  color: rgba(167,139,250,.8);
  font-size: 13px;
  font-weight: 500;
  margin-top: 16px !important;
}

/* ── 8. PRODOTTI CORRELATI ───────────────────────────────────────────────── */
.sp-related-section { padding: 72px 0; background: #fff; }
.sp-related-section .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

/* ── WC notices (carrello, errori) ───────────────────────────────────────── */
.woocommerce-notices-wrapper {
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 24px;
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  border-radius: 10px !important;
  padding: 14px 18px !important;
  font-size: 14px !important;
  margin-bottom: 16px !important;
  list-style: none !important;
}
.woocommerce-message {
  background: #F0FDF4 !important;
  border-left: 4px solid var(--green) !important;
  color: #065F46 !important;
}
.woocommerce-error {
  background: #FEF2F2 !important;
  border-left: 4px solid var(--red) !important;
  color: #991B1B !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .sp-hero { padding: 36px 0 44px; }
  .sp-hero__media { position: static; }
  .sp-price-block .woocommerce-Price-amount,
  .sp-price-block p.price,
  .sp-price-block span.price { font-size: 30px !important; }
  .sp-preview-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .sp-feats { gap: 6px; }
  .sp-feat { font-size: 12px; padding: 6px 10px; }
  .sp-add-to-cart form.cart { flex-direction: column; }
  .sp-add-to-cart .qty { width: 100% !important; }
  .sp-preview-grid { grid-template-columns: 1fr; }
  .sp-faq-item .faq-question { padding: 16px 18px; font-size: 14px; }
  .sp-faq-item .faq-answer   { padding: 0 18px 16px; }
}
