/* =======================
   RESET & BASE STYLES
========================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fb;
  color: #222;
  padding: 20px;
  line-height: 1.6;
}

/* =======================
   TYPOGRAPHY
========================== */
h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  color: #333;
}

/* =======================
   HEADER
========================== */
header {
  background-color: #5a189a;
  color: white;
  padding: 1rem 0;
  margin-bottom: 30px;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  margin-left: 1rem;
}

header a:hover {
  text-decoration: underline;
}

/* =======================
   FOOTER
========================== */
footer {
  background-color: #5a189a;
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 40px;
}

/* =======================
   FILTER BUTTONS
========================== */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.filter-buttons a {
  background-color: #5a189a;
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.filter-buttons a:hover {
  background-color: #9d4edd;
}

/* =======================
   COMPARISON LAYOUT
========================== */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Product Card */
.product-card {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: scale(1.01);
}

/* Product Image */
.product-image {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 15px;
}

/* Product Title */
.product-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Attribute Row */
.attribute {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Label Column */
.attribute-labels {
  text-align: center;
  margin-top: 20px;
}

/* Comparison Table */
.comparison-table {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin-top: 40px;
  background-color: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.comparison-row {
  display: contents;
}

.comparison-cell {
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
  font-size: 0.95rem;
}

.comparison-label {
  font-weight: bold;
  color: #555;
}

/* =======================
   BUTTONS
========================== */
.btn-primary {
  background-color: #5a189a;
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #9d4edd;
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid #5a189a;
  color: #5a189a;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease-in-out;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #5a189a;
  color: white;
}

/* =======================
   RESPONSIVE
========================== */
@media (max-width: 768px) {
  .comparison-container {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    grid-template-columns: 1fr;
  }

  .comparison-label {
    text-align: left;
  }

  header .container,
  footer .container {
    flex-direction: column;
    text-align: center;
  }
}
