/* chancay.lat - Sistema de Diseño Marketplace de Gran Consumo */
:root {
  --bg-page: #f4f6f8;
  --bg-white: #ffffff;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  --primary-navy: #0f172a;
  --accent-orange: #ff5722;
  --accent-orange-hover: #f4511e;
  --accent-red: #e11d48;
  --accent-green: #059669;
  --accent-green-bg: #ecfdf5;
  --accent-yellow: #f59e0b;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', var(--font-sans);
  
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-drawer: -10px 0 30px rgba(0, 0, 0, 0.15);
  --radius-card: 10px;
  --radius-pill: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 1. Top Flash Banner */
.top-flash-banner {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.flash-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 1.6s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.flash-tag {
  background: #ff5722;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.banner-text {
  font-weight: 500;
  color: #cbd5e1;
}
.flash-countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.countdown-label {
  color: #94a3b8;
}
.timer-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-heading);
  color: #ffcc00;
  letter-spacing: 0.5px;
}

/* 2. Marketplace Header */
.marketplace-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Logo */
.logo-area {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.main-header-logo {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.main-header-logo:hover {
  transform: scale(1.02);
}

.footer-logo-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 8px;
}
.footer-brand-logo {
  height: 64px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 620px;
}
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  background: #f8fafc;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 11px 40px 11px 44px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.search-bar input:focus {
  background: #ffffff;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}
.search-clear-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.search-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.search-tags::-webkit-scrollbar { display: none; }
.tag-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.quick-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-tag:hover {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fdba74;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.guarantee-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 8px;
}
.chip-icon {
  font-size: 18px;
}
.chip-text strong {
  display: block;
  font-size: 11px;
  color: var(--text-primary);
}
.chip-text small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.cart-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cart-trigger-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.35);
}
.cart-icon-wrapper {
  position: relative;
  font-size: 18px;
}
.cart-badge-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #0f172a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  border: 2px solid #ff5722;
}
.cart-btn-labels {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.cart-btn-title {
  font-size: 12px;
  font-weight: 700;
}
.cart-btn-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
}

/* 3. Trust Ribbon */
.trust-ribbon {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
}
.ribbon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ribbon-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.r-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.ribbon-item strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.ribbon-item small {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}

/* 4. Categories Navigation */
.categories-nav {
  padding: 14px 0 6px;
}
.pills-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.brand-pill {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: all 0.15s ease;
}
.brand-pill:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}
.brand-pill.active {
  background: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

/* 5. Main Catalog Area */
.main-catalog {
  padding: 16px 0 60px;
}
.catalog-heading-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
}
.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.results-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* 6. Marketplace Grid (High Density) */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

/* Product Card - Estilo Temu / AliExpress */
.mp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.mp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

/* Imagen y Badges Flotantes con Escudo Protector */
.card-media {
  background: #ffffff;
  position: relative;
  width: 100%;
  padding-top: 100%; /* Cuadrado 1:1 */
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
  user-select: none;
  -webkit-user-select: none;
}
.card-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.3s ease;
  pointer-events: none; /* Imposibilita clic directo sobre la etiqueta img */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.mp-card:hover .card-media img {
  transform: scale(1.05);
}

/* Escudo protector transparente anti-clic derecho y anti-arrastre */
.card-media-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  background: transparent;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none; /* Previene menú contextual emergente en iOS/Android */
}

.float-discount-tag {
  display: none !important;
}
.float-brand-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6; /* Siempre visible por encima de la imagen y del escudo protector */
  pointer-events: none;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Contenido de la Ficha */
.card-details {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-category-sku {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  height: 35px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
}

/* Jerarquía de Precios Asiática */
.card-price-zone {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #f1f5f9;
}
.msrp-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}
.msrp-val {
  text-decoration: line-through;
  color: #94a3b8;
}
.discount-pill {
  background: linear-gradient(135deg, #e11d48 0%, #ff5722 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: -0.2px;
  margin-left: auto;
  line-height: 1.3;
}

.chancay-split-price {
  display: flex;
  align-items: baseline;
  margin: 2px 0;
  color: var(--accent-orange);
}
.cur-symbol {
  font-size: 13px;
  font-weight: 700;
  margin-right: 2px;
}
.big-int {
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}
.dec-cents {
  font-size: 15px;
  font-weight: 800;
  margin-left: 1px;
}

.savings-ribbon-tag {
  display: inline-block;
  background: var(--accent-green-bg);
  color: var(--accent-green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Indicadores de Social Proof / Demanda */
.card-social-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  color: #64748b;
}
.sales-count {
  color: #ea580c;
  font-weight: 600;
}
.sales-count.lote-abierto {
  color: #94a3b8;
  font-weight: 500;
}
.delivery-lead {
  color: #0d9488;
  font-weight: 500;
}

/* Botón de Acción */
.card-cta-btn {
  margin-top: 10px;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--text-primary);
  padding: 8px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.card-cta-btn:hover {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
}

/* 7. Drawer de Carrito */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.25s ease;
}
.cart-drawer-backdrop.open {
  visibility: visible;
  pointer-events: auto;
}
.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cart-drawer-backdrop.open .drawer-overlay {
  opacity: 1;
}
.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer-backdrop.open .drawer-content {
  transform: translateX(0);
}

.drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.d-title-group h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-navy);
}
.d-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}
.btn-close-drawer {
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--text-muted);
  cursor: pointer;
}

.drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.empty-notice {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 60px;
}

.drawer-item-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.d-item-thumb {
  width: 50px;
  height: 50px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
}
.d-item-info {
  flex: 1;
}
.d-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.d-item-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.d-item-chancay {
  color: var(--accent-orange);
  font-weight: 700;
  font-size: 13px;
}
.d-item-msrp {
  text-decoration: line-through;
  font-size: 11px;
  color: var(--text-muted);
}
.d-item-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.drawer-foot {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
}

.savings-highlight-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.savings-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.savings-row.bold-chancay {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}
.bold-chancay .price-val {
  color: var(--accent-orange);
  font-family: var(--font-heading);
  font-size: 22px;
}
.savings-badge-pill {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* Checkbox de Blindaje */
.leadtime-safeguard-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}
.safeguard-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.safeguard-checkbox-label input {
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent-orange);
}
.safeguard-text {
  font-size: 10px;
  color: #92400e;
  line-height: 1.4;
}

.btn-order-cta {
  width: 100%;
  background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}
.btn-order-cta:hover:not(:disabled) {
  background: linear-gradient(135deg, #f4511e 0%, #c2410c 100%);
  box-shadow: 0 6px 18px rgba(255, 87, 34, 0.45);
}
.btn-order-cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-cta-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

/* 8. Live Toast Notification */
.live-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--accent-orange);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99;
  max-width: 340px;
  animation: slideToastIn 0.3s ease;
}
@keyframes slideToastIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.toast-avatar {
  font-size: 22px;
}
.toast-body strong {
  display: block;
  font-size: 11px;
  color: var(--primary-navy);
}
.toast-body p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}
.toast-body small {
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 600;
}
.toast-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: auto;
}

/* 9. Footer */
.marketplace-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-content-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
}
.footer-brand-col p {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 12px 0;
  line-height: 1.5;
}
.footer-security {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.footer-links-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links-col ul {
  list-style: none;
}
.footer-links-col ul li {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.footer-copyright {
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  margin-top: 24px;
}

/* 10. Mobile Responsiveness (Double Column Grid) */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    gap: 10px;
  }
  .logo-area {
    order: 1;
  }
  .main-header-logo {
    height: 54px;
  }
  .header-right {
    order: 2;
  }
  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .ribbon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .footer-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .guarantee-chip {
    display: none;
  }
}

@media (max-width: 640px) {
  .top-flash-banner {
    font-size: 10px;
  }
  .banner-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  /* Grilla 2 columnas móvil estilo AliExpress/Temu */
  .marketplace-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card-media {
    padding-top: 90%;
  }
  .card-media img {
    padding: 10px;
  }
  .big-int {
    font-size: 22px;
  }
  .card-details {
    padding: 8px;
  }
  .card-title {
    font-size: 11px;
    height: 30px;
  }
  .card-social-proof {
    display: none;
  }
  .live-toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }
}

/* =========================================================
   12. HD Product Gallery Modal & Card Multi-Photo Elements
   ========================================================= */

/* Badge de cantidad de fotos en la tarjeta (Oculto según solicitud del usuario) */
.float-photos-badge {
  display: none !important;
}

/* Dots indicadores de fotos en la tarjeta */
.card-gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  z-index: 5;
}
.c-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.3);
  transition: all 0.2s ease;
}
.c-dot.active {
  width: 12px;
  border-radius: 3px;
  background: #ff5722;
}

/* Modal Gallery */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gallery-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
}
.gallery-modal-dialog {
  position: relative;
  z-index: 10000;
  background: #ffffff;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: modalZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.gallery-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 22px;
  line-height: 1;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.gallery-modal-close:hover {
  background: #ff5722;
  color: #ffffff;
  border-color: #ff5722;
  transform: rotate(90deg);
}

.gallery-modal-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow-y: auto;
  max-height: 90vh;
}

