@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ================================================================
   Catálogo SaaS Pro v2.0
   Fuente: Poppins en todo
   Color de marca: controlado por --brand via inline CSS
   ================================================================ */
:root {
  --brand:       #f97316;
  --brand-dk:    #ea6700;
  --brand-lt:    #fff7ed;
  --brand-mid:   #fed7aa;
  --green:       #10b981;
  --green-lt:    #ecfdf5;
  --red:         #ef4444;
  --amber:       #f59e0b;
  --text:        #111827;
  --text-2:      #374151;
  --text-3:      #6b7280;
  --text-4:      #9ca3af;
  --border:      #e5e7eb;
  --border-2:    #d1d5db;
  --bg:          #ffffff;
  --bg-2:        #f9fafb;
  --bg-3:        #f3f4f6;
  --dark:        #111827;
  --dark-2:      #1f2937;
  --dark-3:      #374151;
  --r:           14px;
  --r-sm:        9px;
  --font:        'Poppins', system-ui, sans-serif;
  --shadow:      0 1px 3px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ================================================================
   CATÁLOGO PÚBLICO
   ================================================================ */
.csp-catalogo {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* TOPBAR */
.csp-topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.csp-topbar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.csp-topbar-dot {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.csp-topbar-brandname {
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: -.01em;
}
.csp-topbar-cta {
  background: var(--brand);
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.csp-topbar-cta:hover { filter: brightness(.93); transform: translateY(-1px); }

/* STORE HEADER */
.csp-store-header {
  padding: 20px 16px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.csp-store-top {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.csp-store-avatar {
  width: 60px; height: 60px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.csp-store-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.csp-store-info { flex: 1; min-width: 0; }
.csp-store-name {
  font-family: var(--font);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 5px;
  letter-spacing: -.02em;
}
.csp-store-desc {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.55;
  margin-bottom: 8px;
  font-weight: 400;
}
.csp-store-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.csp-store-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-4);
  font-weight: 500;
}
.csp-store-meta-row a { color: inherit; text-decoration: none; }
.csp-store-meta-row a:hover { color: var(--brand); }

/* REDES */
.csp-store-redes {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.csp-red-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: all .15s;
  font-family: var(--font);
}
.csp-red-btn:hover { border-color: var(--brand); color: var(--brand); }
.csp-red-ig:hover  { border-color: #E1306C; color: #E1306C; }
.csp-red-fb:hover  { border-color: #1877F2; color: #1877F2; }
.csp-red-tt:hover  { border-color: #000; color: #000; }

.csp-wa-btn {
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  margin-top: 12px;
}
.csp-wa-btn:hover { background: #128C7E; }

/* HORARIO CHIP */
.csp-horario-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-lt);
  border: 1px solid #a7f3d0;
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  margin-top: 6px;
}

/* CATEGORÍAS */
.csp-cats {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 49px;
  z-index: 90;
}
.csp-cats-scroll {
  display: flex;
  gap: 7px;
  padding: 11px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.csp-cats-scroll::-webkit-scrollbar { display: none; }
.csp-cat-btn {
  flex-shrink: 0;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
  white-space: nowrap;
}
.csp-cat-btn.active {
  background: var(--brand-lt);
  border-color: var(--brand);
  color: var(--brand);
}

/* GRILLA */
.csp-grid-wrap { padding: 14px 14px 100px; }
.csp-grid-meta {
  font-size: 10.5px;
  color: var(--text-4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 12px;
  font-family: var(--font);
}
.csp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
@media(min-width:600px){.csp-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){.csp-grid{grid-template-columns:repeat(4,1fr)}}

.csp-prod-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
}
.csp-prod-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.09);
  transform: translateY(-2px);
  border-color: var(--border-2);
}
.csp-prod-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  overflow: hidden;
}
.csp-prod-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: crisp-edges; -webkit-font-smoothing: antialiased; }
.csp-prod-body { padding: 9px 11px 11px; }
.csp-prod-cat {
  font-size: 9.5px;
  color: var(--text-4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
  font-family: var(--font);
}
.csp-prod-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font);
}
.csp-prod-foot { display: flex; align-items: center; justify-content: space-between; }
.csp-prod-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  font-family: var(--font);
  letter-spacing: -.01em;
  white-space: nowrap;       /* <-- NUEVO: Evita que el precio salte a otra línea */
  overflow: hidden;          /* <-- NUEVO: Oculta si el texto es demasiado largo */
  text-overflow: ellipsis;   /* <-- NUEVO: Pone '...' si no entra */
  margin-right: 8px;         /* <-- NUEVO: Da un espacio de respiro contra el botón */
}
.csp-add-quick {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--brand);
  border: none;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; /* <-- Solo cambiamos el 0 por 1 */
  transition: opacity .15s;
  line-height: 1;
  font-family: var(--font);
}





/* MODAL */
.csp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.csp-overlay.open { display: flex; }
.csp-modal {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 20px 32px;
  max-height: 92vh;
  overflow-y: auto;
}
.csp-modal-img {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.csp-modal-img img { width: 100%; height: 100%; object-fit: cover; image-rendering: crisp-edges; }
.csp-modal-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  font-family: var(--font);
  letter-spacing: -.02em;
}
.csp-modal-cat {
  font-size: 11px;
  color: var(--text-4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.csp-modal-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 10px;
  font-family: var(--font);
  letter-spacing: -.02em;
}
.csp-modal-desc {
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 1.7;
  margin-bottom: 18px;
  font-weight: 400;
}
.csp-qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.csp-qty-row label { font-size: 13px; font-weight: 600; color: var(--text-2); font-family: var(--font); }
.csp-qty-ctrl { display: flex; align-items: center; gap: 14px; }
.csp-qty-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: var(--bg-2);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: all .15s;
  font-family: var(--font);
}
.csp-qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.csp-qty-val { font-size: 17px; font-weight: 700; min-width: 28px; text-align: center; font-family: var(--font); }
.csp-btn-add-cart {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
}
.csp-btn-add-cart:hover { filter: brightness(.93); transform: translateY(-1px); }
.csp-modal-close {
  float: right;
  background: var(--bg-3);
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 15px;
  color: var(--text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: -4px;
  font-family: var(--font);
}

/* CARRITO BAR */
.csp-cart-bar {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 11px 16px;
  display: none;
  gap: 10px;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0,0,0,.07);
  width: 100%;
}
.csp-cart-bar.show { display: flex; }
.csp-cart-icon-wrap { position: relative; }
.csp-cart-icon-btn {
  width: 40px; height: 40px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
}
.csp-cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 17px; height: 17px;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  font-family: var(--font);
}
.csp-cart-info { flex: 1; }
.csp-cart-count { font-size: 11px; color: var(--text-3); font-weight: 500; font-family: var(--font); }
.csp-cart-total { font-size: 15px; font-weight: 700; color: var(--text); font-family: var(--font); }
.csp-btn-ver-pedido {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
}

