@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap');

/* ============================================
   VARIABLES DE COLOR - Paleta Alta Costura
   ============================================ */
:root {
  /* Colores principales - Paleta elegante */
  --primary-purple: #61564A;
  --primary-purple-dark: #4A433A;
  --primary-purple-darker: #3A342C;
  --primary-cyan: #A59B8F;
  --primary-teal: #8A8174;
  
  /* Colores complementarios */
  --purple-light: #8A8174;
  --purple-ultra-light: #F5F3F1;
  --cyan-light: #B5ABA0;
  --teal-light: #9D9387;
  
  /* Fondos y neutros */
  --bg-primary: #E4DFD7;
  --bg-secondary: #F5F3F1;
  --bg-light-purple: #FAF9F7;
  --bg-gradient: linear-gradient(135deg, #61564A 0%, #A59B8F 100%);
  --bg-gradient-soft: linear-gradient(135deg, rgba(97, 86, 74, 0.05) 0%, rgba(165, 155, 143, 0.05) 100%);
  
  /* Texto */
  --text-primary: #181716;
  --text-secondary: #61564A;
  --text-light: #8A8174;
  --text-white: #E4DFD7;
  
  /* Estados */
  --success-color: #61564A;
  --danger-color: #8A6B5F;
  --warning-color: #A59B8F;
  
  /* Sombras suaves */
  --shadow-xs: 0 1px 2px rgba(24, 23, 22, 0.05);
  --shadow-sm: 0 1px 3px rgba(24, 23, 22, 0.08);
  --shadow-md: 0 4px 6px rgba(24, 23, 22, 0.07);
  --shadow-lg: 0 10px 15px rgba(24, 23, 22, 0.08);
  --shadow-xl: 0 20px 25px rgba(24, 23, 22, 0.1);
  
  /* Bordes */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  
  /* Layout */
  --navbar-height: 70px;
  --sidebar-width: 280px;
  --carrito-width: 400px;
  --max-width: 1400px;
}

/* ============================================
   ESTILOS GENERALES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  touch-action: manipulation;
}

/* ============================================
   NAVBAR MEJORADO - MÃS LIMPIO
   ============================================ */
.navbar {
  background: var(--bg-primary) !important;
  box-shadow: var(--shadow-sm);
  padding: 0;
  min-height: var(--navbar-height);
  z-index: 1000;
  border-bottom: 1px solid #E5E7EB;
}

.navbar .container-fluid {
  max-width: var(--max-width);
  margin: 0 auto;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-purple) !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Logo del navbar - SIEMPRE VISIBLE */
.navbar-logo {
  height: 40px;
  width: auto;
  transition: all 0.3s ease;
}

.navbar-brand i {
  color: var(--primary-cyan);
  font-size: 1.75rem;
}

/* BotÃ³n hamburguesa mejorado */
#hamburger-btn {
  color: var(--text-primary) !important;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

#hamburger-btn:hover {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

/* BÃºsqueda central mejorada */
.search-container {
  max-width: 500px;
  width: 100%;
  position: relative;
}

.search-container .input-group {
  background: var(--bg-secondary);
  border: 2px solid #E5E7EB;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-container .input-group:focus-within {
  border-color: var(--primary-purple);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-container .input-group-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
}

.search-container .form-control {
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.search-container .form-control:focus {
  box-shadow: none;
  background: transparent;
}

.search-container .form-control::placeholder {
  color: var(--text-light);
}

/* BotÃ³n carrito mejorado */
.btn-carrito {
  background: var(--primary-purple);
  border: none;
  color: white;
  padding: 0.65rem 1.5rem;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-carrito:hover {
  background: var(--primary-purple-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#cart-badge {
  font-size: 0.7rem;
  padding: 0.3rem 0.5rem;
  background: var(--danger-color) !important;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

/* BÃºsqueda mÃ³vil */
.mobile-search-bar {
  background: var(--bg-primary);
  border-top: 1px solid #E5E7EB;
}

.mobile-search-bar .input-group {
  background: var(--bg-secondary);
  border: 2px solid #E5E7EB;
  border-radius: var(--border-radius-lg);
}

.mobile-search-bar .input-group:focus-within {
  border-color: var(--primary-purple);
  background: var(--bg-primary);
}

.mobile-search-bar .input-group-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
}

.mobile-search-bar .form-control {
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
}

.mobile-search-bar .form-control:focus {
  box-shadow: none;
  background: transparent;
}

/* BotÃ³n de bÃºsqueda mÃ³vil - SIEMPRE VISIBLE en mÃ³vil */
#mobile-search-btn {
  color: var(--text-primary) !important;
  font-size: 1.25rem;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

#mobile-search-btn:hover {
  color: var(--primary-purple) !important;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.mobile-search-bar .input-group {
  background: var(--bg-secondary);
  border: 2px solid #E5E7EB;
  border-radius: var(--border-radius-lg);
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.main-layout {
  display: flex;
  min-height: calc(100vh - var(--navbar-height) - 100px);
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================
   SIDEBAR FILTROS - SIMPLIFICADO
   ============================================ */
.sidebar-filters {
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid #E5E7EB;
  padding: 1.5rem;
  overflow-y: auto;
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  transition: transform 0.3s ease;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 1.5rem;
}

.filters-header h5 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.filter-section {
  margin-bottom: 2rem;
}

.filter-title {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
}

.category-item:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-purple);
  transform: translateX(3px);
}

.category-item.active {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  color: white;
}

.category-item i {
  font-size: 1rem;
  width: 20px;
}

/* Overlay sidebar mÃ³vil */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 100%;
}

/* Contenedor de ordenamiento */
#sort-container {
  margin-bottom: 1.5rem;
}

#sort-select {
  border: 1px solid #E5E7EB;
  border-radius: var(--border-radius);
  padding: 0.6rem 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
}

#sort-select:hover {
  border-color: var(--primary-purple);
}

#sort-select:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  outline: none;
}

/* ============================================
   CARDS DE PRODUCTOS - ESTILO REFERENCIA
   ============================================ */
#productos-container.row {
  margin: 0 -0.75rem;
}

#productos-container.row > div {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}

.producto-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid #E5E7EB !important;
  border-radius: var(--border-radius-lg) !important;
  overflow: hidden;
  background: var(--bg-primary);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-purple) !important;
}

.producto-card .card-img-top {
  width: 100%;
  height: 280px;
  object-fit: contain;
  padding: 1.5rem;
  transition: transform 0.3s ease;
  background-color: var(--bg-primary);
}

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

.producto-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--bg-primary);
  gap: 0.35rem;
}

.producto-card .card-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3rem;
}

.producto-card .producto-titulo {
  margin-bottom: 0.2rem;
}

.descripcion-card {
  flex: 1;
  width: 100%;
  min-height: 3.5rem;
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.descripcion-card .descripcion-texto {
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.producto-card .text-muted {
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.producto-card .small {
  font-size: 0.8rem;
}

.producto-card .fs-4 {
  color: var(--primary-purple);
  font-weight: 700;
  margin-top: auto;
  margin-bottom: 1rem;
  font-size: 1.5rem !important;
}

/* Selector de Cantidad en Tarjetas del Catálogo */
.qty-selector-card {
  margin-bottom: 0.75rem;
}

.qty-controls-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.4rem;
  border-radius: var(--border-radius);
  border: 1px solid #E5E7EB;
}

.qty-btn-card {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius);
  border: 1px solid #E5E7EB;
  background: white;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.qty-btn-card:hover:not(:disabled) {
  background: var(--primary-purple);
  color: white;
  border-color: var(--primary-purple);
  transform: scale(1.05);
}

.qty-btn-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-input-card {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  border: 1px solid #E5E7EB;
  background: white;
  padding: 0.4rem;
  border-radius: var(--border-radius);
  min-width: 50px;
}

.qty-input-card:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Ocultar flechas del input number en tarjetas */
.qty-input-card::-webkit-inner-spin-button,
.qty-input-card::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input-card[type=number] {
  -moz-appearance: textfield;
}

.producto-card .btn-primary {
  background: var(--primary-purple) !important;
  border: none !important;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  width: 100%;
  font-size: 0.95rem;
}

.producto-card .btn-primary:hover {
  background: var(--primary-purple-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.producto-card .btn-primary:active {
  transform: translateY(0);
}

/* ============================================
   CARRITO LATERAL (OFFCANVAS)
   ============================================ */
.carrito-offcanvas {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(520px, 92vw);
  max-width: 92vw;
  height: 100vh;
  background: #F4F2EF;
  box-shadow: -12px 0 32px rgba(24, 23, 22, 0.22);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(97, 86, 74, 0.2);
}

.carrito-offcanvas.active {
  right: 0;
}

.carrito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.25rem;
  background: linear-gradient(180deg, rgba(245, 243, 241, 0.98) 0%, rgba(245, 243, 241, 0.72) 100%);
  border-bottom: 1px solid rgba(97, 86, 74, 0.18);
}

.carrito-header h5 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.95rem;
  line-height: 1;
  margin: 0;
}

#carrito-count {
  font-size: 1.55rem;
  color: rgba(24, 23, 22, 0.76);
  font-weight: 600;
}

.carrito-header-kicker {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  font-size: 0.64rem;
}

.carrito-header .btn-link {
  color: var(--text-secondary) !important;
  text-decoration: none;
}

.carrito-header .btn-link:hover {
  color: var(--text-primary) !important;
}

.carrito-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.1rem 0.9rem;
}

.carrito-item {
  display: flex;
  gap: 0.72rem;
  padding: 0.8rem 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 0.25rem;
  transition: opacity 0.2s ease;
  border-bottom: 1px solid rgba(97, 86, 74, 0.16);
  position: relative;
}

