/* MesPromos static polish — sits on top of the original styles */

:root {
  --mp-magenta: #c8285f;
  --mp-magenta-deep: #a01f4b;
  --mp-cyan: #40c4f2;
  --mp-ink: #2a2a2a;
  --mp-muted: #6b6b6b;
  --mp-line: #e6e6e8;
  --mp-paper: #f7f7f8;
  --mp-white: #ffffff;
  --mp-shadow: 0 10px 28px rgba(42, 42, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--mp-ink);
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(200, 40, 95, 0.08), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(64, 196, 242, 0.08), transparent 55%),
    linear-gradient(180deg, #fbfbfc 0%, #f3f3f5 100%);
  -webkit-font-smoothing: antialiased;
}

/* Hide dead interactive chrome that does nothing in static mode */
.header-nav .login,
.header-nav li.devider,
.header-nav a.lang,
.header .user,
.header-nav .tooltip,
.banner-leaderboard,
.div-gpt-ad,
.squaread,
.ad-content,
.adfoot,
.video-ad,
img[src*="1-pixel"],
img[src*="btn_fb_login"],
img[src*="google_login_icon"],
#LoginModal,
#PostalCodeModal,
#OtherRegionsModal,
.manager-special-tooltip,
.ouibounce-modal {
  display: none !important;
}

/* Soften account icons that only show "0" */
.header-nav li.devider:has(.alerts),
.header-nav li:has(.recipes) {
  display: none !important;
}

/* Fallback when :has() unsupported — hide zero counters */
.header-nav .alerts_count,
.header-nav .recipes_count {
  display: none !important;
}

.masthead .header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--mp-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.masthead .header .logo {
  max-height: 44px;
  width: auto;
}

.header-nav > li > a {
  letter-spacing: 0.01em;
}

.header-nav > li > a:hover {
  color: var(--mp-magenta);
}

