/* ─── Hero Section ── DealsHeroSection.module.scss ──────────────────────── */

.discounts-hero {
  padding: 53px 16px 32px;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column nowrap;
  gap: 24px;
}

@media only screen and (max-width: 991px) {
  .discounts-hero {
    padding: 32px 16px 24px;
    gap: 16px;
  }
}

.discounts-hero__heading {
  margin: 0;
  font-family: 'Parkinsans', Helvetica Neue, Arial;
  font-weight: 400;
  font-size: 28px;
  font-style: normal;
  line-height: 33.6px;
  color: #22252a;
  text-align: center;
}

.discounts-hero__search-bar {
  width: 100%;
  max-width: 792px;
}

.discounts-hero__chips {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
  gap: 8px;
}

/* ─── Search Input ── Input component ────────────────────────────────────
   Inlined from shared/css/redesign-components.css for page self-sufficiency
   (production redesign-components.css does not include these rules). */

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input__field {
  width: 100%;
  border: 1px solid #dfe1e6;
  border-radius: 20px;
  height: 40px;
  padding: 0 40px 0 16px;
  font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  color: #020408;
  background-color: #ffffff;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.search-input__field::-webkit-search-cancel-button {
  display: none;
}

.search-input__field:focus {
  border: 2px solid #e40148;
}

.search-input__field::placeholder {
  color: #22252a;
}

.search-input__field--with-icon {
  padding-left: 44px;
}

.search-input__icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  color: #22252a;
  pointer-events: none;
  flex-shrink: 0;
}

.search-input__clear {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #9096a3;
  transition: color 0.15s;
}

.search-input__clear:hover {
  color: #22252a;
}

.search-input__clear--hidden {
  display: none;
}

/* ─── Tag Chip ── TagChip component ──────────────────────────────────────
   Inlined from shared/css/redesign-components.css. */

.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 20px;
  border: none;
  padding: 3px 13px;
  font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: normal;
  white-space: nowrap;
  cursor: default;
  background-color: rgba(13, 170, 118, 0.15);
  color: #0daa76;
}

.tag-chip--clickable {
  background-color: transparent;
  border: 1px solid #22252a;
  color: #22252a;
  cursor: pointer;
}

a.tag-chip--clickable {
  text-decoration: none;
}

.tag-chip--clickable:hover {
  background-color: #f8f9fb;
}

.tag-chip--clickable:focus-visible {
  outline: 2px solid #e40148;
  outline-offset: 2px;
}

.tag-chip--with-icon {
  gap: 4px;
}