.carrito-item:hover {
  opacity: 0.95;
}

.carrito-item-thumb {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border: 1px solid rgba(97, 86, 74, 0.15);
}

.carrito-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.carrito-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}

.carrito-item-name {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.carrito-item-variants {
  font-size: 0.84rem;
  color: rgba(24, 23, 22, 0.65);
  margin: 0.18rem 0 0;
  display: block;
  line-height: 1.2;
}

.carrito-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.58rem;
  flex-wrap: nowrap;
  padding-top: 0.5rem;
  border-top: none;
}


.carrito-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: #FFFFFF;
  border-radius: 999px;
  padding: 0.18rem 0.25rem;
  border: 1px solid rgba(97, 86, 74, 0.2);
}

.carrito-item-subtotal {
  margin-left: auto;
  text-align: right;
}

.carrito-item-subtotal span {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  color: rgba(24, 23, 22, 0.62);
}

.carrito-item-subtotal strong {
  font-size: 1.24rem;
  line-height: 1;
  color: var(--text-primary);
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(97, 86, 74, 0.22);
  background: #FFFFFF;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-size: 0.8rem;
}

.qty-btn:hover {
  background: var(--primary-purple);
  color: var(--text-white);
  border-color: var(--primary-purple);
}

.qty-display {
  min-width: 38px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.btn-remove {
  position: absolute;
  top: 0.25rem;
  right: 0;
  color: rgba(24, 23, 22, 0.42);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  padding: 0.2rem;
  width: 24px;
  height: 24px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  transform: none;
  background: transparent;
  color: rgba(24, 23, 22, 0.8);
}

.carrito-footer {
  padding: 1rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(97, 86, 74, 0.18);
  background: #FCFBFA;
}

.carrito-summary-rows {
  border-bottom: 1px dashed rgba(97, 86, 74, 0.24);
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
}

.carrito-summary-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.28rem;
}

.carrito-summary-rows > div:last-child {
  margin-bottom: 0;
}

.carrito-summary-rows span {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.carrito-summary-rows strong {
  color: var(--text-primary);
  font-size: 1.08rem;
}

.carrito-summary-rows em {
  color: rgba(24, 23, 22, 0.56);
  font-size: 0.8rem;
  font-style: italic;
}

.carrito-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.08rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.total-precio {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 2.65rem;
  font-family: 'Cormorant Garamond', serif;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

#carrito-vacio {
  background: #FCFBFA;
  border: 1px dashed rgba(97, 86, 74, 0.26);
  border-radius: 14px;
  padding: 2rem 1rem !important;
}

#carrito-vacio h6 {
  font-size: 1.05rem;
  margin-top: 0.35rem;
}

#carrito-vacio .fa-shopping-cart {
  font-size: 2.5rem;
  color: rgba(97, 86, 74, 0.5) !important;
}

/* Overlay del carrito */
.carrito-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  backdrop-filter: blur(2px);
}

.carrito-overlay.active {
  display: block;
}

/* ============================================
   BOTÃ“N WHATSAPP FLOTANTE
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background: #128C7E;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float i {
  color: white;
}

/* ============================================
   LOADING Y ESTADOS VACÃOS
   ============================================ */
#loading {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
  border-color: var(--primary-purple);
  border-right-color: transparent;
}

#no-productos {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

#no-productos i {
  color: var(--text-light);
}

#no-productos h4 {
  color: var(--text-primary);
  margin-top: 1rem;
  font-weight: 600;
}

#no-productos .text-muted {
  color: var(--text-secondary) !important;
}

/* ============================================
   MODALES
   ============================================ */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid #E5E7EB;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
  color: var(--text-primary);
  font-weight: 700;
}

/* Modal checkout - datos del cliente */
.modal-datos-compra-dialog {
  max-width: 980px;
}

.modal-datos-compra-content {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(97, 86, 74, 0.16);
}

.modal-datos-compra-header {
  background: linear-gradient(180deg, rgba(245, 243, 241, 0.95) 0%, rgba(245, 243, 241, 0.7) 100%);
  border-bottom: 1px solid rgba(97, 86, 74, 0.15);
  padding: 1.1rem 1.4rem;
}

.modal-datos-eyebrow {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.modal-datos-compra-body {
  background: var(--bg-light-purple);
  padding: 1.15rem;
}

.datos-modal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.datos-modal-form,
.datos-modal-resumen {
  background: #FCFBFA;
  border: 1px solid rgba(97, 86, 74, 0.14);
  border-radius: 14px;
}

.datos-modal-form {
  padding: 1rem;
}

.modal-field-grid {
  display: grid;
  gap: 0.7rem;
}

.modal-field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-field-group {
  margin-bottom: 0.75rem;
}

#datosModal .form-control {
  border-radius: 11px;
  border-color: rgba(97, 86, 74, 0.24);
  background: #FFFFFF;
}

#datosModal .form-control:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(97, 86, 74, 0.14);
}

.datos-pago-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.datos-pago-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(97, 86, 74, 0.22);
  border-radius: 11px;
  padding: 0.62rem 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.datos-pago-option span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.datos-pago-option i {
  color: var(--text-secondary);
}

.datos-pago-option:has(input:checked) {
  border-color: var(--primary-purple);
  background: rgba(165, 155, 143, 0.15);
}

.datos-modal-resumen {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.datos-modal-resumen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(97, 86, 74, 0.18);
  padding-bottom: 0.55rem;
}

.datos-modal-resumen-head h6 {
  font-size: 1rem;
  font-weight: 700;
}

.datos-modal-resumen-head span {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.datos-modal-items {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 0.2rem;
}

.datos-modal-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.datos-modal-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(97, 86, 74, 0.16);
}

.datos-modal-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.datos-modal-item-meta {
  margin: 0.14rem 0 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.datos-modal-item-price {
  font-weight: 700;
  font-size: 0.87rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.datos-modal-empty {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.datos-modal-totales {
  border-top: 1px dashed rgba(97, 86, 74, 0.32);
  padding-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.datos-modal-totales > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.datos-modal-totales span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.datos-modal-total {
  font-size: 1.22rem;
}

.datos-modal-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  border-top: 1px solid rgba(97, 86, 74, 0.15);
  padding-top: 0.55rem;
}

.modal-datos-compra-footer {
  border-top: 1px solid rgba(97, 86, 74, 0.15);
  background: #FCFBFA;
  padding: 0.9rem 1.2rem;
}

#datosModal .modal-footer .btn {
  min-width: 170px;
  border-radius: 999px;
  font-weight: 700;
}

@media (max-width: 991px) {
  .datos-modal-grid {
    grid-template-columns: 1fr;
  }

  .datos-modal-items {
    max-height: 220px;
  }
}

@media (max-width: 576px) {
  .modal-field-grid.two {
    grid-template-columns: 1fr;
  }

  .modal-datos-compra-header {
    padding: 1rem;
  }

  .modal-datos-compra-body {
    padding: 0.8rem;
  }

  .modal-datos-compra-footer {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  #datosModal .modal-footer .btn {
    min-width: 0;
    width: 100%;
  }
}

#color-options button {
  min-width: 140px;
  transition: all 0.2s ease;
  border-radius: var(--border-radius);
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border: 1px solid #E5E7EB;
  background: var(--bg-primary);
}

#color-options button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-purple);
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-control {
  border: 1px solid #E5E7EB;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
  font-size: 0.95rem;
}

.form-control:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background-color: var(--bg-primary);
}

.form-label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* ============================================
   BOTONES
   ============================================ */