.location {
  color: var(--mp-muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.form-search-homepage {
  background: transparent;
  padding: 28px 16px 10px;
}

.form-search-homepage h1 {
  font-family: breebold, bree, Georgia, serif;
  color: var(--mp-ink);
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 14px;
}

.form-search-homepage .form-search {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  box-shadow: var(--mp-shadow);
  border-radius: 8px;
  overflow: hidden;
  background: var(--mp-white);
  border: 1px solid var(--mp-line);
}

.form-search-homepage .form-search input[type="text"] {
  border: 0;
  box-shadow: none;
  height: 48px;
  margin: 0;
  flex: 1;
  padding: 0 16px;
}

.form-search-homepage .form-search .button {
  border-radius: 0;
  height: 48px;
  min-width: 56px;
  background: var(--mp-magenta);
  border: 0;
}

.form-search-homepage .form-search .button:hover {
  background: var(--mp-magenta-deep);
}

.top-section {
  margin: 8px 0 24px;
  background: transparent;
}

.top-section .container {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: center;
  background: transparent;
}

.top-section .span3 {
  width: auto;
  margin: 0;
  float: none;
  background: transparent;
}

.top-section a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--mp-ink);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.top-section a:hover {
  color: var(--mp-magenta);
  transform: translateY(-1px);
}

.top-section a:before {
  background: transparent !important;
}

/* Flyer / product cards */
.thumbnails > li .thumbnail,
.recipe-thumbnails > li .thumbnail,
.products_thumbnails > li .thumbnail {
  background: var(--mp-white);
  border: 1px solid var(--mp-line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(42, 42, 42, 0.05);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.thumbnails > li .thumbnail:hover,
.recipe-thumbnails > li .thumbnail:hover {
  transform: translateY(-3px);
  box-shadow: var(--mp-shadow);
}

.thumbnail .table-cell img,
.flyer-list .thumbnail .table-cell img,
.recipe-thumbnails .thumbnail .table-cell img {
  object-fit: contain;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
}

img[src*="placeholder"] {
  object-fit: cover;
  filter: saturate(0.9);
  opacity: 0.95;
}

.thumbnail .caption a,
.recipe-thumbnails .caption a {
  color: var(--mp-ink);
}

.thumbnail .caption a:hover,
.recipe-thumbnails .caption a:hover {
  color: var(--mp-magenta);
}

.button,
a.button {
  background: var(--mp-magenta);
  border: 0;
  border-radius: 6px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.button:hover,
a.button:hover {
  background: var(--mp-magenta-deep);
}

/* Footer quieter */
.footer,
.footer-links {
  background: transparent;
}

.footer-links .title {
  color: var(--mp-ink);
  font-family: bree, Georgia, serif;
}

.footer-links a {
  color: var(--mp-muted);
}

.footer-links a:hover {
  color: var(--mp-magenta);
}

/* Recipe listing: less double-title noise if image alt shows */
.recipe-thumbnails .thumbnail .table-cell img[alt] {
  color: transparent;
}

/* Category / filter pages */
.button.hide,
a.button.hide,
.hide {
  display: none !important;
}

#reset-filter,
#apply-filter {
  margin: 6px 8px 6px 0;
  position: static !important;
  float: none !important;
}

.flyer-categories .checkbox-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 10px 4px 0;
  min-width: 140px;
}

.flyer-categories .checkbox-store .store-name {
  font-size: 13px;
  color: var(--mp-ink);
  white-space: nowrap;
}

.flyer-categories .accordion-inner {
  padding-top: 10px;
}

.thumbnails .flyer-list .caption a.center:empty::before {
  content: attr(title);
  color: var(--mp-ink);
  font-size: 13px;
}

.thumbnails .flyer-list .thumbnail .table-cell img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

/* Keep primary nav labels (bootstrap hides .visible-desktop on phones) */
.header-nav .hidden-desktop {
  display: none !important;
}

@media (max-width: 979px) {
  .header-nav > li > a.visible-desktop {
    display: block !important;
  }
}

/* Hamburger on light header */
.trigger-menu {
  background: var(--mp-magenta) !important;
  border: 0 !important;
  border-radius: 6px;
  z-index: 20;
}

.trigger-menu > span {
  background-color: #fff !important;
}

/* Collapsed mobile drawer */
@media (max-width: 979px) {
  .masthead .header .container {
    position: relative;
  }

  .nav-collapse.collapse:not(.in):not(.show) {
    height: 0 !important;
    overflow: hidden !important;
    margin: 0;
    padding: 0;
  }

  .nav-collapse.in,
  .nav-collapse.show {
    height: auto !important;
    overflow: visible !important;
    clear: both;
    width: 100%;
    margin-top: 12px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--mp-line);
    background: var(--mp-white);
    border-radius: 0 0 10px 10px;
  }

  .header-nav {
    width: 100% !important;
    float: none !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .header-nav.inline > li {
    display: block !important;
    float: none !important;
    border-top: 1px solid var(--mp-line);
    padding: 0;
    margin: 0;
  }

  .header-nav.inline > li:first-child {
    border-top: 0;
  }

  .header-nav > li > a {
    display: block !important;
    padding: 12px 8px;
    text-align: left;
  }

  .header-nav .form-search {
    float: none !important;
    margin: 8px 0 !important;
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }

  .header-nav .form-search .ui-front {
    width: auto !important;
    flex: 1;
  }

  .header-nav .form-search input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    height: 42px;
  }

  .header-nav .form-search .button,
  .header-nav .form-search button {
    width: 48px !important;
    min-width: 48px;
    height: 42px;
  }
}

@media (max-width: 767px) {
  .form-search-homepage {
    padding: 18px 12px 6px;
  }

  .form-search-homepage h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .form-search-homepage .form-search {
    max-width: none;
  }

  .form-search-homepage .form-search input[type="text"] {
    height: 44px;
    font-size: 15px;
  }

  .form-search-homepage .form-search .button {
    height: 44px;
    min-width: 48px;
  }

  .top-section {
    margin: 4px 0 16px;
  }

  .top-section .container {
    padding: 0 8px;
    gap: 14px 10px;
  }

  .top-section .span3 {
    width: calc(50% - 8px);
    max-width: none;
  }

  .top-section a {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    text-align: center;
  }

  .location {
    font-size: 12px;
    padding: 0 8px;
    text-align: center;
  }

  .location.inline > li {
    display: inline;
    float: none;
  }

  .flyer-categories .checkbox-store {
    min-width: 46%;
  }

  /* Card grids: 2-up instead of crushed floats */
  ul.thumbnails,
  ul.recipe-thumbnails,
  ul.products_thumbnails,
  ul.stores.list,
  #flyer-items,
  #retailers-list,
  #popular-categories-items {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-left: 0 !important;
    width: 100%;
  }

  ul.thumbnails > li,
  ul.recipe-thumbnails > li,
  ul.products_thumbnails > li,
  ul.stores.list > li,
  #flyer-items > li,
  #retailers-list > li,
  #popular-categories-items > li,
  .thumbnails > li[class*="span"],
  .row-fluid .thumbnails > li[class*="span"] {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
  }

  .categories-front-page > li {
    width: auto !important;
    display: block;
  }

  .thumbnail .table-cell,
  .flyer-list .thumbnail .table-cell {
    height: auto !important;
    min-height: 110px;
  }

  .thumbnail .table-cell img,
  .flyer-list .thumbnail .table-cell img {
    max-height: 160px;
  }

  /* Sidebars stack */
  .row-fluid > [class*="span"],
  #recipe-layout .row-fluid > [class*="span"],
  .search-result [class*="span"] {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .mp-flyer-toolbar {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 10px 12px;
  }

  .mp-flyer-tabs {
    flex-wrap: wrap;
  }

  .mp-flyer-cover {
    min-height: 0;
    padding: 14px;
  }

  .mp-flyer-cover img {
    width: 100%;
    max-height: 420px;
  }

  .grocery-coupon-title h1,
  .grocery-coupon-title h2,
  .row-fluid > h2,
  .mp-flyer-brand h1 {
    font-size: 22px;
  }

  .footer .footer-links {
    padding: 8px 12px 24px;
  }

  .footer .footer-links ul.footers-inline {
    width: 100% !important;
    float: none !important;
    margin: 0 0 18px !important;
    clear: both;
  }

  .container {
    width: auto !important;
    padding-left: 12px;
    padding-right: 12px;
  }

  .masthead .header .logo {
    max-height: 36px;
    width: auto !important;
  }
}

@media (max-width: 480px) {
  .top-section .span3 {
    width: 100%;
  }

  ul.thumbnails,
  ul.recipe-thumbnails,
  ul.products_thumbnails,
  ul.stores.list,
  #flyer-items,
  #retailers-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .form-search-homepage h1 {
    font-size: 22px;
  }
}

