/* Estilos mínimos para aislar vistas de shop sin colisionar con backoffice */

.shop-page h2 {
  font-weight: 600;
}

.shop-page .btn {
  font-size: 0.9rem;
  border-radius: 999px;
}

/* Grid de productos tipo ecommerce */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.product-image {
  position: relative;
  width: 100%;
  padding-top: 70%; /* 7:10 approx */
  background: #ffffff;
}

.product-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  background-color: #fafafa;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 2.2em; /* 2 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-code {
  font-size: 0.75rem;
  color: #777;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
  padding: 5px !important;
}

.product-badge {
  display: inline-block;
  background: #f1f3f5;
  color: #495057;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
}

/* Ajustes de inputs en Chrome */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-actions input {
  text-align: right;
}

/* Perfil de cliente */
.profile-card {
  border-radius: 24px;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}

.profile-hero {
  height: 160px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, #1e293b 0%, #334155 55%, #475569 100%);
  position: relative;
  overflow: hidden;
}
.profile-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 100% at 15% 60%, rgba(99, 102, 241, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 10%, rgba(14, 165, 233, 0.25) 0%, transparent 55%);
  pointer-events: none;
}

.profile-info-wrap {
  padding-top: 4rem;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  transform: translateY(-56px);
}

.profile-card .profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid #fff;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
  cursor: pointer;
}
.profile-card .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.2s ease;
}
.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  color: #fff;
  font-size: 1.3rem;
}
.profile-avatar-wrap:hover .profile-avatar-overlay {
  opacity: 1;
}
.profile-avatar-wrap:hover .profile-avatar img {
  filter: brightness(0.75);
}

.profile-section-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.profile-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #64748b;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.profile-section-title i {
  font-size: 0.85rem;
  color: #94a3b8;
}

.profile-stat-chip {
  display: inline-flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  min-width: 110px;
  gap: 0.1rem;
}
.profile-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}
.profile-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.profile-stat-value.is-danger { color: #b91c1c; }
.profile-stat-value.is-success { color: #15803d; }

@media (max-width: 767.98px) {
  .profile-hero { height: 130px; }
  .profile-info-wrap { padding-top: 3.25rem; }
  .profile-avatar-wrap { transform: translateY(-48px); }
  .profile-card .profile-avatar { width: 104px; height: 104px; border-width: 4px; }
}
@media (max-width: 575.98px) {
  .profile-hero { height: 110px; }
  .profile-info-wrap { padding-top: 2.75rem; }
  .profile-avatar-wrap { transform: translateY(-42px); }
  .profile-card .profile-avatar { width: 90px; height: 90px; }
  .profile-section-card { padding: 1.25rem 1rem; }
}

/* Carrito de compras */
:root {
  /* Paleta de Colores Orientada a Conversión */
  --cart-primary: #2563eb;
  --cart-primary-hover: #1d4ed8;
  --cart-primary-glow: rgba(37, 99, 235, 0.35);
  --cart-surface: #ffffff;
  --cart-surface-alt: #f8fafc;
  --cart-text-main: #0f172a;
  --cart-text-muted: #64748b;
  --cart-border: #e2e8f0;
  --cart-danger: #ef4444;
  --cart-danger-bg: #fef2f2;
  --cart-success: #10b981;

  /* Sistema de Sombras y Radios */
  --cart-radius-sm: 8px;
  --cart-radius-md: 12px;
  --cart-radius-lg: 20px;
  --cart-radius-pill: 9999px;
  --cart-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --cart-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --cart-shadow-floating: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --cart-transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cart-page {
  color: var(--cart-text-main);
  background: linear-gradient(180deg, var(--cart-surface-alt) 0%, var(--cart-surface) 60%);
}
.cart-page .text-muted {
  color: var(--cart-text-muted) !important;
}

.cart-content {
  position: relative;
  z-index: 1;
}

.cart-item {
  border: 1px solid var(--cart-border) !important;
  border-radius: var(--cart-radius-md) !important;
  background: var(--cart-surface) !important;
  transition: transform var(--cart-transition), box-shadow var(--cart-transition), border-color var(--cart-transition);
}
.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--cart-shadow-md) !important;
  border-color: #cbd5e1 !important;
}

.cart-item-thumb {
  width: 86px;
  height: 86px;
  border-radius: var(--cart-radius-sm);
  background: var(--cart-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--cart-border);
  flex-shrink: 0;
}
.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform var(--cart-transition);
}
.cart-item:hover .cart-item-thumb img {
  transform: scale(1.06);
}

