/* =========================================================================
   QR Sale — restyle brand di carrello / checkout / grazie / account
   Caricato dal plugin solo sulle pagine WooCommerce. Tutto è "scoped" sotto
   i contenitori WooCommerce per non toccare il resto del tema.
   ========================================================================= */
:root{
  --qs-accent:#1f6f5c;--qs-accent-dark:#185647;--qs-accent-ink:#0f3d33;
  --qs-ink:#23211c;--qs-line:#e4ddcd;--qs-paper:#fffdf8;--qs-soft:#e7f1ec;--qs-r:12px;
}

/* font brand sui contenitori shop */
.woocommerce,.woocommerce-page,.wc-block-cart,.wc-block-checkout,.woocommerce-account{
  font-family:"Manrope",system-ui,sans-serif;color:var(--qs-ink);
}
.woocommerce h1,.woocommerce h2,.woocommerce h3,
.wc-block-checkout h1,.wc-block-checkout h2,
.woocommerce-order-received h1,.woocommerce-thankyou-order-received{
  font-family:"Fraunces",Georgia,serif;font-weight:600;
}

/* ---- Pulsanti (classico + block) ---- */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
.woocommerce #respond input#submit,.woocommerce a.button.alt,.woocommerce button.button.alt,
.wc-block-components-button,.wp-block-button__link,
.wc-block-cart__submit-button,.wc-block-components-checkout-place-order-button{
  background:var(--qs-accent)!important;color:#fff!important;border:0!important;
  border-radius:var(--qs-r)!important;font-weight:700!important;text-transform:none!important;
  padding:13px 22px!important;font-size:15px!important;line-height:1.2!important;
  box-shadow:none!important;transition:background .15s ease;
}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,
.wc-block-components-button:hover,.wc-block-components-checkout-place-order-button:hover{
  background:var(--qs-accent-dark)!important;
}
/* pulsante "ghost" secondario (es. aggiorna carrello) */
.woocommerce button[name="update_cart"],.woocommerce .button.wc-backward{
  background:transparent!important;color:var(--qs-accent-ink)!important;
  border:1.5px solid var(--qs-accent)!important;
}

/* ---- Campi del form ---- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .select2-container--default .select2-selection--single,
.woocommerce-account .woocommerce-Input,
.wc-block-components-text-input input,
.wc-block-components-select .wc-block-components-select__select{
  border:1.5px solid var(--qs-line)!important;border-radius:11px!important;
  padding:12px!important;font-size:16px!important;background:#fff!important;
}
.woocommerce form .form-row input.input-text:focus,
.wc-block-components-text-input input:focus{
  outline:none!important;border-color:var(--qs-accent)!important;
  box-shadow:0 0 0 4px rgba(31,111,92,.12)!important;
}
.wc-block-components-text-input.is-active label,
.wc-block-components-checkout-step__title{color:var(--qs-accent-ink)!important;}

/* ---- Tabelle carrello / totali ---- */
.woocommerce table.shop_table{border:1px solid var(--qs-line);border-radius:var(--qs-r);overflow:hidden;}
.woocommerce table.shop_table th{background:var(--qs-soft);color:var(--qs-accent-ink);}
.woocommerce .cart_totals h2,.woocommerce-checkout #order_review_heading{color:var(--qs-accent-ink);}
.woocommerce .order-total .amount,.wc-block-components-totals-footer-item .wc-block-components-totals-item__value{
  color:var(--qs-accent-ink)!important;font-family:"Fraunces",serif;font-weight:600;
}
.wc-block-components-totals-item__value{font-weight:600;}

/* ---- Box info / messaggi ---- */
.woocommerce-info,.woocommerce-message,.wc-block-components-notice-banner{
  border-top:0!important;border-left:4px solid var(--qs-accent)!important;
  background:var(--qs-soft)!important;border-radius:10px!important;color:var(--qs-ink)!important;
}
.woocommerce-info::before,.woocommerce-message::before{color:var(--qs-accent)!important;}