.btn-success {
  background: #25D366 !important;
  border: none !important;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.btn-success:hover {
  background: #128C7E !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-outline-danger {
  color: var(--danger-color) !important;
  border-color: #E5E7EB !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-outline-danger:hover {
  background-color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
  color: white !important;
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border-color: #E5E7EB !important;
  color: var(--text-primary) !important;
  font-weight: 500;
}

.btn-outline-secondary:hover {
  background: var(--bg-secondary) !important;
  border-color: var(--text-secondary) !important;
}

/* ============================================
   FOOTER MINIMALISTA
   ============================================ */
.footer-modern {
  background: var(--bg-primary);
  color: var(--text-primary);
  margin-top: 4rem;
  border-top: 1px solid #E5E7EB;
  padding: 2.5rem 0 1.5rem;
}

.footer-modern .container {
  max-width: var(--max-width);
}

/* Contenido principal - Horizontal en desktop */
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-item-group {
  display: flex;
  align-items: center;
}

/* Logo */
.footer-logo {
  height: 50px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Items de contacto */
.footer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-item i {
  color: var(--primary-purple);
  font-size: 1.1rem;
  min-width: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.footer-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.footer-item-text strong {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8rem;
}

.footer-item-text span {
  color: var(--text-secondary);
}

.footer-link {
  color: var(--primary-purple);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--primary-purple-dark);
  text-decoration: underline;
}

/* Separador */
.footer-divider {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 1.5rem 0 1rem;
}

/* CrÃ©ditos - Centrados */
.footer-bottom {
  text-align: center;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
}

.footer-credits {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

.developer-link {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.developer-link:hover {
  color: var(--primary-purple-dark);
  text-decoration: underline;
}

.developer-link i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.developer-link:hover i {
  transform: translate(2px, -2px);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid;
}

.alert-info {
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--primary-purple-dark);
  border-left-color: var(--primary-purple);
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857;
  border-left-color: var(--success-color);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #B45309;
  border-left-color: var(--warning-color);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #B91C1C;
  border-left-color: var(--danger-color);
}

/* ============================================
   PAGINACIÃ“N
   ============================================ */
#pagination-section {
  margin-top: 2rem;
}

.pagination {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pagination .page-item {
  margin: 0;
}

.pagination .page-link {
  border: 1px solid #E5E7EB;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin: 0 0.125rem;
}

.pagination .page-link:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-purple);
  color: var(--primary-purple);
}

.pagination .page-item.active .page-link {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  color: white;
}

.pagination .page-item.disabled .page-link {
  background-color: var(--bg-secondary);
  border-color: #E5E7EB;
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================
   ESTILOS ADMIN (Mantener para panel)
   ============================================ */
.admin-header {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
}

.admin-sidebar {
  background: var(--bg-primary);
  border-right: 1px solid #E5E7EB;
  min-height: calc(100vh - var(--navbar-height));
}

.admin-sidebar .nav-link {
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-purple);
}

.admin-sidebar .nav-link.active {
  background: var(--primary-purple);
  color: white;
}

.stats-card {
  border-radius: var(--border-radius-lg);
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   RESPONSIVE - MÃ“VIL PRIMERO
   ============================================ */

/* TABLETS (768px - 991px) */
@media (max-width: 991px) {
  :root {
    --navbar-height: 65px;
  }
  
  .sidebar-filters {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    width: 280px;
  }
  
  .sidebar-filters.active {
    left: 0;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  .main-content {
    padding: 1.5rem;
    width: 100%;
  }
  
  .main-layout {
    display: block;
  }
  
  .producto-card .card-img-top {
    height: 240px;
  }
}

/* MÃ“VILES (< 768px) */
@media (max-width: 767px) {
  :root {
    --carrito-width: 100%;
    --navbar-height: 60px;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  /* Logo reduce tamaÃ±o pero NO desaparece */
  .navbar-logo {
    height: 36px;
  }
  
  .navbar-brand i {
    font-size: 1.5rem;
  }
  
  /* Asegurar que el botÃ³n de bÃºsqueda mÃ³vil sea visible */
  #mobile-search-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  
  .btn-carrito {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .btn-carrito span:not(.badge) {
    display: none;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  /* Cards - 2 columnas con buen espaciado */
  #productos-container.row > div {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
  }
  
  .producto-card .card-img-top {
    height: 200px;
    padding: 1rem;
  }
  
  .producto-card .card-body {
    padding: 1rem;
  }
  
  .producto-card .card-title {
    font-size: 0.9rem;
    min-height: 2.5rem;
  }
  
  .producto-card .fs-4 {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .producto-card .btn-primary {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  /* WhatsApp flotante */
  .whatsapp-float {
    width: 56px;
    height: 56px;
    font-size: 28px;
    bottom: 16px;
    right: 16px;
  }
  
  /* Footer - Vertical en mÃ³vil */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-item-group {
    width: 100%;
    justify-content: center;
  }
  
  .footer-logo {
    height: 45px;
    max-width: 160px;
  }
  
  .footer-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
  
  .footer-item i {
    margin-top: 0;
  }
  
  .footer-item-text {
    align-items: center;
    text-align: center;
  }
}

/* MÃ“VILES PEQUEÃ‘OS (< 576px) */
@media (max-width: 576px) {
  :root {
    --navbar-height: 56px;
  }
  
  /* Forzar 2 columnas en mÃ³viles pequeÃ±os */
  #productos-container.row > div {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  /* Logo mÃ¡s pequeÃ±o pero VISIBLE */
  .navbar-logo {
    height: 32px;
  }
  
  .navbar-brand span {
    display: none;
  }
  
  .btn-carrito {
    padding: 0.45rem 0.85rem;
  }
  
  #cart-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
  }
  
  .main-content {
    padding: 0.75rem;
  }
  
  /* Cards optimizadas */
  #productos-container.row {
    margin: 0 -0.375rem;
  }
  
  #productos-container.row > div {
    padding: 0 0.375rem;
    margin-bottom: 0.75rem;
  }
  
  .producto-card {
    border-radius: 10px !important;
  }
  
  .producto-card .card-img-top {
    height: 160px;
    padding: 0.75rem;
  }
  
  .producto-card .card-body {
    padding: 0.875rem;
  }
  
  .producto-card .card-title {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    min-height: 2.4rem;
  }
  
  .producto-card .text-muted {
    font-size: 0.75rem;
    margin-bottom: 0.3rem !important;
  }
  
  .producto-card .small {
    font-size: 0.7rem;
  }
  
  .producto-card .fs-4 {
    font-size: 1.1rem !important;
    margin-bottom: 0.625rem !important;
  }
  
  .producto-card .btn-primary {
    padding: 0.55rem 0.875rem;
    font-size: 0.8rem;
  }
  
  /* Carrito lateral */
  .carrito-header {
    padding: 0.95rem;
  }
  
  .carrito-header h5 {
    font-size: 1.35rem;
  }

  #carrito-count {
    font-size: 1.05rem;
  }

  .carrito-header-kicker {
    font-size: 0.63rem;
  }
  
  .carrito-body {
    padding: 0.8rem;
  }
  
  .carrito-item {
    padding: 0.68rem;
    gap: 0.62rem;
  }
  
  .carrito-item-thumb {
    width: 64px;
    height: 64px;
  }
  
  .carrito-item-name {
    font-size: 0.88rem;
  }
  
  .qty-btn {
    width: 28px;
    height: 28px;
  }
  
  .carrito-footer {
    padding: 0.8rem;
  }
  
  .carrito-total {
    font-size: 0.98rem;
  }
  
  .total-precio {
    font-size: 1.8rem;
  }

  .carrito-summary-rows span,
  .carrito-summary-rows strong,
  .carrito-summary-rows em {
    font-size: 0.82rem;
  }
  
  /* Sidebar filtros */
  .sidebar-filters {
    width: 85%;
    max-width: 300px;
  }
  
  /* Modales */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  #color-options button {
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
  }
  
  /* WhatsApp flotante */
  .whatsapp-float {
    width: 52px;
    height: 52px;
    font-size: 26px;
    bottom: 12px;
    right: 12px;
  }
  
  /* Ordenamiento */
  #sort-container {
    margin-bottom: 1rem;
  }
  
  #sort-select {
    width: 100%;
    font-size: 0.85rem;
  }
  
  /* PaginaciÃ³n */
  .pagination .page-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }
}

/* MÃ“VILES MUY PEQUEÃ‘OS (< 375px) */
@media (max-width: 374px) {
  .producto-card .card-img-top {
    height: 140px;
    padding: 0.5rem;
  }
  
  .producto-card .card-body {
    padding: 0.75rem;
  }
  
  .producto-card .card-title {
    font-size: 0.8rem;
    min-height: 2.2rem;
  }
  
  .producto-card .fs-4 {
    font-size: 1rem !important;
  }
  
  .producto-card .btn-primary {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .whatsapp-float {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-purple);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-purple-dark);
}

/* ============================================
   ANIMACIONES SUAVES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.producto-card {
  animation: fadeInUp 0.4s ease;
  animation-fill-mode: both;
}

/* Stagger animation para las cards */
.producto-card:nth-child(1) { animation-delay: 0s; }
.producto-card:nth-child(2) { animation-delay: 0.05s; }
.producto-card:nth-child(3) { animation-delay: 0.1s; }
.producto-card:nth-child(4) { animation-delay: 0.15s; }
.producto-card:nth-child(5) { animation-delay: 0.2s; }
.producto-card:nth-child(6) { animation-delay: 0.25s; }
.producto-card:nth-child(7) { animation-delay: 0.3s; }
.producto-card:nth-child(8) { animation-delay: 0.35s; }

/* ============================================
   UTILIDADES
   ============================================ */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   1. MENÚ ADMIN MÓVIL - CORRECCIÓN COMPLETA
   ============================================ */

/* Botón hamburguesa - Siempre visible en móvil */
.admin-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

/* Sidebar admin - Desktop */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1040;
}

/* Botón cerrar sidebar - Solo móvil */
.admin-sidebar-close {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.admin-sidebar-close:hover {
  background: var(--bg-secondary);
}

/* Overlay para cerrar sidebar */
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1030;
  backdrop-filter: blur(2px);
}

/* ============================================
   2. TABLAS RESPONSIVE CON COLUMNA FIJA
   ============================================ */

/* Contenedor de tabla con scroll horizontal */
.table-responsive {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tabla base - Mejor legibilidad */
.table {
  margin-bottom: 0;
  min-width: 800px; /* Ancho mínimo para evitar colapso */
}

/* Columna de acciones - SIEMPRE FIJA A LA DERECHA */
.acciones-col {
  position: sticky;
  right: 0;
  background: var(--bg-primary);
  z-index: 10;
  min-width: 120px;
  text-align: center;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
}

/* Celdas de acciones en tbody */
.table tbody td:last-child {
  position: sticky;
  right: 0;
  background: var(--bg-primary);
  z-index: 9;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
}

/* Hover en filas - Mantener fondo en columna fija */
.table tbody tr:hover td:last-child {
  background: var(--bg-secondary);
}

/* Botones de acción - Mejor espaciado */
.table tbody td:last-child .btn {
  margin: 0 0.25rem;
  white-space: nowrap;
}

/* ============================================
   3. MEJORAS VISUALES EN TABLAS
   ============================================ */

/* Imágenes en tabla - Tamaño consistente */
.table img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  padding: 0.25rem;
  background: var(--bg-secondary);
}

/* Badges en tabla - Mejor visibilidad */
.table .badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  font-weight: 600;
}