.cart-item-thumb-initial {
  font-size: 1.5rem;
  font-weight: 600;
  color: #475569;
}

.cart-item h3 {
  color: var(--cart-text-main);
  font-weight: 600;
  line-height: 1.3;
}
.cart-remove {
  color: #94a3b8 !important;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 8px;
  border-radius: 6px;
  font-size: 1.1rem;
}
.cart-remove:hover {
  color: var(--cart-danger) !important;
  background: var(--cart-danger-bg);
  transform: scale(1.1);
}

.cart-item-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: end;
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--cart-border);
}

@media (max-width: 768px) {
  .cart-item-meta {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 0.5rem;
  }
  .cart-item-meta > div:first-child {
    grid-column: span 2;
  }
}

.cart-qty-group {
  display: inline-flex;
  align-items: center;
  background: var(--cart-surface-alt);
  border: 1px solid var(--cart-border);
  border-radius: var(--cart-radius-pill);
  overflow: hidden;
  height: 38px;
}
.cart-qty-group button {
  background: transparent;
  border: none;
  width: 38px;
  color: var(--cart-text-main);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cart-qty-group button:hover:not(:disabled) {
  background: #e2e8f0;
}
.cart-qty-group input {
  width: 44px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--cart-text-main);
  padding: 0;
  appearance: textfield;
}
.cart-qty-group input:focus {
  outline: none;
}

.cart-item-meta .fw-semibold {
  font-size: 1.05rem;
  color: var(--cart-text-main);
}
.cart-item-meta div:last-child .fw-semibold {
  font-size: 1.15rem;
}

.cart-summary {
  background: var(--cart-surface) !important;
  border-radius: var(--cart-radius-lg) !important;
  border: 1px solid var(--cart-border) !important;
  box-shadow: var(--cart-shadow-floating) !important;
}

@media (min-width: 992px) {
  .cart-summary {
    position: sticky;
    /* top: 2rem; */
  }
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cart-text-main);
}
.summary-divider {
  height: 1px;
  background: var(--cart-border);
  margin: 1.25rem 0;
}
.summary-divider-bold {
  height: 2px;
  background: var(--cart-text-main);
  margin: 1.5rem 0;
  opacity: 0.08;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 1rem;
}
.summary-label {
  color: var(--cart-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.summary-amount {
  font-weight: 600;
  color: var(--cart-text-main);
}

.summary-total {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.summary-total .summary-amount {
  font-weight: 800;
  font-size: 1.5rem;
}

#cart-coupon-code {
  border-radius: var(--cart-radius-md) 0 0 var(--cart-radius-md);
  border: 1px solid var(--cart-border);
  font-size: 0.95rem;
}
#cart-coupon-code:focus {
  border-color: var(--cart-primary);
  box-shadow: 0 0 0 3px var(--cart-primary-glow);
}
#btn-apply-coupon {
  border-radius: 0 var(--cart-radius-md) var(--cart-radius-md) 0;
  border: 1px solid var(--cart-border);
  border-left: none;
  background: var(--cart-surface-alt);
  color: var(--cart-text-main);
  font-weight: 600;
  transition: background 0.2s ease;
}
#btn-apply-coupon:hover {
  background: #e2e8f0;
}

.summary-cta {
  background-color: var(--cart-primary) !important;
  color: white !important;
  border: none !important;
  border-radius: var(--cart-radius-pill) !important;
  padding: 1rem 1.5rem !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px;
  margin-top: 1.5rem;
  box-shadow: 0 4px 14px 0 var(--cart-primary-glow) !important;
  transition: all 0.3s ease !important;
}
.summary-cta:hover,
.summary-cta:not(.disabled):not(:disabled):hover {
  background-color: var(--cart-primary-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.5) !important;
}
.summary-cta:active {
  transform: translateY(0) !important;
}
.summary-cta.disabled {
  background-color: var(--cart-border) !important;
  box-shadow: none !important;
  color: var(--cart-text-muted) !important;
  pointer-events: none;
}

