/*
 * Galerie Mueller - Artwork Grid Widget Styles
 * Widget: gm_artwork_grid
 */

/* === Section Wrapper === */
.gm-artwork-grid {
  padding-bottom: 40px;
  background-color: #FAFAFA;
  box-sizing: border-box;
}

/* === Container === */
.gm-artwork-grid__container {
  margin-left: auto;
  margin-right: auto;
  max-width: 1280px;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .gm-artwork-grid__container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1024px) {
  .gm-artwork-grid__container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* === Filter Tabs === */
.gm-artwork-grid__filter-container {
  margin-bottom: 40px;
}

.gm-artwork-grid__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gm-artwork-grid__filter-btn {
  position: relative;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #6B6B6B;
  text-decoration: none;
  padding-bottom: 8px;
  transition-property: color;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}

.gm-artwork-grid__filter-btn:hover {
  color: #1A1A1A;
}

.gm-artwork-grid__filter-btn:focus-visible {
  outline: 2px solid #8C7A5B;
  outline-offset: 2px;
}

.gm-artwork-grid__filter-btn--active {
  color: #1A1A1A;
}

.gm-artwork-grid__filter-btn--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #8C7A5B;
}

@media (max-width: 640px) {
  .gm-artwork-grid__filters {
    gap: 24px;
  }
  .gm-artwork-grid__filter-btn {
    font-size: 12px;
    padding-bottom: 6px;
  }
}

/* === Grid Layout === */
.gm-artwork-grid__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  column-gap: 24px;
  row-gap: 40px;
}

@media (min-width: 640px) {
  .gm-artwork-grid__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gm-artwork-grid__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Artwork Item Card === */
.gm-artwork-grid__item {
  cursor: pointer;
  transition: all 700ms ease;
}

/* Fade-up Animation States */
.gm-artwork-grid__item--hidden {
  opacity: 0;
  transform: translateY(20px);
}

.gm-artwork-grid__item--visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes gmArtworkGridFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gm-artwork-grid__item--animate {
  animation: gmArtworkGridFadeUp 700ms ease forwards;
}

/* === Image Container === */
.gm-artwork-grid__image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #F0EEEB;
}

/* === Artwork Image === */
.gm-artwork-grid__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease, opacity 300ms ease;
}

.gm-artwork-grid__item:hover .gm-artwork-grid__image {
  transform: scale(1.03);
}

.gm-artwork-grid__image--loading {
  opacity: 0;
}

.gm-artwork-grid__image--loaded {
  opacity: 1;
}

/* === Hover Overlay === */
.gm-artwork-grid__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 500ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gm-artwork-grid__item:hover .gm-artwork-grid__overlay {
  background-color: rgba(0, 0, 0, 0.2);
}

/* === Overlay Text === */
.gm-artwork-grid__overlay-text {
  color: #FFFFFF;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 500ms ease;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
}

.gm-artwork-grid__item:hover .gm-artwork-grid__overlay-text {
  opacity: 1;
}

/* === Artwork Metadata === */
.gm-artwork-grid__metadata {
  margin-top: 12px;
}

.gm-artwork-grid__title {
  font-size: 18px;
  font-weight: 400;
  color: #1A1A1A;
  font-family: 'Playfair Display', ui-serif, Georgia, serif;
  margin: 0;
  line-height: 1.4;
}

.gm-artwork-grid__medium {
  margin-top: 4px;
  font-size: 13px;
  color: #6B6B6B;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  margin-bottom: 0;
  line-height: 1.4;
}

.gm-artwork-grid__dimensions {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 300;
  color: rgba(107, 107, 107, 0.7);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  margin-bottom: 0;
  line-height: 1.3;
}

/* === Empty State === */
.gm-artwork-grid__empty {
  text-align: center;
  color: #6B6B6B;
  font-weight: 300;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  padding: 80px 16px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

/* === Aspect Ratio Variants === */
.gm-artwork-grid__image-wrap--1-1 {
  aspect-ratio: 1 / 1;
}

.gm-artwork-grid__image-wrap--4-5 {
  aspect-ratio: 4 / 5;
}

.gm-artwork-grid__image-wrap--3-2 {
  aspect-ratio: 3 / 2;
}

.gm-artwork-grid__image-wrap--16-9 {
  aspect-ratio: 16 / 9;
}

.gm-artwork-grid__image-wrap--16-10 {
  aspect-ratio: 16 / 10;
}

.gm-artwork-grid__image-wrap--21-9 {
  aspect-ratio: 21 / 9;
}

.gm-artwork-grid__image-wrap--4-3 {
  aspect-ratio: 4 / 3;
}

/* === Responsive Grid Columns === */
.gm-artwork-grid__grid--cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.gm-artwork-grid__grid--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gm-artwork-grid__grid--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gm-artwork-grid__grid--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gm-artwork-grid__grid--cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.gm-artwork-grid__grid--cols-6 {
  grid-template-columns: repeat(6, 1fr);
}