/* Celdas con mucho texto - Prevenir desbordamiento */
.table td {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Permitir wrap en columnas específicas */
.table td.text-wrap {
  white-space: normal;
  word-wrap: break-word;
}

/* ============================================
   4. RESPONSIVE - MÓVIL
   ============================================ */

@media (max-width: 991px) {
  /* Mostrar botón hamburguesa */
  .admin-hamburger {
    display: block;
  }

  /* Sidebar - Fuera de pantalla por defecto */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    transition: left 0.3s ease;
  }

  /* Sidebar activo - Visible */
  .admin-sidebar.active {
    left: 0;
  }

  /* Mostrar botón cerrar */
  .admin-sidebar-close {
    display: block;
  }

  /* Overlay activo */
  .admin-sidebar-overlay.active {
    display: block;
  }

  /* Contenido principal - Ocupar todo el ancho */
  main.col-md-9 {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 767px) {
  /* Sidebar más angosto en móviles pequeños */
  .admin-sidebar {
    width: 85%;
    max-width: 300px;
  }

  /* Tablas - Ajustes para móvil */
  .table {
    min-width: 700px;
    font-size: 0.875rem;
  }

  /* Columna de acciones más compacta */
  .acciones-col {
    min-width: 100px;
  }

  /* Botones de acción - Más pequeños */
  .table tbody td:last-child .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
  }

  /* Iconos en lugar de texto en botones */
  .table tbody td:last-child .btn span {
    display: none;
  }

  /* Imágenes más pequeñas */
  .table img {
    width: 40px;
    height: 40px;
  }

  /* Padding del contenido principal */
  main.col-md-9 {
    padding: 0.75rem;
  }

  /* Título más compacto */
  main h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  /* Sidebar ocupa casi toda la pantalla */
  .admin-sidebar {
    width: 90%;
  }

  /* Tabla aún más compacta */
  .table {
    min-width: 650px;
    font-size: 0.8rem;
  }

  /* Columna de acciones mínima */
  .acciones-col {
    min-width: 80px;
  }

  /* Botones de acción - Solo iconos */
  .table tbody td:last-child .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    margin: 0 0.15rem;
  }

  /* Imágenes mínimas */
  .table img {
    width: 35px;
    height: 35px;
  }
}

/* ============================================
   5. MEJORAS ADICIONALES
   ============================================ */

/* Scroll suave en tabla */
.table-responsive {
  scroll-behavior: smooth;
}

/* Indicador de scroll horizontal */
.table-responsive::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.05), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-responsive:not(:hover)::after {
  opacity: 1;
}

/* Mejorar contraste en modo oscuro (si aplica) */
@media (prefers-color-scheme: dark) {
  .acciones-col,
  .table tbody td:last-child {
    background: #1a1a1a;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
  }
}

/* Animación suave para sidebar */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.admin-sidebar.active {
  animation: slideIn 0.3s ease;
}

/* Estado de carga en tabla */
.table tbody tr.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Mejora visual: Primera columna también puede ser sticky si es ID */
.table thead th:first-child,
.table tbody td:first-child {
  position: sticky;
  left: 0;
  background: var(--bg-primary);
  z-index: 8;
}

.table tbody tr:hover td:first-child {
  background: var(--bg-secondary);
}

/* ============================================
   6. CORRECCIÓN: HEADER ADMIN
   ============================================ */

.admin-header {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1050;
}

.admin-header .navbar-brand {
  color: white !important;
  font-weight: 700;
}

/* ============================================
   7. CORRECCIÓN: TARJETAS DE ESTADÍSTICAS
   ============================================ */

.stats-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   8. ACCESIBILIDAD
   ============================================ */

/* Focus visible en elementos interactivos */
.admin-hamburger:focus,
.admin-sidebar-close:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* Skip to content para accesibilidad */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-purple);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
}

.skip-to-content:focus {
  top: 0;
}


/* ============================================
   MODAL DE VISTA PREVIA - INDEPENDIENTE
   Solo afecta al modal con ID "vistaPreviaModal"
   ============================================ */

/* Tarjeta clickeable - Cursor pointer */
.producto-card-clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.producto-card-clickable:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl) !important;
}

/* Modal - Base Modernizado */
.modal-vista-previa {
  max-width: 900px;
  width: min(900px, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  margin: 1rem auto;
  /* Animación de entrada */
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#vistaPreviaModal .modal-dialog {
  margin: clamp(0.25rem, 1.8vh, 1rem) auto;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-vista-previa-content {
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 24px !important;
  overflow: hidden;
  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px rgba(97, 86, 74, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Header del modal - Modernizado */
.modal-vista-previa-header {
  padding: 1.5rem 2rem 0 2rem;
  background: transparent;
  border-bottom: none;
  position: relative;
  z-index: 10;
}

.modal-vista-previa-header .btn-close {
  margin-left: auto;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(24, 23, 22, 0.15);
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  opacity: 1;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-image: none;
}

.modal-vista-previa-header .btn-close::after {
  content: '\00d7';
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  color: inherit;
}

.modal-vista-previa-header .btn-close:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(24, 23, 22, 0.4);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
}

.modal-vista-previa-header .btn-close:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 3px;
}

/* Body del modal - Grid Layout */
.modal-vista-previa-body {
  padding: 1rem 2rem 2rem 2rem;
  background: transparent;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  min-height: 0;
}

/* Grid Layout Principal */
.vista-previa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
  justify-content: center;
  min-height: auto;
  height: auto;
  max-width: 640px;
  margin: 0 auto;
  transition: opacity 0.05s ease, transform 0.05s ease;
}

.vista-previa-grid.is-updating {
  opacity: 0;
  transform: translateY(8px);
}

.vista-previa-grid > * {
  min-width: 0;
  min-height: 0;
}

/* ============================================
   IMAGEN CON LUPA (igual que tarjeta)
   ============================================ */

/* Sección de Imágenes - Modernizada */
.vista-previa-imagen-section,
.vista-previa-info-section {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.vista-previa-imagen-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

@media (min-width: 768px) {
  .vista-previa-grid {
    max-width: 820px;
  }
}

@media (min-width: 1200px) {
  .vista-previa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: flex-start;
    max-width: 1000px;
  }

  .vista-previa-imagen-section,
  .vista-previa-info-section {
    width: 100%;
    max-width: 460px;
  }

  .vista-previa-gallery-shell {
    max-width: 460px;
  }
}

@media (max-width: 768px) {
  .modal-vista-previa {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0.75rem auto;
  }

  .vista-previa-grid {
    min-height: auto;
  }
}

/* Mobile-specific adjustments moved later for cascade */

.vista-previa-gallery-shell {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(140deg, #f8f4ef, #ebe4da);
  border-radius: 32px;
  padding: 1.5rem 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.vista-previa-imagen-wrapper {
  background: transparent;
  width: 100%;
}

.vista-previa-gallery {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.45rem;
}

.vista-previa-gallery-main {
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 400px;
  padding: 2rem 1.75rem;
  border-radius: 32px;
  background: radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.7), rgba(228, 223, 215, 0.95));
  box-shadow: 0 35px 70px rgba(58, 52, 44, 0.25);
  overflow: hidden;
}

.vista-previa-gallery-main::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.vista-previa-imagen-stage {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(97, 86, 74, 0.1), rgba(165, 155, 143, 0.2));
  border: 1px solid rgba(97, 86, 74, 0.15);
  overflow: hidden;
}

.vista-previa-imagen-stage::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(97, 86, 74, 0.25);
  border-radius: 18px;
  pointer-events: none;
}

.vista-previa-imagen {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.vista-previa-imagen.loaded {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 5;
}

.gallery-nav:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.22);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.96);
}

.gallery-nav.prev {
  left: 1.25rem;
}

.gallery-nav.next {
  right: 1.25rem;
}

.gallery-nav i {
  font-size: 1rem;
}

.gallery-progress {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  height: 4px;
  background: rgba(24, 23, 22, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.gallery-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #61564A, #A59B8F);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.gallery-count {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(97, 86, 74, 0.25);
}

.gallery-thumbs-wrapper {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  position: relative;
  padding: 0 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-thumbs-wrapper::before,
.gallery-thumbs-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 2rem;
  width: 1.75rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-thumbs-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, rgba(228, 223, 215, 0.9) 0%, rgba(228, 223, 215, 0));
}

.gallery-thumbs-wrapper::after {
  right: 0;
  background: linear-gradient(270deg, rgba(228, 223, 215, 0.9) 0%, rgba(228, 223, 215, 0));
}

.gallery-thumbs-wrapper.has-overflow::before,
.gallery-thumbs-wrapper.has-overflow::after {
  opacity: 1;
}

.gallery-thumbs-wrapper.at-start::before,
.gallery-thumbs-wrapper:not(.has-overflow)::before {
  opacity: 0;
}

.gallery-thumbs-wrapper.at-end::after,
.gallery-thumbs-wrapper:not(.has-overflow)::after {
  opacity: 0;
}

.gallery-track {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 0.35rem 0.25rem 0.35rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-purple) transparent;
  scroll-behavior: smooth;
}

.gallery-track::-webkit-scrollbar {
  height: 6px;
}
.gallery-track::-webkit-scrollbar-thumb {
  background: var(--primary-purple);
  border-radius: 999px;
}

.gallery-track::-webkit-scrollbar-track {
  background: rgba(24, 23, 22, 0.08);
  border-radius: 999px;
}
.gallery-track::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 576px) {
  .gallery-thumbs-wrapper {
    padding: 0 1rem;
  }
}

