/* Estilos para el catálogo de productos */

/* Tarjetas de producto - Diseño moderno */
.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f8fafc;
  overflow: hidden;
}

/* Botón de favoritos */
.btn-favorito {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-center: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #6b7280;
}

.btn-favorito:hover {
  transform: scale(1.1);
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-favorito.favorito-activo {
  color: #ef4444;
  background: #fee2e2;
}

.btn-favorito.favorito-activo:hover {
  background: #fecaca;
  transform: scale(1.15);
}

.btn-favorito svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}


.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  background-color: #e5e7eb;
  min-height: 300px;
}

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

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ef4444;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: none;
}

.product-badge.show {
  display: block;
}

.product-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 6px;
}

/* Badge de categoría */
.product-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  padding: 6px 12px;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 4px;
}

.product-category-badge .category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.product-category-badge span:last-child {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Título del producto */
.product-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tamaño */
.product-size {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  font-style: italic;
}

/* Precio y stock */
.product-pricing {
  margin: 8px 0;
}

.product-price {
  font-size: 24px;
  font-weight: 800;
  color: #10b981;
  display: block;
}

.product-stock-text {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-top: 2px;
}

.product-stock-text.low-stock {
  color: #ef4444;
  font-weight: 600;
}

/* Botones */
.product-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-add-cart {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-cart svg {
  flex-shrink: 0;
}

.btn-add-cart:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-add-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-contact {
  padding: 12px 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-contact svg {
  flex-shrink: 0;
}

.btn-email-small {
  background: white !important;
  color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.btn-email-small:hover {
  background: #3b82f6 !important;
  color: white !important;
}

.btn-whatsapp-small {
  background: white !important;
  color: #25d366 !important;
  border-color: #25d366 !important;
}

.btn-whatsapp-small:hover {
  background: #25d366 !important;
  color: white !important;
}

.product-name {
  font-weight: 700;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.4;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-section {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
}

.product-price {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-stock {
  font-size: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-weight: 700;
}

.product-stock.stock-disponible {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.product-stock.stock-bajo {
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  color: #92400e;
}

/* Botones VIP con degradados */
.product-actions-vip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.btn-vip {
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cart {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
}

.btn-cart:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

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

.btn-email {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
}

.btn-email:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
  color: white !important;
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.btn-vip:active {
  transform: translateY(0);
}

.category-indicator {
  width: 4px;
  height: 40px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Diseño VIP para tarjetas */
.product-card.vip-design {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.product-card.vip-design:hover {
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .product-name {
    font-size: 14px;
    min-height: 40px;
  }

  .product-price {
    font-size: 20px;
  }

  .product-actions-vip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .btn-vip {
    flex-direction: row;
    justify-content: center;
    padding: 12px;
    font-size: 13px;
  }
}

/* ============================================
   SELECTOR DE CANTIDAD EN TARJETAS
   ============================================ */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 6px 8px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  color: #374151;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qty-btn:hover:not(:disabled) {
  background: #10b981;
  color: white;
  transform: scale(1.05);
}

.qty-btn:active:not(:disabled) {
  transform: scale(0.95);
}

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

.qty-input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  background: white;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

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

/* Responsive para selector de cantidad */
@media (max-width: 480px) {
  .quantity-selector {
    padding: 4px 6px;
  }
  
  .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .qty-input {
    width: 42px;
    height: 28px;
    font-size: 13px;
  }
}
