/* Botón carrito */
.mdp-cart-btn {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 0px 5px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mdp-cart-icon {
  font-size: 26px;
  line-height: 1;
}

.mdp-cart-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e30613;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Overlay popup */
.mdp-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: flex-end;
  z-index: 9999;
}

.mdp-cart-overlay.show {
  display: flex;
}

/* Popup carrito */
.mdp-cart-popup {
  width: 410px;
  max-width: 100%;
  height: 100%;
  background: #f5f5f5; /* tono similar al ejemplo f57f6c*/
  box-shadow: -4px 0 12px rgba(0,0,0,.25);
  padding: 30px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.mdp-cart-close {
  position: absolute;
  right: 3px;
  top: -3px;
  border: none;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}

/* Listado de items */
.mdp-cart-items {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.mdp-cart-row {
  display: grid;
  grid-template-columns: auto 65px 1fr auto;
  align-items: center;
  place-content: center;
  gap: 0 8px;
  border: solid 1px #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  position: relative;
  height: 85px;
}

.mdp-remove-item {
    background: #000;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    border-radius: 30px;
    padding: 0px 4px;
    position: absolute;
    top: 4px;
    left: 4px;
}

.mdp-remove-item:hover, .mdp-cart-close:hover {
    opacity: 0.8;
}

.mdp-cart-thumb {
    text-align: center;
}

.mdp-cart-thumb img {
  width: 48px;
  height: auto;
  object-fit: contain;
}

.mdp-cart-info {
  display: flex;
  flex-direction: column;
}

.mdp-cart-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mdp-cart-price {
  font-size: 12px;
  color: #444;
}

.mdp-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.mdp-qty-btn {
    border: none;
    background: #f5f5f5;
    width: 19px;
    height: 26px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.mdp-qty-btn:hover {
    opacity: 0.8;
}

.mdp-qty-input {
    width: 32px !important;
    text-align: center;
    border: none !important;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    height: 26px;
    font-size: 13px !important;
    padding: 0 !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
}

/* Estado sold */
.mdp-cart-row.mdp-item-sold {
  opacity: .6;
}

.mdp-sold-badge {
  display: inline-block;
  background: #444;
  color: #fff;
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 11px;
  margin-left: 4px;
}

/* Footer */
.mdp-cart-footer {
  border-top: 1px solid rgba(255,255,255,.5);
  padding-top: 8px;
  margin-top: 4px;
}

.mdp-cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
}

.mdp-cart-checkout-btn {
  width: 100%;
  border: none;
  padding: 13px 0;
  border-radius: 4px;
  background: #005f85;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

#mdpCartCheckout:hover {
    opacity: 0.9;
}

.mdp-cart-empty {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

@media (max-width: 450px) {
	.mdp-cart-popup {
		width: 100%;
		max-width: 100%;
	}
}