/* ---- Pagina di ringraziamento (order-received) ---- */
.woocommerce-order{max-width:720px;margin:0 auto;}
.woocommerce-thankyou-order-received{
  font-size:26px;color:var(--qs-accent-ink);text-align:center;margin-bottom:6px;
}
.woocommerce-order .woocommerce-order-overview{
  background:var(--qs-paper);border:1px solid var(--qs-line);border-radius:var(--qs-r);
  padding:18px;list-style:none;display:flex;flex-wrap:wrap;gap:16px;justify-content:center;
}
/* pulsante "vai alla dashboard" */
.qre-go-dash{
  display:inline-block;margin:18px auto 0;text-align:center;
  background:var(--qs-accent)!important;color:#fff!important;font-weight:700;
  padding:14px 26px!important;border-radius:14px!important;text-decoration:none;font-size:16px;
}
.qre-go-dash:hover{background:var(--qs-accent-dark)!important;}
.qre-thankyou-cta{text-align:center;margin-top:10px;}

/* ---- "Il mio account": menu laterale brandizzato (Bacheca, Ordini, ecc.) ---- */
.woocommerce-account .woocommerce-MyAccount-navigation ul{
  list-style:none;margin:0;padding:6px;border-radius:var(--qs-r);
  border:1px solid var(--qs-line);background:var(--qs-paper);
  box-shadow:0 10px 30px -22px rgba(40,35,20,.5);
}
.woocommerce-account .woocommerce-MyAccount-navigation li{border:0;margin:0}
.woocommerce-account .woocommerce-MyAccount-navigation li a{
  display:flex;align-items:center;gap:10px;
  padding:13px 14px;margin:2px 0;border-radius:11px;
  font-weight:600;font-size:15px;color:var(--qs-ink);text-decoration:none;
  transition:background .15s ease,color .15s ease;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover{background:var(--qs-soft);color:var(--qs-accent-ink)}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a{
  background:var(--qs-accent);color:#fff;box-shadow:0 8px 18px -10px rgba(31,111,92,.7);
}
/* Iconcina prima di ogni voce (decorativa, in tinta brand) */
.woocommerce-account .woocommerce-MyAccount-navigation li a::before{
  content:"";flex:0 0 auto;width:8px;height:8px;border-radius:50%;
  background:var(--qs-accent);opacity:.5;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a::before{background:#fff;opacity:1}
.woocommerce-account .woocommerce-MyAccount-navigation li--logout a{color:#a32525}
.woocommerce-account .woocommerce-MyAccount-navigation li--logout a::before{background:#a32525}
.woocommerce-account .woocommerce-MyAccount-navigation li--logout a:hover{background:#fdecec;color:#a32525}

/* responsive */
@media(max-width:600px){
  .woocommerce-order .woocommerce-order-overview{flex-direction:column;text-align:center;}
  /* Le tabelle carrello/totali scorrono in orizzontale invece di sforare lo schermo. */
  .woocommerce table.shop_table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .qre-shop-top{padding:12px 14px;}
  .qre-shop-main{padding:18px 14px;}
}

/* ---- Template pulito pagine WooCommerce (white-label) ---- */
body.qre-shop-blank{margin:0;background:var(--qs-paper);font-family:"Manrope",system-ui,sans-serif}
.qre-shop-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-bottom:1px solid var(--qs-line);background:#fff;position:sticky;top:0;z-index:30}
.qre-shop-brand{font-family:"Fraunces",Georgia,serif;font-weight:700;font-size:21px;color:var(--qs-ink);text-decoration:none;display:flex;align-items:center}
.qre-shop-brand span{color:var(--qs-accent)}
.qre-shop-back{color:var(--qs-accent-ink);font-weight:600;text-decoration:none;border:1.5px solid var(--qs-line);border-radius:10px;padding:8px 14px;font-size:14px}
.qre-shop-back:hover{background:var(--qs-soft)}
.qre-shop-main{max-width:1000px;margin:0 auto;padding:26px 18px;min-height:50vh}
.qre-shop-foot{text-align:center;color:#6f6a5e;padding:24px;border-top:1px solid var(--qs-line);margin-top:36px;font-size:13px}
/* niente spazio della admin bar di WP */
body.qre-shop-blank{padding-top:0!important}
