/* Collection Page Custom Styles */

/* CSS Variables from his-her-scents */
:root {
  --font-body-family: "Quattrocento Sans", sans-serif;
  --font-body-style: normal;
  --font-body-weight: 400;
  --font-body-weight-bold: 700;

  --font-heading-family: Trirong, serif;
  --font-heading-style: normal;
  --font-heading-weight: 300;

  --font-body-scale: 1.0;
  --font-heading-scale: 1.1;

  --media-padding: px;
  --media-border-opacity: 0.1;
  --media-border-width: 0px;
  --media-radius: 6px;
  --media-shadow-opacity: 0.0;
  --media-shadow-horizontal-offset: 0px;
  --media-shadow-vertical-offset: 4px;
  --media-shadow-blur-radius: 5px;
  --media-shadow-visible: 0;

  --page-width: 120rem;
  --page-width-margin: 0rem;

  --product-card-image-padding: 0.0rem;
  --product-card-corner-radius: 0.6rem;
  --product-card-text-alignment: left;
  --product-card-border-width: 0.1rem;
  --product-card-border-opacity: 0.1;
  --product-card-shadow-opacity: 0.0;
  --product-card-shadow-visible: 0;
  --product-card-shadow-horizontal-offset: 0.0rem;
  --product-card-shadow-vertical-offset: 0.4rem;
  --product-card-shadow-blur-radius: 0.5rem;

  --grid-desktop-vertical-spacing: 20px;
  --grid-desktop-horizontal-spacing: 20px;
  --grid-mobile-vertical-spacing: 10px;
  --grid-mobile-horizontal-spacing: 10px;
}

/* Loading overlay */
.loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(var(--color-background), 0.7);
  z-index: 10;
}

.loading-overlay.active {
  display: block;
}

/* Loading spinner visibility */
.loading__spinner {
  display: block;
}

.loading__spinner.hidden {
  display: none;
}

/* Empty state styling */
.empty-state {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 30rem;
}

.empty-state h2 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: rgb(var(--color-foreground));
}

.empty-state p {
  font-size: 1.6rem;
  color: rgba(var(--color-foreground), 0.7);
  margin-bottom: 1rem;
}

.empty-state a {
  color: rgb(var(--color-link));
  text-decoration: underline;
}

/* Product grid container positioning */
.product-grid-container {
  position: relative;
}

/* Ensure facets wrapper has proper spacing */
.facets-wrapper {
  margin-bottom: 2rem;
}

/* Facets form grid layout - align sort and count in same row */
.facets__form {
  display: grid;
  grid-template-columns: 1fr max-content max-content;
  gap: 0 3.5rem;
  width: 100%;
  align-items: start;
}

/* Facets wrapper should take first column */
.facets__wrapper {
  grid-column: 1;
  grid-row: 1;
}

/* Active facets should span all columns and be in second row */
.active-facets-desktop {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Sort controls in second column, first row */
.facet-filters.sorting {
  grid-column: 2;
  grid-row: 1;
  padding-left: 0;
  align-self: flex-start;
}

/* Product count in third column, first row */
.facets__form .product-count {
  grid-column: 3;
  grid-row: 1;
  align-self: flex-start;
  margin: 0;
}

/* Product grid styling */
#product-grid {
  display: grid;
  grid-gap: var(--grid-mobile-vertical-spacing) var(--grid-mobile-horizontal-spacing);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 750px) {
  #product-grid {
    grid-gap: var(--grid-desktop-vertical-spacing) var(--grid-desktop-horizontal-spacing);
  }
}

/* Grid column layouts */
.grid--2-col-tablet-down {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media screen and (min-width: 990px) {
  .grid--4-col-desktop {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card wrapper styling */
.card-wrapper {
  height: 100%;
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card-wrapper {
  height: 100%;
}

/* Card base styles */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  text-align: var(--product-card-text-alignment);
}

.card--card {
  background-color: transparent;
  border-radius: var(--product-card-corner-radius);
  border: none;
  height: 100%;
}

.card--media {
  display: flex;
  flex-direction: column;
}

/* Card inner for image - uses ratio for aspect ratio */
.card__inner {
  position: relative;
  width: 100%;
}

.card__inner.ratio::before {
  content: '';
  display: block;
  padding-bottom: var(--ratio-percent);
}

.card__media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  border-radius: var(--product-card-corner-radius);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--product-card-corner-radius);
}

/* Media element styling */
.media {
  display: block;
  background-color: transparent;
  position: relative;
  overflow: hidden;
  border-radius: var(--product-card-corner-radius);
  height: 100%;
}

.media--transparent {
  background-color: transparent;
}

.media--hover-effect img {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.media--hover-effect:hover img {
  transform: scale(1.03);
}

/* Price styling - ensure consistency */
.price-item {
  font-weight: var(--font-body-weight-bold);
}

/* Animation for slide-in effect */
@keyframes animateMenuOpen {
  0% {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-trigger.animate--slide-in {
  animation: animateMenuOpen 0.3s ease;
}

/* Ensure proper spacing for mobile facets */
@media screen and (max-width: 989px) {
  .facets-container {
    padding-top: 0;
  }
  
  .mobile-facets__wrapper {
    margin-bottom: 1rem;
  }
  
  /* Reset grid layout for mobile */
  .facets__form {
    display: block;
  }
  
  .facet-filters.sorting {
    padding-left: 2.5rem;
  }
}

/* Product count text alignment */
.product-count__text {
  font-weight: var(--font-body-weight);
}

.product-count {
  text-align: right;
  position: relative;
}

/* Collection hero spacing */
.collection-hero__inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media screen and (min-width: 750px) {
  .collection-hero__inner {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Card information spacing */
.card__information {
  padding: 1rem 0 0;
}

.card-information {
  margin-top: 0.8rem;
}

/* Card content layout - first content inside card__inner (hidden on desktop, visible on mobile hover) */
.card__inner .card__content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Second card content - visible content below image */
.card > .card__content {
  padding: 1.5rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Card heading - first one inside card__inner is simpler */
.card__inner .card__heading {
  margin: 0;
  line-height: 1.3;
  font-size: 1.5rem;
  font-weight: var(--font-body-weight);
}

/* Main visible card heading with h5 class */
.card__heading.h5 {
  margin: 0 0 0.8rem;
  line-height: 1.3;
  font-size: calc(var(--font-heading-scale) * 1.8rem);
  font-weight: var(--font-heading-weight);
  font-family: var(--font-heading-family);
  color: rgb(var(--color-foreground));
}

.card__heading a {
  color: rgb(var(--color-foreground));
  text-decoration: none;
}

.card__heading a:hover {
  color: rgba(var(--color-foreground), 0.75);
}

/* Vendor styling */
.caption-large.light {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.3rem;
  color: rgba(var(--color-foreground), 0.55);
}

.caption-large.light:empty {
  display: none;
  margin-bottom: 0;
}

/* Price styling */
.price__container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.price-item--regular {
  font-size: 1.6rem;
  font-weight: 400;
  color: rgba(var(--color-foreground), 0.75);
  line-height: 1.4;
}

.price-item--sale {
  font-size: 1.6rem;
  font-weight: 400;
  color: rgba(var(--color-foreground), 0.75);
  line-height: 1.4;
}

/* Hide empty strikethrough prices */
.price__sale s.price-item--regular:empty {
  display: none;
}

/* Hide the sale price wrapper if not on sale */
.price__regular + .price__sale {
  display: none;
}

/* Ensure proper stacking context */
.collection {
  position: relative;
}

/* Adjust facets wrapper alignment */
.facets__wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Facets heading and filters inline */
.facets__heading {
  margin-right: 2rem;
  margin-top: 0;
  margin-bottom: 0;
}

.facets__disclosure {
  margin-right: 3.5rem;
  margin-bottom: 0;
}

/* Ensure sort label and product count are aligned */
.facet-filters__label {
  margin: 0 2rem 0 0;
}

.facet-filters__field {
  display: flex;
  align-items: center;
  gap: 0;
}


