/* Custom CSS for 50StatesWireless E-commerce Site */

/* Tooltip styles for product names */
.tooltip-trigger {
  position: relative;
  cursor: help;
}

.tooltip-trigger::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  margin-bottom: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tooltip-trigger:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Two-line text display for product names */
.product-name-two-lines {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
  min-height: 2.6em !important; /* Ensures exactly 2 lines */
  max-height: 2.6em !important; /* Prevents more than 2 lines */
}

/* Enhanced hover effects for variant circles */
.variant-circle {
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Product description truncation */
#product-description {
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: auto;
}

.variant-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Price range styling */
.price-range {
  color: #dc2626;
  font-weight: 800;
}

/* Color variant circle styles */
.color-variant {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 2px;
}

.color-variant:hover {
  transform: scale(1.2);
  border-color: #374151;
}

.color-variant.selected {
  border-color: #1f2937;
  border-width: 2px;
}

/* Responsive grid improvements */
@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Enhanced shadow effects */
.product-card {
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* NewRock Brand Colors */
.nrw-bg-blue {
  background-color: #1e40af;
}

.nrw-text-red {
  color: #dc2626;
}

.nrw-bg-red {
  background-color: #dc2626;
}

.nrw-btn-blue {
  background-color: #1e40af;
  transition: all 0.2s ease;
}

.nrw-btn-blue:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Animation for cart updates */
.cart-update {
  animation: cartBounce 0.6s ease;
}

@keyframes cartBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Enhanced focus states for accessibility */
button:focus,
.variant-swatch:focus,
.color-variant:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Price display improvements */
.price-display {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
  .tooltip-trigger::after {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .color-variant {
    width: 14px;
    height: 14px;
  }
}
