/* ==========================================================================
   AI Try-On section — application/views/partials/tryon_promo.php
   On every home design, under the hero, while try-on is offered.

   Colours are the theme's (--violet is Settings -> Theme colour, and
   --on-violet the text colour that reads on it, both from
   theme_color_vars()), so the section follows the store's palette. The few
   per-design touches are at the end.
   ========================================================================== */

.tryon-promo {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  /* The fixed navbar would cover the top of the section after the hero's
     "Try on with AI" button jumps here. */
  scroll-margin-top: 96px;
}

.tp-card {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid rgba(31, 27, 46, .08);
  border-radius: var(--tp-radius, 1.25rem);
  background:
    linear-gradient(135deg, var(--gradient-soft, rgba(91, 63, 160, .09)) 0%, rgba(255, 255, 255, 0) 65%),
    #fff;
}
@media (min-width: 992px) {
  .tp-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* ---- the example: photo + saree -> result ---- */

.tp-visual { margin: 0; }
.tp-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(.35rem, 1vw, .75rem);
}
.tp-shot { display: flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 0; }
.tp-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--tp-img-radius, .75rem);
  background: var(--mist);
}
.tp-shot--result img { box-shadow: 0 14px 34px rgba(31, 27, 46, .18); }
.tp-shot-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}
.tp-shot--result .tp-shot-label { color: var(--violet); }
/* Centred on the pictures rather than on pictures plus their labels: the
   label hangs below each one, so the sign is lifted by about half of it. */
.tp-op {
  align-self: center;
  margin-bottom: 1.6rem;
  color: var(--violet);
  font-size: clamp(.9rem, 1.6vw, 1.15rem);
}
.tp-example {
  margin-top: .75rem;
  font-size: .72rem;
  color: var(--muted);
  text-align: right;
}

/* ---- the copy ---- */

.tp-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .75rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
}
.tp-title {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: var(--ink);
}
.tp-lead { margin: 0 0 1.25rem; font-size: 1.05rem; color: var(--muted); }

.tp-steps {
  counter-reset: tp-step;
  display: grid;
  gap: .8rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.tp-steps li {
  counter-increment: tp-step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: .8rem;
  align-items: center;
}
.tp-steps li::before {
  content: counter(tp-step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--violet);
  color: var(--on-violet, #fff);
  font-size: .85rem;
  font-weight: 600;
}
.tp-steps b { font-weight: 600; color: var(--ink); line-height: 1.3; }
.tp-steps span { font-size: .88rem; color: var(--muted); line-height: 1.4; }

.tp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.tp-cta a { display: inline-flex; align-items: center; gap: .45rem; }
.tp-trust {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 1.1rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}

/* ---- phones: compact — the pictures carry the idea, the steps are titles ---- */
@media (max-width: 767.98px) {
  .tryon-promo { padding: 1.5rem 0; }
  .tp-card { gap: 1rem; }
  .tp-shot { gap: .35rem; }
  .tp-shot-label { font-size: .6rem; letter-spacing: .04em; }
  .tp-op { margin-bottom: 1.1rem; font-size: .8rem; }
  .tp-example { margin-top: .4rem; text-align: center; }
  .tp-kicker { margin-bottom: .4rem; font-size: .72rem; }
  .tp-title { margin-bottom: .35rem; }
  .tp-lead { margin-bottom: .9rem; font-size: .98rem; }
  .tp-steps { gap: .55rem; margin-bottom: 1.25rem; }
  .tp-steps li { grid-template-columns: 1.6rem minmax(0, 1fr); column-gap: .65rem; }
  .tp-steps li::before { width: 1.6rem; height: 1.6rem; font-size: .75rem; grid-row: auto; }
  .tp-steps span { display: none; }
  .tp-trust { font-size: .74rem; }
}

/* ---- per design ---- */

/* Classic: its first product row already opens with a full section's
   padding, which on top of this section's own left a double gap. */
.tryon-promo + #shop.section-pad { padding-top: 1.5rem; }

/* Boutique: square corners and its serif titles, as the rest of that page.
   No bottom padding: the next section opens with its own. */
.hm-bt .tryon-promo { --tp-radius: 0; --tp-img-radius: 2px; padding-bottom: 0; }
.hm-bt .tp-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; }
.hm-bt .tp-kicker, .hm-bt .tp-steps b { font-family: 'Jost', 'Inter', sans-serif; }

/* Editorial: its own serif and sans. */
.hm-ed .tp-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; }
.hm-ed .tryon-promo { font-family: 'Jost', 'Inter', sans-serif; }

/* ==========================================================================
   With the shop's animated example (Tryon_demo, tryon-demo.js; its player is
   styled in tryon-demo.css): the animation is a wide strip, so it gets the
   wider column, up to about its own size.
   ========================================================================== */
@media (min-width: 992px) {
  .tp-card--demo { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
