/* shop.css
   Shop-only CSS so we don't wreck your main styles.css
*/

/* ======================
   IMAGE FLIP EFFECT
   ====================== */

.record-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  perspective: 1000px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.flip-wrapper { position: relative; width: 100%; height: 100%; }

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  border-radius: 18px;
  overflow: hidden;
}

/* Desktop hover flip */
@media (hover: hover) and (pointer: fine) {
  .record-card:hover .flip-inner { transform: rotateY(180deg); }
}

/* Mobile tap flip (JS toggles .is-flipped on .record-card) */
.record-card.is-flipped .flip-inner { transform: rotateY(180deg); }

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
}

.flip-back { transform: rotateY(180deg); }

.record-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

/* Missing image placeholder */
.image-missing {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: repeating-linear-gradient(
    45deg,
    #2a2140,
    #2a2140 10px,
    #1d1830 10px,
    #1d1830 20px
  );
}

/* ======================
   QUICK VIEW MODAL (FIX)
   ====================== */

.kd-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.65);
}

.kd-modal.open { display: flex; }

.kd-modal-card {
  width: min(980px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 18px;
  background: rgba(20, 12, 40, 0.96);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
}

.kd-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.kd-modal-title {
  margin: 0;
  font-weight: 800;
}

.kd-close {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
}

.kd-modal-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 14px;
}

@media (min-width: 860px) {
  .kd-modal-inner { grid-template-columns: 1.1fr 0.9fr; }
}

.kd-modal-media img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.kd-modal-details h3 {
  margin: 0 0 6px;
}

.kd-modal-details .price {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 10px 0;
}

.kd-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ======================
   TITLE LINKS (optional style)
   ====================== */

.record-link {
  color: inherit;
  text-decoration: none;
}

.record-link:active,
.record-link:hover {
  text-decoration: underline;
}
