/* Product Showcase Styles - Using main.css root variables */

/* Updated all class names to use product-show prefix to avoid conflicts */
/* Breadcrumb Navigation */
.product-show-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-family: var(--font-primary);
}

.product-show-breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-show-breadcrumb-link:hover {
  color: var(--color-primary);
}

.product-show-breadcrumb-separator {
  color: var(--border-light-two);
  margin: 0 0.25rem;
}

.product-show-breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Product Header */
.product-show-header {
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-gray-1) 100%);
  padding: 4rem 0 2rem; /* Reduced padding for more compact header */
  border-bottom: 1px solid var(--border-light);
}

.product-show-title {
  font-size: 1.5rem; /* Reduced from 2rem for more compact look */
  font-weight: 600; /* Reduced from 700 for less aggressive appearance */
  color: var(--text-primary);
  margin-bottom: 0.75rem; /* Reduced margin */
  line-height: 1.3;
  font-family: var(--font-primary);
}

.product-show-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* Reduced gap for more compact spacing */
  align-items: center;
}

.product-show-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem; /* Reduced font size for compactness */
  font-family: var(--font-primary);
}

.product-show-meta-item i {
  color: var(--color-secondary);
}

.product-show-trending-badge {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #e6b800 100%);
  color: var(--color-white);
  padding: 0.2rem 0.6rem; /* Reduced padding for smaller badge */
  border-radius: 16px; /* Smaller border radius */
  font-size: 0.7rem; /* Smaller font size */
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-primary);
}

.product-show-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.product-show-actions .btn {
  font-family: var(--font-primary);
}

/* Product Content */
.product-show-content-card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Reduced shadow for subtler appearance */
  border: 1px solid var(--border-light);
  overflow: hidden;
  /* Added max-height and proper scrolling behavior */
  max-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
}

.product-show-content-wrapper {
  padding: 1.5rem; /* Reduced padding for compactness */
  font-family: var(--font-primary);
  color: var(--text-secondary);
  font-size: 0.9rem; /* Slightly smaller font size */
  line-height: 1.6;
  /* Added proper scrolling behavior */
  overflow-y: auto;
  flex: 1;
  max-height: calc(100vh - 12rem);
}

.product-show-content-wrapper::-webkit-scrollbar {
  width: 4px; /* Thinner scrollbar */
}

.product-show-content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.product-show-content-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-light-two);
  border-radius: 2px;
}

.product-show-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Content Styling */
.product-show-content-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 6px; /* Smaller border radius */
  margin: 0.75rem 0; /* Reduced margin */
}

.product-show-content-wrapper a {
  color: var(--color-primary);
  text-decoration: none;
}

.product-show-content-wrapper a:hover {
  text-decoration: underline;
}

.product-show-content-wrapper h1,
.product-show-content-wrapper h2,
.product-show-content-wrapper h3,
.product-show-content-wrapper h4,
.product-show-content-wrapper h5,
.product-show-content-wrapper h6 {
  color: var(--text-primary);
  font-family: var(--font-primary);
  margin-bottom: 0.75rem; /* Reduced margin for compactness */
}

.product-show-content-wrapper ul {
  list-style-type: none;
  padding-left: 0;
}

.product-show-content-wrapper ul li {
  position: relative;
  padding-left: 1.2rem; /* Reduced padding */
  margin-bottom: 0.4rem; /* Reduced margin */
}

.product-show-content-wrapper ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.product-show-content-wrapper table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75rem 0; /* Reduced margin */
  border-radius: 6px; /* Smaller border radius */
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtler shadow */
}

.product-show-content-wrapper td,
.product-show-content-wrapper th {
  padding: 0.6rem; /* Reduced padding */
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem; /* Smaller font size */
}

.product-show-content-wrapper th {
  background: var(--color-gray-1);
  font-weight: 600;
  color: var(--text-primary);
}

.product-show-content-wrapper pre {
  background: var(--color-gray-1);
  padding: 0.75rem; /* Reduced padding */
  border-radius: 6px; /* Smaller border radius */
  border-left: 3px solid var(--color-primary); /* Thinner border */
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.85rem; /* Smaller font size */
}

/* Purchase Sidebar */
.product-show-sidebar {
  position: sticky;
  top: 4rem; /* Reduced top offset */
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Reduced gap for compactness */
}

/* Price Card - Removed scrolling and made more compact design */
.product-show-price-card {
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
  /* Removed max-height constraint to prevent scrolling */
}

.product-show-price-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  transition: left 0.6s ease;
}

.product-show-price-card:hover::before {
  left: 100%;
}

.product-show-price-card:hover {
  transform: translateY(-1px); /* Reduced hover effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Subtler hover shadow */
}

.product-show-price-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d1a9e 100%);
  color: var(--color-primary-text);
  padding: 0.875rem 1.25rem;
  position: relative;
}

.product-show-price-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-text);
  font-family: var(--font-primary);
}

.product-show-price-body {
  padding: 0.75rem; /* Reduced padding for more compact design */
  /* Removed scrolling behavior */
}

.product-show-price-section {
  margin-bottom: 0.75rem; /* Reduced margin for compactness */
}

