/* ------------------------------------------
   ARTIST PAGE GALLERY — BASE STYLES
------------------------------------------- */

/* Gallery wrapper */
.artistpage-gallery-container {
  width: 100%;
  position: relative;
}

/* Controls container (holds arrows + track) */
.artistpage-gallery-controls {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
  --gap: 16px;
  --visible: 3; /* Default desktop (updated in media queries) */
}

/* Track: horizontal carousel */
.artistpage-gallery {
  display: flex;
  gap: 150px;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 8px 48px; /* space for arrows */
  align-items: center;
}

/* Artwork card */
.artwork-card {
  flex: 0 0 calc((79.5% - (var(--visible) - 1) * var(--gap)) / var(--visible));
  max-width: 384px;
  height: 480px;
  min-height: 120px;
  box-sizing: border-box;
  display: block;
  overflow: hidden;
  background: var(--grey-100);
}

/* Image */
.artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------
   ARROWS (Switch to Image Icons)
------------------------------------------- */

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: none; /* remove background */
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.arrow-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.gallery-arrow--left {
  left: 8px;
}

.gallery-arrow--right {
  right: 8px;
}

/* hide arrow when disabled */
.gallery-arrow[aria-hidden="true"] {
  display: none;
}


/* ------------------------------------------
   RESPONSIVE — MOBILE FIRST
------------------------------------------- */

@media (max-width: 640px) {
  .artistpage-gallery-controls {
    --visible: 1;
  }

  .artistpage-gallery {
    gap: 24px;
    padding: 8px 32px;
  }

  .artwork-card {
    height: 40vh;
    min-height: 200px;
    max-width: 90vw;
  }

  .gallery-arrow {
    width: 32px;
    height: 32px;
  }

  .gallery-arrow--left,
  .gallery-arrow--right {
    background-size: 28px;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 980px) {
  .artistpage-gallery-controls {
    --visible: 2;
  }

  .artistpage-gallery {
    gap: 80px;
    padding: 8px 40px;
  }

  .artwork-card {
    height: 32vh;
    min-height: 160px;
  }

  .gallery-arrow {
    width: 36px;
    height: 36px;
  }

  .gallery-arrow--left,
  .gallery-arrow--right {
    background-size: 30px;
  }
}

/* Desktop */
@media (min-width: 981px) {
  .artistpage-gallery-controls {
    --visible: 3;
  }
}



/* ------------------------------------------
   COVER HERO SECTION
------------------------------------------- */

.cover-hero {
  position: relative;
  width: 100vw;
  height: 851px;
  overflow: hidden;
}

.cover-img {
  width: 100vw;
  height: 100%;
  object-fit: cover;
}

.cover-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--shw);
  text-align: center;
  font-family: Montserrat;
  font-size: 64px;
  font-weight: 600;
  line-height: 52px;
  letter-spacing: 2.56px;
  text-transform: uppercase;
}

/* Mobile hero optimization */
@media (max-width: 600px) {
  .cover-hero,
  .cover-img {
    height: 22vh;
  }

  .cover-title {
    font-size: 1.6rem;
    line-height: 1.1;
    width: 90%;
  }
}


/* artwork related styling */
.artworks-dashboard-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--crotchet);
  margin-bottom: var(--minim);
}

@media only screen and (min-width: 640px) {
  .artworks-dashboard-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.artwork-in-grid {
  object-fit: cover;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.artwork-form-preview {
  object-fit: contain;
  height: 100%;
  width: 100%;
}

/* artwork form */
.artwork-form-image-preview {
  display: block;
  width: 400px;
  object-fit: contain;

  &.placeholder {
    height: 200px;
    background-color: var(--grey-100);
  }
}