.gallery-thumb {
  border: none;
  background: transparent;
  padding: 0;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

@media (max-width: 576px) {
  .modal-vista-previa {
    width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    margin: 0.25rem auto;
    height: auto;
  }

  .modal-vista-previa.modal-dialog-centered {
    align-items: stretch;
    min-height: calc(100vh - 0.5rem);
    min-height: calc(100dvh - 0.5rem);
  }

  .modal-vista-previa-content {
    height: auto;
    max-height: calc(100vh - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
    overflow: hidden;
  }

  .modal-vista-previa-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
  }

  .vista-previa-grid {
    max-width: 100%;
    gap: 1.25rem;
    min-height: auto;
  }

  .vista-previa-imagen-section,
  .vista-previa-info-section {
    max-width: 100%;
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
  }

  .vista-previa-gallery-shell {
    padding: 0.8rem 0.9rem 1.25rem;
    overflow: visible;
  }

  .vista-previa-gallery {
    align-items: stretch;
    gap: 1rem;
  }

  .vista-previa-gallery-main {
    min-height: 220px;
    max-height: 260px;
    padding: 1rem;
  }

  .vista-previa-imagen-stage {
    height: 200px;
    padding: 0.75rem;
  }

  .gallery-thumbs-wrapper {
    margin-top: 0.35rem;
    padding: 0 0.75rem;
  }

  .gallery-track {
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .gallery-thumb {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .gallery-progress {
    width: calc(100% - 2rem);
  }
}

@media (max-width: 400px) {
  .modal-vista-previa-body {
    padding: 0.85rem 0.9rem 1.25rem;
  }

  .vista-previa-gallery-shell {
    padding: 0.65rem 0.75rem 1rem;
  }

  .vista-previa-gallery-main {
    min-height: 190px;
    max-height: 210px;
    padding: 0.85rem;
  }

  .vista-previa-imagen-stage {
    height: 170px;
    padding: 0.65rem;
  }

  .gallery-thumbs-wrapper {
    padding: 0 0.5rem;
    margin-top: 0.25rem;
  }

  .gallery-track {
    gap: 0.4rem;
    padding: 0.2rem 0.2rem 0.2rem 0.2rem;
  }

  .gallery-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .gallery-progress {
    width: calc(100% - 1.5rem);
  }
}

.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.gallery-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(24, 23, 22, 0.18);
}

.gallery-thumb.active::after {
  border-color: var(--primary-purple);
}

/* Lupa circular - Mejorada */
.vista-previa-lupa {
  display: none;
  position: absolute;
  width: 180px;
  height: 180px;
  border: 3px solid var(--primary-purple);
  border-radius: 50%;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 300%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  z-index: 100;
  cursor: none;
  backdrop-filter: blur(2px);
}

/* Hint de zoom */
.vista-previa-zoom-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 23, 22, 0.85);
  color: white;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

.vista-previa-imagen-stage:hover .vista-previa-zoom-hint {
  opacity: 0;
}

/* ============================================
   INFORMACIÓN DEL PRODUCTO (igual que tarjeta)
   ============================================ */

.vista-previa-info {
  display: flex;
  flex-direction: column;
}

/* Nombre del producto */
.modal-product-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.vista-previa-nombre {
  color: var(--text-primary);
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.modal-header-divider {
  display: inline-block;
  width: 80px;
  height: 2px;
  background: #181716;
  opacity: 0.3;
}

.modal-product-badges {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.modal-product-badges:empty {
  margin-bottom: 0;
}

.vista-previa-descripcion {
  margin-bottom: 1rem;
}

.vista-previa-descripcion-texto {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 1.15rem;
  color: #4c443b;
  line-height: 1.6;
  margin: 0;
}

.modal-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.product-tag {
  padding: 0.35rem 1rem;
  border: 1px solid rgba(24, 23, 22, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
}

.product-tag strong {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: #1f1c18;
}

.modal-section-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(24, 23, 22, 0.08);
  margin: 1rem 0;
}

/* Precio */
.vista-previa-precio-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.vista-previa-precio-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.vista-previa-precio-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.vista-previa-precio {
  color: #1f1c18;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
}

.vista-previa-precio-anterior {
  font-size: 0.9rem;
  color: rgba(24, 23, 22, 0.5);
}

.vista-previa-variantes {
  margin-bottom: 1.25rem;
}

.vista-previa-cantidad-section {
  margin-bottom: 1rem;
}

/* Selector de Cantidad en Modal */
.qty-selector-modal {
  margin-bottom: 1rem;
}

.qty-controls-modal {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #E5E7EB;
}

.qty-btn-modal {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius);
  border: 1px solid #E5E7EB;
  background: white;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.qty-btn-modal:hover:not(:disabled) {
  background: var(--primary-purple);
  color: white;
  border-color: var(--primary-purple);
  transform: scale(1.05);
}

.qty-btn-modal:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-input-modal {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  border: 1px solid #E5E7EB;
  background: white;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  min-width: 60px;
}

.qty-input-modal:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Ocultar flechas del input number */
.qty-input-modal::-webkit-inner-spin-button,
.qty-input-modal::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input-modal[type=number] {
  -moz-appearance: textfield;
}

/* Botón agregar (mismo estilo que tarjeta) */
.vista-previa-btn-agregar {
  background: var(--primary-purple) !important;
  border: none !important;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  width: 100%;
}

.vista-previa-btn-agregar:hover {
  background: var(--primary-purple-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.vista-previa-btn-agregar:active {
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */

@media (max-width: 991px) {
  .vista-previa-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .modal-vista-previa-body {
    overflow-y: auto;
  }

  .vista-previa-info-section {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-right: 0;
  }

  .vista-previa-gallery-main {
    min-height: 360px;
  }

  .gallery-nav {
    top: auto;
    bottom: 1.5rem;
    transform: none;
  }

  .gallery-nav.prev {
    left: 1.5rem;
  }

  .gallery-nav.next {
    right: 1.5rem;
  }

  .gallery-nav:hover {
    transform: scale(1.05);
  }

  .gallery-nav:active {
    transform: scale(0.96);
  }
}

@media (max-width: 768px) {
  .modal-vista-previa {
    width: calc(100vw - 1rem);
    margin: 0.5rem auto;
    max-width: calc(100vw - 1rem);
  }
  
  .modal-vista-previa-header {
    padding: 0.75rem 0.75rem 0 0.75rem;
  }
  
  .modal-vista-previa-body {
    padding-top: 0.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .vista-previa-gallery-main {
    padding: 1.5rem;
  }

  /* Imagen más pequeña en móvil */
  .vista-previa-imagen-stage {
    height: 280px;
    padding: 1rem;
    /* Habilitar zoom nativo con pinch */
    touch-action: pinch-zoom;
  }

  /* Ocultar lupa en móvil */
  .vista-previa-lupa {
    display: none !important;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
    bottom: 1rem;
  }

  .gallery-thumb {
    width: 62px;
    height: 62px;
  }

  .gallery-track {
    gap: 0.4rem;
  }

  .vista-previa-gallery-shell {
    padding: 1.5rem 1rem 2rem;
  }

  
  /* Ajustar tamaños de texto */
  .vista-previa-nombre {
    font-size: 1.5rem;
  }

  .modal-product-tags {
    gap: 0.4rem;
  }

  .product-tag {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }
  
  .vista-previa-precio {
    font-size: 2rem;
  }
  
  .vista-previa-btn-agregar {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .vista-previa-btn-agregar {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }
  
  /* Selector de cantidad en modal - Móvil */
  .qty-controls-modal {
    gap: 0.5rem;
    padding: 0.4rem;
  }
  
  .qty-btn-modal {
    width: 34px;
    height: 34px;
  }
  
  .qty-input-modal {
    font-size: 1rem;
    min-width: 55px;
  }
  
  /* Selector de cantidad en tarjetas - Móvil */
  .qty-controls-card {
    gap: 0.4rem;
    padding: 0.35rem;
  }
  
  .qty-btn-card {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  
  .qty-input-card {
    font-size: 0.95rem;
    min-width: 45px;
    padding: 0.35rem;
  }
}

@media (max-width: 576px) {
  .modal-vista-previa-header {
    padding: 0.5rem 0.5rem 0 0.5rem;
  }
  
  .modal-vista-previa-body {
    padding-top: 0.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: 1.25rem;
  }
  
  .vista-previa-imagen-stage {
    height: 240px;
    padding: 0.75rem;
  }

  .gallery-count {
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
  }

  .gallery-thumb {
    width: 56px;
    height: 56px;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
  }
  
  .vista-previa-gallery-shell {
    padding: 1.25rem 0.75rem 1.5rem;
    border-radius: 26px;
  }

  .vista-previa-nombre {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
  }

  .modal-product-tags {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .product-tag {
    font-size: 0.7rem;
  }
  
  .vista-previa-precio {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .vista-previa-btn-agregar {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Estrategia de scroll unico: solo el body del modal scrollea */
#vistaPreviaModal {
  overflow-y: hidden;
}

#vistaPreviaModal .modal-dialog.modal-vista-previa {
  width: min(900px, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  height: calc(100vh - 1rem);
  height: calc(100dvh - 1rem);
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  margin: 0.5rem auto;
}

#vistaPreviaModal .modal-content.modal-vista-previa-content {
  height: 100%;
  max-height: 100%;
}

#vistaPreviaModal .modal-body.modal-vista-previa-body {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

#vistaPreviaModal .vista-previa-info-section {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  margin-right: 0;
  padding-bottom: 0;
}

@media (min-width: 1200px) {
  #vistaPreviaModal .modal-body.modal-vista-previa-body {
    overflow: hidden;
  }

  #vistaPreviaModal .vista-previa-grid {
    height: 100%;
    min-height: 0;
    align-items: start;
  }

  #vistaPreviaModal .vista-previa-imagen-section {
    height: 100%;
    overflow: visible;
  }

  #vistaPreviaModal .vista-previa-info-section {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}

@media (max-width: 768px) {
  #vistaPreviaModal .modal-dialog.modal-vista-previa {
    width: calc(100vw - 0.75rem);
    max-width: calc(100vw - 0.75rem);
    height: calc(100vh - 0.75rem);
    height: calc(100dvh - 0.75rem);
    max-height: calc(100vh - 0.75rem);
    max-height: calc(100dvh - 0.75rem);
    margin: 0.375rem auto;
  }

  #vistaPreviaModal .modal-body.modal-vista-previa-body {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  #vistaPreviaModal .modal-dialog.modal-vista-previa {
    width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    height: calc(100vh - 0.5rem);
    height: calc(100dvh - 0.5rem);
    max-height: calc(100vh - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
    margin: 0.25rem auto;
  }

  #vistaPreviaModal .modal-header.modal-vista-previa-header {
    padding: 0.45rem 0.5rem 0 0.5rem;
  }

  #vistaPreviaModal .modal-body.modal-vista-previa-body {
    padding-top: 0.45rem;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    padding-bottom: 0.9rem;
  }
}

/* Animación de apertura del modal */
@keyframes vistaPreviaSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#vistaPreviaModal.show .modal-dialog {
  animation: vistaPreviaSlideIn 0.3s ease;
}

/* ============================================
   MEJORAS VISUALES
   ============================================ */

/* Scroll suave únicamente en la columna derecha */
.vista-previa-info-section {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  margin-right: 0;
  height: auto;
  min-height: 0;
  padding-bottom: 0;
}

.vista-previa-info-section::-webkit-scrollbar {
  width: 6px;
}

.vista-previa-info-section::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 999px;
}

.vista-previa-info-section::-webkit-scrollbar-thumb {
  background: var(--primary-purple);
  border-radius: 999px;
}

.vista-previa-info-section::-webkit-scrollbar-thumb:hover {
  background: var(--primary-purple-dark);
}

@media (max-width: 991px) {
  .vista-previa-info-section {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-right: 0;
    padding-bottom: 0;
  }
}

/* ============================================
   NOTIFICACIONES Y ALERTAS
   ============================================ */

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  pointer-events: none;
}

.toast-container > * {
  pointer-events: auto;
}

.toast {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(24, 23, 22, 0.18);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 4px solid var(--primary-purple);
  animation: slideInRight 0.35s ease;
  min-width: 320px;
  max-width: 420px;
  position: relative;
}

.toast.success { border-left-color: #10B981; }
.toast.error { border-left-color: #EF4444; }
.toast.warning { border-left-color: #F59E0B; }
.toast.info { border-left-color: var(--primary-purple); }

.toast-icon {
  font-size: 1.35rem;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: #1f1c18;
  margin-bottom: 0.15rem;
}

.toast-message {
  font-size: 0.95rem;
  color: #4c443b;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #a8a29e;
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: #4c443b;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(120%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .toast-container {
    top: auto;
    right: 16px;
    left: 16px;
    bottom: 20px;
    max-width: none;
    align-items: stretch;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: 0.875rem 1rem;
  }
}

.catalog-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border-left: 4px solid var(--primary-purple);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(24, 23, 22, 0.08);
  flex-wrap: wrap;
}

#search-banner[hidden] {
  display: none !important;
}

.catalog-banner-icon {
  font-size: 1.1rem;
  color: var(--primary-purple);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.catalog-banner.warning { border-left-color: #F59E0B; }
.catalog-banner.warning .catalog-banner-icon { color: #F59E0B; }
.catalog-banner.info { border-left-color: var(--primary-purple); }
.catalog-banner.info .catalog-banner-icon { color: var(--primary-purple); }
.catalog-banner.success { border-left-color: #10B981; }
.catalog-banner.success .catalog-banner-icon { color: #10B981; }
.catalog-banner.error { border-left-color: #EF4444; }
.catalog-banner.error .catalog-banner-icon { color: #EF4444; }

.catalog-banner-body {
  flex: 1;
  min-width: 0;
}

.catalog-banner-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #9ca3af;
  display: block;
  margin-bottom: 0.2rem;
}

.catalog-banner-text {
  margin: 0;
  color: #1f1c18;
  font-size: 0.95rem;
  line-height: 1.45;
}

.catalog-banner-text.small {
  font-size: 0.85rem;
  color: #6b6a67;
}

.catalog-banner-close {
  background: none;
  border: none;
  color: #a8a29e;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
  align-self: center;
}

.catalog-banner-close:hover {
  color: #4c443b;
}

.catalog-banner.floating-alert {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
}

@media (max-width: 576px) {
  .catalog-banner {
    padding: 0.85rem 0.95rem;
  }

  .catalog-banner-text {
    font-size: 0.9rem;
  }
}

/* ============================================
   PRODUCTOS AGOTADOS
   ============================================ */

/* Tarjeta de producto agotado */
.producto-agotado {
  position: relative;
  opacity: 0.7;
  filter: grayscale(30%);
}

.producto-agotado:hover {
  transform: none !important;
  cursor: not-allowed;
}

/* Badge de agotado */
.badge-agotado {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  letter-spacing: 0.5px;
}

/* Imagen de producto agotado */
.producto-agotado .card-img-top {
  filter: grayscale(50%);
}

/* Botón deshabilitado en producto agotado */
.producto-agotado .btn-primary:disabled {
  background: #9CA3AF !important;
  border-color: #9CA3AF !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Responsive móvil */
@media (max-width: 576px) {
  .badge-agotado {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    top: 8px;
    left: 8px;
  }
}

/* Estilos para botones de variantes */
.variante-btn {
  min-width: 60px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
}

.variante-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.variante-btn.active {
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.variante-btn small {
  margin-top: 2px;
  font-weight: 400;
}

/* Responsive para botones pequeños en móvil */
@media (max-width: 576px) {
  .variante-btn {
    min-width: 50px;
    padding: 8px 15px;
    font-size: 0.9rem;
  }
  
  .variante-btn small {
    font-size: 0.7rem !important;
  }
}

/* ==================== BOTONES DE VARIANTES - PALETA CORRECTA ==================== */

.btn-outline-dark {
  color: #181716;
  border-color: #181716;
  background-color: transparent;
}

.btn-outline-dark:hover {
  color: #fff;
  background-color: #181716;
  border-color: #181716;
}

.btn-dark {
  color: #fff;
  background-color: #181716;
  border-color: #181716;
}

.btn-dark:hover {
  background-color: #61564A;
  border-color: #61564A;
}

.variante-btn {
  min-width: 60px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
}

.variante-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 23, 22, 0.2);
}

.variante-btn.active {
  box-shadow: 0 4px 12px rgba(24, 23, 22, 0.4);
}

.variante-btn small {
  margin-top: 2px;
  font-weight: 400;
}

/* ==================== CARRUSEL DE IMÁGENES ==================== */

#carruselImagenes .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #61564A;
  opacity: 0.5;
}

#carruselImagenes .carousel-indicators button.active {
  opacity: 1;
  background-color: #181716;
}

#carruselImagenes .carousel-control-prev-icon,
#carruselImagenes .carousel-control-next-icon {
  background-color: rgba(24, 23, 22, 0.7);
  border-radius: 50%;
  padding: 20px;
}

#carruselImagenes .carousel-control-prev:hover .carousel-control-prev-icon,
#carruselImagenes .carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(24, 23, 22, 0.9);
}

/* Asegurar que las imágenes se vean completas */
.vista-previa-imagen {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  max-height: 500px;
}

#carruselImagenes .carousel-inner {
  background-color: #f8f9fa;
}

#carruselImagenes .carousel-item img {
  object-fit: contain !important;
  max-height: 500px !important;
  width: 100% !important;
  height: auto !important;
}

/* Lupa del zoom */
.vista-previa-lupa {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 3px solid #181716;
  border-radius: 50%;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 500%;
  z-index: 1000;
  display: none;
}

/* Responsive */
@media (max-width: 576px) {
  .variante-btn {
    min-width: 50px;
    padding: 8px 15px;
    font-size: 0.9rem;
  }
  
  .variante-btn small {
    font-size: 0.7rem !important;
  }
  
  .vista-previa-imagen,
  #carruselImagenes .carousel-item img {
    max-height: 300px !important;
  }
}

/* ============================================
   REDISENO MODAL PRODUCTO - ESTILO PROTOTIPO
   ============================================ */
#vistaPreviaModal .modal-dialog.modal-vista-previa {
  width: min(1080px, 92vw);
  max-width: 92vw;
  height: min(860px, 90dvh);
  margin: 4dvh auto;
}

