/* products.css — Products (DIY Manager Trainings) page
 * Source: Figma — Full prototype V4 → Product (989:1745) at 1728px
 * Sections: product grid (7 cards, 3 cols) + shared partials below
 */

.site-main--products {
  background: var(--bg, #F2E8D4);
  color: var(--brand, #183A40);
}

/* ===========================
 * Product Grid — heading + subtext + 3-col card grid
 * =========================== */
.prod-grid {
  background: var(--bg);
  padding: 70px 0 120px;
}

.prod-grid__inner {
  max-width: 1424px;
  margin-inline: auto;
  padding-inline: 0;
  display: flex;
  flex-direction: column;
  gap: 84px;
}

.prod-grid__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 64px;
}

.prod-grid__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 5.56vw, 6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand, #183A40);
  letter-spacing: 0;
  text-transform: uppercase;
}

.prod-grid__title em {
  font-style: italic;
  font-weight: 500;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
}

.prod-grid__subtext {
  margin: 0;
  font-family: var(--sans);
  font-size: 24px;
  line-height: 1.25;
  color: var(--brand, #183A40);
  max-width: 1398px;
}

.prod-grid__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 683px);
  justify-content: center;
  gap: 90px 58px;
}

/* ===========================
 * Product Card
 * =========================== */
.prod-card {
  display: flex;
  min-width: 0;
}

.prod-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: 683px;
  justify-self: center;
}

.prod-card__book {
  --book-ink: var(--brand, #183A40);
  --book-hover-ink: var(--bg, #F2E8D4);
  position: relative;
  width: 100%;
  aspect-ratio: 683 / 812;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 8px;
  color: var(--book-ink);
  background:
    linear-gradient(90deg, rgba(19, 62, 68, 0.72) 0, rgba(19, 62, 68, 0.46) 7.5%, rgba(242, 232, 212, 0.13) 11%, rgba(56, 130, 138, 0.05) 16%, transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(15,60,67,0.08)),
    url("../img/product-book-texture.png") center / 44% auto repeat,
    #69A6AF;
  cursor: default;
  transition: background-color 0.28s ease, color 0.28s ease;
}

.prod-card__book::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 44, 51, 0.44) 0, rgba(4, 44, 51, 0.28) 13%, transparent 31%),
    rgba(6, 49, 56, 0.86);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.prod-card__book:hover,
.prod-card__book:focus-visible {
  color: var(--book-hover-ink);
  outline: 0;
}

.prod-card__book:hover::after,
.prod-card__book:focus-visible::after {
  opacity: 1;
}

.prod-card__corner {
  position: absolute;
  display: block;
  color: currentColor;
  background: currentColor;
  -webkit-mask: url("../img/logo-art.svg") center / contain no-repeat;
  mask: url("../img/logo-art.svg") center / contain no-repeat;
  pointer-events: none;
  transition: color 0.28s ease, background-color 0.28s ease;
}

.prod-card__corner {
  top: -3px;
  left: -32px;
  width: 150px;
  height: 96px;
}

.prod-card__mark {
  position: absolute;
  display: block;
  left: 50%;
  bottom: 62px;
  width: 48px;
  height: 32px;
  color: currentColor;
  transform: translateX(-50%);
  pointer-events: none;
  transition: color 0.28s ease;
}

.prod-card__mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.prod-card__content {
  position: absolute;
  inset: 144px 72px auto 108px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  transition: color 0.28s ease;
}

.prod-card__title {
  width: 100%;
  margin: 0;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
  color: currentColor;
  text-align: center;
}

.prod-card__title em,
.prod-card__title strong {
  display: block;
}

.prod-card__title em {
  font-style: italic;
  font-weight: 400;
}

.prod-card__title strong {
  font-weight: 700;
}

.prod-card__summary {
  align-self: flex-start;
  margin: 2px 0 0 22px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.18;
  color: currentColor;
}

