/* Dieline guide (under the generator) and the free-dieline block on product
   pages. Loaded on /dieline-generator/ and on single products only.
   Prefixes: dgg- (guide), dgp- (product block). Neither exists in main.css. */

.dgg, .dgp {
  --dg-navy: #232058;
  --dg-green: #6bbc44;
  --dg-green-ink: #3f8f1f;
  --dg-green-pale: #eff6ea;
  --dg-ink: #14132b;
  --dg-body: #45435c;
  --dg-muted: #74728a;
  --dg-line: rgba(35, 32, 88, .1);
  --dg-soft: #f6f6f8;
  --dg-shadow: 0 4px 14px rgba(35, 32, 88, .05);
}

/* ── Guide ────────────────────────────────────────────────── */
.dgg { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2.5rem, 5vw, 4rem); color: var(--dg-body); }
.dgg-block { margin-top: clamp(2.25rem, 5vw, 3.5rem); }
.dgg-block:first-child { margin-top: 0; }
.dgg-head { max-width: 760px; margin-bottom: 1.4rem; }
.dgg-h2 {
  font-family: "Sharp Sans", sans-serif; font-weight: 700;
  font-size: clamp(1.35rem, 1.5vw + .85rem, 2rem); line-height: 1.18;
  color: var(--dg-ink); margin: 0 0 .6rem;
}
.dgg-h3 {
  font-family: "Sharp Sans", sans-serif; font-weight: 700;
  font-size: 1.15rem; color: var(--dg-navy); margin: 0 0 .3rem;
}
.dgg-lead { font-size: 1rem; line-height: 1.7; margin: 0; }
.dgg-note { font-size: .88rem; color: var(--dg-muted); margin: .8rem 0 0; }

/* steps */
.dgg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dgg-step {
  position: relative; background: #fff; border: 1px solid var(--dg-line); border-radius: 16px;
  box-shadow: var(--dg-shadow); padding: 1.4rem 1.3rem 1.3rem;
}
.dgg-step__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--dg-green-pale);
  color: var(--dg-green-ink); font-weight: 700; margin-bottom: .75rem;
}
.dgg-step__t { font-family: "Sharp Sans", sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--dg-ink); margin: 0 0 .4rem; }
.dgg-step p { margin: 0; font-size: .95rem; line-height: 1.6; }

/* catalogue */
.dgg-group { margin-top: 1.75rem; }
.dgg-group__intro { margin: 0 0 1rem; font-size: .95rem; color: var(--dg-muted); max-width: 720px; }
.dgg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.dgg-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--dg-line);
  border-radius: 16px; box-shadow: var(--dg-shadow); padding: 1.25rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.dgg-card:hover { border-color: rgba(107, 188, 68, .45); box-shadow: 0 10px 26px rgba(35, 32, 88, .09); transform: translateY(-2px); }
.dgg-card__media, .dgp-card__media {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  margin: -.25rem -.25rem 1rem; padding: .9rem; border-radius: 12px; background: #f6f7f9;
  color: var(--dg-green-ink); font-size: 2rem; overflow: hidden;
}
.dgg-card__media img, .dgp-card__media img {
  display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease;
}
.dgg-card:hover .dgg-card__media img, .dgp-card:hover .dgp-card__media img { transform: scale(1.04); }
.dgg-card__t { font-family: "Sharp Sans", sans-serif; font-size: 1.02rem; font-weight: 700; color: var(--dg-ink); margin: 0 0 .35rem; }
.dgg-card__use { font-size: .92rem; line-height: 1.55; margin: 0 0 .5rem; }
.dgg-card__ex { font-size: .84rem; color: var(--dg-muted); margin: 0 0 1rem; }
.dgg-card__ex strong { color: var(--dg-body); font-weight: 600; }
.dgg-card__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.dgg-btn {
  display: inline-flex; align-items: center; gap: .35rem; background: var(--dg-navy); color: #fff;
  text-decoration: none; font-weight: 600; font-size: .86rem; padding: .55rem 1rem; border-radius: 50rem;
  transition: background .15s ease;
}
.dgg-btn:hover { background: #33307a; color: #fff; }
.dgg-link { font-size: .84rem; font-weight: 600; color: var(--dg-green-ink); text-decoration: none; }
.dgg-link:hover { text-decoration: underline; }

/* tables */
.dgg-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--dg-line); border-radius: 16px; box-shadow: var(--dg-shadow); }
.dgg-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
.dgg-table th, .dgg-table td { text-align: left; vertical-align: top; padding: .8rem 1rem; border-bottom: 1px solid var(--dg-line); }
.dgg-table thead th {
  background: var(--dg-navy); color: #fff; font-family: "Sharp Sans", sans-serif;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; border-bottom: 0;
}
.dgg-table tbody tr:last-child th, .dgg-table tbody tr:last-child td { border-bottom: 0; }
.dgg-table tbody tr:nth-child(even) { background: #fbfbfd; }
.dgg-table tbody th { font-weight: 700; color: var(--dg-ink); white-space: nowrap; }
.dgg-table tbody th a { color: var(--dg-navy); text-decoration: none; }
.dgg-table tbody th a:hover { color: var(--dg-green-ink); text-decoration: underline; }
.dgg-table--lines { min-width: 0; }
.dgg-nowrap { white-space: nowrap; }
.dgg-swatch { display: inline-block; width: 22px; height: 6px; border-radius: 3px; margin-right: .55rem; vertical-align: middle; border: 1px solid rgba(0, 0, 0, .08); }

.dgg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; align-items: start; }
.dgg-two .dgg-h2 { margin-bottom: 1rem; }

