/* Model Page — a pure profile page: hero + two-column body (bio/gallery/FAQ
   main column, partner-stores/categories/related-models sidebar). No coupon
   listing here by design — this is deliberately not a reskin of store.css's
   header+deal-list shape. Reuses shared components (.ap-btn, .ap-faq,
   .ap-breadcrumb) for consistency where they fit. */

/* ---- /models directory (index page): search + A-Z filter + dense grid ---- */
.ap-model-dir-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--ap-space-md); margin-top: var(--ap-space-lg); }
.ap-model-dir-search { display: flex; max-width: 320px; flex: 1; min-width: 220px; }
.ap-model-dir-search input {
  flex: 1;
  border: 1px solid var(--ap-border);
  border-right: none;
  border-radius: var(--ap-radius-sm) 0 0 var(--ap-radius-sm);
  padding: 8px 12px;
  font-size: var(--ap-fs-sm);
  background: var(--ap-surface);
  color: var(--ap-text);
}
.ap-model-dir-search button {
  border: 1px solid var(--ap-border);
  background: var(--ap-surface-alt);
  border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0;
  padding: 0 14px;
  cursor: pointer;
  color: var(--ap-text-muted);
}
.ap-model-dir-sort { display: flex; gap: var(--ap-space-sm); }
.ap-model-dir-sort a {
  font-size: var(--ap-fs-sm);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--ap-border);
  color: var(--ap-text-muted);
  text-decoration: none;
}
.ap-model-dir-sort a.active { background: var(--ap-primary); border-color: var(--ap-primary); color: var(--ap-text-inverse); font-weight: 600; }

.ap-model-dir-alpha { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--ap-space-md); padding: var(--ap-space-sm) 0; border-top: 1px solid var(--ap-border); border-bottom: 1px solid var(--ap-border); }
.ap-model-dir-alpha a, .ap-model-dir-alpha__disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: var(--ap-fs-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--ap-text);
}
.ap-model-dir-alpha a:hover { background: var(--ap-surface-alt); }
.ap-model-dir-alpha a.active { background: var(--ap-primary); color: var(--ap-text-inverse); }
.ap-model-dir-alpha__disabled { color: var(--ap-border); cursor: default; }

.ap-model-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--ap-space-lg); }

.ap-model-hero {
  position: relative;
  border-radius: var(--ap-radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--ap-surface-alt), var(--ap-surface));
  border: 1px solid var(--ap-border);
  margin-top: var(--ap-space-md);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--ap-space-lg);
  align-items: center;
  padding: var(--ap-space-lg);
}
@media (max-width: 720px) {
  .ap-model-hero { grid-template-columns: 1fr; text-align: center; }
}

.ap-model-hero__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--ap-radius-md);
  overflow: hidden;
  box-shadow: var(--ap-shadow-md);
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
}
.ap-model-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ap-model-hero__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: var(--ap-fs-sm); color: var(--ap-primary); font-weight: 700; margin-bottom: 4px; }
.ap-model-hero__name { font-family: var(--ap-font-heading); font-size: var(--ap-fs-h1); line-height: var(--ap-lh-tight); margin: 0 0 var(--ap-space-sm); }
.ap-model-hero__short { color: var(--ap-text-muted); font-size: 1.05rem; line-height: var(--ap-lh-body); margin-bottom: var(--ap-space-md); max-width: 60ch; }
.ap-model-hero__short p { margin: 0; }
.ap-model-hero__cta { display: flex; gap: var(--ap-space-sm); flex-wrap: wrap; }
@media (max-width: 720px) { .ap-model-hero__cta { justify-content: center; } }
.ap-model-hero__cta .ap-btn--affiliate {
  background: var(--ap-primary);
  color: var(--ap-text-inverse);
  font-weight: 700;
}
.ap-model-hero__cta .ap-btn--affiliate:hover { background: var(--ap-primary-hover); }

.ap-model-chips { display: flex; gap: var(--ap-space-sm); margin: var(--ap-space-md) 0 0; flex-wrap: wrap; }
@media (max-width: 720px) { .ap-model-chips { justify-content: center; } }
.ap-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--ap-fs-sm);
  color: var(--ap-text);
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  padding: 5px 12px;
}
.ap-model-chip b { color: var(--ap-primary); }

/* ---- Two-column body ---- */
/* The sidebar's 2-3 short cards are almost always shorter than the main
   column's About/Gallery/FAQ content. Two things were tried and rejected
   before this:
     1. Natural heights (align-items: start) — the sidebar just stops, and
        the leftover space is bare page background below the last card's
        visible border, which is what looked "wrong" in dark mode: a card
        with a clear box edge going nowhere.
     2. Stretching the sidebar + spreading its cards apart with
        justify-content: space-between — spacing between cards became much
        bigger than every other gap on the page (inconsistent), and the
        last card ended up flush against the footer with zero gap.
   The fix: stretch the sidebar to match the main column's height (so there
   IS leftover space to fill), but give that leftover space to the LAST
   card's own box (flex-grow) instead of spreading it as gaps. The empty
   space then sits inside a bordered, background-filled card panel — reads
   as "this card is just taller," not as a layout that stopped short. */
