:root {
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --amber-border: rgba(217, 119, 6, 0.22);
}

body { font-feature-settings: 'cv11', 'ss01'; }

.step-enter {
  animation: stepIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-opt {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s;
}

.card-opt:hover:not(:disabled) {
  transform: scale(1.015);
  box-shadow: 0 16px 40px -18px rgba(15, 23, 42, 0.14);
}

.card-opt.selected {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft), 0 12px 32px -16px rgba(217, 119, 6, 0.2);
}

.live-price {
  animation: stepIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card-opt--finish .img-zoom-wrap {
  border-bottom: 1px solid #f1f5f9;
}
.card-opt--finish.selected {
  border-color: var(--amber);
}
.card-opt--maniglia .img-zoom-wrap {
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.card-opt--maniglia img {
  object-fit: contain;
}

.progress-track { transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

.img-zoom-wrap { overflow: hidden; }
.img-zoom-wrap img,
.img-zoom-wrap svg {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-opt:hover .img-zoom-wrap img { transform: scale(1.06); }

.badge-piu-venduti {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.35);
}

.altri-linee-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.altri-linee-toggle:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.check-badge {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-opt.selected .check-badge {
  opacity: 1;
  transform: scale(1);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: #cbd5e1; }
.chip.on {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: #92400e;
}

.approfondisci-btn { cursor: pointer; }

.select-tendina {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 2.25rem 0.75rem 0.9rem;
  font-size: 0.875rem;
  color: #1e293b;
  line-height: 1.35;
  outline: none;
  cursor: pointer;
}
.select-tendina:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 90;
}
.cart-overlay[hidden] { display: none !important; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.18);
  transition: right 0.3s ease-in-out;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }

/* Carrello stile tapparelle */
.cart-item-tapparella { padding: 12px !important; }
.cart-tapp-layout { align-items: flex-start; }
.cart-tapp-thumb {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 72px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-tapp-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cart-tapp-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.1rem;
  background: #f9fafb;
}
.cart-tapp-thumb-fallback.hidden { display: none; }
.cart-tapp-fin-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.cart-tapp-fin-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-tapp-specs { font-size: 0.7rem; line-height: 1.35; }
.cart-tapp-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
}
.cart-tapp-spec-label {
  flex-shrink: 0;
  color: #6b7280;
  font-weight: 600;
}
.cart-tapp-spec-value {
  text-align: right;
  font-weight: 700;
  color: #111827;
}
.cart-tapp-ref {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}
.cart-tapp-ref--btn,
.cart-tapp-ref--empty,
.cart-tapp-spec-row--btn {
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.cart-tapp-ref--btn { width: auto; }
.cart-tapp-ref--empty {
  color: #93c5fd;
  background: #f8fafc;
  border-style: dashed;
}
.cart-tapp-ref--btn:hover,
.cart-tapp-spec-row--btn:hover {
  filter: brightness(0.97);
}
.cart-tapp-spec-row--btn { width: 100%; }

body.cart-modal-open { overflow: hidden; }
.cart-dims-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .cart-dims-modal {
    align-items: center;
    padding: 1rem;
  }
}
.cart-dims-modal.hidden { display: none; }
.cart-dims-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.cart-dims-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
  max-height: 92vh;
  overflow: auto;
}
@media (min-width: 640px) {
  .cart-dims-dialog {
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  }
}
.cart-dims-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cart-dims-dialog-content { padding: 1rem 1.1rem 1.25rem; }
.cart-dims-input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
}
.cart-dims-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
.cart-dims-input.input-error { border-color: #ef4444; }
select.cart-dims-input {
  appearance: auto;
  cursor: pointer;
}
.cart-dims-err {
  display: none;
  margin-top: 0.25rem;
  font-size: 11px;
  color: #ef4444;
}
.cart-dims-err.visible { display: block; }

#linea-modal { animation: fadeIn 0.2s ease both; }
#linea-modal .modal-panel { animation: modalUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

.card-opt--stipite {
  min-width: 0;
}
.card-opt--stipite .stipite-draw {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
  box-sizing: border-box;
}
.card-opt--stipite .stipite-draw > img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100% !important;
  height: 100% !important;
  padding: 10px 12px;
  box-sizing: border-box;
  display: block;
  object-fit: contain !important;
  object-position: center center !important;
  pointer-events: none;
}
.card-opt--stipite .stipite-draw__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.card-opt--stipite .stipite-draw .check-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #d97706;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.card-opt--stipite.selected .stipite-draw .check-badge {
  display: flex;
}
.card-opt--stipite:hover .stipite-draw > img {
  transform: none !important;
}
.card-opt--stipite .stipite-approfondisci {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  color: #b45309;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.card-opt--stipite .stipite-approfondisci:hover {
  background: #fff7ed;
  border-color: #fdba74;
}
.card-opt--stipite .stipite-approfondisci i {
  font-size: 9px;
}

.stipite-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.stipite-zoom-controls button {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 0;
  background: #fff;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.stipite-zoom-controls button[data-zoom-reset] {
  width: auto;
  padding: 0 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.stipite-zoom-controls button:hover {
  background: #fff7ed;
  color: #b45309;
}
.stipite-zoom-controls [data-zoom-label] {
  min-width: 2.75rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}
.stipite-zoom-stage {
  position: relative;
  overflow: hidden;
  min-height: 48vh;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.stipite-zoom-stage.is-dragging {
  cursor: grabbing;
}
.stipite-zoom-stage img {
  max-width: 96%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

/* Checkout (preventivo / ordine) — stile tapparelle */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.checkout-modal.hidden { display: none !important; }
@media (min-width: 640px) {
  .checkout-modal { align-items: center; padding: 1rem; }
}
.checkout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.checkout-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 640px) {
  .checkout-dialog {
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  }
}
.checkout-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.checkout-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
}
.checkout-tab {
  flex: 1;
  padding: 0.9rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.checkout-tab.active {
  color: #0d6efd;
  background: #fff;
  box-shadow: inset 0 -2px 0 #0d6efd;
}
.checkout-dialog-body {
  padding: 1rem 1.15rem 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.checkout-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: #475569;
}
.checkout-summary .co-total {
  margin-top: 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d6efd;
}
.checkout-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  background: #f8fafc;
  outline: none;
}
.checkout-input:focus {
  background: #fff;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

/* PDF client modal */
.pdf-client-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pdf-client-modal.hidden { display: none !important; }
.pdf-client-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.pdf-client-dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}
.pdf-client-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.pdf-client-dialog-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}
.pdf-client-close-btn {
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
}
.pdf-client-close-btn:hover { color: #ef4444; }
.pdf-client-form { padding: 1rem 1.1rem 1.15rem; }
.pdf-client-intro {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.85rem;
}
.pdf-client-field {
  display: block;
  margin-bottom: 0.75rem;
}
.pdf-client-field span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.pdf-client-required { color: #ef4444; }
.pdf-client-field input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  background: #f8fafc;
  outline: none;
}
.pdf-client-field input:focus {
  background: #fff;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}
.pdf-client-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.pdf-client-btn {
  flex: 1;
  padding: 0.7rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.pdf-client-btn-secondary {
  background: #f1f5f9;
  color: #475569;
}
.pdf-client-btn-primary {
  background: #dc2626;
  color: #fff;
}
.pdf-client-btn-primary:hover { background: #b91c1c; }