/* SHEET CARRITO */
.csp-cart-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 250;
  align-items: flex-end;
  justify-content: center;
}
.csp-cart-sheet-overlay.open { display: flex; }
.csp-cart-sheet {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 20px 32px;
  max-height: 88vh;
  overflow-y: auto;
}
.csp-cs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.csp-cs-title { font-size: 17px; font-weight: 700; color: var(--text); font-family: var(--font); }
.csp-cs-close { background: var(--bg-3); border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.csp-cart-item { display: flex; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.csp-ci-img { width: 52px; height: 52px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; overflow: hidden; }
.csp-ci-img img { width: 100%; height: 100%; object-fit: cover; }
.csp-ci-body { flex: 1; min-width: 0; }
.csp-ci-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font); }
.csp-ci-cat { font-size: 11px; color: var(--text-4); margin-top: 2px; }
.csp-ci-price { font-size: 14px; font-weight: 700; color: var(--text-2); font-family: var(--font); white-space: nowrap; }
.csp-ci-del { background: none; border: none; color: var(--red); font-size: 17px; cursor: pointer; padding: 4px; }
.csp-cs-total { padding-top: 14px; display: flex; justify-content: space-between; align-items: center; }
.csp-cs-total-lbl { font-size: 13px; color: var(--text-3); font-weight: 500; font-family: var(--font); }
.csp-cs-total-val { font-size: 20px; font-weight: 700; color: var(--text); font-family: var(--font); }
.csp-btn-wa-final {
  width: 100%;
  margin-top: 14px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 9px;
  transition: all .2s;
}
.csp-btn-wa-final:hover { background: #128C7E; }
.csp-empty-cart { text-align: center; padding: 28px 0; color: var(--text-4); font-size: 13px; font-family: var(--font); }
.csp-empty-cart span { font-size: 34px; display: block; margin-bottom: 8px; }

/* BRAND FOOTER */
.csp-brand-footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--bg);
}
.csp-bf-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  text-decoration: none;
}
.csp-bf-icon {
  width: 34px; height: 34px;
  background: var(--brand);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.csp-bf-name { font-family: var(--font); font-weight: 700; font-size: 16px; color: var(--text); }
.csp-bf-sistema { font-size: 10px; color: var(--text-4); font-weight: 500; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.csp-bf-tagline { font-size: 12.5px; color: var(--text-3); line-height: 1.5; margin-bottom: 14px; font-weight: 400; }
.csp-bf-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--dark); color: #fff;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 11px 24px; border-radius: 100px;
  text-decoration: none; transition: all .2s;
}
.csp-bf-cta:hover { background: var(--dark-2); transform: translateY(-1px); }
.csp-bf-grupo { margin-top: 10px; font-size: 10px; color: var(--border-2); font-weight: 400; }

