/*
 * API Print on Demand page (frontend_apiprintondemand.php).
 * Two parts:
 *   1. "apipod-" classes — product code listing card grid (replaces the old table)
 *   2. "pro-" classes — the subset of css/pro.css needed by
 *      views/inc/pro/module_connect.php, which is reused at the bottom of this
 *      page. Kept here (not by loading pro.css) because pro.css also restyles
 *      <body>, which would break this page's theme.
 * Responsive from 320px to 4K.
 */

:root {
  --apipod-brand: #de256f;
  --apipod-ink: #161616;
  --apipod-text: #333;
  --apipod-muted: #6b7280;
  --apipod-line: #ebe8e5;
  --apipod-tint: #faf8f6;
  --apipod-radius: 12px;
}

/* ── Product code listing ──────────────────────────────────────────────── */

.apipod-codes {
  font-family: "Open Sans", "Source Sans Pro", Arial, sans-serif;
}

/* Short intro line above the grid */
.apipod-codes-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--apipod-muted);
  max-width: 720px;
  margin: 0 0 26px;
}

.apipod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* One product card — becomes an <a> when the product has a detail page */
.apipod-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--apipod-line);
  border-radius: var(--apipod-radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.apipod-card:hover,
a.apipod-card:focus {
  border-color: var(--apipod-brand);
  box-shadow: 0 12px 28px rgba(22, 22, 22, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

/* Product photo, or a neutral placeholder when the product has none */
.apipod-card-media {
  position: relative;
  height: 150px;
  background: var(--apipod-tint);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.apipod-card-media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d3cec9;
  font-size: 34px;
}

/* Product code chip, overlaid on the photo */
.apipod-code {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-block;
  background: var(--apipod-brand);
  color: #fff;
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 11px;
  border-radius: 6px;
}

.apipod-card-body {
  flex: 1 1 auto;
  padding: 16px 18px 18px;
}

.apipod-card-name {
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--apipod-ink);
  margin: 0 0 12px;
}

/* Specs table: label on the left, value on the right, one row per line */
.apipod-specs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.apipod-specs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  padding: 5px 0;
  border-top: 1px solid #f2f0ee;
}

.apipod-specs li:first-child {
  border-top: 0;
}

.apipod-spec-label {
  color: var(--apipod-muted);
}

.apipod-spec-value {
  font-weight: 600;
  color: var(--apipod-ink);
  text-align: right;
}

/* International shipping yes/no */
.apipod-flag-yes {
  color: #1a7f52;
}

.apipod-flag-no {
  color: #a5a5a5;
}

/* "View product" affordance at the bottom of linked cards */
.apipod-card-more {
  display: block;
  padding: 11px 18px;
  border-top: 1px solid var(--apipod-line);
  background: var(--apipod-tint);
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--apipod-brand);
}

.apipod-card-more .fa {
  margin-left: 5px;
}

@media (max-width: 480px) {
  .apipod-grid {
    grid-template-columns: 1fr;
  }

  .apipod-card-media {
    height: 170px;
  }
}

/* ── Connect module (mirrors css/pro.css) ──────────────────────────────── */

:root {
  --pro-brand: #de256f;
  --pro-brand-dark: #b81b59;
  --pro-pink-bg: #fbe9f0;
  --pro-ink: #161616;
  --pro-text: #333;
  --pro-muted: #6b7280;
  --pro-tint: #faf8f6;
  --pro-radius: 14px;
}

.pro-module {
  padding: 70px 0;
  background: #fff;
}

.pro-wrap {
  font-family: "Open Sans", "Source Sans Pro", Arial, sans-serif;
  color: var(--pro-text);
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.pro-kicker {
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--pro-brand);
  margin: 0 0 14px;
}

.pro-section-title {
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--pro-ink);
  margin: 0 0 14px;
}

/* Short pink bar followed by a thin gray line, drawn with background gradients */
.pro-section-title::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 16px;
  background:
    linear-gradient(var(--pro-brand), var(--pro-brand)) left center / 50px 3px no-repeat,
    linear-gradient(#c9c9c9, #c9c9c9) right center / calc(100% - 75px) 1px no-repeat;
}

.pro-section-lead {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--pro-muted);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 30px;
}