/* Flyer detail pages */
.mp-flyer-page {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px 36px;
  margin: 8px 0 36px;
  align-items: start;
}

.mp-flyer-store {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
  background: linear-gradient(180deg, #fff 0%, #f7f7f9 100%);
  border: 1px solid var(--mp-line);
  border-radius: 12px;
}

.mp-flyer-change {
  margin: 0;
  font-size: 13px;
}

.mp-flyer-change a {
  color: var(--mp-magenta);
  text-decoration: none;
  font-weight: 600;
}

.mp-flyer-change a:hover {
  text-decoration: underline;
}

.mp-flyer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-flyer-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--mp-line);
  border-radius: 10px;
  padding: 6px;
}

.mp-flyer-brand h1 {
  margin: 0;
  font-family: Bree, Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
  color: var(--mp-ink);
}

.mp-flyer-address,
.mp-flyer-distance,
.mp-flyer-fav {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #555;
}

.mp-flyer-distance {
  font-weight: 600;
  color: var(--mp-ink);
}

.mp-flyer-details {
  font-size: 13px;
  color: var(--mp-magenta);
  text-decoration: none;
}

.mp-flyer-details:hover {
  text-decoration: underline;
}

.mp-flyer-star {
  color: #e0a800;
  margin-left: 4px;
}

