/* ==========================================================================
   Component: datpro_product_showcase  (page: /san-pham/)

   The Products page leads with the product itself: a numbered block per
   product, copy on one side and REAL product UI on the other, sides
   alternating. Deliberately not the numbered grid used by /gioi-thieu/ and
   not the question-led rows used by /giai-phap/.

   Products with no real UI yet are NOT given an equal-sized block — showing a
   placeholder next to a real screenshot makes the real one look staged. They
   sit together in a smaller "in development" strip instead.

   Screenshots are framed by .dp-device (device-frame.css), which draws the
   chrome in CSS so the image files stay untouched.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page-level section rhythm — /san-pham/ only.

   Each product gets its OWN <section>, so vertical space is owned once, by
   that section, sized to how much weight the product actually earns:
   Enterprise (flagship, real multi-shot showcase) gets the most air,
   DATCARE+ (one honest screenshot, secondary-sized) sits in the middle, and
   the "in development" strip (icons + one-liners, no imagery) stays tight.
   Deliberately NOT var(--section-py) — that single shared value can't hold
   three different weights at once, and this file is scoped to this page.
   -------------------------------------------------------------------------- */

.dp-showcase--enterprise {
  /* ~96–120px desktop, ~56px mobile */
  padding-block: clamp(3.5rem, 2.25rem + 4.3vw, 7.5rem);
  position: relative;
  overflow: hidden; /* contains the decorative spotlight below — never widens the section */
  background: linear-gradient(180deg, var(--dp-blue-50) 0%, var(--dp-bg) 42%);
}

.dp-showcase--datcare {
  /* ~72–96px desktop, ~48px mobile */
  padding-block: clamp(3rem, 0.8rem + 4.3vw, 6rem);
}

.dp-showcase--car {
  /* Medium weight: a real showcase now, but still reads as secondary to
     Enterprise. Same rhythm as the DATCARE+ block above it. */
  padding-block: clamp(3rem, 0.8rem + 4.3vw, 6rem);
}

.dp-showcase--coming {
  /* ~40–64px desktop, ~40px mobile */
  padding-block: clamp(2.5rem, 1.5rem + 2vw, 4rem);
}

/* Soft spotlight behind the flagship screenshot — a showcase "stage", not a
   catalogue thumbnail. Pure CSS, no new asset. */
.dp-showcase--enterprise .dp-product-block__media {
  position: relative;
  z-index: 0; /* contain the ::before's negative z-index to this box only */
}

.dp-showcase--enterprise .dp-product-block__media::before {
  content: "";
  position: absolute;
  inset: -5%;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 42%, var(--dp-blue-100) 0%, transparent 72%);
  border-radius: var(--r-lg);
}

.dp-product-block {
  padding-block: 0;
}

/* ---------- Heading row --------------------------------------------------- */

.dp-product-block__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.dp-product-block__index {
  flex: none;
  color: var(--dp-blue-200);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.02em;
}

.dp-product-block__name {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  line-height: 1.25;
}

.dp-product-block__subtitle {
  margin-top: 0.375rem;
  color: var(--dp-text-muted);
  font-size: var(--fs-lead);
}

/* ---------- Lead row: copy + the main screenshot -------------------------- */

.dp-product-block__lead {
  display: grid;
  grid-template-columns: minmax(0, 41fr) minmax(0, 59fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.dp-product-block__copy p {
  color: var(--dp-text-muted);
  font-size: var(--fs-lead);
  text-wrap: pretty;
}

.dp-product-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: clamp(1.5rem, 2.4vw, 2rem);
}

.dp-product-block__tags {
  margin-top: var(--sp-5);
}

/* Media first on desktop, copy first everywhere else — the source order stays
   copy → media so the reading order on mobile is never inverted. */
@media (min-width: 900px) {
  .dp-product-block--reverse .dp-product-block__copy {
    order: 2;
  }

  .dp-product-block--reverse .dp-product-block__media {
    order: 1;
  }
}

/* ---------- Secondary screenshots ---------------------------------------- */

.dp-product-block__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  /* The two shots have different native aspect ratios; top-align them rather
     than stretching, so each caption sits directly under its own image. */
  align-items: start;
}

.dp-product-block__shot figcaption {
  margin-top: var(--sp-3);
  color: var(--dp-text-subtle);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

/* ---------- Phone-led block ----------------------------------------------- */

.dp-product-block__media--phone {
  display: flex;
  justify-content: center;
}

/* Two phones for the DAT CAR block: CAR-01 main + CAR-02 secondary, at
   different sizes so it reads as main/secondary rather than a matched pair. */
.dp-product-block__media--phone-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.dp-product-block__media--phone-pair .dp-device--phone {
  max-width: 12.5rem;
}

.dp-product-block__shot--secondary .dp-device--phone {
  max-width: 10rem;
}

.dp-product-block__media--phone-pair figcaption {
  margin-top: var(--sp-3);
  color: var(--dp-text-subtle);
  font-size: var(--fs-xs);
  text-align: center;
}

@media (max-width: 480px) {
  .dp-product-block__media--phone-pair .dp-device--phone {
    max-width: 7.5rem;
  }

  .dp-product-block__shot--secondary .dp-device--phone {
    max-width: 6.5rem;
  }
}

/* Status tag inside a product block's copy column (DAT CAR: real current-build
   UI is not the same claim as "released"). */
.dp-product-block__status {
  display: inline-flex;
  margin-bottom: var(--sp-3);
}

/* ---------- "In development" strip ---------------------------------------- */

.dp-coming__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

/* DAT CAR moved out into its own showcase above, leaving exactly two items —
   a 3-column grid would leave a visibly empty third slot. */
.dp-coming__grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 40rem;
  margin-inline: auto;
}

.dp-coming__item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--dp-border);
  border-radius: var(--r-lg);
}

.dp-coming__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-2);
  border-radius: 12px;
  color: #fff;
}

.dp-coming__icon svg {
  width: 23px;
  height: 23px;
}

.dp-coming__icon--language {
  background: linear-gradient(155deg, #fba733 8%, var(--dp-product-language) 92%);
}
.dp-coming__icon--car {
  background: linear-gradient(155deg, #ec4b3b 8%, var(--dp-product-car) 92%);
}
.dp-coming__icon--lite {
  background: linear-gradient(155deg, #6f8496 8%, #4a5c6d 92%);
}

.dp-coming__name {
  color: var(--dp-text);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  line-height: 1.3;
}

.dp-coming__desc {
  color: var(--dp-text-muted);
  font-size: var(--fs-body);
  line-height: 1.55;
}

.dp-coming__status {
  align-self: flex-start;
  margin-top: var(--sp-2);
}

/* ---------- Responsive ---------------------------------------------------- */

@media (max-width: 899px) {
  .dp-product-block__lead {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 2.5rem);
  }

  .dp-product-block__gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .dp-coming__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .dp-product-block__actions .dp-btn {
    flex: 1 1 100%;
  }
}