.summary-note {
  font-size: 0.85rem;
  color: var(--cart-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 1rem;
  line-height: 1.45;
}
.summary-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--cart-success);
  font-weight: 600;
  margin-top: 1.25rem;
}

.cart-back-link, .btn-clear-cart {
  font-weight: 500;
  color: var(--cart-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0.5rem 0.75rem;
  border-radius: var(--cart-radius-md);
}
.cart-back-link:hover {
  color: var(--cart-primary);
  background: var(--cart-surface-alt);
}
.btn-clear-cart:hover {
  color: var(--cart-danger);
  background: var(--cart-danger-bg);
}
.btn-clear-cart[disabled] {
  opacity: 0.5;
  pointer-events: none;
}
.cart-items-list .cart-empty {
  color: #6b7280;
}

/* Mis pedidos */
/* .orders-page {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #eef2ff 100%);
} */

.orders-hero,
.payments-hero {
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
}

.orders-hero {
  background: linear-gradient(262deg, #22387d, #14174d);
}

/* Íconos decorativos flotantes en el hero */
.orders-hero-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.orders-hero-pattern i {
  position: absolute;
  color: rgba(255, 255, 255, 0.06);
  font-size: 8rem;
  animation: ordersFloat 9s ease-in-out infinite;
}
.orders-hero-pattern i:nth-child(1) { top: -20px; right: 8%; animation-delay: 0s; }
.orders-hero-pattern i:nth-child(2) { bottom: -30px; right: 28%; font-size: 5rem; animation-delay: 2s; }
.orders-hero-pattern i:nth-child(3) { top: 20%; right: 42%; font-size: 4rem; animation-delay: 4s; }
@keyframes ordersFloat {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-10px) rotate(6deg); }
}

.payments-hero {
  background: linear-gradient(262deg, rgb(255 207 13), rgb(195 158 10));
}

.orders-hero .row,
.payments-hero .row {
  position: relative;
  z-index: 1;
}

.orders-hero-glow,
.payments-hero-glow {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  pointer-events: none;
}

.orders-hero-glow {
  background: radial-gradient(
      120% 90% at 0% 0%,
      rgba(255, 255, 255, 0.45),
      transparent 60%
    ),
    radial-gradient(
      80% 70% at 100% 0%,
      rgba(125, 211, 252, 0.5),
      transparent 55%
    );
}

.payments-hero-glow {
  background: radial-gradient(
      130% 95% at 0% 0%,
      rgba(255, 255, 255, 0.45),
      transparent 65%
    ),
    radial-gradient(
      95% 80% at 100% 0%,
      rgba(14, 165, 233, 0.6),
      transparent 55%
    );
}

.orders-hero-badge,
.payments-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
}

.orders-hero-title,
.payments-hero-title {
  font-weight: 700;
}

.orders-hero-text,
.payments-hero-text {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.orders-hero-action,
.payments-hero-action {
  font-weight: 600;
  border-radius: 999px;
  padding-inline: 1.75rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.payments-hero-stats {
  position: relative;
  z-index: 1;
}

.payments-hero-stat {
  background: rgb(66 56 56 / 15%);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.payments-hero-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  color: rgb(255, 255, 255);
  font-weight: 700;
}

.text-danger {
  --bs-text-opacity: 1;
  color: rgb(162 24 37) !important;
}

.payments-hero-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #000000;
}

.orders-feedback {
  margin-bottom: 1.5rem;
}

.orders-feedback .alert {
  border-radius: 18px;
  border: none;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.orders-card,
.payments-card {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.orders-table,
.payments-table {
  color: #1f2937;
}

.orders-table thead,
.payments-table thead {
  background: linear-gradient(
    90deg,
    rgba(248, 250, 252, 0.8),
    rgba(226, 232, 240, 0.8)
  );
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #475569;
}

.orders-table thead th,
.payments-table thead th {
  padding-block: 0.95rem;
  border-bottom: none;
}

.orders-table tbody tr,
.payments-table tbody tr {
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.orders-table-body .order-row {
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.orders-table-body .order-row:hover {
  background: rgba(79, 70, 229, 0.05);
}

.orders-table-body .order-row.active {
  background: rgba(79, 70, 229, 0.08);
  box-shadow: inset 0 0 0 999px rgba(79, 70, 229, 0.04);
}

.orders-table-body .order-detail-row {
  background: rgba(248, 250, 252, 0.8);
}

.orders-table-body .order-detail-row > td {
  padding: 0;
  border-top: none;
}

.orders-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #475569;
  font-weight: 500;
  padding: 1.25rem 0;
}

.payments-breakdown {
  position: relative;
}

.payments-breakdown-item {
  background: #ffffff;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.payments-breakdown-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.payments-breakdown-item.is-zero {
  opacity: 0.65;
}

.payments-breakdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.payments-breakdown-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
}

.payments-table tbody tr {
  transition: background-color 0.2s ease;
}

.payments-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.06);
}

.payments-table-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.payments-table-id-badge i {
  color: #1e293b;
}

.payments-table-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1f2937;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.payments-table-date i {
  color: #1d4ed8;
}

.payments-amount {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #0f172a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.payments-amount-total {
  background: rgba(79, 70, 229, 0.15);
  color: #1e1b4b;
}

.payments-amount.is-zero {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-weight: 500;
}

.payments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #475569;
}

