/* ==========================================================================
   LOS DOS HERMANOS MUEBLES - COMPONENTES ESPECÍFICOS & MODALES
   ========================================================================== */

/* --- TARJETAS DE PRODUCTO --- */
.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  border-color: var(--border-metallic);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #101014;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.card-badges {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-recent {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
}

.badge-promo-chair {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.badge-cash {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-cash);
  border: 1px solid rgba(52, 211, 153, 0.3);
  backdrop-filter: blur(6px);
}

.card-overlay-actions {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 2;
}

.product-card:hover .card-overlay-actions {
  opacity: 1;
  transform: translateY(0);
}

.btn-quick-view {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid var(--border-metallic);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-quick-view:hover {
  background: var(--text-primary);
  color: var(--text-dark);
}

.card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.3;
}

.card-title:hover {
  color: var(--metallic-accent);
}

.card-dimensions {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.card-pricing {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.pricing-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-sub {
  font-size: 0.8rem;
}

.cash-savings-tag {
  color: var(--color-cash);
  font-weight: 600;
  display: inline-block;
}

.cuotas-tag {
  color: var(--text-secondary);
}

.cuotas-tag strong {
  color: var(--color-cuotas);
}

.pricing-consult .consult-tag {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-add-cart {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background: var(--metallic-sheen);
  color: var(--text-dark);
  border-color: transparent;
}

.btn-consult-wa {
  flex: 1;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25d366;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-consult-wa:hover {
  background: #25d366;
  color: #ffffff;
}

.btn-icon-wa {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.25);
  color: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-icon-wa:hover {
  background: #25d366;
  color: #ffffff;
}

/* --- CARRITO LATERAL (DRAWER) --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h3 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-close-drawer {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.btn-close-drawer:hover {
  color: var(--text-primary);
}

/* Modo de pago dentro del carrito */
.cart-drawer-mode-select {
  padding: 0.85rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.cart-drawer-mode-select select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
}

.cart-empty-state svg {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item-img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #101014;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.cart-item-variant {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cart-item-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-cash-tag {
  font-size: 0.72rem;
  color: var(--color-cash);
}

.price-cuotas-tag {
  font-size: 0.72rem;
  color: var(--color-cuotas);
}

.chair-promo-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-qty {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: var(--transition);
}

.btn-qty:hover {
  background: rgba(255, 255, 255, 0.1);
}

.qty-number {
  min-width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-item:hover {
  color: var(--color-danger);
}

/* Calculadora de Envíos en Carrito */
.shipping-calc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.shipping-calc-box h5 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
}

.shipping-input-group {
  display: flex;
  gap: 0.5rem;
}

.shipping-input-group input {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.shipping-badge {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.shipping-badge.free {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--color-cash);
}

.shipping-badge.custom {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: var(--color-cuotas);
}

/* Footer del Carrito con Totales */
.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cart-summary-line.highlight {
  color: var(--color-cash);
  font-weight: 600;
}

.cart-total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 0.4rem;
}

.cart-cuotas-breakdown {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.cart-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-checkout-wa {
  background: #25d366;
  color: #ffffff;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-checkout-wa:hover {
  background: #20bd5a;
  transform: translateY(-2px);
}

.btn-checkout-mp {
  background: #009ee3;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-checkout-mp:hover {
  background: #0089c7;
}

/* --- MODAL DE FICHA DE PRODUCTO (DETALLE) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.product-modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-metallic);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.btn-close-modal {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 10;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background: var(--text-primary);
  color: var(--text-dark);
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 2.5rem;
  padding: 2.5rem;
}

.modal-main-image-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0d0d11;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-subtle);
}

.modal-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-image-tag {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.modal-thumbnails-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.modal-thumb-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: var(--transition);
}

.modal-thumb-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.modal-thumb-btn span {
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.modal-thumb-btn.active {
  border-color: var(--metallic-accent);
  box-shadow: var(--shadow-glow);
}

.taller-guarantee-note {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.82rem;
}

.taller-guarantee-note svg {
  color: var(--metallic-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Columna de detalles */
.modal-details-col {
  display: flex;
  flex-direction: column;
}

.modal-category {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.modal-title {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.modal-status-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.status-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.status-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-gray {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.modal-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Caja de Precio en Modal */
.modal-price-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.price-mode-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.btn-toggle-pricing-modal {
  background: transparent;
  border: 1px dashed var(--border-metallic);
  color: var(--text-primary);
  font-size: 0.74rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.modal-price-highlight {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-price-val {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-cuota-sub {
  font-size: 0.9rem;
  color: var(--color-cuotas);
}

/* Variantes en Modal */
.modal-variant-selector {
  margin-bottom: 1.5rem;
}

.variant-group-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.variant-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.variant-pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.variant-pill-btn span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.variant-pill-btn small {
  font-weight: 700;
}

.variant-pill-btn.active {
  border-color: var(--metallic-accent);
  background: var(--bg-surface-hover);
  box-shadow: var(--shadow-sm);
}

.modal-single-dim {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Especificaciones Técnicas */
.modal-specs-accordion {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.spec-item {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.spec-item p {
  color: var(--text-secondary);
}

/* Acciones en Modal */
.modal-qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* --- PANEL DE ADMINISTRACIÓN --- */
.admin-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-metallic);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.admin-login-card {
  max-width: 420px;
  margin: 3.5rem auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.admin-shield-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-metallic);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  color: var(--text-primary);
}

.admin-login-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.form-group {
  text-align: left;
  margin-top: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.admin-input, .admin-select, .admin-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  outline: none;
  border-color: var(--metallic-accent);
}

.admin-error-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-top: 1rem;
}

.admin-dashboard {
  display: flex;
  flex-direction: column;
  height: 85vh;
}

.admin-topbar {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-surface-elevated);
}

.admin-brand-status h4 {
  font-size: 1.15rem;
}

.badge-live {
  font-size: 0.74rem;
  color: var(--color-cash);
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-subtle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-subtle:hover {
  color: var(--text-primary);
}

.text-danger {
  color: var(--color-danger);
}

.admin-filter-bar {
  padding: 1rem 1.75rem;
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.admin-search-wrapper {
  flex: 1;
}

.admin-table-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.75rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-table th {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 5;
}

.admin-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.row-hidden {
  opacity: 0.45;
}

.td-thumb {
  width: 60px;
}

.admin-thumb-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.admin-dim-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-category-tag {
  background: var(--bg-surface-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
}

.td-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--metallic-accent);
}

/* Submodal de edición de producto */
.admin-submodal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-submodal-content {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-metallic);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.admin-submodal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn-close-submodal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-with-action {
  display: flex;
  gap: 0.5rem;
}

.admin-checkbox-group {
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.admin-submodal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* --- MODALES LEGALES (ARREPENTIMIENTO & DATA FISCAL) --- */
.legal-modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-metallic);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 2.25rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.legal-modal-dialog h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.legal-modal-dialog p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.data-fiscal-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.df-header {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: #0070ba;
  margin-bottom: 0.5rem;
}

.df-qr-placeholder {
  width: 150px;
  height: 150px;
  margin: 1rem auto;
  background: #f1f5f9;
  border: 2px dashed #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: #475569;
}

.df-data-list {
  text-align: left;
  font-size: 0.82rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
}

/* Responsividad en Componentes */
@media (max-width: 768px) {
  .product-modal-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .cart-drawer {
    max-width: 100%;
  }
}