#vistaPreviaModal .modal-content.modal-vista-previa-content {
  border-radius: 0;
  border: none !important;
  background: #f5f3f0;
  box-shadow: 0 24px 60px rgba(24, 23, 22, 0.22);
  height: 100%;
  overflow: hidden;
}

#vistaPreviaModal .modal-header.modal-vista-previa-header {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  z-index: 20;
  padding: 1.15rem;
  background: transparent;
}

#vistaPreviaModal .modal-header.modal-vista-previa-header .btn-close {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

#vistaPreviaModal .modal-body.modal-vista-previa-body {
  padding: 0;
  height: 100%;
  overflow: hidden;
}

#vistaPreviaModal .vista-previa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, 1fr);
  gap: 0;
  max-width: none;
  height: 100%;
}

#vistaPreviaModal .vista-previa-imagen-section {
  background: #f2f0ec;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 0;
}

#vistaPreviaModal .vista-previa-gallery-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(120deg, #efebe4 0%, #f6f4f1 45%, #eeebe5 100%);
  padding: 0;
  display: flex;
}

#vistaPreviaModal .vista-previa-imagen-wrapper,
#vistaPreviaModal .vista-previa-imagen-container,
#vistaPreviaModal .vista-previa-gallery,
#vistaPreviaModal .vista-previa-gallery-main,
#vistaPreviaModal .vista-previa-imagen-stage {
  width: 100%;
  height: 100%;
}

