/* ==========================================================
   CART ADDED CONFIRMATION
   Bottom sheet en movil, modal centrado en desktop.
   ========================================================== */

/* ---------- overlay ---------- */
.cac_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cac_overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- sheet / modal ---------- */
.cac_sheet {
  background: #fff;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.cac_overlay.is-open .cac_sheet {
  transform: translateY(0);
}

/* ---------- header ---------- */
.cac_header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f3;
  flex-shrink: 0;
}

.cac_check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.cac_header_text {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #353535;
}

.cac_close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #f1f3f5;
  color: #666;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cac_close:hover {
  background: #dc3545;
  color: #fff;
}

/* ---------- body ---------- */
.cac_body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #c9d6e2 transparent;
}

.cac_product {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cac_img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #edf0f3;
  flex-shrink: 0;
  background: #f8f9fa;
}

.cac_info {
  min-width: 0;
  flex: 1;
}

.cac_name {
  font-size: 14px;
  font-weight: 600;
  color: #353535;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cac_variant {
  font-size: 12.5px;
  color: #8d99a3;
  margin-bottom: 4px;
}

.cac_qty_price {
  font-size: 13px;
  color: #5c5b5b;
}

.cac_subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0f3;
  font-size: 15px;
}

.cac_subtotal span {
  color: #5c5b5b;
}

.cac_total {
  color: #08C;
  font-size: 18px;
  font-weight: 700;
}

/* ---------- footer ---------- */
.cac_footer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #edf0f3;
  flex-shrink: 0;
}

.cac_btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.cac_btn i {
  font-size: 13px;
}

.cac_btn_cart {
  background: #fff;
  border: 2px solid #08C;
  color: #08C;
}

.cac_btn_cart:hover {
  background: #f0f9ff;
  border-color: #069;
  color: #069;
}

.cac_btn_pay {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: 2px solid transparent;
  color: #fff;
}

.cac_btn_pay:hover {
  background: linear-gradient(135deg, #0284c7, #006da3);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

/* ---------- desktop: modal centrado ---------- */
@media (min-width: 768px) {
  .cac_overlay {
    align-items: center;
  }

  .cac_sheet {
    border-radius: 14px;
    max-height: 70vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  }

  .cac_sheet {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.3s ease;
  }

  .cac_overlay.is-open .cac_sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
