/* Homepage sections (neo_site/index.php) - builds on style.css variables.
   .hp-*  : AI search hero, section headings, product rows/cards, categories, budget tabs, trust strip
   .home-*: "This week at Mascom" (pick of the day + deals) and the blog cards */

/* ---------------- Shared section shell + heading */
.hp-section { padding: 28px 0 6px; }
/* Bootstrap columns are flex items (min-width: auto): without this, a scrolling row or chip line stretches the
   column to its full content width on screens below lg and the page overflows sideways */
.hp-section .row > [class*="col"],
.hp-search .row > [class*="col"],
.hp-trust .row > [class*="col"] { min-width: 0; }
.hp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hp-head h2 { font-size: 1.35rem; font-weight: 700; color: #1f2233; margin: 0; }
.hp-head h2 .mdi { color: rgba(192, 8, 183, 0.9); }
.hp-head-sub { display: block; font-size: 13.5px; color: #6b7080; margin-top: 2px; }
.hp-head-link {
  color: var(--bg-navyblue);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.hp-head-link:hover { color: rgba(192, 8, 183, 0.9); }

/* ---------------- AI search hero */
.hp-search { padding: 24px 0 4px; }
.hp-search-card {
  background: linear-gradient(120deg, #252b61 0%, #4a2a7a 55%, #a0109a 100%);
  border-radius: 20px;
  padding: 26px 28px 22px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 43, 97, 0.2);
}
.hp-search-card h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; color: #fff; }
.hp-search-lead { color: rgba(255, 255, 255, 0.82); font-size: 14.5px; margin-bottom: 16px; }
.hp-search-box { display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 6px; }
.hp-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 14px;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: #1f2233;
}
.hp-search-go {
  flex: none;
  border: 0;
  border-radius: 999px;
  background: rgba(192, 8, 183, 0.92);
  color: #fff;
  font-weight: 700;
  padding: 8px 20px;
  cursor: pointer;
}
.hp-search-go:hover, .hp-search-go:focus { background: var(--bg-navyblue); }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.hp-chips-label { font-size: 13px; color: rgba(255, 255, 255, 0.75); font-weight: 600; margin-right: 2px; }
.hp-chip {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}
.hp-chip:hover, .hp-chip:focus { background: #fff; color: var(--bg-navyblue); }

/* ---------------- Product rows (horizontal scroll) and the shared product card */
.hp-row-wrap { position: relative; }
.hp-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 14px) / 5);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
}
.hp-row-item { scroll-snap-align: start; min-width: 0; }
.hp-row-nav {
  position: absolute;
  top: 36%;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e3e5ec;
  background: #fff;
  color: var(--bg-navyblue);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(37, 43, 97, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hp-row-nav[hidden] { display: none; }
.hp-row-nav.is-prev { left: -16px; }
.hp-row-nav.is-next { right: -16px; }
.hp-row-nav:hover { background: var(--bg-navyblue); color: #fff; }

.hp-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e9ebf1;
  border-radius: 16px;
  padding: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hp-card:hover { box-shadow: 0 8px 24px rgba(37, 43, 97, 0.1); transform: translateY(-2px); }
.hp-card-img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #f4f5f9;
  overflow: hidden;
}
.hp-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.hp-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #d62d4b;
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
}
.hp-card-badge.is-off { background: #6b7080; }
.hp-card-title {
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2233;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-card-title:hover { color: var(--bg-navyblue); text-decoration: underline; }
.hp-card-price { margin: 6px 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.hp-card-price b { color: var(--bg-navyblue); font-size: 1.05rem; }
.hp-card-price s { color: #8a8fa0; font-size: 13px; }
.hp-card-btn {
  margin-top: auto;
  display: block;
  text-align: center;
  border: 2px solid var(--bg-navyblue);
  color: var(--bg-navyblue);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13.5px;
  font-weight: 600;
}
.hp-card-btn:hover { background: var(--bg-navyblue); color: #fff; }
.hp-card-btn.is-off { border-color: #d5d8e2; color: #6b7080; }
.hp-card-btn.is-off:hover { background: #f4f5f9; color: #1f2233; }

/* ---------------- Shop by category */
.hp-cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.hp-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  background: #fff;
  border: 1px solid #e9ebf1;
  border-radius: 16px;
  padding: 14px 8px 12px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.hp-cat:hover { border-color: rgba(192, 8, 183, 0.45); box-shadow: 0 8px 24px rgba(37, 43, 97, 0.1); }
.hp-cats:not(.is-open) .hp-cat.is-extra { display: none; }
.hp-cat-img {
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #f6f0fb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-cat-img img { max-width: 44px; max-height: 44px; object-fit: contain; }
.hp-cat-img .mdi { font-size: 28px; color: rgba(192, 8, 183, 0.85); }
.hp-cat-name { font-weight: 600; font-size: 14px; color: #1f2233; line-height: 1.25; }
.hp-cat-count { font-size: 12.5px; color: #0b7a31; font-weight: 600; }
.hp-cats-more {
  display: block;
  margin: 14px auto 0;
  border: 2px solid var(--bg-navyblue);
  background: #fff;
  color: var(--bg-navyblue);
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.hp-cats-more:hover { background: var(--bg-navyblue); color: #fff; }

/* ---------------- Shop by budget tabs */
.hp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hp-tab {
  border: 1px solid #d5d8e2;
  background: #fff;
  color: #1f2233;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.hp-tab:hover { border-color: var(--bg-navyblue); }
.hp-tab[aria-selected="true"] { background: var(--bg-navyblue); border-color: var(--bg-navyblue); color: #fff; }
.hp-tabpanel[hidden] { display: none; }

/* ---------------- Trust strip */
.hp-trust { padding: 30px 0 40px; }
.hp-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: #f7f8fb;
  border-radius: 18px;
  padding: 18px;
}
.hp-trust-item { display: flex; gap: 12px; align-items: center; color: #1f2233; }
.hp-trust-item > .mdi {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: rgba(192, 8, 183, 0.9);
  box-shadow: 0 2px 8px rgba(37, 43, 97, 0.08);
}
.hp-trust-item b { display: block; font-size: 14.5px; }
.hp-trust-item small { display: block; font-size: 12.5px; color: #6b7080; line-height: 1.35; }
a.hp-trust-item:hover { color: #1f2233; }
a.hp-trust-item:hover b { text-decoration: underline; }

@media (max-width: 991.98px) {
  .hp-row { grid-auto-columns: calc((100% - 2 * 14px) / 3.2); }
  .hp-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .hp-section { padding-top: 22px; }
  .hp-head h2 { font-size: 1.2rem; }
  .hp-search { padding-top: 16px; }
  .hp-search-card { padding: 20px 16px 16px; border-radius: 16px; }
  .hp-search-card h2 { font-size: 1.25rem; }
  .hp-search-go { padding: 8px 14px; }
  .hp-search-go-text { display: none; }
  /* one swipeable line of chips instead of a tall stack */
  .hp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .hp-chips::-webkit-scrollbar { display: none; }
  .hp-row { grid-auto-columns: 46%; gap: 12px; }
  .hp-row-nav { display: none !important; } /* swipe on touch screens */
  .hp-card { padding: 10px; }
  .hp-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .hp-cat-img { width: 52px; height: 52px; }
  .hp-cat-img img { max-width: 36px; max-height: 36px; }
  .hp-cat-name { font-size: 13px; }
  .hp-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hp-tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 479.98px) {
  .hp-trust-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- This week at Mascom */
.home-week {
  margin-top: 28px;
  padding: 36px 0 28px;
  background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 100%);
}

.home-week-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.home-week-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(192, 8, 183, 0.9);
  margin-bottom: 4px;
}
.home-week-head h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bg-navyblue);
  margin: 0;
}
.home-week-head h2::first-letter { text-transform: uppercase; }
.home-week-all,
.home-deals-head a {
  color: var(--bg-navyblue);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.home-week-all:hover,
.home-deals-head a:hover { color: rgba(192, 8, 183, 0.9); }

/* ---------------- Pick of the day */
.home-pick {
  position: relative;
  display: block;
  height: 100%;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #1f2233;
  box-shadow: 0 10px 30px rgba(37, 43, 97, 0.18);
  color: #fff;
}
.home-pick img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.home-pick:hover img { transform: scale(1.04); }
.home-pick::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 50, 0) 45%, rgba(20, 22, 50, 0.88) 100%);
}
.home-pick-chip {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  background: rgba(192, 8, 183, 0.92);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.home-pick-info {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-pick-title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.home-pick-title,
.home-pick-price { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
.home-pick-price { font-weight: 700; color: #ffd8fb; }
.home-pick-price s { color: rgba(255, 255, 255, 0.65); font-weight: 400; margin-left: 6px; }
.home-pick-cta {
  align-self: flex-start;
  margin-top: 10px;
  background: #fff;
  color: var(--bg-navyblue);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 14px;
}
.home-pick:hover .home-pick-cta { background: rgba(192, 8, 183, 0.92); color: #fff; }

/* ---------------- Deals */
.home-deals-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.home-deals-head h3 { font-size: 1.15rem; font-weight: 700; color: #1f2233; margin: 0; }
.home-deals-head h3 .mdi { color: rgba(192, 8, 183, 0.9); }
.home-deals-head > span { font-size: 13.5px; color: #6b7080; }

.home-deals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.col-12 > .home-deals { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.home-deal {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid #e9ebf1;
  border-radius: 16px;
  padding: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.home-deal:hover { box-shadow: 0 8px 24px rgba(37, 43, 97, 0.1); transform: translateY(-2px); }
.col-12 > .home-deals .home-deal { flex-direction: column; }

.home-deal-img {
  position: relative;
  flex: none;
  width: 130px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #f4f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.col-12 > .home-deals .home-deal-img { width: 100%; }
.home-deal-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.home-deal-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #d62d4b;
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12.5px;
  font-weight: 700;
}
.home-deal-badge.is-popular { background: var(--bg-navyblue); }

.home-deal-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.home-deal-title {
  font-weight: 600;
  color: #1f2233;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-deal-title:hover { color: var(--bg-navyblue); text-decoration: underline; }
.home-deal-price { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.home-deal-price b { font-size: 1.1rem; color: var(--bg-navyblue); }
.home-deal-price s { color: #8a8fa0; font-size: 13.5px; }
.home-deal-price small { flex-basis: 100%; color: #0b7a31; font-weight: 600; font-size: 12.5px; }
.home-deal-btn {
  margin-top: auto;
  align-self: flex-start;
  border: 2px solid var(--bg-navyblue);
  color: var(--bg-navyblue);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.home-deal-price + .home-deal-btn { margin-top: 12px; }
.home-deal-btn:hover { background: var(--bg-navyblue); color: #fff; }

/* ---------------- From the blog */
.home-blog { margin-top: 8px; }
.home-blog-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid #e9ebf1;
  border-radius: 14px;
  padding: 10px;
  height: 100%;
}
.home-blog-card:hover { box-shadow: 0 8px 24px rgba(37, 43, 97, 0.1); }
.home-blog-card img { flex: none; width: 92px; height: 70px; object-fit: cover; border-radius: 10px; background: #eef0f4; }
.home-blog-text { display: flex; flex-direction: column; min-width: 0; }
.home-blog-cat { font-size: 12px; font-weight: 700; color: #0b7a31; }
.home-blog-title {
  font-weight: 600;
  color: #1f2233;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-blog-card:hover .home-blog-title { color: var(--bg-navyblue); text-decoration: underline; }
.home-blog-date { font-size: 12.5px; color: #6b7080; margin-top: 2px; }

/* ---------------- Smaller screens */
@media (max-width: 991.98px) {
  .home-pick { min-height: 380px; }
  .col-12 > .home-deals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .home-week { margin-top: 36px; padding-top: 24px; }
  .home-week-head h2 { font-size: 1.4rem; }
  .home-deals { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .col-12 > .home-deals { grid-template-columns: minmax(0, 1fr); }
  .col-12 > .home-deals .home-deal { flex-direction: row; }
  .col-12 > .home-deals .home-deal-img { width: 110px; }
  .home-deal-img { width: 110px; }
  .home-pick { min-height: 360px; }
  /* wide-and-short card on phones: start the shade higher so the title stays readable over the picture */
  .home-pick::after { background: linear-gradient(180deg, rgba(20, 22, 50, 0) 20%, rgba(20, 22, 50, 0.92) 85%); }
}