.ap-model-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--ap-space-xl); margin-top: var(--ap-space-xl); padding-bottom: var(--ap-space-lg); align-items: stretch; }
@media (max-width: 960px) { .ap-model-layout { grid-template-columns: 1fr; } }

.ap-model-main { min-width: 0; }
.ap-model-sidebar { display: flex; flex-direction: column; gap: var(--ap-space-lg); position: sticky; top: calc(var(--ap-header-height) + var(--ap-space-md)); }
.ap-model-sidebar > .ap-model-card:last-child { flex-grow: 1; }
@media (max-width: 960px) { .ap-model-sidebar { position: static; } .ap-model-sidebar > .ap-model-card:last-child { flex-grow: 0; } }

/* Sections within the main column space themselves apart by var(--ap-space-lg)
   each; the last one's own margin is zeroed so it doesn't double up with
   .ap-model-layout's padding-bottom above, which is what actually
   guarantees the gap before the footer. */
.ap-model-section { margin-bottom: var(--ap-space-lg); }
.ap-model-section:last-child { margin-bottom: 0; }
.ap-model-section h2 {
  font-family: var(--ap-font-heading);
  font-size: var(--ap-fs-h2);
  margin-bottom: var(--ap-space-md);
  padding-bottom: var(--ap-space-sm);
  border-bottom: 2px solid var(--ap-border);
}

.ap-model-about { color: var(--ap-text); line-height: var(--ap-lh-body); }
.ap-model-about a { color: var(--ap-primary); }

.ap-model-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--ap-space-sm); margin-top: var(--ap-space-md); }
.ap-model-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--ap-radius-md); border: 1px solid var(--ap-border); cursor: pointer; transition: transform var(--ap-transition); }
.ap-model-gallery img:hover { transform: scale(1.03); }

/* ---- Sidebar cards ---- */
.ap-model-card {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-md);
  padding: var(--ap-space-md);
  box-shadow: var(--ap-shadow-sm);
}
.ap-model-card h3 { font-size: var(--ap-fs-sm); text-transform: uppercase; letter-spacing: .05em; color: var(--ap-text-muted); margin: 0 0 var(--ap-space-sm); }

.ap-model-mini-store { display: flex; align-items: center; gap: var(--ap-space-sm); padding: 8px 0; border-bottom: 1px solid var(--ap-border); }
.ap-model-mini-store:last-child { border-bottom: none; }
.ap-model-mini-store img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.ap-model-mini-store__name { font-size: var(--ap-fs-sm); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ap-model-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-model-cat-chip {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--ap-surface-alt);
  border: 1px solid var(--ap-border);
  font-size: 12px;
  color: var(--ap-text);
}
.ap-model-cat-chip:hover { border-color: var(--ap-primary); color: var(--ap-primary); }

/* .ap-model-related-grid/.ap-model-related-card: used by models.php's directory grid.
   Bolder "offer card" styling — ribbon badge, tag chips, CTA bar — deliberately
   richer than a plain photo+name tile, while staying within this site's own
   design tokens (not the literal colors of any reference site). */
.ap-model-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--ap-space-lg); }
.ap-model-related-card {
  display: flex;
  flex-direction: column;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-lg);
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--ap-shadow-sm);
  transition: box-shadow var(--ap-transition), transform var(--ap-transition), border-color var(--ap-transition);
}
.ap-model-related-card:hover { box-shadow: var(--ap-shadow-md); transform: translateY(-3px); border-color: var(--ap-primary); }

.ap-model-related-card__photo { position: relative; aspect-ratio: 3/4; background: var(--ap-surface-alt); }
.ap-model-related-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ap-model-related-card__badge {
  position: absolute;
  top: 12px;
  left: -6px;
  padding: 5px 14px 5px 16px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: #6b7280;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%);
}
.ap-model-related-card__badge.new { background: #0ea5e9; }
.ap-model-related-card__badge.featured { background: var(--ap-primary); }
.ap-model-related-card__badge.trending { background: var(--ap-secondary); }
.ap-model-related-card__badge.hot { background: #ec4899; }

.ap-model-related-card__body { padding: var(--ap-space-md); flex: 1; }
.ap-model-related-card__name { font-weight: 700; font-size: 1.125rem; margin-bottom: 8px; }
.ap-model-related-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-model-related-card__tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--ap-surface-alt); color: var(--ap-text-muted); }

.ap-model-related-card__cta {
  display: block;
  text-align: center;
  padding: 13px 0;
  font-size: var(--ap-fs-body);
  font-weight: 700;
  color: #fff;
  background: var(--ap-primary);
}
.ap-model-related-card:hover .ap-model-related-card__cta { background: var(--ap-primary-hover); }

.ap-model-empty { color: var(--ap-text-muted); font-style: italic; }
