/* PC Bestseller v1.9 - Updated mobile card size behavior
   - Desktop: 3 cards
   - Tablet: 2 cards
   - Mobile:  1 card visible at a time, card width = desktop card width (392px), sliding enabled
*/

/* Font */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap');

* { box-sizing: border-box; margin:0; padding:0; }

/* Root section */
.pcb-section {
  max-width: 1400px !important;
  margin: 70px auto;
  padding: 0 20px;
  font-family: "Poppins", sans-serif;
  color: #3a1f1b;
}

/* Header (outside, aligned) */
.pcb-header {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.pcb-header-inner {
  width:100%;
  max-width:1400px !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
}
.pcb-title-left {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 28px;
  text-transform: uppercase;
  color: #6b3a34;
  letter-spacing: 0.5px;
}
.pcb-viewall-top {
  color: #6b3a34;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
}

/* Container & track */
.pcb-container {
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* uniform card width variable and gap */
:root {
  --pcb-card-w: 392px; /* desktop default */
  --pcb-gap: 28px;
}

.pcb-track-wrap {
  width: 100%;
  overflow: visible;
}

.pcb-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--pcb-gap);
  align-items: start;
  justify-items: center;
  transition: transform 360ms ease;
  will-change: transform;
}

/* Force all items to the same width with variable on desktop/tablet.
   On mobile we still use this variable but layout switches to flex. */
.pcb-item {
  width: var(--pcb-card-w);
  max-width: var(--pcb-card-w);
  transition: transform 0.25s ease;
}
.pcb-item:hover { transform: translateY(-4px); }

.pcb-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 392 / 414;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display:block;
}
.pcb-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition: transform .35s ease; }
.pcb-thumb:hover img { transform: scale(1.03); }

/* Arrows (DOM present; visible only on mobile) */
.pcb-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  width: 44px; height: 44px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  font-weight: 700;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) and (min-width: 641px) {
  :root { --pcb-card-w: 320px; --pcb-gap: 20px; }
  .pcb-track { grid-template-columns: repeat(2, 1fr); gap: var(--pcb-gap); }
  .pcb-item { width: var(--pcb-card-w); max-width: var(--pcb-card-w); }
  .pcb-thumb { aspect-ratio: 320/340; border-radius: 8px; }
  .pcb-container { max-width: 940px; padding: 8px; }
  .pcb-title-left { font-size: 24px; }
  .pcb-viewall-top { font-size: 13px; }
  .pcb-arrow { display: none; }
}

/* MOBILE: keep original card width (392px) and slide that fixed-size card
   - Track becomes a horizontal flex row
   - Each .pcb-item has fixed width: var(--pcb-card-w)
   - We center the visible card inside the container when container is wider than card
*/
@media (max-width: 640px) {
  :root { --pcb-card-w: 392px; --pcb-gap: 12px; }

  .pcb-container { padding: 6px 8px 12px; }
  .pcb-title-left { font-size: 20px; }

  .pcb-track-wrap { overflow: hidden; }
  .pcb-track {
    display: flex;
    flex-direction: row;
    gap: var(--pcb-gap);
    align-items: stretch;
  }

  /* Each item fixed to desktop card width so it looks the same as laptop */
  .pcb-item { flex: 0 0 var(--pcb-card-w); width: var(--pcb-card-w); max-width: var(--pcb-card-w); }

  /* Keep thumb ratio the same as desktop */
  .pcb-thumb { aspect-ratio: 392 / 414; border-radius: 8px; }

  /* show arrows and place them overlapping the container */
  .pcb-arrow { display: flex; position: absolute; top: 50%; transform: translateY(-50%); z-index: 12; }
  .pcb-prev { left: 8px; }
  .pcb-next { right: 8px; }

  .pcb-viewall-top { font-size: 13px; white-space: nowrap; }
}

/* Small phones tweaks */
@media (max-width: 420px) {
  .pcb-title-left { font-size: 18px; }
  .pcb-prev { left: 6px; }
  .pcb-next { right: 6px; }
}

/* print fallback */
@media print {
  .pcb-thumb img { height: auto; }
}