/* Offers market: the banner, then one panel with the heading, the filters and the offer cards.
   (The page shell and breadcrumb come from vendors-page.css; the cards' own look from styles.css.) */

.om-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  margin-bottom: 14px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--vendors-shadow);
}

.om-panel {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--vendors-border);
  border-radius: 10px;
  background: var(--white, #fff);
  box-shadow: var(--vendors-shadow);
}

.om-head {
  margin-bottom: .9rem;
}

.om-head__title {
  margin: 0;
  color: var(--vendors-navy);
  font-family: 'Manrope', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.om-head__lead {
  margin: .2rem 0 0;
  color: var(--vendors-muted);
  font-size: .84rem;
}

/* Filters: on phones a compact card, category and subcategory side by side, validity below (the
   selects' own text says what each is, so their names are for screen readers only) */
@media (max-width: 767.98px) {
  .om-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: .75rem;
    padding: .55rem;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16, 51, 102, 0.05);
  }

  .om-filter {
    position: relative;
    min-width: 0;
  }

  .om-filter:last-child {
    grid-column: 1 / -1;
  }

  .om-filter__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* (the same fields as the ads market's filter) */
  .om-filter__select.form-select {
    height: 40px;
    min-height: 40px;
    padding: 0 1.8rem 0 .7rem;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
    background-color: #fff;
    background-position: right .55rem center;
    background-size: 12px 10px;
    box-shadow: none;
    color: #0f172a;
    font-size: .84rem;
    text-overflow: ellipsis;
  }

  .om-filter__select.form-select:disabled {
    background-color: #f6f7f9;
    color: #94a3b8;
  }

  .om-filter__select.form-select:focus {
    border-color: var(--vendors-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, .12);
  }
}

/* Wider screens: a box per filter, its name inside on the left, all on one line */
@media (min-width: 768px) {
  .om-filters {
    display: flex;
    gap: .6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef2f7;
  }

  .om-filter {
    display: flex;
    flex: 0 1 260px;
    align-items: center;
    min-width: 0;
    height: 40px;
    padding-left: .8rem;
    border: 1px solid #d5dbe3;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
  }

  .om-filter:focus-within {
    border-color: var(--vendors-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
  }

  .om-filter:has(.om-filter__select:disabled) {
    background: #f6f7f9;
  }

  .om-filter__label {
    flex-shrink: 0;
    margin: 0;
    color: var(--vendors-muted);
    font-size: .74rem;
    font-weight: 600;
  }

  .om-filter__label::after {
    content: ':';
  }

  .om-filter__select.form-select {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0 2rem 0 .4rem;
    border: 0;
    background-color: transparent;
    box-shadow: none;
    color: #0f1111;
    font-size: .84rem;
    font-weight: 600;
    text-overflow: ellipsis;
    cursor: pointer;
  }

  .om-filter__select.form-select:focus {
    box-shadow: none;
  }

  .om-filter__select.form-select:disabled {
    background-color: transparent;
    color: #9aa5b1;
    cursor: not-allowed;
  }
}

/* Offer cards: the picture filling the top, the title and the deal pills under it */
.offers-market-page #offersGrid .offer-coupon-card {
  max-width: none;
  margin-inline: 0;
  padding: 0;
  overflow: hidden;
}

.offers-market-page #offersGrid .offer-coupon-image-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.offers-market-page #offersGrid .offer-coupon-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offers-market-page #offersGrid .offer-coupon-card .card-body {
  padding: .75rem .9rem .85rem;
}

.om-pagination {
  margin-top: 1.5rem;
  font-size: .86rem;
}

/* The offer's details popup */
.offer-login-message {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  margin-top: .75rem;
  padding: .85rem .9rem;
  border: 1px solid #d6e4ff;
  border-radius: 12px;
  background: #f8faff;
}

.offer-login-message-icon {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f0ff;
  color: #2457c5;
}

.offer-login-message-title {
  color: #1d3557;
  font-size: 1rem;
  font-weight: 700;
}

.offer-login-message-text {
  color: #5d6b82;
  font-size: .9rem;
}

#offerDetailsModalDescription {
  white-space: pre-line;
}

/* Phones: the cards straight on the page, two to a row */
@media (max-width: 767.98px) {
  .om-banner {
    margin-bottom: 12px;
  }

  .om-panel {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .om-head {
    margin-bottom: .75rem;
  }

  .om-head__title {
    font-size: 1.12rem;
  }

  .om-head__lead {
    font-size: .78rem;
  }

  .offers-market-page #offersGrid {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem;
  }

  .offers-market-page #offersGrid .offer-coupon-card {
    height: 280px;
  }

  .offers-market-page #offersGrid .offer-coupon-card .card-body {
    gap: .4rem !important;
    padding: .6rem .65rem .7rem;
  }

  .offers-market-page #offersGrid .offer-card-title {
    font-size: .88rem;
  }

  .offers-market-page #offersGrid .offer-meta-row {
    gap: .3rem !important;
  }

  .offers-market-page #offersGrid .offer-meta-pill {
    padding: .2rem .5rem;
    font-size: .66rem;
  }
}

/* ---------- The offer's popup on phones: details folded to 4 lines with "Read more", and the share
   options in a bar at the bottom (as on the vendor pages); wider screens keep the share panel ---------- */
@media (max-width: 767.98px) {
  .offer-details-description.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .offer-readmore {
    display: inline-flex;
    margin: -.5rem 0 .85rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--vendors-green, #2e7d32);
    font-size: .88rem;
    font-weight: 700;
  }

  #offerSharePanel {
    display: none !important;
  }

  .offer-share-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: .45rem;
    padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e1e7ef;
    background: #fff;
  }

  .offer-share-bar.d-none {
    display: none !important;
  }

  .offer-share-bar > * {
    margin: 0;
  }

  .offer-share-bar__btn {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    min-width: 0;
    min-height: 52px;
    padding: .35rem .2rem;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
  }

  .offer-share-bar__btn i {
    font-size: 1.05rem;
  }

  .offer-share-bar__btn--whatsapp {
    border-color: #25d366;
    background: #25d366;
    color: #fff;
  }

  .offer-share-bar__btn--facebook i {
    color: #1877f2;
  }

  .offer-share-bar__btn--instagram i {
    color: #d6249f;
  }

  .offer-share-bar__btn:active {
    filter: brightness(.95);
  }
}

@media (min-width: 768px) {
  .offer-share-bar,
  .offer-readmore {
    display: none !important;
  }
}