.product-show-price-section h5 {
  font-size: 0.8rem; /* Smaller font size for compactness */
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem; /* Reduced margin */
  font-family: var(--font-primary);
}

.product-show-price-with-discount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem; /* Reduced gap */
}

.product-show-original-price {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: line-through;
  font-family: var(--font-primary);
}

.product-show-final-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #10b981;
  font-family: var(--font-primary);
  letter-spacing: -0.05em;
}

.product-show-price-regular .product-show-final-price {
  color: var(--text-primary);
}

.product-show-discount-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--color-white);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-primary);
}

.product-show-details {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem; /* Reduced padding */
  margin-bottom: 1rem; /* Reduced margin */
}

.product-show-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0; /* Reduced padding */
  border-bottom: 1px solid var(--border-light-two);
  transition: all 0.2s ease;
}

.product-show-detail-item:hover {
  background: var(--color-gray-1);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 4px; /* Smaller border radius */
}

.product-show-detail-item:last-child {
  border-bottom: none;
}

.product-show-detail-label {
  color: var(--text-secondary);
  font-size: 0.8rem; /* Smaller font size */
  font-family: var(--font-primary);
  font-weight: 500;
  flex: 1;
}

.product-show-detail-value {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-primary);
  text-align: right;
  flex: 1;
  font-size: 0.8rem; /* Smaller font size */
}

.product-show-rating-stars {
  display: flex;
  align-items: center;
  gap: 0.2rem; /* Reduced gap */
}

.product-show-rating-stars i {
  color: var(--color-secondary);
  font-size: 0.8rem; /* Smaller font size */
}

.product-show-rating-text {
  margin-left: 0.4rem; /* Reduced margin */
  font-size: 0.8rem; /* Smaller font size */
  color: var(--text-secondary);
  font-family: var(--font-primary);
}

.product-show-btn-purchase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  border: none;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.product-show-btn-purchase:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  color: var(--color-white);
}

/* Preview Card - Compact version for left column */
.product-show-preview-card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.product-show-preview-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-show-preview-gallery {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-height: 320px; /* Set minimum height to ensure proper layout */
  height: 100%; /* Take full available height */
}

.product-show-main-preview {
  flex: 0 0 590px; /* Fixed width for main image */
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.product-show-main-preview-img {
  width: 590px; /* Fixed width to match image dimensions */
  height: auto; /* Auto height to maintain aspect ratio */
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-show-main-preview:hover .product-show-main-preview-img {
  transform: scale(1.02);
}

/* Enhanced separator design for better visibility */
.product-show-preview-separator {
  width: 2px; /* Slightly thicker separator */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-primary) 20%,
    var(--color-primary) 80%,
    transparent 100%
  ); /* More prominent gradient with primary color */
  margin: 0 0.75rem; /* More spacing around separator */
  flex-shrink: 0;
  border-radius: 1px;
}

.product-show-preview-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1; /* Take all remaining space */
  min-width: 80px; /* Minimum width for thumbnails */
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light-two) transparent;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.product-show-thumbnail {
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
  width: 100%; /* Take full width of container */
  height: 60px; /* Increased height for better visibility */
}

.product-show-thumbnail img {
  width: 100%;
  height: 60px; /* Match container height */
  object-fit: cover;
  transition: transform 0.2s ease;
}

.product-show-thumbnail:hover img {
  transform: scale(1.05); /* Reduced hover effect */
}

.product-show-thumbnail.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* Modern license selection styling - Fixed radio button visibility */
.product-show-license-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Reduced gap */
}

.product-show-license-option {
  position: relative;
  border: 1.5px solid var(--border-light);
  border-radius: 6px; /* Smaller border radius */
  padding: 0.5rem 0.75rem; /* Reduced padding for compactness */
  transition: all 0.2s ease;
  cursor: pointer;
  background: var(--color-white);
}

.product-show-license-option:hover {
  border-color: var(--color-primary);
  background: rgba(55, 37, 189, 0.02);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(55, 37, 189, 0.1);
}

.product-show-license-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.product-show-license-option::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light-two);
  border-radius: 50%;
  background: var(--color-white);
  transition: all 0.2s ease;
}

.product-show-license-option:has(input[type="radio"]:checked)::before {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 3px var(--color-white);
}

.product-show-license-option:has(input[type="radio"]:checked) {
  border-color: var(--color-primary);
  background: rgba(55, 37, 189, 0.03);
  box-shadow: 0 0 0 1px rgba(55, 37, 189, 0.1);
}

.product-show-license-label {
  display: block;
  cursor: pointer;
  width: 100%;
  padding-right: 2.5rem;
}

.license-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.license-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem; /* Smaller font size */
  font-family: var(--font-primary);
  letter-spacing: -0.025em;
  line-height: 1.3; /* Tighter line height */
}

.license-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

/* Animated current price display */
.product-show-current-price {
  text-align: center;
  padding: 0.5rem; /* Reduced padding */
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 6px; /* Smaller border radius */
  border: 1px solid var(--border-light);
  margin-top: 0.5rem; /* Reduced margin */
}