/* TOAST */
.csp-toast {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
  animation: csp-pop .2s ease;
}
@keyframes csp-pop { from{opacity:0;transform:translateX(-50%) scale(.9)} to{opacity:1;transform:translateX(-50%) scale(1)} }

/* ================================================================
   PANEL DE USUARIO
   ================================================================ */
.csp-panel-wrap {
  display: flex;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg-2);
}

/* SIDEBAR */
.csp-sidebar {
  width: 230px;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.csp-sidebar-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 9px;
}
.csp-sidebar-logo {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.csp-sidebar-name { font-family: var(--font); font-size: 15px; font-weight: 700; color: #fff; }
.csp-sidebar-tag { font-size: 9.5px; color: rgba(255,255,255,.3); font-weight: 400; margin-top: 1px; }
.csp-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.csp-nav-section { font-size: 9.5px; font-weight: 600; color: rgba(255,255,255,.25); text-transform: uppercase; letter-spacing: .1em; padding: 10px 8px 5px; font-family: var(--font); }
.csp-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}
.csp-nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.csp-nav-item.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.csp-nav-icon { font-size: 15px; flex-shrink: 0; }
.csp-sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.csp-sidebar-user {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.06);
  border-radius: 9px;
  padding: 9px;
}
.csp-sidebar-avatar {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0; font-family: var(--font);
}
.csp-sidebar-uname { font-size: 11.5px; font-weight: 600; color: #e5e7eb; font-family: var(--font); }
.csp-sidebar-uemail { font-size: 10px; color: rgba(255,255,255,.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csp-sidebar-logout {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px;
  font-size: 11.5px; font-weight: 500;
  color: rgba(255,255,255,.3);
  text-decoration: none;
  border-radius: 8px;
  transition: all .15s;
  font-family: var(--font);
}
.csp-sidebar-logout:hover { color: #f87171; background: rgba(239,68,68,.1); }

/* MAIN */
.csp-panel-main { flex: 1; display: flex; flex-direction: column; min-width: 0; max-width: 820px; }
.csp-panel-header { padding: 22px 26px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.csp-panel-header h1 { font-size: 20px; font-weight: 700; color: var(--text); font-family: var(--font); letter-spacing: -.02em; }
.csp-panel-header p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; font-weight: 400; }
.csp-tab { display: none; }
.csp-tab.active { display: block; }
.csp-tab-content { padding: 18px 26px 100px; }

/* CARDS */
.csp-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 14px; }
.csp-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.csp-card-icon { width: 36px; height: 36px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.csp-card-title { font-size: 14px; font-weight: 700; color: var(--text); font-family: var(--font); }
.csp-card-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-weight: 400; }

/* CAMPOS */
.csp-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.csp-field { display: flex; flex-direction: column; gap: 4px; }
.csp-field label { font-size: 11.5px; font-weight: 600; color: var(--text-2); font-family: var(--font); }
.csp-field input, .csp-field textarea, .csp-field select {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  transition: all .15s;
  outline: none;
  width: 100%;
  resize: none;
  font-weight: 400;
}
.csp-field input:focus, .csp-field textarea:focus { border-color: var(--brand); background: var(--bg); }
.csp-field-full { grid-column: 1/-1; }
.csp-field-hint { font-size: 10.5px; color: var(--text-4); line-height: 1.5; font-weight: 400; }

/* COLOR PICKER PANEL */
.csp-color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.csp-color-row input[type=color] { width: 44px; height: 38px; border: none; border-radius: 8px; cursor: pointer; padding: 2px; }
.csp-color-row input[type=text] { flex: 1; }
.csp-color-palette { display: flex; gap: 7px; flex-wrap: wrap; }
.csp-color-swatch {
  width: 26px; height: 26px;
  border-radius: 7px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
}
.csp-color-swatch:hover { transform: scale(1.15); }
.csp-color-swatch.selected { border-color: var(--text); }

/* PRODUCTOS LISTA */
.csp-prod-panel-list { display: flex; flex-direction: column; gap: 9px; }
.csp-prod-panel-item { display: flex; gap: 11px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 11px; transition: border-color .15s; }
.csp-prod-panel-item:hover { border-color: var(--border-2); }
.csp-prod-panel-thumb { width: 52px; height: 52px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; overflow: hidden; }
.csp-prod-panel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.csp-prod-panel-info { flex: 1; min-width: 0; }
.csp-prod-panel-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font); }
.csp-prod-panel-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; font-weight: 400; }
.csp-prod-panel-price { font-size: 13px; font-weight: 600; color: var(--text-2); font-family: var(--font); }
.csp-prod-panel-actions { display: flex; gap: 5px; flex-shrink: 0; }

