/* Modulo Carrello: usa i colori e gli angoli del tema (--primary, --line, --muted, --radius) */
.cart-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.cart-add select { flex: 1 1 140px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line, #ddd); border-radius: var(--radius, 6px); background: #fff; color: inherit; font: inherit; }
.cart-price { flex: 1 1 100%; font-weight: 600; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line, #ddd); border-radius: var(--radius, 6px); overflow: hidden; background: #fff; }
.cart-qty button { width: 36px; height: 38px; border: 0; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.cart-qty input, .cart-qty output { width: 40px; text-align: center; border: 0; font: inherit; background: transparent; color: inherit; -moz-appearance: textfield; }
.cart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-btn { flex: 1 1 auto; text-align: center; cursor: pointer; border: 0; transition: opacity .2s; }
.cart-btn.is-ok { opacity: .8; }
.cart-soldout { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #f2f2f0; color: var(--muted, #667); font-size: .85rem; }
.buy-compact.cart-add .cart-btn { padding: 9px 14px; }

.header-cart { order: 2; position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; color: var(--header-text, inherit); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.header-cart svg { display: block; }
.header-cart .hc-n { position: absolute; top: 0; left: 18px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary, #222); color: var(--on-primary, #fff); font-size: .7rem; line-height: 18px; text-align: center; }
.header-cart .hc-n[hidden] { display: none; }
.header-cart .hc-t:empty { display: none; }
.header-cart.has-items .hc-t { margin-left: 4px; }
.header-cart.hc-bump svg { animation: hc-bump .45s ease; }
@keyframes hc-bump { 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (max-width: 600px) { .header-cart .hc-t { display: none; } }
@media (prefers-reduced-motion: reduce) { .header-cart.hc-bump svg { animation: none; } }
.fx-off .header-cart.hc-bump svg { animation: none; }

.cart-page { padding-block: 24px 56px; }
.cart-grid { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .cart-grid { grid-template-columns: 1.3fr 1fr; } }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line, #e6e6e6); }
.cart-line img, .cart-noimg { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius, 6px); background: #f4f4f2; }
.cart-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-info a { font-weight: 600; color: inherit; text-decoration: none; }
.cart-line .cart-qty { grid-column: 2; justify-self: start; }
.cart-lt { grid-column: 3; grid-row: 1; justify-self: end; white-space: nowrap; }
.cart-rm { grid-column: 3; grid-row: 2; justify-self: end; border: 0; background: transparent; color: var(--muted, #667); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.cart-muted { color: var(--muted, #667); font-size: .9rem; }
.cart-note { color: var(--muted, #667); font-size: .9rem; margin: 8px 0 0; }
.cart-error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; padding: 10px 12px; border-radius: var(--radius, 6px); }
.cart-error[hidden], .cart-note[hidden] { display: none; }

.cart-form { display: grid; gap: 18px; padding: 22px; border: 1px solid var(--line, #e6e6e6); border-radius: calc(var(--radius, 6px) * 2); background: #fff; }
.cart-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-form legend { font-weight: 700; margin-bottom: 6px; }
.cart-form label { display: grid; gap: 4px; font-size: .92rem; }
.cart-form input:not([type="radio"]), .cart-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: var(--radius, 6px); font: inherit; background: #fff; color: inherit; }
.cart-form .cart-opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: var(--radius, 6px); cursor: pointer; }
.cart-form .cart-opt:has(input:checked) { border-color: var(--primary, #222); }
.cart-2 { display: grid; gap: 10px; grid-template-columns: 1fr 2fr; }
.cart-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cart-totals p { display: flex; justify-content: space-between; margin: 4px 0; }
.cart-totals .cart-tot { font-size: 1.15rem; border-top: 1px solid var(--line, #e6e6e6); padding-top: 8px; margin-top: 8px; }
.cart-totals .cart-note, .cart-totals .cart-error { display: block; }
.cart-send { width: 100%; text-align: center; border: 0; cursor: pointer; font-size: 1rem; }
.cart-send:disabled { opacity: .5; cursor: not-allowed; }
.cart-done { max-width: 680px; }
.cart-summary { white-space: pre-wrap; font: inherit; background: #faf9f6; border: 1px solid var(--line, #e6e6e6); border-radius: var(--radius, 6px); padding: 16px; }
.cart-wa { background: #1f9d55; color: #fff; }
.cart-qty button:disabled, .cart-btn:disabled { opacity: .4; cursor: not-allowed; }
.cart-vat p { display: flex; justify-content: space-between; margin: 2px 0; font-size: .85rem; color: var(--muted, #667); }
.vat-incl { font-size: .72em; font-weight: 400; color: var(--muted, #667); white-space: nowrap; }
.cart-incl { flex: 1 1 100%; margin-top: -4px; }

/* ===== Componente Negozio: identico in tutti i kit (dal tema prende solo colori, caratteri e angoli) ===== */
.shop-btn.shop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; margin: 0;
  border: 1px solid var(--primary, #2f3a2f); border-radius: var(--radius, 8px); background: var(--primary, #2f3a2f); color: var(--on-primary, #fff);
  font: 600 1rem/1.2 inherit; font-family: inherit; text-transform: none; letter-spacing: normal; text-decoration: none; text-align: center;
  box-shadow: none; transform: none; cursor: pointer; transition: opacity .2s; -webkit-appearance: none; appearance: none; }
.shop-btn.shop-btn:hover { opacity: .88; }
.shop-btn.shop-btn:disabled { opacity: .45; cursor: not-allowed; }
.shop-btn.shop-btn::before, .shop-btn.shop-btn::after { content: none; }
.shop-btn.cart-wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.cart-add.cart-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; padding: 0; border: 0; background: none; box-shadow: none; text-align: left; }
.cart-add.cart-add > * { margin: 0; }
.cart-add.cart-add select, .cart-page.cart-page select { flex: 1 1 100%; height: 44px; min-height: 0; padding: 0 34px 0 12px; border: 1px solid var(--line, #d9d6cf); border-radius: var(--radius, 8px);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: inherit; font: inherit; font-size: .95rem; box-shadow: none; -webkit-appearance: none; appearance: none; }
.cart-add.cart-add .cart-qty, .cart-page.cart-page .cart-qty { flex: 0 0 auto; height: 44px; border: 1px solid var(--line, #d9d6cf); border-radius: var(--radius, 8px); background: #fff; box-shadow: none; }
.cart-add.cart-add .cart-qty button, .cart-page.cart-page .cart-qty button { width: 40px; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; font: 400 1.15rem/1 inherit; font-family: inherit; }
.cart-add.cart-add .cart-qty input { width: 38px; height: 100%; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; text-align: center; font: inherit; color: inherit; -moz-appearance: textfield; appearance: textfield; }
.cart-add.cart-add .cart-btn { flex: 1 1 160px; }
.cart-add.cart-add .cart-price { flex: 1 1 100%; font-size: .95rem; }
.cart-add .vat-incl.cart-incl { margin-top: -2px; }
.cart-page.cart-page input:not([type=radio]):not([type=checkbox]), .cart-page.cart-page textarea { box-shadow: none; }
.cart-page.cart-page .cart-send { width: 100%; }

/* Foto a scorrimento nelle schede del negozio */
.coll-card-media.shop-ig { position: relative; }
.shop-ig .ig-view { border-radius: inherit; background: transparent; }
.shop-ig .ig-slide { aspect-ratio: auto; height: 100%; }
.shop-ig .ig-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-ig .ig-nav { width: 34px; height: 34px; background: rgba(255, 255, 255, .92); color: #222; font-size: 1.2rem; line-height: 1; opacity: 0; transition: opacity .2s; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.shop-ig:hover .ig-nav, .shop-ig:focus-within .ig-nav { opacity: 1; }
@media (hover: none) { .shop-ig .ig-nav { opacity: 1; } }
.shop-ig .ig-prev { left: 8px; } .shop-ig .ig-next { right: 8px; }
.shop-dots { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; gap: 6px; pointer-events: none; }
.shop-dots .ig-dot { pointer-events: auto; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); cursor: pointer; transition: opacity .2s; }
.shop-dots .ig-dot.is-on { background: #fff; }
.fx-off .shop-ig .ig-track { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) { .shop-ig .ig-track { scroll-behavior: auto; } }
.shop-dots .ig-dot.is-on { width: 7px; }
.shop-ig .ig-view, .shop-ig .ig-track { height: 100%; }
[data-cart-page] [hidden] { display: none !important; }   /* il carrello vuoto non mostra il modulo */
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 48px 20px; color: var(--muted, #667); }
.cart-empty p { margin: 0; color: var(--text, inherit); font-size: 1.1rem; }
.cart-2.cart-2r { grid-template-columns: 2fr 1fr; }