/* Visor de Fotos */
.gallery-viewer {
  background: #f8fafc;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid #e2e8f0;
}
.gallery-main-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 280px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main-stage img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease;
}
.gallery-nav-btn:hover {
  background: #ff5722;
  color: #ffffff;
  border-color: #ff5722;
}
.gallery-nav-btn.prev-btn { left: 12px; }
.gallery-nav-btn.next-btn { right: 12px; }

.gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 6;
}

/* Fila de Miniaturas */
.gallery-thumbs-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
}
.gallery-thumb-item {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}
.gallery-thumb-item:hover {
  border-color: #fdba74;
}
.gallery-thumb-item.active {
  border-color: #ff5722;
  box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.25);
}
.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Panel de Información Lateral en Modal */
.gallery-info-panel {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}
.g-brand-badge {
  display: inline-block;
  align-self: flex-start;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.g-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}
.g-sku-code {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.g-pricing-box {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 14px 16px;
  border-radius: 10px;
}
.g-msrp-row {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.g-msrp-val {
  text-decoration: line-through;
  font-weight: 600;
}
.g-chancay-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}
.g-cur {
  font-size: 16px;
  font-weight: 800;
  color: #ea580c;
}
.g-big-int {
  font-size: 32px;
  font-weight: 900;
  color: #ea580c;
  line-height: 1;
}
.g-cents {
  font-size: 18px;
  font-weight: 800;
  color: #ea580c;
}
.g-savings-pill {
  margin-left: auto;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
}

/* ─── Reto de Transparencia: Comparar en Google ─── */
.g-google-compare-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #fed7aa;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.g-google-compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #fdba74;
  border-radius: 8px;
  padding: 8px 14px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}
.g-google-compare-btn:hover {
  background: #fffaf5;
  border-color: #ea580c;
  color: #ea580c;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.16);
  transform: translateY(-1px);
}
.g-external-icon {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 800;
  transition: transform 0.2s ease, color 0.2s ease;
}
.g-google-compare-btn:hover .g-external-icon {
  color: #ea580c;
  transform: translate(2px, -2px);
}
.g-google-compare-sub {
  font-size: 10.5px;
  color: #78716c;
  text-align: center;
  line-height: 1.35;
}

.g-perks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.g-perk-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.g-perk-icon {
  font-size: 22px;
}
.g-perk-item strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}
.g-perk-item small {
  display: block;
  font-size: 11px;
  color: #64748b;
}

/* ─── Sección Ficha Técnica y Contenido del Paquete ─── */
.g-specs-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.g-section-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}
.g-section-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.g-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.g-sec-icon {
  font-size: 16px;
  line-height: 1;
}
.g-section-header h4 {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
/* Chips de ¿Qué incluye? */
.g-includes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.g-include-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  line-height: 1.3;
}
.g-include-chip svg {
  flex-shrink: 0;
}
/* Tabla de Especificaciones Técnicas */
.g-specs-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}
.g-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}
.g-specs-table tr:nth-child(even) {
  background: #f8fafc;
}
.g-specs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.35;
}
.g-spec-key {
  font-weight: 600;
  color: #475569;
  width: 48%;
  border-right: 1px solid #f1f5f9;
}
.g-spec-val {
  font-weight: 700;
  color: #0f172a;
}
/* Características Destacadas */
.g-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.g-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}
.g-feature-bullet {
  color: #ea580c;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.g-actions-bar {
  margin-top: auto;
  padding-top: 8px;
}
.g-add-cart-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.35);
  transition: all 0.15s ease;
}
.g-add-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.45);
}

@media (max-width: 768px) {
  .gallery-modal-content {
    grid-template-columns: 1fr;
  }
  .gallery-viewer {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px;
  }
  .gallery-info-panel {
    padding: 20px 16px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   NUEVO: ESTILOS DE CHECKOUT TRANSACCIONAL Y RASTREO DE PEDIDOS
   ───────────────────────────────────────────────────────────────────────────── */

/* Botón de Rastrear Pedidos en Header */
.tracking-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s ease;
}
.tracking-nav-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.tracking-icon {
  font-size: 18px;
}
.tracking-btn-labels {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.tracking-btn-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-navy);
}
.tracking-btn-sub {
  font-size: 10px;
  color: #64748b;
}

