﻿/* KPI cuenta + carrito Mercado Pago */

.te-shop-hub {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 1.25rem 0 1.5rem;
}

.te-shop-hub-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  align-items: start;
}

.te-kpi-board {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.te-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.te-kpi-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 0.35rem;
}

.te-kpi-head h1 {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.te-kpi-greeting {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.te-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.te-kpi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

.te-kpi-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.te-kpi-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.te-kpi-hint {
  display: block;
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.te-kpi-progress {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.te-kpi-progress > span:first-child {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.te-kpi-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.te-kpi-bar div,
#kpi-ship-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #16a34a);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0;
}

#kpi-ship-text {
  font-size: 0.75rem;
  color: #64748b;
}

/* Carrito hub */
.te-cart-hub {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem 1.125rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 5.5rem;
}

.te-cart-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.te-cart-hub-head h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.te-cart-hub-count {
  font-size: 0.75rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

#cart-hub-items {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.te-cart-hub--page #cart-hub-items {
  max-height: none;
}

.te-cart-empty {
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.te-cart-item {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  padding: 0.625rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.te-cart-item img {
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
  flex-shrink: 0;
}

.te-cart-item-body {
  flex: 1;
  min-width: 0;
}

.te-cart-item-body strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

.te-cart-item-meta {
  font-size: 0.6875rem;
  color: #64748b;
}

.te-cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.te-cart-qty button {
  width: 26px;
  height: 26px;
  border: none;
  background: #f8fafc;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.te-cart-qty span {
  font-size: 0.8125rem;
  font-weight: 600;
  min-width: 1.25rem;
  text-align: center;
}

.te-cart-remove {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.te-cart-remove:hover {
  color: #ef4444;
}

.te-cart-totals {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8125rem;
}

.te-cart-totals div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  color: #64748b;
}

.te-cart-total-row {
  font-size: 0.9375rem !important;
  color: #0f172a !important;
  font-weight: 700;
  margin-top: 0.35rem !important;
  padding-top: 0.35rem;
  border-top: 1px dashed #e2e8f0;
}

.te-mp-btn {
  width: 100%;
  margin-top: 0.875rem;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #009ee3 0%, #007eb5 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.te-mp-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 158, 227, 0.35);
}

.te-mp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.te-mp-btn svg {
  flex-shrink: 0;
}

.te-mp-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: #64748b;
}


@import url('cart-drawer.css');


/* Avisos debug envÃ­o WC (clase nativa) */
.woocommerce-shipping-debug {
  display: none !important;
}

/* Modales MP */
.te-mp-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.te-mp-modal[hidden] {
  display: none !important;
}

.te-mp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.te-mp-modal-panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.te-mp-modal-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.te-mp-summary-lead {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.75rem;
}

.te-mp-summary-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  max-height: 160px;
  overflow-y: auto;
}

.te-mp-summary-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.te-mp-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.te-mp-summary-note {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 1rem;
}

.te-mp-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.te-mp-modal-actions .btn-outline {
  flex: 1;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.te-mp-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* BotÃ³n agregar en tarjeta */
.pa-card-add {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #2563eb;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pa-card-add:hover {
  background: #dbeafe;
}

.pa-card-add--in-cart {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.pa-card-add--in-cart:hover {
  background: #1d4ed8;
  color: #fff;
}

@media (max-width: 960px) {
  .te-shop-hub-inner {
    grid-template-columns: 1fr;
  }

  .te-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .te-cart-hub {
    position: static;
  }
}

@media (max-width: 480px) {
  .te-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* â€”â€” KPI resumen home â€”â€” */
.te-kpi-home {
  padding: 0 1.5rem 3rem;
}

.te-kpi-home-inner {
  max-width: 80rem;
  margin: 0 auto;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #312e81 100%);
  border-radius: 1.25rem;
  padding: 1.75rem 2rem;
  color: #fff;
}

.te-kpi-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.te-kpi-home .te-kpi-eyebrow {
  color: #93c5fd;
}

.te-kpi-home-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.25rem 0 0;
  letter-spacing: -0.02em;
}

.te-kpi-home-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #bfdbfe;
  text-decoration: none;
  white-space: nowrap;
}

.te-kpi-home-link:hover {
  color: #fff;
}

.te-kpi-home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.te-kpi-home-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

.te-kpi-home-card .te-kpi-label {
  color: rgba(255, 255, 255, 0.65);
}

.te-kpi-home-card strong {
  display: block;
  font-size: 1.375rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

.te-kpi-home-progress {
  margin-bottom: 1.25rem;
}

.te-kpi-home-progress span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

.te-kpi-home-progress .te-kpi-bar {
  background: rgba(255, 255, 255, 0.2);
  margin-top: 0.5rem;
}

.te-kpi-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.te-kpi-home-btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  color: #0f172a;
}

.te-kpi-home-btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* â€”â€” Cabecera tienda (solo catÃ¡logo) â€”â€” */
.te-shop-page-head {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 1.25rem 0 1rem;
}

.te-shop-page-head-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.te-shop-page-head .pa-breadcrumb {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.te-shop-page-head .pa-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.te-shop-page-head .pa-breadcrumb a:hover {
  text-decoration: underline;
}

.te-shop-page-head h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.te-shop-page-lead {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.35rem 0 0;
}

/* â€”â€” PÃ¡gina cuenta.html â€”â€” */
.te-cuenta-main {
  flex: 1;
}

.te-account-section {
  padding: 1.5rem 0;
}

.te-account-section--kpi {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e5e7eb;
}

.te-account-section--cart {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.te-account-section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.te-cart-hub--page {
  position: static;
  max-width: 640px;
}

.te-cuenta-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.te-cuenta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  align-items: start;
}

.te-cuenta-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.te-cuenta-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.te-cuenta-section-head h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.te-cuenta-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #009ee3;
  background: #e0f2fe;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.te-orders-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.te-orders-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.te-orders-empty {
  font-size: 0.875rem;
  color: #64748b;
  padding: 1.5rem 0;
  text-align: center;
}

.te-orders-empty a {
  color: #2563eb;
  font-weight: 600;
}

.te-order-item {
  padding: 0.875rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.te-order-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.te-order-main strong {
  font-size: 0.875rem;
  color: #0f172a;
}

.te-order-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.te-order-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.te-order-link:hover {
  text-decoration: underline;
}

.te-order-empty {
  font-size: 0.875rem;
  color: #64748b;
  padding: 2rem 1rem;
  text-align: center;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
}

.te-order-empty a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.te-order-empty a:hover {
  text-decoration: underline;
}

.te-order-item:last-child {
  border-bottom: none;
}

.te-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.te-order-top strong {
  font-size: 0.875rem;
}

.te-order-status {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #16a34a;
  background: #dcfce7;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.te-order-meta {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0.25rem 0 0;
}

.te-order-ref {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin: 0.15rem 0 0;
}

.te-order-lines {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid #f1f5f9;
}

.te-order-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.te-order-line img {
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f8fafc;
}

.te-order-line-body {
  flex: 1;
  min-width: 0;
}

.te-order-line-body strong {
  display: block;
  font-size: 0.8125rem;
  color: #0f172a;
}

.te-order-line-body span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.te-order-line-total {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.te-cart-page-body {
  padding: 0 0 3rem;
}

.te-cart-page-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.te-cuenta-actions {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
}

.te-cuenta-actions h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.875rem;
}

.te-cuenta-action {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.te-cuenta-action:last-child {
  margin-bottom: 0;
}

.te-cuenta-action:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.te-cuenta-action--btn {
  font-family: inherit;
}

.te-cuenta-link-shop {
  display: block;
  text-align: center;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.te-account-btn--active {
  color: #2563eb !important;
}

@media (max-width: 768px) {
  .te-kpi-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .te-cuenta-grid {
    grid-template-columns: 1fr;
  }

  .te-cuenta-sidebar {
    order: -1;
  }

  .te-kpi-home-head {
    flex-direction: column;
  }
}