.payments-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  color: #2563eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.payments-empty-icon i {
  font-size: 1.6rem;
}

.payments-empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.payments-empty-text {
  color: #64748b;
  max-width: 340px;
}

.order-meta-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.order-meta-subtext {
  font-size: 0.78rem;
  color: #64748b;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-info {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.status-progress {
  background: rgba(14, 165, 233, 0.12);
  color: #0f9bd7;
}

.status-warning {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.status-success {
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
}

.status-cancelled {
  background: rgba(248, 113, 113, 0.16);
  color: #b91c1c;
}

.order-detail-inner {
  padding: 1.75rem 2.5rem;
}

.order-detail-card {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.order-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1rem;
}

.order-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem 0.5rem;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  transition: all 0.2s ease;
  min-height: 85px;
}

.order-summary-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.order-summary-item.is-total {
  grid-column: span 2 !important;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #fff;
  border: none;
  padding: 1.25rem 1rem;
}

.order-summary-item.is-full-width {
  grid-column: span 2 !important;
}

.order-summary-item.is-total .order-summary-label {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.order-summary-item.is-total .order-summary-value {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
}

.order-summary-icon {
  font-size: 1.1rem;
  color: #6366f1;
  background: #f1f5f9;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50%;
  margin-bottom: 0.6rem;
  flex-shrink: 0;
  padding: 0 !important;
}

.order-summary-icon i {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.order-summary-item.is-total .order-summary-icon {
  display: none; /* Icono arriba no en total segun ej */
}

.order-summary-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.order-summary-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.order-timeline {
  position: relative;
  padding-top: 0.5rem;
}

.order-progress-track {
  position: relative;
  height: 4px;
  background: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.order-progress-bar {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.order-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.order-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  position: relative;
}

.order-progress-step i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 2px #e2e8f0;
  font-size: 1rem;
  color: #94a3b8;
  z-index: 1;
  margin-bottom: 0.2rem;
}

.order-progress-step.completed i {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(14, 165, 233, 0.2)
  );
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.4);
  color: #6366f1;
}

.order-progress-step.current i {
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.7),
    0 6px 20px rgba(37, 99, 235, 0.2);
  color: #2563eb;
}

.order-progress-step span {
  display: block;
  line-height: 1.2;
}

.order-timeline-status {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 0.75rem;
}

.order-timeline-cancelled {
  padding: 1.25rem;
  border-radius: 18px;
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
  font-weight: 600;
  text-align: center;
}

.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.order-items-card {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding-top: 1.5rem;
}

.order-items-card h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.order-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: all 0.2s ease;
}

.order-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
  background: #fdfdff;
}

.order-item-main {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-weight: 700;
  color: #1a1a2e;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-item-qty {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.order-item-price {
  text-align: right;
  flex-shrink: 0;
}

.order-item-unit {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.1rem;
}

