/**
 * CARNEDOM — CART UI CSS
 * Estilos del carrito global: widget, panel, barra inferior.
 * Cargar via: wp_enqueue_style('cdom-cart-ui', get_template_directory_uri().'/css/carnedom-cart-ui.css');
 * O como <link> en el header de Elementor.
 */

/* ── OVERLAY ─────────────────────────────────────────────────── */
#cu-ov {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 99998;
}
#cu-ov.open { display: block; }

/* ── WIDGET WRAPPER ──────────────────────────────────────────── */
#cu-widget {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 99999;
  display: none;
  font-family: Montserrat, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#cu-widget.visible { display: block; }

/* ── PANEL EXPANDIBLE ────────────────────────────────────────── */
#cu-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .5s cubic-bezier(.22,1,.36,1);
  background: rgba(5,5,5,0.98);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid transparent;
}
#cu-panel.open { border-top-color: rgba(176,48,48,0.2); }

.cu-inner { max-width: 1200px; width: 100%; margin: 0 auto; }

/* Panel header */
.cu-ph {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cu-ph-t {
  font-size: 10px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase; color: #B03030;
}
.cu-ph-c {
  background: none; border: none;
  color: rgba(255,255,255,.25); font-size: 10px;
  cursor: pointer; font-family: Montserrat, sans-serif;
  letter-spacing: 1px; text-decoration: underline; padding: 4px;
  transition: color .2s;
}
.cu-ph-c:hover { color: rgba(255,255,255,.5); }

/* Scrollable items */
.cu-scroll {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  max-height: 40vh; padding: 0 24px;
}
@media (max-width: 640px) { .cu-scroll { max-height: 35vh; } }

/* Category label */
.cu-cat {
  font-size: 9px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,.18);
  padding-bottom: 6px; margin-top: 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* Item row */
.cu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.cu-qty {
  display: flex; align-items: center;
  border: 1px solid rgba(176,48,48,0.3); flex-shrink: 0;
}
.cu-qb {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); font-size: 12px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: Montserrat, sans-serif; transition: color .15s;
}
.cu-qb:first-child { border-right: 1px solid rgba(176,48,48,.15); }
.cu-qb:last-child  { border-left:  1px solid rgba(176,48,48,.15); }
.cu-qb:hover { color: #fff; }
.cu-qn {
  width: 32px; text-align: center;
  font-size: 12px; font-weight: 600; color: #fff;
  font-family: Montserrat, sans-serif;
  height: 26px; line-height: 26px;
}
.cu-nm {
  flex: 1; min-width: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px; font-weight: 400;
  color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cu-pr {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,.7); white-space: nowrap;
}
.cu-dl {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.2); font-size: 14px;
  padding: 4px 2px; line-height: 1;
  transition: color .2s; flex-shrink: 0;
}
.cu-dl:hover { color: #B03030; }

/* Panel footer total */
.cu-pf {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cu-pfl {
  font-size: 10px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.cu-pft {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px; font-weight: 300; color: #fff;
}

/* ── BOTTOM BAR ──────────────────────────────────────────────── */
#cu-bar {
  background: linear-gradient(180deg, rgba(35,0,0,0.95) 0%, rgba(10,0,0,0.98) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(176,48,48,0.3);
}
#cu-bar.flash { animation: cuFlash .6s ease; }
@keyframes cuFlash {
  0%   { border-top-color: rgba(176,48,48,0.3); }
  50%  { border-top-color: rgba(176,48,48,0.9); }
  100% { border-top-color: rgba(176,48,48,0.3); }
}
.cu-bi {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 24px 20px;
  display: flex; flex-direction: column;
}

/* Toggle button */
#cu-toggle {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 14px; width: 100%;
  font-family: Montserrat, sans-serif;
}
.cu-tl { display: flex; align-items: center; gap: 12px; }
.cu-circle {
  width: 28px; height: 28px;
  border: 1px solid rgba(176,48,48,.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .3s;
}
.cu-circle.open { background: rgba(176,48,48,.15); }
.cu-chev {
  display: block;
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.cu-chev.open { transform: rotate(180deg); }
.cu-tx { text-align: left; }
.cu-sub {
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.4); display: block;
}
.cu-tot {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px; font-weight: 300; color: #fff;
  line-height: 1; display: inline-block; margin-top: 4px;
}
.cu-tot.pulse { animation: cuPulse .4s ease; }
@keyframes cuPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Divider + hint */
.cu-divider {
  width: 100%; height: 1px;
  background: rgba(255,255,255,.06); margin-bottom: 14px;
}
.cu-hint {
  font-size: 10px; color: rgba(255,255,255,.25);
  text-align: center; margin: 0 0 10px; letter-spacing: 1px;
}

/* WhatsApp button */
.cu-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; width: 100%;
  background: #B03030; color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  text-decoration: none; text-align: center;
  font-family: Montserrat, sans-serif;
  border: 1px solid rgba(176,48,48,.6);
  box-shadow: 0 0 20px rgba(176,48,48,.15);
  transition: background .3s, box-shadow .3s;
  cursor: pointer; box-sizing: border-box;
}
.cu-wa:hover {
  background: #8a2020;
  box-shadow: 0 0 30px rgba(176,48,48,.3);
}
.cu-resp {
  font-size: 10px; font-weight: 500; letter-spacing: 1.5px;
  color: rgba(255,255,255,.35);
  text-align: center; margin-top: 10px;
}

/* ── EMPTY STATE BAR ─────────────────────────────────────────── */
#cu-empty {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 99999; display: none;
  background: rgba(20,0,0,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.05);
  padding: 16px 24px; text-align: center;
}
#cu-empty.visible { display: block; }
.cu-et {
  font-size: 11px; font-weight: 500;
  letter-spacing: 2px; color: rgba(255,255,255,.25); margin: 0;
}
