/* ============================================================
   10K USED GEAR — product card styles
   Extracted from the homepage so [tku_products] can be used
   on any page/post via the shortcode's assets="true" attribute.

   Markup convention (same as the homepage): the cards render as a
   flat list of .tku-pcard elements. Wrap the shortcode in a
   .tku-panel-carousel (or .tku-carousel-inner) element to get the
   horizontal scrolling row layout, e.g.

     <div class="tku-carousel-scroll">
       <div class="tku-panel-carousel">[tku_products assets="true" limit="10"]</div>
     </div>
   ============================================================ */
:root {
  --tku-navy:  #002844;
  --tku-blue:  #008acd;
  --tku-muted: #6b7f91;
  --tku-fd:    'Montserrat', sans-serif;
}

/* Clickable scroll arrows (shortcode arrows="true"). Right-aligned bar
   sitting above the scroller; buttons call window.tkuScroll(id, ±1). */
.tku-arr-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
/* Optional title fills the empty space to the left of the arrows.
   margin-right:auto pushes the arrows to the far right. */
.tku-arr-title {
  margin: 0 auto 0 0;
  font-family: var(--tku-fd);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--tku-navy);
  text-decoration: none;
  transition: color .2s ease;
}
a.tku-arr-title:hover { color: var(--tku-blue); }
.tku-arr {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(0,40,68,.1);
  background: #fff;
  color: var(--tku-navy);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  box-shadow: 0 2px 16px rgba(0,40,68,.08);
}
.tku-arr:hover {
  background: var(--tku-navy);
  border-color: var(--tku-navy);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,40,68,.14);
}

/* Carousel scroller — the overflow container the shortcode wraps cards in
   when assets="true". (Homepage scopes these under #tku-page; here they
   are global so they work on any page.) */
.tku-carousel-scroll {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  width: 100%;
  min-width: 0;
  -ms-overflow-style: none !important;
}
.tku-carousel-scroll::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.tku-carousel-scroll::-webkit-scrollbar-track { display: none !important; }
.tku-carousel-scroll::-webkit-scrollbar-thumb { display: none !important; }

/* Carousel containers — flex row, horizontally scrollable */
.tku-panel-carousel,
.tku-carousel-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  padding-bottom: 6px; /* room for hover shadow */
}

/* Individual card */
.tku-pcard {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  background: #fff;
  border: 3px solid #e4ebf0; /* soft outline to soften tile vs. navy bg */
  border-radius: 8px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 2px 10px rgba(0,40,68,.08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer;
  padding-top: 10px; /* small breathing room above the thumbnail */
}
.tku-pcard:hover { border-color: #cfd9e2; }
.tku-pcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,40,68,.18);
}
.tku-pcard a {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

/* Image */
.tku-pcard-img {
  height: 200px;
  overflow: hidden;
  /* "Pictures Available Upon Request" placeholder shows through when no <img> is rendered.
     When the product has a real image, the <img> tag overlays this and the placeholder
     is invisible. Net effect: products with images display normally, products without
     images show the standard placeholder graphic. */
  background: #fff url('/wp-content/uploads/2024/10/photos-on-request.png') center/cover no-repeat;
  flex-shrink: 0;
}
.tku-pcard-img img {
  width: 100%;
  height: 100% !important; /* override #tku-page img { height: auto } */
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .35s ease;
}
.tku-pcard:hover .tku-pcard-img img {
  transform: scale(1.04);
}

/* Text body */
.tku-pcard-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tku-pcard-title {
  font-family: var(--tku-fd);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tku-navy);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Reserve exactly 2 lines of height so "View Product" buttons line up
     across cards regardless of title length */
  min-height: 2.7em;  /* 2 × line-height */
}
.tku-pcard-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tku-blue);
}
.tku-pcard-price del { color: var(--tku-muted); font-weight: 400; font-size: 0.8rem; }
.tku-pcard-cta {
  display: block;
  margin-top: 4px;
  background: var(--tku-navy);
  color: #fff;
  text-align: center;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background .2s ease;
}
.tku-pcard:hover .tku-pcard-cta {
  background: var(--tku-blue);
}

/* Responsive card sizing */
@media (max-width: 960px) {
  .tku-pcard { width: 180px; min-width: 180px; }
}
@media (max-width: 480px) {
  .tku-pcard { width: 155px; min-width: 155px; }
}

/* ============================================================
   PRODUCT CARD LOADING SKELETON (used by the JS lazy-loader)
   ============================================================ */
.tku-pcard-loading {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
}
.tku-pcard-loading span {
  width: 220px;
  min-width: 220px;
  height: 280px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8ecf0 25%, #f4f6f8 50%, #e8ecf0 75%);
  background-size: 400% 100%;
  animation: tkuSkel 1.4s ease infinite;
  flex-shrink: 0;
}
@keyframes tkuSkel {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