.current-price-label {
  font-size: 0.7rem; /* Smaller font size */
  color: var(--text-secondary);
  margin-bottom: 0.2rem; /* Reduced margin */
  font-weight: 500;
  font-family: var(--font-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.current-price-value {
  font-size: 1.25rem; /* Smaller font size for compactness */
  font-weight: 800;
  color: var(--color-primary);
  transition: all 0.15s ease;
  font-family: var(--font-primary);
}

/* Modern support select styling */
.product-show-support-select {
  border: 1.5px solid var(--border-light);
  border-radius: 6px;
  padding: 0.4rem 0.6rem; /* Reduced padding */
  font-weight: 500;
  transition: all 0.2s ease;
  background: var(--color-white);
  font-size: 0.8rem; /* Smaller font size */
  font-family: var(--font-primary);
  width: 100%;
}

.product-show-support-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(55, 37, 189, 0.1);
  outline: none;
}

/* Updated button styling with glow effects */
.product-show-price-actions {
  margin-top: 0.75rem; /* Reduced margin */
  gap: 0.5rem; /* Added gap between buttons */
}

.product-show-btn-cart,
.product-show-btn-purchase {
  padding: 0.5rem 0.75rem; /* Reduced padding for compactness */
  font-size: 0.75rem; /* Smaller font size */
  border-radius: 6px;
  font-weight: 600;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
  flex: 1; /* Make buttons equal width */
}

.product-show-btn-cart {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.product-show-btn-cart:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(55, 37, 189, 0.25);
}

.product-show-btn-purchase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  border: none;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.product-show-btn-purchase:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  color: var(--color-white);
}

/* Added Software Information card styling */
.product-show-info-card {
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.product-show-info-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-show-info-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d1a9e 100%); /* Use primary color gradient */
  color: var(--color-white); /* White text for better contrast */
  padding: 0.75rem 1rem; /* Reduced padding */
  border-bottom: 1px solid var(--border-light);
}

.product-show-info-header h3 {
  margin: 0;
  font-size: 0.9rem; /* Smaller font size */
  font-weight: 600;
  color: var(--color-white); /* White text */
  font-family: var(--font-primary);
}

.product-show-info-body {
  padding: 0.75rem; /* Reduced padding */
}

.product-show-info-body .product-show-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.4rem 0; /* Reduced padding */
  border-bottom: 1px solid var(--border-light-two);
  transition: all 0.2s ease;
}

.product-show-info-body .product-show-detail-item:hover {
  background: var(--color-gray-1);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 4px;
}

.product-show-info-body .product-show-detail-item:last-child {
  border-bottom: none;
}

.product-show-info-body .product-show-detail-label {
  color: var(--text-secondary);
  font-size: 0.75rem; /* Smaller font size */
  font-family: var(--font-primary);
  font-weight: 500;
  flex: 1;
}

.product-show-info-body .product-show-detail-value {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-primary);
  text-align: right;
  flex: 1;
  font-size: 0.75rem; /* Smaller font size */
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .product-show-title {
    font-size: 1.4rem; /* Adjusted for mobile */
  }

  .product-show-actions {
    justify-content: flex-start;
    margin-top: 0.75rem; /* Reduced margin */
  }
}

@media (max-width: 767.98px) {
  .product-show-header {
    padding: 1rem 0; /* Reduced padding */
  }

  .product-show-title {
    font-size: 1.25rem; /* Smaller mobile title */
  }

  .product-show-meta {
    gap: 0.75rem; /* Reduced gap */
  }

  .product-show-meta-item {
    font-size: 0.75rem; /* Smaller mobile font */
  }

  .product-show-price-header,
  .product-show-price-body,
  .product-show-preview-gallery {
    padding: 0.75rem; /* Reduced mobile padding */
  }

  .product-show-final-price {
    font-size: 1.25rem; /* Smaller mobile price */
  }

  .product-show-content-wrapper {
    padding: 1rem; /* Reduced mobile padding */
  }

  .product-show-preview-thumbnails {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); /* Smaller mobile thumbnails */
  }

  .product-show-thumbnail img {
    height: 40px; /* Smaller mobile thumbnail height */
  }

  .product-show-main-preview-img {
    height: 150px; /* Smaller mobile preview height */
  }
}

@media (max-width: 575.98px) {
  .product-show-breadcrumb {
    font-size: 0.8rem; /* Smaller breadcrumb */
  }

  .product-show-title {
    font-size: 1.1rem; /* Smaller mobile title */
    line-height: 1.4;
  }

  .product-show-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem; /* Reduced gap */
  }

  .product-show-final-price {
    font-size: 1.1rem; /* Smaller mobile price */
  }

  .product-show-btn-purchase {
    padding: 8px 16px; /* Smaller mobile button */
    font-size: 0.8rem;
  }
}

/* Added external link icon styling */
.product-show-external-link {
  color: var(--text-secondary);
  font-size: 1rem; /* Smaller icon */
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.product-show-external-link:hover {
  color: var(--color-primary);
  opacity: 1;
  transform: translateY(-1px); /* Reduced hover effect */
}
