/* FLIP CORE — use absolute overlays so slide height stays constant */
.sff-card > .e-con-inner {
  position: relative;
  perspective: 1200px;
  transform-style: preserve-3d;
  /* height gets locked/unlocked by JS during flip/fetch */
}

/* Front & back occupy the same box */
.sff-card__front,
.sff-card__back {
  position: absolute;
  inset: 0;                   /* top:0 right:0 bottom:0 left:0 */
  transition: transform .28s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* Default orientations (front shows, back rotated) */
.sff-card__front { transform: rotateY(0deg);   z-index: 2; }
.sff-card__back  { transform: rotateY(180deg); z-index: 1; overflow: auto; }

/* Flip state toggled on the INNER wrapper */
.sff-card > .e-con-inner.is-flipped .sff-card__front { transform: rotateY(-180deg) !important; }
.sff-card > .e-con-inner.is-flipped .sff-card__back  { transform: rotateY(0deg)    !important; }

/* ALSO flip when the class is on .sff-card (no .e-con-inner in DOM) */
.sff-card.is-flipped .sff-card__front { transform: rotateY(-180deg) !important; }
.sff-card.is-flipped .sff-card__back  { transform: rotateY(0deg)    !important; }

/* And enable clicks on back when flipping via .sff-card */
.sff-card .sff-card__back { pointer-events: none; }
.sff-card.is-flipped .sff-card__back { pointer-events: auto; }

/* Carousel shouldn’t clip 3D transforms */
.swiper-slide { overflow: visible; }

/* Enable clicks on back only when visible */
.sff-card__back { pointer-events: none; }
.sff-card > .e-con-inner.is-flipped .sff-card__back { pointer-events: auto; }

/* Optional: while flipped, also prevent touch-swipe via CSS (JS handles too) */
.sff-no-swipe, .sff-no-swipe * { touch-action: none; }

/* Title clamp (unchanged) */
.product_title.entry-title,
.product_title.entry-title a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; white-space: normal;
  line-height: 1.25; margin-bottom: 8px;
}

/* TABLE STYLES (yours) */
.sff-card__back .sff-qdetails-table th,
.sff-card__back .sff-qdetails-table td {
  padding: 5px;
  font-size: 12px;
  text-align: left;
}
.sff-card__back table.sff-qdetails-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden; /* enables rounded corners */
}

/* Wider first column */
.sff-qdetails table td:first-child,
.sff-qdetails table th:first-child {
  width: 40%;
  font-weight: 600;           /* makes labels pop */
  background: #f9f9f9;        /* optional */
}

@media (max-width: 768px) {
  .sff-card__back .sff-qdetails-table th,
  .sff-card__back .sff-qdetails-table td {
    font-size: 10px;
  }
}