.tag-chip__icon {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

.tag-chip--selected {
  background-color: #0daa76;
  color: #ffffff;
  padding-left: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.tag-chip--deletable {
  background-color: #0daa76;
  color: #ffffff;
  padding-left: 12px;
  padding-right: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-chip--deletable .tag-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.tag-chip--deletable .tag-chip__delete-btn {
  appearance: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.tag-chip--deletable .tag-chip__delete-btn:focus-visible {
  outline: 2px solid #e40148;
  outline-offset: 2px;
}

/* ─── Results Section ── DealsResultsSection.module.scss ────────────────── */

.discounts-results {
  padding: 0 16px 64px;
  width: 100%;
  max-width: 1232px; /* content-width (1200) + 32px padding */
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-flow: column nowrap;
}

.discounts-results__toolbar {
  width: 100%;
  max-width: 1200px;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-flow: row nowrap;
}

.discounts-results__count {
  margin: 0;
  font-family: 'DMSans', Helvetica Neue, Arial;
  color: #22252a;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 19.6px;
}

.discounts-results__count strong {
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 19.6px;
}

.discounts-results__grid {
  display: grid;
  grid-template-columns: repeat(2, 588px);
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

@media only screen and (max-width: 991px) {
  .discounts-results__grid {
    grid-template-columns: 1fr;
  }
}

/* Override deal-tile fixed sizes — let tiles fill the grid column */
.discounts-results__grid .deal-tile--card {
  width: 100%;
  max-width: unset;
  min-width: unset;
}

.discounts-results__empty {
  margin: 0;
  padding: 64px 0;
  text-align: center;
  font-family: 'DMSans', Helvetica Neue, Arial;
  color: #9096a3;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22.4px;
}

.discounts-results__pagination {
  padding: 40px 0 0;
}

/* ─── Deal Tile ── DealTile.module.scss ──────────────────────────────────
   Inlined from shared/css/redesign-components.css for page self-sufficiency
   (mirrors shop_detail_gr pattern). When shared CSS gains .deal-tile rules
   in production, these become redundant but harmless duplicates. */

.deal-tile {
  border: 8px solid #f8f9fb;
  border-radius: 20px;
  box-sizing: border-box;
}

.deal-tile--small,
.deal-tile--card {
  padding: 24px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-flow: column nowrap;
  gap: 8px;
}

.deal-tile--small { max-width: 386px; }
.deal-tile--card  { max-width: 588px; }

@media only screen and (max-width: 991px) {
  .deal-tile--small,
  .deal-tile--card {
    width: min(588px, calc(100vw - 48px));
  }
}

.deal-tile__header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-flow: row nowrap;
}

.deal-tile__logo {
  width: 137px;
  height: 80px;
  object-fit: contain;
  display: block;
}

.deal-tile__content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-flow: column nowrap;
  gap: 4px;
}

.deal-tile__title {
  font-family: 'Parkinsans', Helvetica Neue, Arial;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: #22252a;
  margin: 0;
}

.deal-tile__description-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-flow: row nowrap;
  gap: 8px;
}

.deal-tile__description {
  font-family: 'DMSans', Helvetica Neue, Arial;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: #22252a;
  margin: 0;
}

.deal-tile__promoted {
  font-family: 'DMSans', Helvetica Neue, Arial;
  font-weight: 500;
  font-size: 13px;
  line-height: normal;
  color: #e40148;
  white-space: nowrap;
}

.deal-tile__date-range {
  font-family: 'DMSans', Helvetica Neue, Arial;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.2;
  color: #9096a3;
  margin: 0;
}

/* card: date-range positioned top-right inside header */
.deal-tile--card .deal-tile__date-range {
  position: absolute;
  right: 0;
  top: -5px;
  text-align: right;
  max-width: 239px;
}

/* ─── Deal Modal ── DealModal ───────────────────────────────────────────── */

.deal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.deal-modal-overlay[hidden] {
  display: none;
}

.deal-modal {
  background: #ffffff;
  border-radius: 20px;
  padding: 48px 32px 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 25px 0 rgba(58, 82, 129, 0.21);
}

.deal-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #22252a;
  line-height: 0;
  border-radius: 4px;
}

.deal-modal__close:hover { opacity: 0.7; }

.deal-modal__logo {
  height: 80px;
  max-width: 137px;
  object-fit: contain;
  margin-bottom: 24px;
}

.deal-modal__title {
  margin: 0 0 16px;
  font-family: 'Parkinsans', Helvetica Neue, Arial;
  font-weight: 400;
  font-size: 28px;
  line-height: 33.6px;
  color: #22252a;
  text-align: center;
}

.deal-modal__description {
  margin: 0 0 40px;
  font-family: 'DMSans', Helvetica Neue, Arial;
  font-size: 14px;
  line-height: 1.2;
  color: #22252a;
  text-align: center;
}

.deal-modal__description[hidden] { display: none; }

.deal-modal__code-box {
  margin-bottom: 24px;
  border: 1px solid #dfe1e6;
  border-radius: 20px;
  padding: 8px 16px 8px 40px;
  width: 326px;
  max-width: 100%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row nowrap;
  gap: 8px;
}

.deal-modal__code-box[hidden] { display: none; }

@media only screen and (max-width: 991px) {
  .deal-modal__code-box {
    width: 100%;
    padding: 8px 16px;
  }
}

.deal-modal__code-text {
  font-family: 'Parkinsans', Helvetica Neue, Arial;
  font-size: 16px;
  font-weight: 500;
  line-height: 22.4px;
  letter-spacing: 2px;
  color: #22252a;
  text-align: center;
  flex: 1;
}

.deal-modal__copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22252a;
}

.deal-modal__copy-btn:hover { opacity: 0.7; }

.deal-modal__cta { margin-top: 0; }

/* ─── Compact Select (sort dropdown) ─────────────────────────────────────
   Inlined from shared/css/redesign-components.css for page self-sufficiency. */

