/* Capri Blu Totem v0.4.59 - carrello vetro + drag portate */

#screen-cart .gallery-shell {
  padding-top: 16px;
}

#screen-cart .gallery-header {
  grid-template-columns: minmax(260px, 42%) minmax(0, 1fr) !important;
  min-height: 64px;
  gap: 20px !important;
  margin-bottom: 14px !important;
}

#screen-cart .gallery-header h2 {
  font-size: clamp(2rem, 2.5vw, 3.25rem) !important;
  line-height: 1 !important;
}

#screen-cart .gallery-header .brand {
  font-size: clamp(0.8rem, 1vw, 1rem) !important;
}

#screen-cart #continue-shopping {
  max-width: none !important;
  width: 100% !important;
  min-height: 48px;
  background: rgba(18, 93, 145, 0.82) !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.16) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Le grandi fasce bianche diventano vetro scuro. */
#screen-cart .cart-item,
#screen-cart .cover-cart-row,
#screen-cart .cart-total-box {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(8,31,48,.72), rgba(10,48,73,.58)) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.20) !important;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

#screen-cart .cart-item h3,
#screen-cart .cart-item strong,
#screen-cart .cart-item p,
#screen-cart .cart-item span,
#screen-cart .cover-cart-row h3,
#screen-cart .cover-cart-row strong,
#screen-cart .cover-cart-row p,
#screen-cart .cover-cart-row span,
#screen-cart .cart-total-box span,
#screen-cart .cart-total-box strong {
  color: #fff !important;
}

#screen-cart .cart-note {
  color: rgba(255,255,255,.78) !important;
}

#screen-cart .cart-item button:not(.cb-course-trigger):not(.cb-course-menu-item) {
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.58) !important;
}

#screen-cart .cart-item .remove-cart-item,
#screen-cart .cart-item [data-remove-cart-item] {
  color: #ffb3b3 !important;
}

#screen-cart .cart-total-box {
  min-height: 70px;
  padding: 16px 24px !important;
  margin-top: 18px !important;
}

#screen-cart .cart-total-box strong {
  font-size: clamp(1.65rem, 2vw, 2.25rem) !important;
}

#screen-cart #go-to-review {
  margin-top: 14px !important;
  min-height: 54px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

/* Il mini-carrello flottante non deve duplicare il totale quando siamo gia nel carrello. */
body.cb-cart-active #nav-v2-floating-cart,
body.cb-cart-active .nav-v2-floating-cart,
body.cb-cart-active .floating-cart {
  display: none !important;
}

/* Maniglia touch per spostare un prodotto tra le portate. */
#screen-cart .cart-item.cb-drag-enabled {
  position: relative;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

#screen-cart .cb-course-drag-handle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 21px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 4;
}

#screen-cart .cb-drag-enabled .cart-item-main {
  padding-left: 42px;
}

#screen-cart .cb-drag-source {
  opacity: .48;
  transform: scale(.985);
}

#screen-cart .cb-drag-over {
  border-color: rgba(255,224,147,.9) !important;
  box-shadow: 0 0 0 2px rgba(255,224,147,.18), 0 14px 34px rgba(0,0,0,.28) !important;
}

#screen-cart .cb-course-dropbar {
  display: none;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  position: sticky;
  top: 8px;
  z-index: 30;
  margin: 0 0 12px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(5,24,38,.82);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#screen-cart .cb-course-dropbar.active {
  display: grid;
}

#screen-cart .cb-course-dropzone {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,.36);
  color: rgba(255,255,255,.92);
  font-weight: 800;
  letter-spacing: .035em;
  background: rgba(255,255,255,.06);
}

#screen-cart .cb-course-dropzone.cb-drag-over {
  color: #fff8dc;
  background: rgba(157,118,29,.34);
  border-color: rgba(255,224,147,.95);
}

@media (max-width: 900px) {
  #screen-cart .gallery-header {
    grid-template-columns: 1fr !important;
  }
  #screen-cart .gallery-header h2 {
    font-size: clamp(1.9rem, 6vw, 2.8rem) !important;
  }
}