.pro-more {
  display: inline-block;
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--pro-brand);
  text-decoration: none;
  border-bottom: 2px solid var(--pro-brand);
  padding-bottom: 3px;
  margin-top: 6px;
}

.pro-more:hover,
.pro-more:focus {
  color: var(--pro-brand-dark);
  border-color: var(--pro-brand-dark);
  text-decoration: none;
}

.pro-more .fa {
  margin-left: 5px;
}

.pro-integration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}

/* Connect module lists all 9 integrations in 3 columns */
.pro-integration-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.pro-integration {
  display: block;
  background: var(--pro-tint);
  border: 1px solid #f0ece8;
  border-radius: var(--pro-radius);
  padding: 26px 22px;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

a.pro-integration:hover,
a.pro-integration:focus {
  border-color: var(--pro-brand);
  text-decoration: none;
  color: inherit;
}

.pro-integration-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pro-pink-bg);
  color: var(--pro-brand);
  font-size: 21px;
  margin-bottom: 14px;
}

/* Brand logo in place of the icon badge — kept at the badge's 52px height so
   logo tiles and icon tiles line up. Duplicated from pro.css, like the rest of
   the .pro-integration-* subset below. */
.pro-integration-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-bottom: 14px;
}

/* Height is set, not capped — see the note on this rule in pro.css: a
   viewBox-only SVG collapses to zero height as a flex item with height:auto. */
.pro-integration-logo img {
  max-width: 130px;
  width: auto;
  height: 30px;
  object-fit: contain;
}

.pro-integration-title {
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--pro-ink);
  margin: 0 0 8px;
}

.pro-integration-text {
  font-size: 13px;
  color: var(--pro-muted);
  line-height: 1.55;
  margin: 0;
}

/* Clickable tile: the whole card links to the platform page at /pro/i/{slug}.
   Column layout keeps the "Learn more" line at the bottom of every card. */
.pro-integration-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.pro-integration-link:hover,
.pro-integration-link:focus {
  box-shadow: 0 12px 32px rgba(222, 37, 111, 0.12);
  transform: translateY(-2px);
}

.pro-integration-link .pro-integration-text {
  flex: 1 1 auto;
}

.pro-integration-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pro-brand);
}

.pro-integration-more .fa {
  margin-left: 5px;
  transition: transform 0.2s;
}

.pro-integration-link:hover .pro-integration-more .fa {
  transform: translateX(3px);
}

/* Product builder promo banner at the bottom of the connect module */
.pro-builder-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--pro-pink-bg);
  border: 1px solid rgba(222, 37, 111, 0.18);
  border-radius: var(--pro-radius);
  padding: 26px 32px;
  margin-top: 18px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.pro-builder-banner:hover,
.pro-builder-banner:focus {
  border-color: var(--pro-brand);
  box-shadow: 0 12px 32px rgba(222, 37, 111, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.pro-builder-banner-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--pro-brand);
  color: #fff;
  font-size: 24px;
}

.pro-builder-banner-body {
  flex: 1;
  min-width: 0;
}

.pro-builder-banner-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pro-brand);
  margin: 0 0 4px;
}

.pro-builder-banner-title {
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--pro-ink);
  margin: 0 0 6px;
  line-height: 1.25;
}

.pro-builder-banner-text {
  font-size: 14px;
  color: var(--pro-muted);
  line-height: 1.55;
  margin: 0;
}

.pro-builder-banner-cta {
  flex-shrink: 0;
  display: inline-block;
  background: var(--pro-brand);
  color: #fff;
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.pro-builder-banner:hover .pro-builder-banner-cta,
.pro-builder-banner-cta:hover,
.pro-builder-banner-cta:focus {
  background: var(--pro-brand-dark);
  color: #fff;
  text-decoration: none;
}

/* Tablets */
@media (max-width: 991px) {
  .pro-integration-grid,
  .pro-integration-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones */
@media (max-width: 640px) {
  .pro-module {
    padding: 46px 0;
  }

  .pro-integration-grid,
  .pro-integration-grid-3 {
    grid-template-columns: 1fr;
  }

  .pro-builder-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
    gap: 16px;
  }

  .pro-builder-banner-cta {
    width: 100%;
    text-align: center;
  }
}
