/* --- Container & Background --- */
.offers-container {
  background-color: #f1f1f1; /* Light grey background like image */
  padding: 40px 20px;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Filters --- */
.offers-filters-wrapper {
  max-width: 1200px;
  margin: 0 auto 30px;
}

.offers-filter-form {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.offers-filter-group {
  flex: 0 1 300px;
}

.offers-filter-group select {
  width: 100%;
  height: 45px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 15px;
  font-size: 15px;
  color: #333;
  background: #fff;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 12px auto;
}

/* --- Grid System --- */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(var(--offers-columns, 3), 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .offers-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .offers-grid {
    grid-template-columns: 1fr !important;
  }
  .offers-filter-group {
    flex: 1 1 100%;
  }
}

/* --- Card Styling (Matching Image) --- */
.offer-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.offer-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px;
}

.offer-image-container {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.offer-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px; /* Some logos in image have rounded boxes */
}

.offer-details {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.offer-merchant-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0c2b4a; /* Dark blue/black */
  margin: 0 0 15px;
  line-height: 1.3;
}

.offer-divider {
  width: 100%;
  height: 1px;
  background-color: #f1f1f1;
  margin-bottom: 20px;
}

.offer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start; /* Align links to left like in screenshot bottom area */
  width: 100%;
}

.offer-link {
  color: #ff5a3b; /* Orange/Red from image */
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.offer-link:hover {
  color: #e04a2d;
  text-decoration: underline;
}

/* --- Pagination --- */
.offers-pagination {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.offers-pagination .page-numbers {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}

.offers-pagination .page-numbers.current {
  background: #ff5a3b;
  color: #fff;
  border-color: #ff5a3b;
}

/* --- Modal Styling --- */
.offers-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.offers-modal-window {
  background: #fff;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.offers-modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.offers-modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #0c2b4a;
}

.offers-modal-close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.offers-modal-close-btn:hover {
  color: #333;
}

.offers-modal-content-area {
  padding: 30px;
  overflow-y: auto;
  color: #444;
  line-height: 1.6;
}

.modal-merchant-header h3 {
  margin-top: 0;
  color: #ff5a3b;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.offers-modal-content-area ul,
.offers-modal-content-area ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.offers-modal-content-area li {
  margin-bottom: 10px;
}