/* Pasos del Drawer */
.drawer-step-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.btn-back-step {
  background: none;
  border: none;
  color: var(--accent-orange);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.btn-back-step:hover {
  background: #fff7ed;
}

/* Formularios de Checkout */
.checkout-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chk-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chk-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-navy);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.chk-hint {
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
}
.chk-sublabel {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}
.chk-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.chk-input-wrap input {
  width: 100%;
}
.chk-spinner {
  position: absolute;
  right: 12px;
  font-size: 14px;
  animation: spin 1s infinite linear;
}
.chk-spinner-circle {
  position: absolute;
  right: 12px;
  width: 15px;
  height: 15px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--accent-orange, #ff5722);
  border-radius: 50%;
  animation: spin 0.75s infinite linear;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cart-icon-wrapper svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: block;
}

.ribbon-item .r-icon svg {
  width: 22px;
  height: 22px;
  stroke: #0284c7;
  display: block;
}

.deliv-card .d-icon svg {
  width: 20px;
  height: 20px;
  stroke: #475569;
  display: inline-block;
  vertical-align: middle;
}
.deliv-card.active .d-icon svg {
  stroke: var(--accent-orange);
}

.branch-icon svg,
.w-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-orange);
  display: block;
}

.success-icon-badge svg {
  width: 32px;
  height: 32px;
  display: block;
}

.btn-icon-svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}


.checkout-scroll input[type="text"],
.checkout-scroll input[type="tel"],
.checkout-scroll input[type="email"],
.chk-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.checkout-scroll input:focus,
.chk-select:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.chk-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Banner de Autofill */
.autofill-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 6px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Píldoras de Comprobante (Boleta vs Factura) */
.chk-invoice-toggle {
  display: flex;
  gap: 8px;
}
.toggle-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  transition: all 0.15s ease;
}
.toggle-pill input {
  margin-right: 6px;
  accent-color: var(--accent-orange);
}
.toggle-pill:has(input:checked) {
  background: #fff7ed;
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Selector de Modalidad de Despacho */
.chk-delivery-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.deliv-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.deliv-card:hover {
  border-color: #94a3b8;
}
.deliv-card.active {
  background: #fff7ed;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 1px var(--accent-orange);
}
.deliv-card * {
  pointer-events: none;
}
.deliv-card .d-icon {
  font-size: 18px;
  display: block;
  margin-bottom: 2px;
}
.deliv-card strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: var(--primary-navy);
  line-height: 1.2;
}
.deliv-card small {
  display: block;
  font-size: 9.5px;
  color: #64748b;
  margin-top: 2px;
}

.chk-address-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

/* Explicación concisa y clara de modalidad de despacho */
.chk-deliv-expl {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid var(--accent-orange);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 11.5px;
  color: #334155;
  line-height: 1.45;
  animation: fadeInExpl 0.2s ease-in-out;
}
@keyframes fadeInExpl {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
.chk-deliv-expl strong {
  color: #0f172a;
}
.chk-deliv-expl .expl-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #d97706;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.chk-deliv-expl p {
  margin: 0;
}

/* Grilla de 3 selectores en cascada (Depto, Prov, Dist) */
.chk-inline-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
}
@media (min-width: 520px) {
  .chk-inline-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Ficha de agencia seleccionada */
.chk-branch-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 3.5px solid #2563eb;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 11px;
}
.chk-branch-card .branch-icon {
  font-size: 16px;
  line-height: 1;
}
.chk-branch-card strong {
  display: block;
  color: #0f172a;
  font-size: 11.5px;
  margin-bottom: 2px;
}
.chk-branch-card .branch-address {
  color: #334155;
}
.chk-branch-card .branch-ref {
  color: #64748b;
  font-style: italic;
  margin-top: 2px;
}

/* Tarjeta de Retiro en Almacén */
.chk-warehouse-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
}
.chk-warehouse-card .w-icon {
  font-size: 24px;
}
.chk-warehouse-card strong {
  display: block;
  color: #166534;
  font-size: 12.5px;
}
.chk-warehouse-card p {
  margin: 3px 0;
  font-size: 11.5px;
  color: #374151;
}

