/*
 * CDO Vitrines — Template 2 (2.4.12)
 * INTERNAL COMPOSITION ONLY.
 *
 * Card frame, border, border-radius, image, body padding, geometry, typography,
 * hover, and compact dimensions all come from the canonical vitrine-card.css.
 * Standard = 20px corner, compact = 16px corner. Do not override those here.
 */

/* Keep headings within the same two-line editorial rhythm without changing
   font tokens or spacing from the base card. */
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__title{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
/* Match the approved Urgencia title footprint in Tempo Limitado:
   one-line and two-line titles start the countdown at the same height.
   The 7px body gap and the group's 9px margin stay unchanged. */
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__title{
  min-height:2.4em;
}

/* Inside the existing body: timer, same progress track as Urgência. */
.cdo-v-products .cdo-vc-card--template-2 .cdo-v-timed-card__details,
.cdo-v-products .cdo-vc-card--template-2 .cdo-v-urgency__details{
  margin:8px 0 0;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-v-timed-card__notice{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px 4px;
  font-size:12px;
  line-height:1.35;
  font-weight:600;
  color:#00d0d7;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-v-timed-card__notice i,
.cdo-v-products .cdo-vc-card--template-2 .cdo-v-timed-card__label{
  color:#00d0d7;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-v-timed-card__clock{
  color:var(--cdo-ds-color-heading,#1f3556);
  font-weight:600;
  white-space:nowrap;
  letter-spacing:-.02em;
}

/* Promotional ribbon is a Template 2-only INTERNAL element.
   Eligibility and percent originate in CDO Promotions. */
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__offer-banner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  align-self:flex-start;
  gap:4px 8px;
  max-width:100%;
  margin:12px 0 0;
  color:var(--cdo-palette-green,#92d037);
  font-size:11px;
  line-height:1.2;
  font-weight:700;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__offer-value{
  display:inline-flex;
  align-items:center;
  background:var(--cdo-palette-green,#92d037);
  color:#fff;
  padding:4px 6px;
  border-radius:50px;
  font-size:11px;
  line-height:1.2;
  font-weight:700;
  white-space:nowrap;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__offer-description{
  color:var(--cdo-palette-green,#92d037);
  font-weight:700;
}

/* The only intentional structural change: internal price alignment.
   DE spans both columns; A PARTIR DE is vertically centered on the value. */
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__price{
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content max-content;
  grid-template-areas:
    "original original original"
    ". label value"
    ". installments installments"
    ". discount discount";
  column-gap:6px;
  align-items:center;
  margin-top:auto;
  text-align:right;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__original{
  grid-area:original;
  justify-self:end;
  text-align:right;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__price-label{
  grid-area:label;
  align-self:center;
  margin:0;
  white-space:nowrap;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__value{
  grid-area:value;
  align-self:center;
  align-items:center;
  justify-self:end;
  justify-content:flex-end;
  min-width:0;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__installments{
  grid-area:installments;
  justify-self:end;
  text-align:right;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__discount-note{
  grid-area:discount;
  justify-self:end;
}
.cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__unavailable{
  grid-column:1/-1;
  justify-self:end;
}

/* Compact framing, geometry and typography remain 100% inherited from the
   existing .cdo-card-layout--compact selectors in vitrine-card.css. */
.cdo-card-layout--compact .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__offer-banner{
  gap:4px;
  margin-top:8px;
}


/* Tempo Limitado — countdown/track AND offer form one anchored content block.
 * One spacer sits ABOVE the entire group, not between timer and discount.
 * The timed detail track has the same first-row footprint in every card. */
/* The product title and additional info retain the canonical card positions.
 * ONLY the timed-offer group receives vertical alignment. */
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__timed-offer-group{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(36px,auto) auto;
  gap:4px; /* same gap as Urgencia details */
  width:100%;
  min-width:0;
  margin-top:9px;
  margin-bottom:0;
  align-content:end;
}
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__timed-offer-group > .cdo-v-timed-card__details{
  margin:0;
  align-self:start;
}
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__timed-offer-group > .cdo-vc-card__offer-banner{
  margin:0;
  align-self:end;
  flex-shrink:0;
}
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__comparison{
  margin-top:0;
}
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__price{
  margin-top:auto; /* price alone absorbs remaining card height */
}
/* When a timed offer has no progress/countdown, avoid a ghost timer row. */
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2 .cdo-vc-card__timed-offer-group:not(:has(> .cdo-v-timed-card__details)){
  grid-template-rows:auto;
}
/* Compact horizontal cards: do not force the full-size price/footer height. */
.cdo-v-timed .cdo-v-products .cdo-vc-card--template-2.cdo-vc-card--compact .cdo-vc-card__timed-offer-group{
  grid-template-rows:minmax(45px,auto) auto;
  gap:5px;
  margin-top:9px;
  margin-bottom:0; /* compact cards retain their own geometry */
}