/* FORM PRODUCTO */
.csp-prod-form-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300; align-items: flex-end; justify-content: center; }
.csp-prod-form-overlay.open { display: flex; }
.csp-prod-form-sheet { background: var(--bg); border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; padding: 20px 20px 32px; max-height: 94vh; overflow-y: auto; }
@media(min-width:769px){ .csp-prod-form-overlay { align-items: center; } .csp-prod-form-sheet { border-radius: var(--r); max-width: 500px; } }
.csp-pf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.csp-pf-title { font-size: 16px; font-weight: 700; color: var(--text); font-family: var(--font); }
.csp-pf-close { background: var(--bg-3); border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.csp-pf-img-box { width: 100%; aspect-ratio: 1/1; max-height: 150px; border: 2px dashed var(--border-2); border-radius: 12px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; margin-bottom: 14px; transition: all .15s; }
.csp-pf-img-box:hover { border-color: var(--brand); background: var(--bg-2); }
.csp-pf-img-box img { width: 100%; height: 100%; object-fit: cover; }
.csp-pf-img-placeholder { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--text-3); font-size: 12px; font-weight: 500; font-family: var(--font); }
.csp-pf-img-placeholder span { font-size: 28px; }
.csp-pf-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.csp-pf-field { display: flex; flex-direction: column; gap: 4px; }
.csp-pf-field label { font-size: 11.5px; font-weight: 600; color: var(--text-2); font-family: var(--font); }
.csp-pf-field input, .csp-pf-field textarea { background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 13px; font-size: 13px; font-family: var(--font); color: var(--text); outline: none; width: 100%; resize: none; font-weight: 400; }
.csp-pf-field input:focus, .csp-pf-field textarea:focus { border-color: var(--brand); background: var(--bg); }
.csp-pf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