/* Pasarela Oficial Mercado Pago */
.chk-payment-mp-box {
  background: #f0f9ff;
  border: 1.5px solid #009ee3;
  border-radius: 10px;
  padding: 12px;
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(0, 158, 227, 0.08);
}
.mp-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.mp-logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-logo-badge strong {
  display: block;
  font-size: 13px;
  color: #0369a1;
  font-weight: 800;
}
.mp-logo-badge .mp-sub {
  display: block;
  font-size: 10.5px;
  color: #0284c7;
}
.mp-check-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #bae6fd;
}
.mp-methods-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.mp-badge-method {
  font-size: 10.5px;
  font-weight: 700;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.mp-safe-text {
  margin: 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

.btn-order-cta.mp-cta {
  background: #009ee3;
  border-color: #0087c2;
}
.btn-order-cta.mp-cta:hover {
  background: #0087c2;
  box-shadow: 0 4px 14px rgba(0, 158, 227, 0.35);
}

/* Tarjeta de Resumen en Footer Checkout */
.checkout-breakdown-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.chk-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.chk-row.chk-row-total {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-navy);
  border-top: 1px dashed #e2e8f0;
  padding-top: 6px;
  margin-top: 6px;
}
.chk-row-total strong {
  color: var(--accent-orange);
  font-family: var(--font-heading);
  font-size: 18px;
}
.chk-savings-badge {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  margin-top: 6px;
}

/* Pantalla de Éxito / Confirmación */
.success-scroll {
  padding: 24px 20px;
}
.success-box {
  text-align: center;
}
.success-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #dcfce7;
  border-radius: 50%;
  font-size: 28px;
  margin-bottom: 12px;
}
.success-box h4 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 6px;
}
.success-box p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 16px;
}

.order-code-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}
.occ-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.occ-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: 1px;
  color: #ff5722;
  margin-bottom: 10px;
}
.occ-copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.occ-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.success-instructions-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 18px;
}
.success-instructions-card h5 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 8px;
}
.success-instructions-card ol {
  padding-left: 18px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}

.success-ctas-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wa-cta {
  background: #25d366 !important;
  color: #ffffff !important;
}
.wa-cta:hover {
  background: #20ba5a !important;
}
.btn-secondary-link {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--primary-navy);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-secondary-link:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Mercado Pago Checkout Bricks Integration */
.mp-brick-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 6px;
  min-height: 240px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  position: relative;
}

.brick-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 16px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.brick-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: brickSpin 0.8s linear infinite;
}

@keyframes brickSpin {
  to { transform: rotate(360deg); }
}

/* Ficha de Detalles de Pago Exitoso */
.success-payment-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #334155;
}

.spc-row strong {
  font-size: 13px;
  color: #0f172a;
}

.spc-badge-approved {
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
}

.spc-badge-pending {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #fde68a;
}

/* ────────────────────────────────────────────────────────────
   MODAL FLOTANTE DE PAGO: MERCADO PAGO BRICKS
   ──────────────────────────────────────────────────────────── */
.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.payment-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: pmFadeIn 0.2s ease-out;
}

@keyframes pmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.payment-modal-dialog {
  position: relative;
  z-index: 2501;
  background: #f5f6f9;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  animation: pmZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes pmZoomIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Cabecera Oficial Mercado Pago */
.mp-modal-topbar {
  background: #ffffff;
  padding: 16px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-official-logo {
  height: 28px;
  width: auto;
  display: block;
}

.mp-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-secure-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #009ee3;
  background: rgba(0, 158, 227, 0.08);
  padding: 3px 9px;
  border-radius: 999px;
}

.mp-modal-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  font-size: 19px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-left: 4px;
}

.mp-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Badge de Comercio / Tienda */
.mp-store-row {
  background: #ffffff;
  padding: 0 20px 12px;
  display: flex;
  justify-content: center;
}

.mp-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 999px;
}

.mp-store-badge-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #7c3aed;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-store-name {
  font-size: 12px;
  font-weight: 700;
  color: #6d28d9;
}

/* Resumen de Pedido: Producto | S/ 0.00 */
.mp-order-summary-row {
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-summary-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.mp-summary-amount {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

/* Cuerpo del Modal: ¿Cómo quieres pagar? */
.mp-modal-body {
  background: #f5f6f9;
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  max-height: calc(92vh - 165px);
}

.mp-body-title {
  margin: 0 0 14px 0;
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.3px;
}

/* Estilización Nativa del Contenedor de Bricks */
.mp-bricks-styled-container {
  min-height: 220px;
}

#paymentBrick_container .mercadopago-brick,
#paymentBrick_container [class*="payment-method-selector"] {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

#paymentBrick_container [class*="card"],
#paymentBrick_container [class*="accordion-item"] {
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
}

#paymentBrick_container h1, 
#paymentBrick_container h2,
#paymentBrick_container [class*="form-title"],
#paymentBrick_container [class*="title-container"] {
  display: none !important;
}

