/* ==============================
   PINK PAGE ? extra styles only
   Base styles come from style.css
============================== */

.pinkpage-hero {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  transition:
    background 0.35s,
    color 0.35s;
}

.pinkpage-title {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.pinkpage-subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 400;
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 520px;
}

.pinkpage-image {
  max-width: min(380px, 90vw);
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* countdown */
.pinkpage-countdown {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.pinkpage-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.pinkpage-num {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 72px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.pinkpage-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.8;
}

.pinkpage-launched {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 700;
  margin-top: 16px;
}

/* notify form */
.pinkpage-notify {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 420px;
}

.pinkpage-notify input {
  flex: 1;
  min-width: 200px;
  border-radius: 10px;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  color: #111;
  outline: none;
}

.pinkpage-notify button {
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.pinkpage-notify button:hover {
  background: rgba(0, 0, 0, 0.4);
}

@media (max-width: 480px) {
  .pinkpage-num {
    min-width: 58px;
    padding: 8px 12px;
  }

  .pinkpage-countdown {
    gap: 10px;
  }
}

/* ==============================
   REVEAL COUNTDOWN (grid tile)
   Compact variant of .pinkpage-countdown
   for use inside a product-grid card,
   themed via the same CSS variables
   as the rest of the site (style.css)
============================== */

.pinkpage-reveal-card .image-box {
  background: var(--card);
}

.pinkpage-reveal-icon {
  font-size: 2.2rem;
  color: #ff69b4;
}

/* Per-product placeholder image (revealCarPlaceholder field on each car
   in pinkcar.json) shown in the grid's reveal-countdown card in place of
   the hourglass icon above ? .pinkpage-reveal-icon itself is left
   untouched since the individual /pinkcar/:slug page (server.js) still
   uses the icon there. */
.pinkpage-reveal-placeholder {
  max-width: min(380px, 90vw);
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.pinkpage-reveal-heading {
  color: #ff69b4;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.pinkpage-reveal-subtext {
  font-size: 10px;
  color: var(--secondary);
  margin-bottom: 10px;
}

.pinkpage-countdown-mini {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
}

.pinkpage-unit-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 42px;
}

.pinkpage-num-mini {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 6px;
  min-width: 38px;
  text-align: center;
}

.pinkpage-label-mini {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.75;
  color: var(--secondary);
}

@media (max-width: 480px) {
  .pinkpage-num-mini {
    min-width: 32px;
    padding: 4px 5px;
    font-size: 0.85rem;
  }

  .pinkpage-countdown-mini {
    gap: 5px;
  }
}

/* ==============================
   REVEAL PROGRESS BAR
   Visualises elapsed time between
   createdAt -> revealAt, colour shifts
   red -> orange -> yellow -> green
============================== */

.pinkpage-reveal-progress {
  margin-top: 12px;
}

.pinkpage-progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: var(--border);
  overflow: hidden;
}

.pinkpage-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: #dc3545;
  transition:
    width 1s linear,
    background-color 1s linear;
}

.pinkpage-progress-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

body.dark-theme .pinkpage-progress-tick {
  background: rgba(255, 255, 255, 0.28);
}

.pinkpage-progress-arrow-track {
  position: relative;
  width: 100%;
  height: 26px;
}

.pinkpage-progress-marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.pinkpage-progress-arrow {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 13px;
  line-height: 1;
  color: var(--text);
  transform: translateX(-50%);
  transition: left 1s linear;
}

.pinkpage-progress-marker-label {
  position: absolute;
  top: 15px;
  left: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
  transition: left 1s linear;
}

/* ==============================
   BRAND / CONDITION ATTRIBUTE LINES
   "Brand : <badge>" and "Condition : <badge>" rows shown on each
   revealed product card (Brand just below the name, Condition just
   above the price ? wired up in pinkpage.js).
============================== */

.pinkpage-attr-line {
  font-weight: 700;
  font-size: 10px;
  line-height: 1.4;
}
.pinkpage-condition-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}

/* Condition ? green for "Mint", yellow for every other value
   (from condition.json or freely typed by the admin) */
.pinkpage-condition-badge.mint {
  background: #198754;
  color: #fff;
}

.pinkpage-condition-badge.other {
  background: #ffc107;
  color: #111;
}

/* ==============================
   PINK BUTTON
   Reusable pink variant of Bootstrap's btn ? used for the Cart button
   in pinkpage.html's navbar and the Share Cart button in pinkcart.html,
   so both "primary cart action" buttons match the page's pink theme
   instead of the site-wide green (.btn-success).
============================== */

.btn-pink {
  background: #ff69b4;
  border-color: #ff69b4;
  color: #fff;
}