/* checklist */
.dgg-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.5rem; }
.dgg-checks li { display: flex; gap: .6rem; font-size: .96rem; line-height: 1.55; }
.dgg-checks .bi { color: var(--dg-green); margin-top: .2rem; flex: 0 0 auto; }

/* printing band */
.dgg-print {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: var(--dg-navy); color: #fff; border-radius: 20px; padding: clamp(1.6rem, 3.5vw, 2.4rem) clamp(1.3rem, 3vw, 2.4rem);
}
.dgg-print::after {
  content: ""; position: absolute; top: -50%; right: -8%; width: 38%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 188, 68, .32), transparent 68%); pointer-events: none;
}
.dgg-print__copy { position: relative; z-index: 1; }
.dgg-print__t { font-family: "Sharp Sans", sans-serif; font-weight: 700; font-size: clamp(1.25rem, 1.3vw + .85rem, 1.75rem); color: #fff; margin: 0 0 .5rem; }
.dgg-print__copy p { margin: 0 0 1rem; color: rgba(255, 255, 255, .82); }
.dgg-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; }
.dgg-facts .bi { color: var(--dg-green); margin-right: .25rem; }
.dgg-print__btn {
  position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem;
  background: var(--dg-green); color: var(--dg-navy); border: 0; cursor: pointer;
  font-family: "Sharp Sans", sans-serif; font-weight: 600; font-size: 15px; padding: .9rem 1.8rem; border-radius: 50rem;
  transition: background .2s ease, transform .15s ease;
}
.dgg-print__btn:hover { background: #7cd052; transform: translateY(-1px); }

/* the products behind the dielines: the theme's own .product-card, in a rolling slider */
.dgg-products__swiper { padding: .25rem .1rem 1rem; }
.dgg-products__swiper .swiper-slide { height: auto; }
.dgg-products__swiper .product-card { height: 100%; }

/* ── Product page block ───────────────────────────────────── */
/* No border, background or gradient of its own: it reads as one more section
   of the page, with the theme's .section-head / .section-title on top. */
.dgp { padding: clamp(2.25rem, 5vw, 3.75rem) 0; }
.dgp .section-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
/* Four to a row; a product with fewer styles gets them centred, not parked on the left. */
.dgp-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem; }
.dgp-cards > .dgp-card { flex: 0 1 calc((100% - 3 * 1.1rem) / 4); min-width: 0; }
.dgp-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--dg-line); border-radius: 16px;
  box-shadow: var(--dg-shadow); padding: 1rem; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.dgp-card:hover { border-color: rgba(107, 188, 68, .5); box-shadow: 0 10px 26px rgba(35, 32, 88, .09); transform: translateY(-2px); }
.dgp-card__media { margin: 0 0 .9rem; }
.dgp-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 0 .2rem .1rem; }
.dgp-card__t { font-family: "Sharp Sans", sans-serif; font-size: 1.02rem; font-weight: 700; color: var(--dg-ink); margin: 0 0 .35rem; }
.dgp-card__use { font-size: .9rem; line-height: 1.55; color: var(--dg-body); margin: 0 0 1rem; }
/* One line, always: short label, no wrap, full card width. */
.dgp-card__btn {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: .45rem; width: 100%;
  white-space: nowrap; background: var(--dg-navy); color: #fff; text-decoration: none;
  font-family: "Sharp Sans", sans-serif; font-weight: 600; font-size: .9rem; line-height: 1;
  padding: .8rem .9rem; border-radius: 50rem; transition: background .15s ease;
}
.dgp-card__btn:hover { background: #33307a; color: #fff; }
.dgp-card__more {
  display: inline-flex; align-items: center; gap: .25rem; margin: -.4rem 0 1rem; align-self: flex-start;
  font-size: .84rem; font-weight: 600; color: var(--dg-green-ink); text-decoration: none;
}
.dgp-card__more:hover { text-decoration: underline; }
.dgp-foot { margin: 1.5rem 0 0; text-align: center; }
.dgp-foot a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--dg-navy); text-decoration: none; }
.dgp-foot a:hover { color: var(--dg-green-ink); }

/* The generator, scrolled to from a style further down the page, clears the sticky header. */
#dieline-app { scroll-margin-top: 96px; }

/* ── Narrow screens ───────────────────────────────────────── */
@media (max-width: 991.98px) {
  .dgp-cards > .dgp-card { flex-basis: calc((100% - 1.1rem) / 2); }
  .dgg-two { grid-template-columns: minmax(0, 1fr); }
  .dgg-print { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 479.98px) {
  .dgp-cards > .dgp-card { flex-basis: 100%; }
}
@media (max-width: 767.98px) {
  .dgg-steps { grid-template-columns: minmax(0, 1fr); }
  .dgg-checks { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .dgg-card, .dgp-card, .dgg-btn, .dgp-card__btn, .dgg-print__btn { transition: none; }
  .dgg-card:hover, .dgp-card:hover, .dgg-print__btn:hover { transform: none; }
  .dgg-card:hover .dgg-card__media img, .dgp-card:hover .dgp-card__media img { transform: none; }
}

/* glossary */
.dgg-terms { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.dgg-term { background: #fff; border: 1px solid var(--dg-line); border-radius: 12px; padding: .9rem 1.05rem; }
.dgg-term dt { font-family: "Sharp Sans", sans-serif; font-weight: 700; color: var(--dg-navy); margin: 0 0 .25rem; }
.dgg-term dd { margin: 0; font-size: .92rem; line-height: 1.6; }
