/* Handpainted Collection — match Bestseller behavior
   Desktop: 3 cards (392x414)
   Tablet: 2 cards
   Mobile: 1 visible card (392x414), slides with arrows + swipe
   Shows exactly 2 rows per breakpoint via CSS hiding (desktop 6 / tablet 4 / mobile 2)
*/

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

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

/* Section root */
.hpaint-section {
  max-width: 1600px;
  margin: 70px auto;
  padding: 0 20px;
  font-family: "Poppins", sans-serif;
  color: #3a1f1b;
}

/* Header (outside container but aligned) */
.hpaint-header {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.hpaint-header-inner {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}

.hpaint-header-left { min-width: 220px; }

.hpaint-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 600;
  color: #4a1f17;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hpaint-desc {
  font-size: 14px;
  color: #6b4a3d;
  margin: 8px 0 0 0;
}

.hpaint-viewall {
  color: #8b2a20;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  align-self: flex-start;
}
.hpaint-viewall:hover { color: #5c1b15; text-decoration: underline; }

/* Container & track */
.hpaint-container {
  width: 100%;
  max-width: 1200px !important;
  margin: 0 auto;
  position: relative;
  padding: 8px 12px 18px;
}

/* variables for uniform card width */
:root {
  --hpaint-card-w: 392px;
  --hpaint-gap: 28px;
}

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

.hpaint-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hpaint-gap);
  align-items: start;
  justify-items: start; /* left aligned grid items on desktop */
  transition: transform 360ms ease;
  will-change: transform;
}

/* each card forced to same width */
.hpaint-item {
  width: var(--hpaint-card-w);
  max-width: var(--hpaint-card-w);
  transition: transform .25s ease;
}
.hpaint-item:hover { transform: translateY(-4px); }

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

/* arrows hidden by default (visible on mobile) */
.hpaint-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;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  cursor: pointer;
  font-weight:700;
}

/* Tablet: 2 columns, smaller card width */
@media (max-width: 1024px) and (min-width: 641px) {
  :root { --hpaint-card-w: 340px; --hpaint-gap: 20px; }
  .hpaint-track { grid-template-columns: repeat(2, 1fr); gap: var(--hpaint-gap); }
  .hpaint-item { width: var(--hpaint-card-w); max-width: var(--hpaint-card-w); }
  .hpaint-thumb { aspect-ratio: 340 / 360; border-radius:8px; }
  .hpaint-container { max-width: 940px; padding: 8px; }
  .hpaint-title { font-size: 32px; }
}

/* Mobile: 1 visible card (fixed desktop width), sliding + centered behavior */
@media (max-width: 640px) {
  :root { --hpaint-card-w: 392px; --hpaint-gap: 12px; }
  .hpaint-container { padding: 6px 8px 12px; }
  .hpaint-title { font-size: 24px; }

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

  /* keep each item at desktop width but slide them horizontally */
  .hpaint-item { flex: 0 0 var(--hpaint-card-w); width: var(--hpaint-card-w); max-width: var(--hpaint-card-w); }

  /* keep thumb ratio same */
  .hpaint-thumb { aspect-ratio: 392 / 414; border-radius:8px; }

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

  /* center header inner on mobile smaller widths */
  .hpaint-header-inner { align-items: center; gap:8px; }
}

/* small phones */
@media (max-width: 420px) {
  .hpaint-title { font-size: 20px; }
  .hpaint-prev { left: 6px; }
  .hpaint-next { right: 6px; }
}

/* ---------- Show exactly 2 rows per breakpoint ----------
   Desktop (>=1025px): 3 columns -> show first 6 (3 x 2)
   Tablet  (641px–1024px): 2 columns -> show first 4 (2 x 2)
   Mobile  (<=640px): 1 column -> show first 2 (1 x 2)
--------------------------------------------------------- */

/* Desktop: hide items after 6th */
@media (min-width: 1025px) {
  .hpaint-track .hpaint-item:nth-child(n+7) {
    display: none;
  }
}

/* Tablet: hide items after 4th */
@media (min-width: 641px) and (max-width: 1024px) {
  .hpaint-track .hpaint-item:nth-child(n+5) {
    display: