:root {
  --mcs-header-desktop: 87px;
  --mcs-header-mobile: 92px;
}

header {
  margin: 0 !important;
  padding: 0 !important;
}

/* White text sections with better width usage */
.title-container,
.home-intro {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 14px 18px;
  margin: 8px 0 10px;
}

.title-container h1,
.title-container p {
  margin: 0 !important;
  max-width: none !important;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.28 !important;
  font-weight: 700;
  color: #3a4350;
}

.home-intro {
  padding: 16px 20px;
}

.home-intro-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.08;
}

.home-intro-text {
  margin: 0 !important;
  max-width: none !important;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.38;
  color: #4c596b;
}

.home-intro-text i {
  font-style: italic;
}

.category-header .categories-title {
  font-weight: 700;
  color: #2f3a4a;
}

.breadcrumb-item a,
.breadcrumb-item.active {
  font-weight: 600;
}

/* Mobile text collapsible */
.mcs-text-collapsible {
  position: relative;
  transition: max-height 0.24s ease;
  cursor: pointer;
}

.mcs-text-collapsible:focus-visible {
  outline: 2px solid rgba(193, 18, 25, 0.45);
  outline-offset: 2px;
}

.mcs-text-collapsible.is-collapsed {
  max-height: var(--mcs-collapsed-height, 120px);
  overflow: hidden;
}

.mcs-text-collapsible.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 92%);
  pointer-events: none;
}

.mcs-text-toggle {
  display: none !important;
}

.home-intro.mcs-text-collapsible .home-intro-text {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.24s ease, opacity 0.2s ease, margin 0.2s ease;
}

.home-intro.mcs-text-collapsible.is-collapsed .home-intro-text {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.home-intro.mcs-text-collapsible.is-collapsed::after {
  display: none;
}

.top-wrap {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100% !important;
  z-index: 1400 !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.header-spacer {
  height: var(--mcs-header-desktop) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

div[role="main"] > .stripe-regular {
  margin: 0 !important;
}

.page.companies .company-box {
  margin: 8px 0 20px !important;
}

.page.companies .breadcrumb-container {
  margin-top: 0 !important;
}

.top-wrap form {
  margin: 0 !important;
}

.top-wrap .menu-browse .input.button.primary {
  position: relative !important;
  overflow: visible !important;
}

.top-wrap .menu-browse .input.button.primary .label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100%;
  line-height: 1.1 !important;
  padding: 0 18px 0 8px !important;
}

.top-wrap .menu-browse .input.button.primary .label img {
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  width: 18px !important;
  height: 12px !important;
  border-radius: 2px !important;
  object-fit: cover !important;
  flex: 0 0 18px;
}

.top-wrap .menu-browse .input.button.primary:after {
  right: 10px !important;
}

.top-wrap .header-country .menu-browse .sub {
  top: calc(100% + 2px) !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  max-width: 240px !important;
  z-index: 1500 !important;
}

.top-wrap .header-country .menu-browse .sub a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  white-space: nowrap !important;
}

.top-wrap .header-country .menu-browse .sub a img {
  width: 18px !important;
  height: 12px !important;
  border-radius: 2px !important;
  margin: 0 !important;
  object-fit: cover !important;
}

.page.companies .coupons-wrapper > .row > .large-8.columns {
  float: none !important;
  width: 100% !important;
}

.page.companies .coupons-wrapper ul.items-landscape {
  clear: both !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 {
  clear: both !important;
  float: none !important;
  width: 100% !important;
  overflow: hidden !important;
}

.page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
}

.page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .columns {
  float: none !important;
}

.page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .large-3.columns {
  flex: 0 0 22%;
  max-width: 22%;
}

.page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .large-6.columns {
  flex: 1 1 auto;
  max-width: none;
}

.page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .large-3.small-4.columns {
  flex: 0 0 26%;
  max-width: 26%;
}

.page.companies .coupons-wrapper .items-landscape figure {
  margin: 0 !important;
}

.page.companies .coupons-wrapper .items-landscape figure img {
  display: block;
  margin: 0 auto !important;
  width: auto !important;
  height: auto !important;
  max-width: 160px !important;
  max-height: 100px !important;
  object-fit: contain !important;
}

.page.companies .coupons-wrapper .items-landscape .col-middle h2.alt {
  margin: 0 0 8px !important;
  top: auto !important;
}

.page.companies .coupons-wrapper .items-landscape .col-right {
  padding-top: 0 !important;
  padding-left: 0 !important;
}

@media (max-width: 767.98px) {
  .header-spacer {
    height: var(--mcs-header-mobile) !important;
  }

  .top-wrap form {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.7fr) minmax(0, 0.9fr) minmax(0, 0.9fr) !important;
    grid-template-areas:
      "logo search search lang"
      "brands brands country country" !important;
    gap: 8px !important;
    margin: 0 !important;
    padding-bottom: 6px !important;
  }

  .top-wrap form .header-logo {
    grid-area: logo;
    width: 100% !important;
    padding: 0 !important;
  }

  .top-wrap form .header-search {
    grid-area: search;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .top-wrap form .header-language {
    grid-area: lang;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .top-wrap form .header-brands {
    grid-area: brands;
    width: 100% !important;
    padding: 0 !important;
  }

  .top-wrap form .header-country {
    grid-area: country;
    width: 100% !important;
    padding: 0 !important;
  }

  .top-wrap form .header-logo .logo {
    display: flex;
    align-items: center;
    text-align: left;
  }

  .top-wrap form .header-logo .logo a {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .top-wrap form .header-logo .logo img {
    max-width: 42px !important;
    height: auto !important;
  }

  .top-wrap form .header-logo .logo span {
    display: none !important;
    line-height: 1.04 !important;
    font-size: 0.92em !important;
  }

  .top-wrap form .header-search .input.field {
    height: 2.55em !important;
  }

  .top-wrap form .header-brands .menu-browse,
  .top-wrap form .header-country .menu-browse,
  .top-wrap form .header-brands .menu-browse .input,
  .top-wrap form .header-country .menu-browse .input {
    width: 100% !important;
  }

  .top-wrap .header-country .menu-browse .sub {
    max-width: none !important;
  }

  .page.companies .company-box {
    margin: 6px 0 14px !important;
  }

  .page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row {
    display: block;
  }

  .page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .large-3.columns,
  .page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .large-6.columns,
  .page.companies .coupons-wrapper ul.items-landscape > li.wrapper-3 > .row > .large-3.small-4.columns {
    max-width: 100% !important;
    flex: 0 0 100%;
  }

  .page.companies .coupons-wrapper .items-landscape figure img {
    max-width: 140px !important;
    max-height: 90px !important;
  }

  .title-container,
  .home-intro {
    padding: 12px 14px;
    margin: 8px 0;
    border-radius: 10px;
  }

  .mcs-text-toggle {
    height: 32px;
    min-width: 124px;
    margin: 4px auto 10px;
  }

  .title-container h1,
  .title-container p {
    font-size: clamp(1.14rem, 4.5vw, 1.32rem) !important;
    line-height: 1.24 !important;
    max-width: none !important;
  }

  .home-intro {
    padding: 14px;
  }

  .home-intro-title {
    font-size: clamp(1.9rem, 8.2vw, 2.2rem);
    margin-bottom: 6px;
  }

  .home-intro-text {
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .category-header .categories-title {
    font-size: 1rem;
  }
}

@media (max-width: 430px) {
  .header-spacer {
    height: 86px !important;
  }

  .top-wrap form .header-logo .logo img {
    max-width: 44px !important;
  }
}

body.coupon-popup-open {
  overflow: hidden;
}

.coupon-copy-popup {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
}

.coupon-copy-popup.is-open {
  display: block;
}

.coupon-copy-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.coupon-copy-popup__dialog {
  position: relative;
  width: min(92vw, 440px);
  margin: 16vh auto 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e4e7ee;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
  padding: 18px 18px 14px;
  text-align: center;
}

.coupon-copy-popup__dialog h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  color: #1f2937;
}

.coupon-copy-popup__dialog p {
  margin: 0 0 7px;
  color: #404b5a;
  line-height: 1.35;
}

#coupon-popup-code {
  color: #c11219;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.coupon-copy-popup__msg {
  margin-bottom: 14px !important;
}

.coupon-copy-popup__actions {
  display: flex;
  justify-content: center;
}

.coupon-copy-popup__actions .coupon-popup-go {
  min-width: 170px;
}