.btn-pink:hover,
.btn-pink:focus {
  background: #ff4da6;
  border-color: #ff4da6;
  color: #fff;
}

/* ==============================
   ENQUIRE BUTTON
   Replaces the Add-to-cart button once a car is sold out. Same
   sizing/shape as .btn-add-cart/.btn-share-cart in style.css (10px 0
   padding, 12px radius, full-width) so it lines up with the Share
   button beside it ? just blue, matching the site's existing
   Bootstrap-primary blue used elsewhere (Coming Soon badge, Store
   button), so the color stays consistent across pages rather than
   introducing a new shade.
============================== */

.btn-enquire-cart {
  background: #0d6efd;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 0;
  border-radius: 12px;
  width: 100%;
  transition: 0.25s;
}

.btn-enquire-cart:hover {
  background: #0b5ed7;
  color: #fff;
}

/* ==============================
   PAST SALE BANNER
   Moving strip shown above the footer on pinkpage.html (and previewed
   twice ? marquee + fade ? in pinkpageadmin.js). Colors are all set
   inline per-instance from pastsalebanner.json / the admin's live
   color pickers, so this stylesheet only owns layout/animation.
============================== */

/* Outer wrapper: divider + heading + the colored banner box itself.
   Sits between the current-products grid and the footer, so the
   divider/heading read against the page background (var(--bg)), not
   the banner's own configurable background. Horizontal padding comes
   entirely from the container-fluid px-2 px-md-3 px-lg-4 classes on
   #pastSaleBanner in pinkpage.html (same classes #pinkCarSection uses),
   so this rule only ever sets vertical spacing. */
.pastsale-section {
  padding-top: 28px;
  padding-bottom: 4px;
}

.pastsale-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 18px;
}

.pastsale-heading {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 14px;
}

.pastsale-banner {
  width: 100%;
  overflow: hidden;
  padding: 14px 0;
  /* Follows the page theme (white in daylight, dark to match the rest
     of the site at night) instead of an admin-configured color ? same
     variable the page body and product-grid section already use, so
     toggling the theme keeps this section blended in. */
  background: var(--bg);
}

/* No horizontal padding here ? the overflow:hidden box's edges are the
   container's own padded edges (set on #pastSaleBanner in pinkpage.html),
   so items enter/exit flush with that same boundary instead of an extra
   inset, matching the product grid's left/right padding exactly. */