#paymentBrick_container button[type="submit"],
#paymentBrick_container [class*="submit-button"] {
  background: #009ee3 !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 158, 227, 0.3) !important;
  transition: all 0.2s ease !important;
}

#paymentBrick_container button[type="submit"]:hover,
#paymentBrick_container [class*="submit-button"]:hover {
  background: #0081bb !important;
}

/* Footer de Confianza Oficial */
.mp-modal-trust {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mp-trust-inner {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

.mp-trust-inner strong {
  color: #009ee3;
}

/* Vista previa de Pasarela en el Drawer */
.chk-payment-mp-preview {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.mp-prev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mp-prev-shield {
  font-size: 1.3rem;
}

.mp-prev-info strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.mp-prev-info span {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.mp-prev-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #bae6fd;
}

.mp-prev-desc {
  margin: 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

/* Estado del botón Ir a Pagar */
.btn-pay-disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: #94a3b8 !important;
  border-color: #64748b !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-pay-ready {
  background: #009ee3 !important;
  border-color: #0087c2 !important;
  box-shadow: 0 4px 14px rgba(0, 158, 227, 0.4) !important;
  animation: pulseReady 2s infinite ease-in-out;
  cursor: pointer !important;
}

@keyframes pulseReady {
  0%, 100% { box-shadow: 0 4px 14px rgba(0, 158, 227, 0.4); }
  50% { box-shadow: 0 4px 22px rgba(0, 158, 227, 0.65); }
}

/* ==========================================================================
   VISTA YAPE DIRECTA (COMPONENTE OFICIAL IDÉNTICO A LA FOTO REFERENCIAL)
   ========================================================================== */
.mp-method-tabs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.mp-tab-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  position: relative;
}

.mp-tab-pill input[type="radio"] {
  display: none;
}

.mp-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mp-tab-pill.active {
  border-color: #009ee3;
  background: #ffffff;
  box-shadow: 0 0 0 1px #009ee3;
}

.mp-tab-pill.active .mp-radio-dot {
  border-color: #009ee3;
  background: #009ee3;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.mp-tab-label-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.mp-yape-circle-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.mp-yape-badge-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: block;
}

.mp-cards-icons-row {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Tarjeta Formulario Yape Directo con Puntero Superior */
.mp-yape-direct-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.mp-yape-arrow-pointer {
  position: absolute;
  top: -7px;
  left: 36px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
  transform: rotate(45deg);
}

.mp-yape-title-block {
  margin-bottom: 18px;
}

.mp-yape-h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.2px;
  text-transform: uppercase;
}

.mp-yape-p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.mp-yape-form-group {
  margin-bottom: 16px;
}

.mp-yape-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 7px;
}

.mp-yape-input-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 14px;
  transition: all 0.15s ease;
}

.mp-yape-input-box:focus-within {
  border-color: #009ee3;
  box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.15);
}

.mp-yape-control {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

.mp-yape-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Grilla de 6 casillas cuadradas para el OTP */
.mp-otp-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.mp-otp-header-row .mp-yape-label {
  margin-bottom: 0;
}

.mp-otp-info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #009ee3;
  background: transparent;
  color: #009ee3;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}

.mp-otp-info-btn:hover {
  background: #009ee3;
  color: #ffffff;
}

.mp-otp-boxes-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.yape-otp-digit {
  width: 100%;
  height: 52px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
  padding: 0;
}

.yape-otp-digit:focus {
  border-color: #009ee3;
  box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.15);
  background: #f0f9ff;
}

.yape-otp-digit.filled {
  border-color: #742284;
  color: #742284;
}

.mp-otp-guide {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 11.5px;
  color: #334155;
  line-height: 1.45;
}

/* Alerta informativa idéntica a la imagen referencial */
.mp-yape-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  border-left: 3.5px solid #009ee3;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 18px 0;
}

.mp-alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.mp-alert-text {
  margin: 0;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  font-weight: 500;
}

/* Footer Oficial: Procesado por Mercado Pago */
.mp-yape-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.mp-yape-powered strong {
  color: #009ee3;
}

/* Términos y Condiciones */
.mp-yape-terms {
  text-align: center;
  font-size: 10.5px;
  color: #64748b;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.mp-yape-terms a {
  color: #009ee3;
  text-decoration: none;
  font-weight: 700;
}

.mp-yape-terms a:hover {
  text-decoration: underline;
}