#vistaPreviaModal .vista-previa-gallery {
  gap: 0;
}

#vistaPreviaModal .vista-previa-gallery-main {
  min-height: 0;
  border-radius: 0;
  padding: 1.1rem 1.1rem 0.9rem;
  box-shadow: none;
  background: transparent;
}

#vistaPreviaModal .vista-previa-gallery-main::before,
#vistaPreviaModal .vista-previa-imagen-stage::after,
#vistaPreviaModal .gallery-progress,
#vistaPreviaModal .gallery-count,
#vistaPreviaModal .gallery-nav,
#vistaPreviaModal .vista-previa-zoom-hint {
  display: none !important;
}

#vistaPreviaModal .vista-previa-imagen-stage {
  height: 100%;
  min-height: 520px;
  max-height: calc(100dvh - 210px);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

#vistaPreviaModal .vista-previa-imagen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: none !important;
}

#vistaPreviaModal .gallery-thumbs-wrapper {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 0;
  margin-top: 0.8rem;
}

#vistaPreviaModal .gallery-track {
  gap: 0.6rem;
  justify-content: flex-start;
}

#vistaPreviaModal .gallery-thumb {
  width: 74px;
  height: 92px;
  border-radius: 14px;
  background: #f7f5f2;
  border: 1px solid rgba(97, 86, 74, 0.2);
  box-shadow: none;
}

#vistaPreviaModal .gallery-thumb.active {
  transform: none;
  border-color: #37322d;
}

#vistaPreviaModal .gallery-thumb img {
  object-fit: cover;
}

#vistaPreviaModal .vista-previa-info-section {
  background: #fbfaf8;
  border-left: 1px solid rgba(97, 86, 74, 0.18);
  overflow-y: auto;
  padding: 2rem 1.8rem;
}

#vistaPreviaModal .vista-previa-info {
  gap: 1rem;
}

.modal-product-breadcrumb {
  margin: 0;
  font-size: 0.86rem;
  color: #6a655e;
}

#vistaPreviaModal .vista-previa-nombre {
  font-size: clamp(2.4rem, 4.8vw, 4.6rem);
  line-height: 0.95;
  margin: 0;
  color: #27231f;
}

#vistaPreviaModal .vista-previa-precio-section {
  margin-bottom: 0;
}

#vistaPreviaModal .vista-previa-precio {
  font-size: clamp(2rem, 3.2vw, 3rem);
  color: #23201c;
}

#vistaPreviaModal .vista-previa-descripcion-texto {
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #4f4a43;
}

#vistaPreviaModal .modal-product-tags {
  margin-bottom: 0.25rem;
}

#vistaPreviaModal .product-tag {
  border-radius: 999px;
  background: #f6f3ee;
}

#vistaPreviaModal .modal-option-group {
  margin-top: 0.15rem;
}

#vistaPreviaModal .modal-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

#vistaPreviaModal .modal-option-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #36322d;
}

#vistaPreviaModal .modal-option-guide {
  border: none;
  background: transparent;
  color: #6b655f;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.82rem;
}

#vistaPreviaModal .modal-size-options,
#vistaPreviaModal .modal-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

#vistaPreviaModal .modal-chip-btn {
  border-radius: 999px;
  padding: 0.48rem 1.05rem;
  font-size: 0.9rem;
  border-color: rgba(97, 86, 74, 0.25);
  color: #4a453f;
}

#vistaPreviaModal .modal-chip-btn.active,
#vistaPreviaModal .modal-chip-btn.btn-dark {
  background: #5b5247;
  border-color: #5b5247;
  color: #f6f1ea;
}

#vistaPreviaModal .modal-color-swatch {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(97, 86, 74, 0.28);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

#vistaPreviaModal .modal-color-dot {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: block;
}

#vistaPreviaModal .modal-color-swatch.active,
#vistaPreviaModal .modal-color-swatch.btn-dark {
  border: 2px solid #2f2a25;
}

#vistaPreviaModal .vista-previa-actions-row {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 0.8rem;
}

#vistaPreviaModal .qty-controls-modal {
  background: #fff;
  border-radius: 999px;
  border: 1px solid rgba(97, 86, 74, 0.25);
  padding: 0.24rem;
  gap: 0.15rem;
}

#vistaPreviaModal .qty-btn-modal {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
}

#vistaPreviaModal .qty-input-modal {
  border: none;
  min-width: 34px;
  padding: 0;
  font-size: 1rem;
}

#vistaPreviaModal .vista-previa-btn-agregar {
  border-radius: 999px;
  font-size: 1.03rem;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
}

#vistaPreviaModal .vista-previa-links-row {
  margin-top: 0.1rem;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

#vistaPreviaModal .modal-link-btn {
  border: none;
  background: transparent;
  color: #666058;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

@media (max-width: 992px) {
  #vistaPreviaModal .modal-dialog.modal-vista-previa {
    width: min(1080px, 97vw);
    height: 96dvh;
    margin: 0.5dvh auto;
  }

  #vistaPreviaModal .vista-previa-grid {
    grid-template-columns: 1fr;
  }

  #vistaPreviaModal .vista-previa-imagen-stage {
    min-height: 460px;
    max-height: 56dvh;
  }

  #vistaPreviaModal .vista-previa-gallery-main {
    padding: 1.15rem 1rem 6.5rem;
  }

  #vistaPreviaModal .vista-previa-info-section {
    border-left: none;
    border-top: 1px solid rgba(97, 86, 74, 0.16);
    padding: 1.3rem 1.1rem 1.5rem;
  }
}

@media (max-width: 576px) {
  #vistaPreviaModal .modal-dialog.modal-vista-previa {
    width: calc(100vw - 0.35rem);
    max-width: calc(100vw - 0.35rem);
    height: calc(100dvh - 0.35rem);
    margin: 0.175rem auto;
  }

  #vistaPreviaModal .vista-previa-imagen-stage {
    min-height: 0;
    height: min(58dvh, 470px);
    max-height: none;
  }

  #vistaPreviaModal .vista-previa-gallery-main {
    padding: 0.9rem 0.7rem 6rem;
  }

  #vistaPreviaModal .gallery-thumbs-wrapper {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.7rem;
  }

  #vistaPreviaModal .gallery-thumb {
    width: 60px;
    height: 72px;
  }

  #vistaPreviaModal .vista-previa-actions-row {
    grid-template-columns: 1fr;
  }
}

/* Ajuste final mobile: 1 columna real, imagen completa sin recorte */
@media (max-width: 992px) {
  #vistaPreviaModal .modal-dialog.modal-vista-previa {
    height: auto !important;
    max-height: calc(100dvh - 1.5rem);
    width: min(980px, 94vw);
    max-width: 94vw;
    margin: 0.75rem auto;
  }

  #vistaPreviaModal .modal-content.modal-vista-previa-content {
    height: auto !important;
    max-height: calc(100dvh - 0.25rem);
  }

  #vistaPreviaModal .modal-body.modal-vista-previa-body {
    overflow-y: auto;
  }

  #vistaPreviaModal .vista-previa-grid {
    display: block;
    height: auto !important;
  }

  #vistaPreviaModal .vista-previa-imagen-section,
  #vistaPreviaModal .vista-previa-gallery-shell,
  #vistaPreviaModal .vista-previa-imagen-wrapper,
  #vistaPreviaModal .vista-previa-imagen-container,
  #vistaPreviaModal .vista-previa-gallery,
  #vistaPreviaModal .vista-previa-gallery-main,
  #vistaPreviaModal .vista-previa-imagen-stage {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #vistaPreviaModal .vista-previa-gallery-main {
    padding: 0.5rem 0.5rem 0.55rem;
    overflow: hidden;
  }

  #vistaPreviaModal .vista-previa-imagen-stage {
    padding: 0;
    overflow: hidden;
  }

  #vistaPreviaModal .vista-previa-imagen {
    display: block;
    width: min(88vw, 520px);
    margin: 0 auto;
    height: auto !important;
    max-height: 52dvh !important;
    object-fit: contain;
  }

  #vistaPreviaModal .gallery-thumbs-wrapper {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 0.45rem;
  }

  #vistaPreviaModal .gallery-track {
    gap: 0.45rem;
  }

  #vistaPreviaModal .gallery-thumb {
    width: 56px;
    height: 68px;
  }
}

@media (max-width: 576px) {
  #vistaPreviaModal .modal-dialog.modal-vista-previa.modal-dialog-centered {
    min-height: 100dvh;
    display: flex;
    align-items: center;
  }

  #vistaPreviaModal .modal-dialog.modal-vista-previa {
    width: min(92vw, 520px);
    max-width: min(92vw, 520px);
    height: auto !important;
    max-height: 88dvh;
    margin: auto;
  }

  #vistaPreviaModal .modal-content.modal-vista-previa-content {
    height: auto !important;
    max-height: 88dvh;
    border-radius: 18px;
    overflow: hidden;
  }

  #vistaPreviaModal .vista-previa-gallery-main {
    padding: 0.35rem 0.35rem 0.45rem;
  }

  #vistaPreviaModal .vista-previa-imagen {
    width: min(84vw, 420px);
    max-height: 44dvh !important;
  }

  #vistaPreviaModal .gallery-thumb {
    width: 52px;
    height: 64px;
  }

  #vistaPreviaModal .vista-previa-imagen-section {
    margin-bottom: 0.5rem;
  }
}