.mp-flyer-viewer {
  min-width: 0;
}

.mp-flyer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.mp-flyer-tab {
  appearance: none;
  border: 1px solid var(--mp-line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--mp-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.mp-flyer-tab span {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  color: #666;
  font-size: 12px;
}

.mp-flyer-tab.is-active {
  border-color: var(--mp-magenta);
  box-shadow: inset 0 0 0 1px var(--mp-magenta);
  background: #fff5f8;
}

.mp-flyer-edition {
  display: none;
  background: #fff;
  border: 1px solid var(--mp-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(42, 42, 42, 0.06);
}

.mp-flyer-edition.is-active {
  display: block;
}

.mp-flyer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #f4f4f6, #fafafa);
  border-bottom: 1px solid var(--mp-line);
}

.mp-flyer-dates,
.mp-flyer-pages {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mp-ink);
}

.mp-flyer-pages {
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.mp-flyer-cover {
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background:
    radial-gradient(ellipse at top, rgba(200, 40, 95, 0.06), transparent 55%),
    linear-gradient(180deg, #fbfbfc 0%, #f0f0f3 100%);
  min-height: 360px;
  justify-content: center;
}

.mp-flyer-cover img {
  width: min(100%, 420px);
  max-height: 520px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--mp-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  padding: 12px;
}

.mp-flyer-cover figcaption {
  font-size: 13px;
  color: #777;
}

.row-fluid > h2 {
  font-family: Bree, Georgia, serif;
  font-size: 22px;
  margin: 8px 0 16px;
  color: var(--mp-ink);
}

@media (max-width: 900px) {
  .mp-flyer-page {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mp-flyer-store {
    order: -1;
  }

  .mp-flyer-brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .mp-flyer-brand img {
    width: 72px;
    height: 72px;
  }

  .mp-flyer-cover {
    min-height: 240px;
    padding: 18px;
  }
}


/* Recipe filters: static markup only, no open empty panels */
#refineRecipeList .accordion-body {
  display: none !important;
}
#refineRecipeList .accordion-heading .accordion-toggle {
  display: block;
  cursor: default;
  text-decoration: none;
  pointer-events: none;
}
#refineRecipeList .accordion-group {
  margin-bottom: 2px;
}
#refineRecipeList input.filters {
  pointer-events: none;
}


/* Coupons page */
.grocery-coupon-title h1,
.grocery-coupon-title h2 {
  font-family: Bree, Georgia, serif;
  font-size: 28px;
  color: var(--mp-ink);
  margin: 8px 0 18px;
}
.grocery-coupon-title h2 a { color: inherit; text-decoration: none; }

#websaver-print-coupon-list-items {
  clear: both;
}

ul.mp-coupon-grid,
#print-coupon-items.mp-coupon-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
  float: none;
}

ul.mp-coupon-grid > li,
#print-coupon-items.mp-coupon-grid > li {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  display: block;
}

.mp-coupon-grid .coupon-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid var(--mp-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(42, 42, 42, 0.05);
}

.mp-coupon-grid .coupon-detail h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--mp-ink);
  font-family: Bree, Georgia, serif;
}

.mp-coupon-grid .coupon-detail h6 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-magenta);
}

.mp-coupon-grid .coupon-description {
  font-size: 13px;
  line-height: 1.45;
  color: #555;
}

.mp-coupon-grid .coupon-badge {
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f4f4f6;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  pointer-events: none;
}

.view-all-coupons {
  display: none;
}

@media (max-width: 900px) {
  ul.mp-coupon-grid,
  #print-coupon-items.mp-coupon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  ul.mp-coupon-grid,
  #print-coupon-items.mp-coupon-grid {
    grid-template-columns: 1fr;
  }
}
