/* TCS x Lenovo Deals page. Scoped to .ld-page so the Understrap/Bootstrap theme is not touched. */
@font-face {
  font-family: "LD Montserrat";
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

.ld-page {
  --ld-navy: #11184f;
  --ld-band-top: #7a126b;
  --ld-band-bottom: #b8252e;
  --ld-tile-top: #900a6d;
  --ld-tile-bottom: #d8202a;
  --ld-lenovo-red: #e1140a;
  --ld-max: 1415px;
  --ld-gap: clamp(16px, 2.8vw, 40px);
  --ld-font: "LD Montserrat", "Montserrat", "Ubuntu", Arial, sans-serif;

  /* break out of the theme's .container to full viewport width */
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: var(--ld-navy);
  color: #fff;
  font-family: var(--ld-font);
  padding-bottom: clamp(48px, 6vw, 96px);
  overflow: hidden;
}
.ld-page *, .ld-page *::before, .ld-page *::after { box-sizing: border-box; }

/* gradient band behind the heading; tiles overlap its lower edge */
.ld-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(300px, 25vw, 483px);
  background: linear-gradient(180deg, var(--ld-band-top) 0%, var(--ld-band-bottom) 100%);
}

.ld-inner {
  position: relative;
  max-width: var(--ld-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

.ld-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: clamp(64px, 14.4vw, 277px);
  padding-bottom: clamp(28px, 3vw, 56px);
}
.ld-title {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 50px);
  margin: 0;
  font-family: var(--ld-font);
  font-weight: 700;
  font-size: clamp(44px, 4.7vw, 90px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}
#page-wrapper .ld-page .ld-title img,
.ld-title img {
  display: block;
  margin: 0;
  max-width: none;
  height: clamp(42px, 4.6vw, 89px);
  width: auto;
}

/* category filter */
.ld-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ld-filter button {
  font-family: var(--ld-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 16px;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 3px;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.ld-filter button:hover { background: rgba(255, 255, 255, .15); }
.ld-filter button[aria-pressed="true"] { background: #fff; color: #000; }
.ld-filter button:focus-visible,
.ld-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* tile grid */
.ld-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ld-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 900px) { .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ld-grid { grid-template-columns: minmax(0, 1fr); } }

.ld-tile {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  aspect-ratio: 8 / 15;
  background: linear-gradient(180deg, var(--ld-tile-top) 0%, var(--ld-tile-top) 17.7%, var(--ld-tile-bottom) 100%);
  /* % padding resolves against the tile width (cqw would hit the viewport here) */
  padding: 7.4% 7.6%;
}
.ld-tile[hidden] { display: none; }
@media (max-width: 560px) { .ld-tile { aspect-ratio: auto; } }

/* #page-wrapper prefix beats the theme's "#page-wrapper article.page img { width: 80%; margin: 40px auto }" */
#page-wrapper .ld-page .ld-img,
.ld-page .ld-img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 0 6cqw;
  object-fit: contain;
}
.ld-name {
  margin: 0 0 4.4cqw;
  font-family: var(--ld-font);
  font-weight: 700;
  font-size: clamp(20px, 8.6cqw, 36px);
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: none;
  color: #fff;
  min-height: 2.4em; /* two lines, like the mockup */
}
.ld-specs {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(14px, 5.5cqw, 22px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: .02em;
}
.ld-specs li {
  position: relative;
  padding-left: .55em;
}
.ld-specs li::before {
  content: "-";
  position: absolute;
  left: 0;
}
.ld-btn {
  align-self: flex-end;
  margin-top: auto;
  display: inline-block;
  padding: 3.9cqw 6.6cqw;
  font-family: var(--ld-font);
  font-size: clamp(14px, 4.6cqw, 19px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
  color: #000;
  background: #fff;
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.ld-specs { margin-bottom: 6cqw; }
.ld-btn:hover,
.ld-btn:focus { color: #000; text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
@media (max-width: 560px) { .ld-specs { margin-bottom: 24px; } }
/* Preview only: product without a shop link yet (never in the plugin's deals.html) */
.ld-btn-pending,
.ld-btn-pending:hover { background: rgba(255, 255, 255, .35); color: #fff; transform: none; box-shadow: none; cursor: default; }

.ld-note {
  margin: clamp(32px, 4vw, 56px) 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .65);
}

/* this page only: hide the theme's page header and its blue content box */
body.ld-deals-page #single-header,
body.ld-deals-page #page-wrapper article .entry-header { display: none; }
body.ld-deals-page #page-wrapper { padding: 0; }
body.ld-deals-page #content { padding-top: 0; padding-bottom: 0; }
body.ld-deals-page #main { margin: 0; padding: 0; }
body.ld-deals-page #page-wrapper article .entry-content {
  margin: 0;
  padding: 0;
  background: transparent;
}

.ld-page .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
