#cart-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 9998;
  cursor: pointer;
}
#cart-drawer-overlay.is-visible { display: block; }

#cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  border-left: 1px solid #e8e8e8;
}
#cart-drawer.is-open { transform: translateX(0) !important; }

#cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e8;
}
#cart-drawer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
#cart-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #666;
  padding: 4px;
}
#cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.cart-drawer-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}
.cart-drawer-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
}
.cart-drawer-item-info { flex: 1; }
.cart-drawer-item-name {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #222;
}
.cart-drawer-item-attrs {
  font-size: 12px;
  color: #888;
  margin: 0 0 6px;
}
.cart-drawer-item-price {
  font-size: 13px;
  font-weight: 600;
  color: #222;
}
.cart-drawer-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.cart-drawer-item-qty button {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-drawer-item-qty span {
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}
.cart-drawer-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 18px;
  padding: 2px;
  line-height: 1;
}
.cart-drawer-item-remove:hover { color: #e24b4a; }

#cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
  background: #fff;
}

/* ===== SUBTOTAL — display block para que los hijos apilen en columna ===== */
#cart-drawer-subtotal {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

#cart-drawer-checkout {
  display: block;
  width: 100%;
  padding: 13px;
  background: #E85D24;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: 'Poppins', Arial, sans-serif;
}
#cart-drawer-checkout:hover { background: #d04f1a; }
#cart-drawer-view-cart {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
}
#cart-drawer-empty {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-size: 14px;
}
@media (max-width: 480px) {
  #cart-drawer { width: 100vw; }
}
.cart-drawer-item-remove {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 20px;
  padding: 4px 8px;
  line-height: 1;
  align-self: flex-start;
  flex-shrink: 0;
}
.cart-drawer-item-remove:hover { color: #e24b4a; }

/* Ocultar carrito negro hover */
.cart-preview .body.cart-hover-content,
.blockcart .body.cart-hover-content,
div.body.cart-hover-content {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===== PUNTO PATRONES - DRAWER TOTALS ===== */
#cart-drawer-subtotal .cd-precio-normal,
#cart-drawer-subtotal .cd-ahorro,
#cart-drawer-subtotal .cd-total {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin-bottom: 6px;
}
#cart-drawer-subtotal .cd-precio-normal span:first-child { color: #E53935 !important; font-size: 12px; }
#cart-drawer-subtotal .cd-tachado { text-decoration: line-through; color: #E53935 !important; font-size: 12px; }
#cart-drawer-subtotal .cd-ahorro span:first-child { color: #27AE60 !important; font-weight: 700; font-size: 13px; }
#cart-drawer-subtotal .cd-ahorro-val { color: #27AE60 !important; font-weight: 700; font-size: 13px; }
#cart-drawer-subtotal .cd-total {
  padding-top: 8px;
  border-top: 1px solid #EAE0D8;
  margin-bottom: 0;
}
#cart-drawer-subtotal .cd-total span:first-child { color: #3D2B1F !important; font-weight: 700; font-size: 14px; }
#cart-drawer-subtotal .cd-total-val { color: #3D2B1F !important; font-weight: 700; font-size: 18px; }
@media (max-width: 768px) {
  #cart-drawer-footer {
    padding-bottom: 200px !important;
  }
}