.pastsale-track {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

/* Marquee: continuous right -> left scroll. The item list is rendered
   twice back-to-back (see pinkpage.js/pinkpageadmin.js), so animating
   translateX(0) -> translateX(-50%) loops seamlessly. */
.pastsale-track-marquee {
  width: max-content;
  animation-name: pastsaleMarquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Single product: nothing to loop, so no animation and no duplicated
   item ? just centered in the track (see buildMarqueeItems() in
   pinkpage.js/pinkpageadmin.js). */
.pastsale-track-single {
  justify-content: center;
}

@keyframes pastsaleMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Fade ("appear and slow disappear"): a 2-item window is fully
   replaced on each cycle (see showNext()/showWindow() in
   pinkpage.js/pinkpageadmin.js) and cross-fades in via .show. */
.pastsale-track-fade {
  justify-content: center;
}

.pastsale-track-fade .pastsale-item {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.pastsale-track-fade .pastsale-item.show {
  opacity: 1;
}

.pastsale-item {
  flex: 0 0 auto;
  width: 150px;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Thin fade boundary so each grid item stays visible even when its
     own background is white against the (also white, in daylight mode)
     banner background ? same light/dark rgba split already used for
     .pinkpage-progress-tick above, for consistency. */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Items with an individual page render as an <a> instead of a <div>
   (see buildPastSaleItem() in pinkpage.js) ? strip the default link
   styling so it still looks like a plain grid item, just clickable. */
a.pastsale-item {
  text-decoration: none;
  cursor: pointer;
}

body.dark-theme .pastsale-item {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.pastsale-item img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  background: transparent;
}

.pastsale-item-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Marks the admin preview panel currently matching the selected
   Transition Style dropdown */
.psb-active-style {
  color: #ff69b4 !important;
  font-weight: 700;
}

/* Mobile: exactly two items visible per requirement ? item width
   scales to the viewport instead of a fixed px, gap shrinks slightly
   so two fit edge-to-edge inside the container's padding. */
@media (max-width: 576px) {
  .pastsale-track {
    gap: 8px;
  }

  .pastsale-item {
    width: calc(50vw - 20px);
  }

  .pastsale-item img {
    height: 70px;
  }
  .pinkpage-reveal-placeholder {
    max-width: min(280px, 90vw);
    max-height: 220px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  }
}

/* ==============================
   TOP PAGE BANNER ? FADE CYCLE
   Deliberately separate from .announcement-track's marquee keyframes in
   style.css (shared with index.html's scrolling banner) ? this page's
   top banner instead cycles through text1-text4 with a plain opacity
   fade, driven entirely by pinkpage.js setting/removing the .show class
   and its own inline transition-duration (from cfg.fadeSpeed). Reuses
   .announcement-banner from style.css for the outer background/padding
   only; .pinkpage-announcement-fade just centers that container's text
   since there's no scrolling track to lay out anymore.
============================== */

.pinkpage-announcement-fade {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pinkpage-announcement-fade-text {
  display: inline-block;
  opacity: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity 1s ease;
}

.pinkpage-announcement-fade-text.show {
  opacity: 1;
}

/* ==============================
   MULTI-IMAGE CARD GALLERY
   Swipe/scroll through a car's images inside the grid card's image area.
   Dots at the bottom show which image is showing (and are clickable).
============================== */

.pp-gallery-box {
  position: relative;
}

.pp-gallery {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pp-gallery::-webkit-scrollbar {
  display: none;
}

.pp-gallery-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
}

.pp-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.pp-gallery-dot {
  pointer-events: auto;
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  transition:
    background 0.2s,
    transform 0.2s;
}

.pp-gallery-dot.active {
  background: #333;
  transform: scale(1.2);
}

/* ==============================
   THUMBNAIL STRIP (used by the individual car page /pinkcar/<slug>)
============================== */

.pp-gmodal-thumbs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pp-gmodal-thumb {
  width: 64px;
  height: 64px;
  padding: 3px;
  border: 2px solid var(--border, #dcdcdc);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.pp-gmodal-thumb.active {
  border-color: #198754;
}

.pp-gmodal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==============================
   OFFER PRICE BLOCK
   Offer label -> struck-through price -> offer price -> saving
============================== */

.pinkpage-price-struck {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  font-size: 15px;
  font-weight: 400;
}

/* Offer price: same look as the crossed-out MRP, a little bolder */
.pinkpage-offer-amt {
  font-size: 15px;
  font-weight: 600;
  margin-right: 6px;
}

/* Regular (non-offer) price: same look as the offer price */
.pinkpage-regular-amt {
  font-size: 15px;
  font-weight: 600;
}

/* Sold Out badge: always on top (above the image gallery) and solid red.
   The card fade is moved from the whole card onto its contents so the badge
   is not faded with it. */
.pp-soldout-badge {
  z-index: 5;
}
#pinkCarGrid .card.sold-out {
  opacity: 1;
}
#pinkCarGrid .card.sold-out > :not(.pp-soldout-badge) {
  opacity: 0.6;
}

.pinkpage-saving {
  font-size: 14px;
  font-weight: 700;
  color: #198754;
  line-height: 1.2;
}

/* ==============================
   REFERENCE LINK + SHARE (half-size icon buttons)
   Only used when a car has a Reference Url; otherwise the normal
   full-size "Share" button is rendered.
============================== */

/* Same sizing as the original Share button: .btn-add-cart / .btn-enquire-cart
   have width:100% (and Bootstrap's .flex-fill), so the wrapper must also be
   width:100% - then both shrink equally into two halves. A flex-basis of 0
   here would leave the wrapper with no room at all. */
.pp-ref-share-wrap {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

/* No font-size / padding / border of its own: these two buttons use the
   exact same rules (.card .btn, .btn-share-cart) as the Add and Share
   buttons on cars without a reference link, so the row keeps the same
   height. Only the icon is scaled (em-based, line-height 1 so it never
   makes the row taller). */
.pp-ref-share-wrap > .btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.pp-ref-share-wrap > .btn i {
  font-size: 1.3em;
  line-height: 1;
}

.btn-ref-link {
  background: #f1f3f5;
  border: none;
  box-shadow: inset 0 0 0 1px var(--border, #dcdcdc);
}

.btn-ref-link:hover {
  background: #e4e7ea;
}

body.dark-theme .btn-ref-link {
  background: #2a2a2a;
}

body.dark-theme .btn-ref-link:hover {
  background: #333;
}

.pp-ref-mono {
  color: var(--text, #111);
}

.pp-ref-info {
  color: #0d6efd;
}

.pp-ref-flipkart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 4px;
  background: #2874f0;
  color: #fff;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  border-bottom: 3px solid #ffe500;
}

/* ==============================
   STABLE PRODUCT GRID
   style.css makes every .card grow on hover (scale 1.03). On the pink
   car grids (pinkpage.html and pinkpageadmin.html) cards stay still.
============================== */

#pinkCarGrid .card:hover {
  transform: none;
}