.prod-card__details {
  width: 100%;
  max-width: 520px;
  margin-top: 2px;
  color: currentColor;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.28;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.prod-card__details p,
.prod-card__bullets {
  margin: 0;
}

.prod-card__bullets {
  padding-left: 1.05em;
  list-style-type: disc;
}

.prod-card__bullets li::marker {
  color: currentColor;
  font-size: 0.8em;
}

.prod-card__pricing {
  position: absolute;
  right: 58px;
  bottom: 138px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.06;
  color: currentColor;
  transition: color 0.28s ease;
}

.prod-card__price-original,
.prod-card__price-sale {
  color: currentColor;
}

.prod-card__price-original--strike {
  text-decoration: line-through;
  text-decoration-thickness: 0.08em;
}

.prod-card__book:hover .prod-card__details,
.prod-card__book:focus-visible .prod-card__details {
  opacity: 1;
}

.prod-card__book:hover .prod-card__pricing,
.prod-card__book:focus-visible .prod-card__pricing {
  color: var(--book-hover-ink);
}

.prod-card__book:hover .prod-card__corner,
.prod-card__book:focus-visible .prod-card__corner,
.prod-card__book:hover .prod-card__mark,
.prod-card__book:focus-visible .prod-card__mark {
  color: var(--book-hover-ink);
}

.prod-card__book:hover .prod-card__corner,
.prod-card__book:focus-visible .prod-card__corner {
  background: var(--book-hover-ink);
}

/*
 * Responsive â€” 1399px
 * =========================== */
/* ===========================
 * Responsive — 1399px
 * =========================== */
@media (max-width: 1399px) {
  .prod-grid__inner {
    max-width: 1160px;
    padding-inline: 32px;
  }

  .prod-grid__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px 40px;
  }

  .prod-card:last-child:nth-child(odd) {
    width: min(100%, 560px);
  }

  .prod-card__content {
    inset: 118px 52px auto 82px;
  }

  .prod-card__title {
    font-size: clamp(2.6rem, 3.7vw, 3.3rem);
  }

  .prod-card__pricing {
    right: 48px;
    bottom: 108px;
    font-size: 28px;
  }
}

/* ===========================
 * Responsive — 991px (tablet)
 * =========================== */
@media (max-width: 991px) {
  .prod-grid {
    padding: 56px 0 90px;
  }

  .prod-grid__inner {
    gap: 56px;
  }

  .prod-grid__head {
    gap: 36px;
  }

  .prod-grid__title {
    font-size: clamp(3.25rem, 8.5vw, 4.5rem);
  }

  .prod-grid__subtext {
    font-size: 20px;
  }

  .prod-grid__list {
    gap: 42px 28px;
  }

  .prod-card__content {
    inset: 94px 36px auto 54px;
  }

  .prod-card__title {
    font-size: clamp(2rem, 4.8vw, 2.8rem);
  }

  .prod-card__details {
    font-size: 15px;
  }

  .prod-card__pricing {
    right: 38px;
    bottom: 90px;
    font-size: 28px;
  }

  .prod-card__mark {
    bottom: 42px;
  }
}

/* ===========================
 * Responsive — 767px (mobile)
 * =========================== */
@media (max-width: 767px) {
  .prod-grid__title {
    font-size: clamp(2.65rem, 12vw, 3.5rem);
    line-height: 1.08;
  }

  .prod-grid__list {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .prod-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }

  .prod-card__content {
    inset: 23% 12% auto 14%;
  }

}

/* ===========================
 * Responsive — 575px (small mobile)
 * =========================== */
@media (max-width: 575px) {
  .prod-grid__inner {
    padding-inline: 18px;
  }

  .prod-grid__subtext {
    font-size: 18px;
  }

  .prod-card__title {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .prod-card__details {
    font-size: 13px;
  }

  .prod-card__pricing {
    right: 26px;
    bottom: 70px;
    font-size: 22px;
  }

  .prod-card__corner {
    left: -34px;
    width: 155px;
    height: 100px;
  }

  .prod-card__mark {
    bottom: 32px;
    width: 40px;
    height: 26px;
  }
}
