/* Product Details Styles */
:root {
  --product-card-height: 500px;
  --product-image-height: 200px;
  --product-card-radius: 15px;
  --product-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --product-card-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  --product-card-bg: #fff;
  --product-image-bg: #f8f9fa;
  --product-title-color: #2c2c2c;
  --product-price-color: #005bea;
  --product-text-color: #6c757d;
  --transition-speed: 0.3s;
}

/* Product Card Base Styles */
.product-card {
  background: var(--product-card-bg);
  border-radius: var(--product-card-radius);
  box-shadow: var(--product-card-shadow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  overflow: hidden;
  height: var(--product-card-height);
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--product-card-hover-shadow);
}

/* Product Image Styles */
.product-image {
  position: relative;
  width: 100%;
  height: var(--product-image-height);
  background: var(--product-image-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-speed) ease;
}

/* Product Info Styles */
.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--product-title-color);
  height: 3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  color: var(--product-text-color);
  margin-bottom: 1rem;
  flex: 1;
}

/* Product Variants Styles */
.product-variants {
  margin-bottom: 1.5rem;
  overflow-y: auto;
  max-height: 200px;
}

.variant {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--product-image-bg);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.variant:last-child {
  margin-bottom: 0;
}

.variant .power {
  font-weight: 500;
  color: var(--product-title-color);
}

.variant .price {
  font-weight: 600;
  color: var(--product-price-color);
}

/* View Details Button */
.view-details {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  background: linear-gradient(90deg, #00c6fb 0%, #005bea 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.view-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,102,255,0.2);
}

/* Product Details Modal */
.product-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.product-details-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--product-card-bg);
  border-radius: var(--product-card-radius);
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-speed) ease;
}

.product-details-modal.active .modal-content {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c2c2c;
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #2c2c2c;
}

.modal-body {
  padding: 1.5rem;
}

.product-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.product-details-image {
  position: relative;
  padding-top: 75%;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
}

.product-details-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-details-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #2c2c2c;
}

.product-features li:before {
  content: "✓";
  color: #2ecc71;
  font-weight: bold;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.spec-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
}

.spec-label {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.spec-value {
  font-weight: 500;
  color: #2c2c2c;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
  :root {
    --product-card-height: 450px;
  }
  
  .product-details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  :root {
    --product-card-height: 400px;
    --product-image-height: 180px;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .product-info h3 {
    font-size: 1.1rem;
  }
}

/* Loading State */
.loading {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading:after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--product-price-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 