/* Enhanced styles for better visual appeal */

/* General improvements */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text-color);
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Product page enhancements */
.product-container {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  position: relative;
}

.product-media {
  background: var(--gradient-secondary);
  position: relative;
  overflow: hidden;
}

.product-media::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
  backdrop-filter: blur(1px);
}

.product-media img, .product-media video {
  position: relative;
  z-index: 2;
  border-radius: 15px;
}

.product-details {
  padding: 30px;
  background: transparent;
}

.product-details h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-details .description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Rating improvements */
.rating-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
}

.stars-wrap {
  position: relative;
  font-size: 24px;
}

.stars-bottom, .stars-top {
  display: inline-block;
}

.stars-bottom {
  color: #ddd;
}

.stars-top {
  color: #ffd700;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.rating-text {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1rem;
}

/* Options row */
.options-row {
  display: flex;
  gap: 20px;
  margin: 25px 0;
}

.select-wrapper {
  flex: 1;
}

.select-wrapper label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--surface);
  color: var(--text-color);
}

.form-select:focus {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  outline: none;
}

/* Buttons */
.add-cart-btn, .marketplace-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.add-cart-btn::before, .marketplace-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.add-cart-btn:hover::before, .marketplace-btn:hover::before {
  left: 100%;
}

.add-cart-btn:hover, .marketplace-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Rating input stars improvements */
.rating-input-stars {
  display: flex;
  gap: 5px;
  align-items: center;
}

.rating-input-stars .star {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.rating-input-stars .star:hover, .rating-input-stars .star.hovered {
  color: #ffd700;
  transform: scale(1.2);
}

.rating-input-stars .star.selected {
  color: #ffd700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

#ratingSelectedTextBottom {
  font-weight: bold;
  color: var(--brand-1);
  margin-left: 10px;
  font-size: 1.1rem;
}

/* News ticker improvements */
#news-ticker {
  background: var(--gradient-accent) !important;
  color: #fff !important;
  padding: 12px !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm) !important;
}

#ticker-inner {
  font-weight: 600;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-container, #news-list .news-item.card {
  animation: fadeInUp 0.6s ease-out;
}

/* Additional visual enhancements */

/* Gradient backgrounds for sections */
.product-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  z-index: -1;
  border-radius: 20px;
}

#news-list .news-item.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
  z-index: -1;
  border-radius: 20px;
}

/* Button hover effects */
.add-cart-btn:active, .marketplace-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Smooth scrolling for thumbnails */
.thumbnails {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.thumb:focus {
  outline: 2px solid var(--brand-1);
  outline-offset: 2px;
}

.rating-input-stars .star:focus {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}

/* Loading animation for images */
.product-media img, .thumb img {
  transition: opacity 0.3s ease;
}

.product-media img[src=""],
.thumb img[src=""] {
  opacity: 0;
}

.product-media img:not([src=""]),
.thumb img:not([src=""]) {
  opacity: 1;
}

/* Thumbnails for image gallery */
.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.thumb:hover {
  opacity: 1;
  border-color: var(--brand-1);
  transform: scale(1.1);
}

.thumb.active, .thumb[style*="2px solid #21a366"] {
  opacity: 1;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Navigation buttons for gallery */
.media-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 10;
}

.media-nav-btn:hover {
  background: var(--brand-1);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.media-nav-btn.prev {
  left: 10px;
}

.media-nav-btn.next {
  right: 10px;
}

/* Mobile gallery improvements */
.gallery-mobile .gallery-track {
  display: flex;
  transition: transform 0.3s ease;
}

.gallery-mobile img, .gallery-mobile video {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
}