/* UPLOAD LOGO */
.csp-upload-box { border: 2px dashed var(--border-2); border-radius: var(--r); background: var(--bg-2); position: relative; overflow: hidden; cursor: pointer; min-height: 120px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.csp-upload-box:hover { border-color: var(--brand); }
.csp-upload-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-3); pointer-events: none; }
.csp-upload-ph-icon { width: 46px; height: 46px; background: var(--bg-3); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.csp-upload-ph p { font-size: 12.5px; font-weight: 600; font-family: var(--font); }
.csp-upload-ph small { font-size: 10.5px; color: var(--text-4); }
.csp-logo-preview { width: 100%; max-height: 150px; object-fit: contain; padding: 10px; }
.csp-file-inp { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.csp-logo-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 7px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; z-index: 10; font-family: var(--font); }

/* STATS */
.csp-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.csp-stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: 13px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.csp-stat-icon { width: 34px; height: 34px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 4px; }
.csp-stat-val { font-family: var(--font); font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; letter-spacing: -.03em; }
.csp-stat-lbl { font-size: 11.5px; color: var(--text-4); font-weight: 500; font-family: var(--font); }
.csp-stat-wide { grid-column: 1/-1; }
.csp-url-row { display: flex; gap: 7px; margin-top: 8px; }
.csp-url-row input { flex: 1; font-size: 11.5px; background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 11px; color: var(--text-3); font-family: var(--font); outline: none; }

/* BADGES */
.csp-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 100px; font-size: 10.5px; font-weight: 600; padding: 3px 10px; font-family: var(--font); }
.csp-badge-active   { background: var(--green-lt); color: var(--green); border: 1px solid #a7f3d0; }
.csp-badge-inactive { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.csp-badge-pending  { background: #fffbeb; color: var(--amber); border: 1px solid #fde68a; }

/* ALERTAS */
.csp-alert { border-radius: var(--r-sm); padding: 11px 15px; font-size: 12.5px; font-weight: 600; margin-bottom: 14px; font-family: var(--font); }
.csp-alert-success { background: var(--green-lt); color: var(--green); border: 1px solid #a7f3d0; }
.csp-alert-error   { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }

/* BOTONES */
.csp-btn-primary { display: inline-flex; align-items: center; gap: 7px; background: var(--brand); color: #fff; border: none; border-radius: 9px; padding: 10px 20px; font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .2s; }
.csp-btn-primary:hover { filter: brightness(.93); transform: translateY(-1px); }
.csp-btn-full { width: 100%; justify-content: center; }
.csp-btn-outline { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--brand); border: 1.5px solid var(--brand); border-radius: 9px; padding: 9px 16px; font-family: var(--font); font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .2s; }
.csp-btn-outline:hover { background: var(--brand); color: #fff; }
.csp-btn-ghost { background: none; border: 1.5px solid var(--border); border-radius: 8px; padding: 7px 13px; font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text-3); cursor: pointer; text-decoration: none; transition: all .15s; display: inline-flex; align-items: center; gap: 5px; }
.csp-btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.csp-btn-danger { background: #fef2f2; color: var(--red); border: 1.5px solid #fecaca; border-radius: 8px; padding: 6px 11px; font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.csp-btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* FORM FOOTER */
.csp-form-footer { position: fixed; bottom: 0; right: 0; left: 230px; background: var(--bg); border-top: 1px solid var(--border); padding: 12px 26px; display: flex; align-items: center; gap: 11px; z-index: 50; }

/* AUTH */
.csp-auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; font-family: var(--font); }
.csp-auth-box { width: 100%; max-width: 390px; }
.csp-auth-logo { display: flex; align-items: center; gap: 9px; justify-content: center; margin-bottom: 22px; }
.csp-auth-logo-icon { width: 38px; height: 38px; background: var(--brand); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.csp-auth-logo-name { font-family: var(--font); font-size: 20px; font-weight: 700; color: var(--text); }
.csp-auth-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 5px; font-family: var(--font); text-align: center; letter-spacing: -.02em; }
.csp-auth-sub { font-size: 12.5px; color: var(--text-3); text-align: center; margin-bottom: 26px; font-weight: 400; }
.csp-auth-form { display: flex; flex-direction: column; gap: 13px; }
.csp-auth-field { display: flex; flex-direction: column; gap: 4px; }
.csp-auth-field label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.csp-auth-field input { border: 1.5px solid var(--border); border-radius: 9px; padding: 12px 13px; font-size: 13px; font-family: var(--font); color: var(--text); background: var(--bg-2); outline: none; transition: all .15s; width: 100%; font-weight: 400; }
.csp-auth-field input:focus { border-color: var(--brand); background: var(--bg); }
.csp-auth-submit { width: 100%; background: var(--brand); color: #fff; border: none; border-radius: 9px; padding: 13px; font-size: 14px; font-weight: 700; font-family: var(--font); cursor: pointer; margin-top: 4px; transition: all .2s; }
.csp-auth-submit:hover { filter: brightness(.93); transform: translateY(-1px); }
.csp-auth-divider { text-align: center; padding: 14px 0; font-size: 11.5px; color: var(--text-4); }
.csp-auth-link-row { text-align: center; font-size: 12.5px; color: var(--text-3); }
.csp-auth-link-row a { color: var(--brand); font-weight: 600; text-decoration: none; }
.csp-error-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 9px; padding: 11px 14px; font-size: 12.5px; color: var(--red); font-weight: 600; text-align: center; font-family: var(--font); }

/* SUB PANELS */
.csp-sub-active { background: linear-gradient(135deg,#f0fdf4,#ecfdf5); border: 1px solid #a7f3d0; border-radius: var(--r); padding: 22px; text-align: center; }
.csp-sub-pending { background: linear-gradient(135deg,var(--dark),var(--dark-2)); border-radius: var(--r); padding: 26px; text-align: center; }
.csp-sub-pending h2 { color: #fff; font-family: var(--font); font-size: 18px; margin-bottom: 7px; font-weight: 700; }
.csp-sub-pending p { color: rgba(255,255,255,.5); font-size: 13px; margin-bottom: 18px; font-weight: 400; }

/* RESPONSIVE */
@media(max-width:768px){
  .csp-panel-wrap { flex-direction: column; }
  .csp-sidebar { width: 100%; height: auto; position: static; }
  .csp-sidebar-brand { padding: 12px 14px; }
  .csp-nav { flex-direction: row; flex-wrap: wrap; padding: 5px 8px 8px; gap: 2px; }
  .csp-nav-section { display: none; }
  .csp-nav-item { flex-direction: column; font-size: 9px; padding: 6px 4px; gap: 2px; flex: 1; min-width: 50px; text-align: center; justify-content: center; }
  .csp-nav-item.active { border-bottom: 2px solid var(--brand); }
  .csp-sidebar-footer { display: none; }
  .csp-panel-header { padding: 13px 14px 0; }
  .csp-tab-content { padding: 13px 13px 90px; }
  .csp-card { padding: 14px; }
  .csp-fields-grid { grid-template-columns: 1fr; }
  .csp-field-full { grid-column: auto; }
  .csp-stats-grid { grid-template-columns: 1fr; }
  .csp-form-footer { left: 0; padding: 10px 13px; }
}


/* Expandir el contenedor principal solo en computadoras */
@media (min-width: 769px) {
  .csp-catalogo {
    max-width: 960px; /* o 1024px, lo que prefieras para que sea más ancho */
  }
}




.gal-item {
    position: relative;
    width: 70px;
    height: 70px;
}
.gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}
.gal-del {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


