/**
 * Enhanced Product Detail Page Styles
 * 
 * Custom CSS styles for the product detail page with truck capacity visualization
 * 
 * @author Claude
 * @version 1.0
 */

/* Base Styling */
:root {
  --primary-color: #7db86c;
  --primary-dark: #6da35d;
  --secondary-color: #3b2e8a;
  --text-color: #1F2937;
  --light-gray: #F9FAFB;
  --dark-gray: #6B7280;
  --border-color: #E5E7EB;
  --transition-base: all 0.3s ease-in-out;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: var(--light-gray);
}

/* Common Elements */
.transition-ani {
  transition: var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.gradient-button {
  background-image: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  transition: opacity 0.3s ease;
}

.gradient-button:hover {
  opacity: 0.9;
}

/* Truck Capacity Visualization */
.truck-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.truck-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.2);
}

.truck-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.75s ease;
  z-index: 1;
}

.truck-card:hover::before {
  left: 150%;
}

.truck-header {
  transition: background-color 0.3s ease;
}

.truck-card:hover .truck-header {
  background-color: var(--primary-dark);
}

.capacity-number {
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.truck-card:hover .capacity-number {
  transform: scale(1.1);
  color: var(--primary-dark);
}

/* Tab System Enhanced */
.tab-button {
  position: relative;
  transition: color 0.3s ease, background-color 0.3s ease;
  overflow: hidden;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-button:hover::after,
.tab-button.active::after {
  width: 100%;
}

.tab-content {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ripple Effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Product Information */
.product-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.product-title::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  bottom: -5px;
  left: 15%;
  border-radius: 2px;
}

.product-code {
  font-size: 0.875rem;
  color: var(--dark-gray);
  margin-bottom: 1rem;
}

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

.product-feature {
  background-color: var(--light-gray);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.product-feature:hover {
  background-color: #F3F4F6;
}

.product-feature svg {
  color: var(--primary-color);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Truck Capacity Section */
.capacity-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: #FFFFFF;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.capacity-section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  position: relative;
}

.capacity-section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
}

.capacity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.capacity-card {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.capacity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.capacity-card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1rem;
  font-weight: 600;
}

.capacity-card-body {
  padding: 1.5rem;
  text-align: center;
}

.capacity-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.capacity-label {
  color: var(--dark-gray);
  font-size: 0.875rem;
}

.capacity-info {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--dark-gray);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .capacity-grid {
    grid-template-columns: 1fr;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .capacity-value {
    font-size: 2rem;
  }
}

/* Tab System Styles */
.tabs-container {
  margin-top: 2rem;
  background-color: #F9FAFB;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.tabs-header::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.tab-button {
  padding: 1rem 1.5rem;
  white-space: nowrap;
  font-weight: 500;
  color: var(--dark-gray);
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-button:hover {
  color: var(--primary-color);
  background-color: rgba(16, 185, 129, 0.05);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: white;
}

.tab-content {
  padding: 1.5rem;
  background-color: white;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Tooltip Styles */
.tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  max-width: 250px;
  text-align: center;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 5px 5px 5px;
  border-style: solid;
  border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
}

/* Buttons */
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.primary-button {
  background-image: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  color: white;
}

.primary-button:hover {
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.secondary-button {
  background-color: #EDF2F7;
  color: var(--text-color);
}

.secondary-button:hover {
  background-color: #E2E8F0;
}

/* Loader Animation */
.loader {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background-color: white;
  }
  
  .product-detail-container {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .capacity-section {
    break-inside: avoid;
  }
}