/* Mensaje de Error */
.mp-yape-error-msg {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

/* Botón de Pago Principal Yape */
.btn-yape-action {
  width: 100%;
  background: #742284;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(116, 34, 132, 0.35);
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-yape-action:hover:not(:disabled) {
  background: #60186d;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(116, 34, 132, 0.45);
}

.btn-yape-action:active:not(:disabled) {
  transform: translateY(0);
}

.btn-yape-action:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-yape-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: brickSpin 0.7s linear infinite;
  display: inline-block;
}

@media (max-width: 540px) {
  .payment-modal {
    padding: 0;
    align-items: flex-end;
  }
  .payment-modal-dialog {
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }
  .mp-yape-direct-card {
    padding: 16px 14px;
  }
  .yape-otp-digit {
    height: 46px;
    font-size: 18px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   SKELETON CARDS & LAZY LOAD PROGRESSIVO INTELIGENTE
   ══════════════════════════════════════════════════════════════════════ */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: relative;
}

.skeleton-media {
  width: 100%;
  padding-top: 100%;
  position: relative;
  background: #f8fafc;
}

.skeleton-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-details {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-line.short { width: 45%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.title { height: 16px; width: 90%; }
.skeleton-line.price { height: 26px; width: 60%; margin: 6px 0; }
.skeleton-line.button { height: 38px; width: 100%; border-radius: 8px; }

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Sentinel y Loader de Scroll Infinito */
.catalog-sentinel {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 15px 48px;
  min-height: 80px;
}

.catalog-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.catalog-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--primary, #0f172a);
  border-radius: 50%;
  animation: catalogSpinner 0.75s linear infinite;
  display: inline-block;
}

@keyframes catalogSpinner {
  to { transform: rotate(360deg); }
}

.catalog-end-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

/* ═════════════════════════════════════════════════════════════════════════════
   MODO MATRIX: PANEL DE EDICIÓN EN VIVO Y MODAL DE AUTENTICACIÓN
   ═════════════════════════════════════════════════════════════════════════════ */

.g-matrix-panel {
  background: #090d16;
  border: 1.5px solid #10b981;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2), inset 0 0 15px rgba(16, 185, 129, 0.05);
  animation: matrixGlow 0.3s ease;
}

@keyframes matrixGlow {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.g-matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  padding-bottom: 8px;
}

.g-matrix-tag {
  color: #10b981;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.g-matrix-exit-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.g-matrix-exit-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.g-matrix-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-matrix-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.g-matrix-admin-link:hover {
  background: #10b981;
  color: #032014;
  border-color: #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}

.g-matrix-ext-icon {
  font-size: 10px;
  opacity: 0.85;
}

.g-matrix-gallery-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  transition: all 0.2s ease;
}

.g-matrix-gallery-admin-link:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.g-matrix-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g-matrix-cost-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
}

.g-matrix-cost-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.m-val-cost {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  font-family: monospace;
}

.m-val-margin {
  font-size: 14px;
  font-weight: 800;
  color: #10b981;
  font-family: monospace;
}

.g-matrix-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.g-matrix-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.g-matrix-field label {
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.g-matrix-input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 7px 10px;
  color: #f8fafc;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
  width: 100%;
}

.g-matrix-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  background: #1e293b;
}

.g-matrix-tabs {
  display: flex;
  gap: 6px;
  background: #06090e;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 10px;
}

.g-matrix-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.g-matrix-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.g-matrix-tab.active {
  background: #10b981;
  color: #06090e;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.g-matrix-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-subtext {
  font-size: 10px;
  color: #64748b;
  line-height: 1.3;
}

/* Gestor de Galería de Fotos en Matrix */
.g-matrix-gallery-manager {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-gallery-help-text {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

.m-gallery-help-text strong {
  color: #38bdf8;
}

.matrix-gallery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px;
  min-height: 125px;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}

.matrix-gallery-strip::-webkit-scrollbar {
  height: 5px;
}

.matrix-gallery-strip::-webkit-scrollbar-track {
  background: #0f172a;
}

.matrix-gallery-strip::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.matrix-photo-card {
  background: #090d16;
  border: 1.5px solid #334155;
  border-radius: 8px;
  padding: 6px;
  width: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: all 0.15s ease;
}

.matrix-photo-card.is-main {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.05);
}

.m-photo-thumb-wrap {
  width: 82px;
  height: 82px;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.m-photo-thumb-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.m-photo-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  border-radius: 3px;
  padding: 1px 2px;
  letter-spacing: 0.3px;
}

.matrix-photo-card.is-main .m-photo-badge {
  background: #f59e0b;
  color: #090d16;
  font-weight: 900;
}

.m-photo-actions {
  display: flex;
  gap: 3px;
  width: 100%;
  justify-content: center;
}

.m-photo-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #cbd5e1;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 9.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-photo-btn:hover {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #090d16;
}

