/* Carrito de compras de Emprendedores Catrachos */
.ec-cart-open { overflow: hidden; }
.ec-cart-float {
  position: fixed;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 15000;
  min-width: 62px;
  height: 62px;
  padding: 0 20px 0 17px;
  gap: 9px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #082b4c;
  color: #fff;
  box-shadow: 0 15px 38px rgba(8,43,76,.28);
  cursor: pointer;
}
.ec-cart-float:hover { transform: translateY(-2px); background: #0e5d91; }
.ec-cart-float-icon { font-size: 1.55rem; line-height: 1; }
.ec-cart-float-label { font-size: .86rem; font-weight: 900; letter-spacing: .01em; }
.ec-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #f4c400;
  color: #082b4c;
  font-size: .72rem;
  font-weight: 900;
}
.ec-cart-modal[hidden] { display: none !important; }
.ec-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 16000;
  display: grid;
  place-items: center;
  padding: 22px;
}
.ec-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4,24,43,.76);
  backdrop-filter: blur(6px);
}
.ec-cart-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(860px, calc(100dvh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 28px;
  background: #fffdf7;
  box-shadow: 0 34px 100px rgba(4,24,43,.42);
}
.ec-cart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid #dfe7ea;
}
.ec-cart-kicker {
  display: block;
  margin-bottom: 6px;
  color: #0e5d91;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
}
.ec-cart-head h2 { margin: 0; color: #082b4c; font-size: 2rem; letter-spacing: -.04em; }
.ec-cart-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #d7e0e5;
  border-radius: 50%;
  background: #fff;
  color: #082b4c;
  font-size: 1.35rem;
  cursor: pointer;
}
.ec-cart-close:hover { background: #f4c400; }
.ec-cart-body { min-height: 0; overflow: auto; padding: 18px 30px; }
.ec-cart-list { display: grid; gap: 12px; }
.ec-cart-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border: 1px solid #dfe7ea;
  border-radius: 18px;
  background: #fff;
}
.ec-cart-item-visual {
  min-width: 62px;
  height: 62px;
  padding: 0 20px 0 17px;
  gap: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #fff0a8;
  color: #082b4c;
  font-weight: 900;
}
.ec-cart-item-visual img { width: 100%; height: 100%; object-fit: cover; }
.ec-cart-item-copy { min-width: 0; display: grid; gap: 3px; }
.ec-cart-item-copy strong { color: #082b4c; font-size: .96rem; }
.ec-cart-item-copy small { color: #70808b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-cart-item-copy span { color: #0e5d91; font-size: .78rem; font-weight: 800; }
.ec-cart-item-controls { display: grid; justify-items: end; gap: 7px; }
.ec-cart-quantity {
  display: grid;
  grid-template-columns: 34px 44px 34px;
  align-items: center;
  border: 1px solid #d8e1e5;
  border-radius: 12px;
  overflow: hidden;
}
.ec-cart-quantity button {
  width: 34px;
  height: 34px;
  border: 0;
  background: #f4f7f8;
  color: #082b4c;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}
.ec-cart-quantity input {
  width: 44px;
  height: 34px;
  border: 0;
  border-left: 1px solid #d8e1e5;
  border-right: 1px solid #d8e1e5;
  background: #fff;
  color: #082b4c;
  text-align: center;
  font-weight: 800;
  appearance: textfield;
}
.ec-cart-quantity input::-webkit-inner-spin-button,
.ec-cart-quantity input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.ec-cart-remove {
  border: 0;
  background: transparent;
  color: #a54141;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
.ec-cart-empty {
  padding: 58px 20px;
  text-align: center;
  color: #667985;
}
.ec-cart-empty span { display: block; margin-bottom: 12px; font-size: 2.4rem; }
.ec-cart-empty strong { display: block; color: #082b4c; font-size: 1.2rem; }
.ec-cart-empty p { margin: 8px auto 0; max-width: 390px; line-height: 1.6; }
.ec-cart-footer {
  padding: 20px 30px 28px;
  border-top: 1px solid #dfe7ea;
  background: #f7f9f9;
}
.ec-cart-summary { display: flex; justify-content: space-between; gap: 18px; color: #667985; }
.ec-cart-summary strong { color: #082b4c; }
.ec-cart-footer > p { margin: 10px 0 18px; color: #71808a; font-size: .82rem; line-height: 1.55; }
.ec-cart-footer-actions { display: grid; grid-template-columns: auto auto minmax(220px, 1fr); gap: 12px; }
.ec-cart-footer-actions .btn { justify-content: center; text-align: center; }
.ec-cart-checkout.is-disabled { pointer-events: none; opacity: .48; }
.ec-cart-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 17000;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border-radius: 999px;
  background: #082b4c;
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 14px 38px rgba(4,24,43,.25);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ec-cart-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.product-cart-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 12px;
  margin-top: 22px;
}
.product-cart-controls label,
.public-product-cart-controls label { display: grid; gap: 7px; color: #536876; font-size: .78rem; font-weight: 800; }
.product-cart-controls select,
.product-cart-controls input,
.public-product-cart-controls select,
.public-product-cart-controls input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d5e0e5;
  border-radius: 12px;
  background: #fff;
  color: #082b4c;
  font: inherit;
}
.product-cart-add { grid-column: 1 / -1; width: 100%; justify-content: center; }
.product-show-catalog { width: 100%; margin-top: 12px; justify-content: center; }

.public-product-cart-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 10px;
  margin-top: 15px;
}
.public-product-cart-controls .btn { grid-column: 1 / -1; width: 100%; justify-content: center; }
.public-product-actions { display: grid; gap: 9px; }

@media (max-width: 700px) {
  .ec-cart-float { min-width: 58px; width: 58px; height: 58px; padding: 0; bottom: max(18px, env(safe-area-inset-bottom)); }
  .ec-cart-float-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .ec-cart-modal { padding: 0; align-items: end; }
  .ec-cart-panel { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; }
  .ec-cart-head { padding: 22px 20px 17px; }
  .ec-cart-head h2 { font-size: 1.65rem; }
  .ec-cart-body { padding: 14px 16px; }
  .ec-cart-item { grid-template-columns: 52px minmax(0, 1fr); align-items: start; }
  .ec-cart-item-visual { width: 52px; height: 52px; }
  .ec-cart-item-controls { grid-column: 2; grid-template-columns: auto auto; align-items: center; justify-content: space-between; justify-items: start; width: 100%; }
  .ec-cart-footer { padding: 17px 16px max(20px, env(safe-area-inset-bottom)); }
  .ec-cart-footer-actions { grid-template-columns: 1fr; }
  .product-cart-controls,
  .public-product-cart-controls { grid-template-columns: 1fr 92px; }
}

@media (max-width: 390px) {
  .product-cart-controls,
  .public-product-cart-controls { grid-template-columns: 1fr; }
  .product-cart-add,
  .public-product-cart-controls .btn { grid-column: 1; }
}