.order-item-total {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.order-detail-loading,
.order-detail-error {
  padding: 1.5rem;
  text-align: center;
  color: #475569;
}

.order-detail-error {
  color: #b91c1c;
}

@media (max-width: 767.98px) {
  .order-detail-inner {
    padding: 1.5rem;
  }

  .orders-hero,
  .payments-hero {
    padding: 2.5rem 1.75rem;
  }

  .orders-hero-action,
  .payments-hero-action {
    width: 100%;
  }

  .order-progress-steps {
    gap: 0.5rem;
  }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-item-meta {
    text-align: left;
  }

  .payments-breakdown-item {
    padding: 0.9rem 1.1rem;
  }
}

/* ====== Stats strip (resumen de pedidos) ====== */
.orders-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  animation: ordersFadeIn 0.4s ease both;
}

.orders-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.orders-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.orders-stat-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #475569;
  background: #f1f5f9;
}
.orders-stat-icon.is-primary { background: rgba(37, 99, 235, 0.12);  color: #2563eb; }
.orders-stat-icon.is-warning { background: rgba(234, 179, 8, 0.15);  color: #b45309; }
.orders-stat-icon.is-success { background: rgba(16, 185, 129, 0.14); color: #047857; }
.orders-stat-icon.is-info    { background: rgba(14, 165, 233, 0.14); color: #0369a1; }

.orders-stat-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.orders-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.orders-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====== Skeleton loading (pulso) ====== */
.order-skeleton-row td {
  padding: 1.05rem 0.75rem;
  background: transparent;
}
.order-skeleton-bar {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 40%, #e2e8f0 80%);
  background-size: 200% 100%;
  animation: orderSkeleton 1.4s ease-in-out infinite;
}
.order-skeleton-bar.is-sm { width: 40%; }
.order-skeleton-bar.is-md { width: 65%; }
.order-skeleton-bar.is-lg { width: 85%; }
.order-skeleton-bar.is-pill { width: 80px; height: 22px; border-radius: 999px; }
@keyframes orderSkeleton {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ====== Empty state moderno ====== */
.orders-empty {
  padding: 3.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.orders-empty-icon {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #4f46e5;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.12));
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.orders-empty-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.orders-empty-text {
  color: #64748b;
  max-width: 380px;
  margin: 0;
  line-height: 1.5;
}
.orders-empty-cta {
  margin-top: 0.5rem;
  border-radius: 999px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  border: none;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.orders-empty-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.4);
}

/* ====== Refinamientos en filas ====== */
.orders-table-body .order-row {
  position: relative;
}
.orders-table-body .order-row > td:first-child {
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease;
}
.orders-table-body .order-row:hover > td:first-child {
  border-left-color: #6366f1;
}
.orders-table-body .order-row.active > td:first-child {
  border-left-color: #2563eb;
}

/* Entrada suave al renderizar */
@keyframes ordersFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.orders-table-body .order-row {
  animation: ordersFadeIn 0.35s ease both;
}
.orders-table-body .order-row:nth-child(2)  { animation-delay: 0.03s; }
.orders-table-body .order-row:nth-child(4)  { animation-delay: 0.06s; }
.orders-table-body .order-row:nth-child(6)  { animation-delay: 0.09s; }
.orders-table-body .order-row:nth-child(8)  { animation-delay: 0.12s; }
.orders-table-body .order-row:nth-child(10) { animation-delay: 0.15s; }

/* WhatsApp Float Premium */
.whatsapp-float {
  position: fixed;
  right: 1.5rem; /* Movido a la derecha por convención UI/UX */
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0.8rem;
  background-color: #25d366;
  color: #fff !important;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  z-index: 1040;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulsing effect when idle */
@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp-float:not(:hover) {
  animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
  transform: translateY(-4px);
  padding-right: 1.25rem;
  padding-left: 0.5rem; /* Ajuste para el ícono al expandir */
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float__icon {
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  font-size: 1.4rem; color: #fff;
}

.whatsapp-float__text {
  font-size: 0.95rem; font-weight: 700; font-family: 'Inter', sans-serif;
  line-height: 1; margin-left: 0; white-space: nowrap;
  max-width: 0; opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float:hover .whatsapp-float__text {
  max-width: 200px;
  margin-left: 6px;
  opacity: 1;
}

@media (max-width: 576px) {
  .whatsapp-float {
    right: 1rem; bottom: 1rem;
    padding: 0.75rem;
  }
}

/* Descuentos y Badges */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
    pointer-events: none;
    text-transform: uppercase;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-original {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
    text-decoration-color: #ef4444;
    font-weight: 500;
}

.price-final {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cart-primary);
}