.redesign-compact-select {
  display: block;
  width: fit-content;
  position: relative;
}

.redesign-compact-select__trigger {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  border-radius: 20px;
  height: 24px;
  padding: 0 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  color: #22252a;
  cursor: pointer;
  white-space: nowrap;
}

.redesign-compact-select__trigger:hover {
  background-color: #f8f9fb;
}

.redesign-compact-select__label {
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

.redesign-compact-select__chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.6;
}

.redesign-compact-select--open .redesign-compact-select__chevron {
  transform: rotate(180deg);
}

.redesign-compact-select__panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 99;
  min-width: 100%;
  background-color: #ffffff;
  border: 1px solid #e40148;
  border-radius: 5px;
  box-shadow: 0 0 30px -5px rgba(0, 23, 92, 0.3);
  padding: 4px 0;
}

.redesign-compact-select--open .redesign-compact-select__panel {
  display: block;
}

.redesign-compact-select__option {
  appearance: none;
  background: none;
  border: none;
  width: 100%;
  padding: 8px 16px;
  text-align: left;
  font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 22.4px;
  color: #22252a;
  cursor: pointer;
  white-space: nowrap;
}

.redesign-compact-select__option:hover {
  background-color: #f8f9fb;
}

.redesign-compact-select__option--selected {
  color: #0daa76;
  font-weight: 500;
}

/* ─── Pagination ─────────────────────────────────────────────────────────
   Inlined from shared/css/redesign-components.css. JS-rendered. */

.redesign-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.redesign-pagination__link {
  appearance: none;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  width: fit-content;
  height: 24px;
  padding: 0 4px;
  border-radius: 5px;
  font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 19.6px;
  color: #9096a3;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.redesign-pagination__link:hover:not(.redesign-pagination__link--active) {
  background-color: #f8f9fb;
}

.redesign-pagination__link--active {
  background-color: rgba(13, 170, 118, 0.15);
  color: #0daa76;
  cursor: default;
}

.redesign-pagination__arrow {
  appearance: none;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: #9096a3;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 16px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.redesign-pagination__arrow:hover:not(:disabled) {
  color: #22252a;
  background-color: #f8f9fb;
}

.redesign-pagination__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.redesign-pagination__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #9096a3;
  font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 19.6px;
  user-select: none;
}

/* ─── Newsletter Section ── DealsNewsletterSection.module.scss ───────────── */

.discounts-newsletter {
  padding: 32px 16px 64px;
  background-color: #ffffff;
}

.discounts-newsletter__card {
  max-width: 1200px;
  min-height: 290px;
  margin: 0 auto;
  background-color: #bad6f3; /* color-quaternary */
  border-radius: 20px;
  padding: 40px 40px 64px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-flow: column nowrap;
  gap: 24px;
}

@media only screen and (max-width: 991px) {
  .discounts-newsletter__card {
    padding: 32px 24px 40px;
  }
}

.discounts-newsletter__heading {
  margin: 0;
  font-family: 'Parkinsans', Helvetica Neue, Arial;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 48px;
  letter-spacing: -1px;
  color: #22252a;
}

@media only screen and (max-width: 991px) {
  .discounts-newsletter__heading {
    font-size: 28px;
    font-style: normal;
    font-weight: 400;
    line-height: 33.6px;
  }
}

.discounts-newsletter__description {
  margin: 0;
  font-family: 'DMSans', Helvetica Neue, Arial;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22.4px;
  color: #22252a;
  max-width: 792px;
}

.discounts-newsletter__form {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-flow: row nowrap;
  gap: 16px;
  width: 100%;
  max-width: 547px;
  padding-top: 8px;
}

@media only screen and (max-width: 991px) {
  .discounts-newsletter__form {
    flex-direction: column;
    max-width: 100%;
  }
}

.discounts-newsletter__email-input {
  flex: 1;
  min-width: 0;
}

.discounts-newsletter__success,
.discounts-newsletter__error {
  margin: 0;
  font-family: 'DMSans', Helvetica Neue, Arial;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 19.6px;
}

.discounts-newsletter__success { color: #0daa76; }
.discounts-newsletter__error   { color: #e40148; }

.discounts-newsletter__success[hidden],
.discounts-newsletter__error[hidden] { display: none; }