.m-photo-btn.m-btn-main:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #090d16;
}

.m-photo-btn.m-btn-del:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.m-photo-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.m-photo-mode-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.8);
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #1e293b;
}

.m-mode-radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
}

.m-mode-radio input[type="radio"] {
  accent-color: #10b981;
  cursor: pointer;
}

/* Toggle Switch de Visibilidad */
.g-matrix-toggle-row {
  background: rgba(16, 185, 129, 0.05);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
}

.g-matrix-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.g-matrix-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.g-matrix-toggle-custom {
  width: 36px;
  height: 20px;
  background: #334155;
  border-radius: 20px;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.g-matrix-toggle-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.g-matrix-checkbox:checked + .g-matrix-toggle-custom {
  background: #10b981;
}

.g-matrix-checkbox:checked + .g-matrix-toggle-custom::after {
  transform: translateX(16px);
}

.g-matrix-toggle-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
}

/* Títulos de sección dentro de Matrix */
.g-matrix-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.m-add-row-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #10b981;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.m-add-row-btn:hover {
  background: #10b981;
  color: #06090e;
}

/* Tabla de Edición de Especificaciones */
.m-specs-table-container {
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid #1e293b;
  border-radius: 6px;
  background: #06090e;
}

.m-specs-edit-table {
  width: 100%;
  border-collapse: collapse;
}

.m-specs-edit-table th {
  background: #0f172a;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #1e293b;
}

.m-specs-edit-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #0f172a;
}

.m-spec-key-input, .m-spec-val-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 5px 8px;
  color: #f1f5f9;
  font-size: 11px;
  outline: none;
  transition: border-color 0.15s;
}

.m-spec-key-input:focus, .m-spec-val-input:focus {
  border-color: #38bdf8;
  background: #1e293b;
}

.m-del-row-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-del-row-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Textareas para contenido */
.g-matrix-textarea {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 7px 10px;
  color: #f8fafc;
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: all 0.15s ease;
  width: 100%;
  line-height: 1.4;
}

.g-matrix-textarea:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  background: #1e293b;
}

/* Caja de ADN de Producto */
.g-matrix-adn-box {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.g-adn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.g-adn-label {
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.g-adn-val {
  color: #38bdf8;
  font-family: monospace;
  font-weight: 700;
  word-break: break-all;
  text-align: right;
}

.g-adn-copy-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.g-adn-copy-btn:hover {
  background: #38bdf8;
  color: #06090e;
}

/* Grid del Radar de Espionaje en Tiendas Perú */
.m-spy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.m-spy-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 7px 10px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.m-spy-btn:hover {
  border-color: #38bdf8;
  background: #1e293b;
  transform: translateY(-1px);
  color: #ffffff;
}

.m-spy-arrow {
  margin-left: auto;
  font-size: 12px;
  color: #64748b;
  transition: transform 0.15s ease;
}

.m-spy-btn:hover .m-spy-arrow {
  transform: translate(2px, -2px);
  color: #38bdf8;
}

.m-spy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.m-spy-dot.sodimac { background: #ea580c; }
.m-spy-dot.promart { background: #0284c7; }
.m-spy-dot.meli    { background: #eab308; }
.m-spy-dot.falabella { background: #10b981; }
.m-spy-dot.google  { background: #ef4444; }
.m-spy-dot.official { background: #a855f7; }

.g-matrix-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.g-matrix-save-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.g-matrix-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.g-matrix-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.g-matrix-status {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-height: 16px;
}

/* Modal de Autenticación de PIN */
.matrix-auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-auth-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
}

.matrix-auth-dialog {
  position: relative;
  z-index: 2;
  background: #090d16;
  border: 1.5px solid #10b981;
  border-radius: 14px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.3);
  overflow: hidden;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.matrix-auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.matrix-auth-glitch {
  color: #10b981;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
}

.matrix-auth-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.matrix-auth-close:hover {
  color: #f8fafc;
}

.matrix-auth-body {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.matrix-auth-desc {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.matrix-auth-input-wrap {
  display: flex;
  gap: 8px;
}

.matrix-auth-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 2px;
  outline: none;
  font-family: monospace;
}

.matrix-auth-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.matrix-auth-btn {
  background: #10b981;
  color: #090d16;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.matrix-auth-btn:hover {
  background: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.matrix-auth-error {
  color: #f87171;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
}