/* ============================================
   HOME REDISEÑO - EDITORIAL CALIDO
   ============================================ */
body.home-editorial {
  background:
    radial-gradient(1200px 420px at 8% -12%, rgba(165, 155, 143, 0.18), transparent 58%),
    radial-gradient(1000px 380px at 96% -18%, rgba(97, 86, 74, 0.12), transparent 62%),
    #f6f3ef;
}

body.home-editorial .navbar {
  background: rgba(244, 240, 235, 0.94) !important;
  border-bottom: 1px solid rgba(97, 86, 74, 0.18);
  box-shadow: 0 8px 20px rgba(24, 23, 22, 0.08);
  backdrop-filter: blur(8px);
  min-height: 68px;
}

body.home-editorial .navbar .container-fluid {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

body.home-editorial .navbar-brand {
  padding-block: 0.2rem;
}

body.home-editorial .navbar-logo {
  height: 44px;
}

body.home-editorial .search-container .input-group,
body.home-editorial .mobile-search-bar .input-group {
  border-color: rgba(97, 86, 74, 0.2);
  border-radius: 999px;
  background: #faf8f5;
}

body.home-editorial .search-container .input-group:focus-within,
body.home-editorial .mobile-search-bar .input-group:focus-within {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(97, 86, 74, 0.14);
}

body.home-editorial .btn-carrito {
  border-radius: 999px;
  padding-inline: 1.35rem;
  box-shadow: 0 6px 14px rgba(74, 67, 58, 0.24);
}

body.home-editorial #hamburger-btn,
body.home-editorial #mobile-search-btn {
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary) !important;
}

body.home-editorial #hamburger-btn:hover,
body.home-editorial #mobile-search-btn:hover {
  background: rgba(97, 86, 74, 0.12);
}

body.home-editorial .search-container #clear-search,
body.home-editorial .mobile-search-bar #clear-search-mobile {
  border: none !important;
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
  border-radius: 999px;
}

body.home-editorial .search-container #clear-search:hover,
body.home-editorial .mobile-search-bar #clear-search-mobile:hover {
  color: var(--text-primary);
  background: rgba(97, 86, 74, 0.08);
}

body.home-editorial .search-container .form-control,
body.home-editorial .mobile-search-bar .form-control {
  line-height: 1.2;
}

body.home-editorial #hamburger-btn:focus-visible,
body.home-editorial #mobile-search-btn:focus-visible,
body.home-editorial .btn-carrito:focus-visible,
body.home-editorial .search-container .form-control:focus-visible,
body.home-editorial .mobile-search-bar .form-control:focus-visible {
  outline: 2px solid rgba(97, 86, 74, 0.45);
  outline-offset: 2px;
}

body.home-editorial .main-layout {
  gap: 1rem;
  max-width: 1400px;
  padding: 1rem 1rem 1.2rem;
}

body.home-editorial .sidebar-filters {
  background: #f7f3ee;
  border: 1px solid rgba(97, 86, 74, 0.16);
  border-radius: 18px;
  margin-top: 0.15rem;
  top: calc(var(--navbar-height) + 0.9rem);
  height: calc(100vh - var(--navbar-height) - 1.55rem);
  box-shadow: 0 12px 24px rgba(24, 23, 22, 0.08);
}

body.home-editorial .filters-header {
  border-bottom-color: rgba(97, 86, 74, 0.16);
}

body.home-editorial .filter-title {
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

body.home-editorial .category-item {
  border-radius: 11px;
  border-color: rgba(97, 86, 74, 0.18);
  background: #fbfaf8;
}

body.home-editorial .category-item:hover {
  transform: translateX(0);
  border-color: rgba(97, 86, 74, 0.36);
  background: #f3eee7;
}

body.home-editorial .category-item.active {
  background: linear-gradient(135deg, #605649 0%, #7b7165 100%);
  border-color: #605649;
}

body.home-editorial .main-content {
  background: #fbf9f6;
  border: 1px solid rgba(97, 86, 74, 0.12);
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(24, 23, 22, 0.06);
  padding: 1.55rem;
  padding-right: 2.2rem;
}

body.home-editorial #sort-select {
  border-radius: 999px;
  border-color: rgba(97, 86, 74, 0.22);
  background: #f7f4f0;
}

body.home-editorial #productos-container.row {
  margin: 0 -0.6rem;
  max-width: 1200px;
}

body.home-editorial #productos-container.row > div {
  padding: 0 0.6rem;
  margin-bottom: 1.35rem;
}

body.home-editorial .producto-card {
  border: 1px solid rgba(97, 86, 74, 0.16) !important;
  border-radius: 16px !important;
  background: #fcfbfa;
  box-shadow: 0 12px 26px rgba(24, 23, 22, 0.07);
  min-height: 100%;
}

body.home-editorial .producto-card:hover {
  box-shadow: 0 18px 32px rgba(24, 23, 22, 0.12);
  border-color: rgba(97, 86, 74, 0.36) !important;
}

body.home-editorial .producto-card .card-img-top {
  height: 254px;
  padding: 1.1rem;
  background: linear-gradient(150deg, #f4efe8 0%, #f9f6f2 65%, #f2ece4 100%);
}

body.home-editorial .producto-card .card-body {
  background: #fcfbfa;
  padding: 1.2rem 1.05rem 1.1rem;
  gap: 0.22rem;
}

body.home-editorial .producto-card .card-title {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 1.52rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 0.98;
  min-height: auto;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 992px) {
  body.home-editorial .producto-card .card-title {
    margin-bottom: 0.35rem;
  }
}

body.home-editorial .producto-card .text-muted.small {
  margin-bottom: 0.1rem !important;
  line-height: 1.25;
  font-size: 0.76rem !important;
  text-transform: none;
  letter-spacing: 0;
  color: #7a7166 !important;
}

body.home-editorial .producto-card .fs-5,
body.home-editorial .producto-card .fs-4 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 2.08rem !important;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #1c1916 !important;
  margin-bottom: 0.52rem !important;
}

body.home-editorial .descripcion-card {
  min-height: 4rem;
}

body.home-editorial .descripcion-card .descripcion-texto {
  -webkit-line-clamp: 4;
  line-height: 1.34;
  font-size: 0.84rem;
  color: #625a50 !important;
  text-transform: none;
  letter-spacing: normal;
}

body.home-editorial .qty-controls-card {
  border-radius: 999px;
  border-color: rgba(97, 86, 74, 0.22);
  background: #fff;
}

body.home-editorial .qty-btn-card {
  border-radius: 999px;
  border-color: rgba(97, 86, 74, 0.24);
}

body.home-editorial .qty-input-card {
  border: none;
  background: transparent;
}

body.home-editorial .producto-card .btn-primary {
  border-radius: 999px;
  letter-spacing: 0.01em;
  font-weight: 700;
  padding: 0.68rem 1rem;
  font-size: 0.9rem;
}

body.home-editorial .catalog-banner {
  border: 1px solid rgba(97, 86, 74, 0.18);
  border-left-width: 3px;
  border-radius: 14px;
  background: #f9f6f2;
}

body.home-editorial #loading,
body.home-editorial #no-productos {
  background: #f8f5f1;
  border: 1px dashed rgba(97, 86, 74, 0.24);
  border-radius: 14px;
}

@media (max-width: 991px) {
  body.home-editorial .main-layout {
    display: block;
    padding: 0.55rem 0.55rem 1rem;
  }

  body.home-editorial .navbar {
    min-height: 62px;
  }

  body.home-editorial .navbar .container-fluid {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  body.home-editorial .navbar-logo {
    height: 38px;
  }

  body.home-editorial #hamburger-btn,
  body.home-editorial #mobile-search-btn {
    width: 34px;
    height: 34px;
  }

  body.home-editorial .btn-carrito {
    padding: 0.48rem 0.95rem;
  }

  body.home-editorial .main-content {
    margin-top: 0.45rem;
    padding: 0.9rem;
    border-radius: 14px;
    padding-right: 0.9rem;
  }

  body.home-editorial .sidebar-filters {
    margin-top: 0;
    top: 0;
    height: 100vh;
    border-radius: 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
  }

  body.home-editorial .producto-card .card-img-top {
    height: 184px;
    padding: 0.62rem;
  }

  body.home-editorial .producto-card .card-title {
    font-size: 1.2rem;
    min-height: auto;
    line-height: 0.99;
  }

  body.home-editorial .producto-card .text-muted.small {
    font-size: 0.69rem !important;
  }

  body.home-editorial .producto-card .fs-5,
  body.home-editorial .producto-card .fs-4 {
    font-size: 1.68rem !important;
    margin-bottom: 0.42rem !important;
  }

  body.home-editorial .producto-card .card-body {
    padding: 0.9rem 0.78rem 0.82rem;
    gap: 0.18rem;
  }

  body.home-editorial .descripcion-card {
    min-height: 3.1rem;
  }

  body.home-editorial .descripcion-card .descripcion-texto {
    -webkit-line-clamp: 3;
    line-height: 1.32;
    font-size: 0.78rem;
  }

  body.home-editorial .producto-card .btn-primary {
    padding: 0.56rem 0.78rem;
    font-size: 0.82rem;
  }

  body.home-editorial .qty-controls-card {
    padding: 0.28rem;
    gap: 0.32rem;
  }

  body.home-editorial .qty-btn-card {
    width: 28px;
    height: 28px;
    font-size: 0.74rem;
  }

  body.home-editorial .qty-input-card {
    min-width: 40px;
    font-size: 0.9rem;
  }
}
