/* ============================================================================
   ITMZZ Service Marketplace - Product Compare Styles
   Modern styling for product comparison page
   Note: CSS variables are inherited from general-styles.css
   ============================================================================ */

.compare-container {
  background: var(--gradient-light);
  min-height: 100vh;
  padding: var(--section-padding);
}

.compare-header {
  text-align: center;
  margin-bottom: 40px;
}

.compare-header h1 {
  font-family: var(--font-primary);
  font-size: var(--font-size-5xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.compare-table-container {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 0 auto;
  max-width: 1200px;
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-secondary);
}

.compare-table thead {
  background: var(--gradient-primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.compare-table th {
  padding: 20px 15px;
  text-align: center;
  font-weight: 600;
  font-size: var(--font-size-base);
  border-right: 1px solid var(--overlay-white-20);
  position: relative;
}

.compare-table th:last-child {
  border-right: none;
}

.compare-table th img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--overlay-white-30);
}

.compare-table th .product-name {
  font-size: var(--font-size-lg);
  margin-top: 10px;
  display: block;
  color: white;
}

.compare-table th .product-price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-top: 5px;
  display: block;
}

.request-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-block;
  background: var(--accent-info);
  color: white;
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  vertical-align: middle;
}

.compare-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.compare-table tbody tr:hover {
  background: var(--palette-green-light);
}

.compare-table td {
  padding: 15px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid var(--border-color);
}

.compare-table td:last-child {
  border-right: none;
}

.compare-table .attribute-label {
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  background: var(--bg-secondary);
  padding: 12px 15px;
  border-right: none;
  font-size: var(--font-size-base);
  position: sticky;
  left: 0;
  z-index: 5;
}

.compare-table .rating-stars {
  color: var(--accent-warning);
}

.compare-table .rating-stars .fa {
  margin-right: 2px;
}

.compare-table .product-description {
  text-align: left;
  max-width: 200px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.btn-compare {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  cursor: pointer;
  margin: 5px;
  display: inline-block;
}

.btn-compare:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-remove {
  background: var(--accent-danger);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 5px;
}

.btn-remove:hover {
  background: var(--accent-danger-dark);
  transform: translateY(-2px);
}

.compare-table .btn-group {
  display: flex;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.compare-table .btn-group .btn-compare {
  border-top-left-radius: var(--border-radius-lg);
  border-bottom-left-radius: var(--border-radius-lg);
  border-right: 1px solid var(--overlay-white-20);
  margin: 0;
  flex: 1;
}

.compare-table .btn-group .btn-remove {
  border-top-right-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  border-right: none;
  margin: 0;
  flex: 1;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  max-width: 500px;
  margin: 0 auto;
}

.empty-state h3 {
  font-family: var(--font-primary);
  color: var(--text-primary);
  margin-bottom: 15px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.btn-continue {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 32px;
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: var(--transition);
}

.btn-continue:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

@media (max-width: 768px) {
  .compare-table-container {
    overflow-x: auto;
  }

  .compare-table {
    min-width: 600px;
  }

  .compare-header h1 {
    font-size: var(--font-size-4xl);
  }

  .compare-table th,
  .compare-table td {
    padding: 10px 8px;
    font-size: var(--font-size-sm);
  }

  .compare-table th img {
    width: 60px;
    height: 60px;
  }

  /* ============================================================================
   ENHANCED STYLES FOR #product-compare
   Additional styles for ID-based product compare implementation
   ============================================================================ */
  #product-compare {
    margin-top: 30px;
  }

  #product-compare h1 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
  }

  #product-compare .table {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  #product-compare .table thead {
    background: var(--bg-secondary);
  }

  #product-compare .table th,
  #product-compare .table td {
    padding: 18px 12px;
    vertical-align: middle;
    font-size: 1.05rem;
  }

  #product-compare .table th {
    font-weight: 600;
    color: var(--text-primary);
  }

  #product-compare .table-bordered td {
    border: 1px solid var(--border-color);
  }

  #product-compare .img-thumbnail {
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-xs);
    max-width: 90px;
  }

  #product-compare .btn-primary {
    background: var(--primary-blue);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
  }

  #product-compare .btn-primary:hover {
    background: var(--primary-blue-dark);
  }

  #product-compare .btn-danger {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
  }

  #product-compare .description {
    color: var(--text-secondary);
    font-size: 0.98rem;
  }

  #product-compare .rating .fa-star {
    color: var(--accent-warning);
  }

  #product-compare .rating .fa-star-o {
    color: var(--border-color);
  }

  @media (max-width: 768px) {

    #product-compare .table th,
    #product-compare .table td {
      padding: 10px 4px;
      font-size: 0.95rem;
    }

    #product-compare h1 {
      font-size: 1.3rem;
    }

    #product-compare .img-thumbnail {
      max-width: 60px;
    }
  }