/* ==========================================================
   Gallery
========================================================== */

.pcg-gallery {
  position: relative;
  width: 100%;
}

.pcg-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  opacity: 1;
}

.pcg-gallery-image.pcg-fading {
  opacity: 0;
  transform: scale(0.985);
}

/* ==========================================================
   Color Selector
========================================================== */

.pcg-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pcg-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #d9d9d9;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
  position: relative;
}

.pcg-color:hover {
  transform: scale(1.1);
}

.pcg-color:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.pcg-color.active {
  transform: scale(1.15);
  border-color: #000;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #000;
}

/* White swatch border */

.pcg-color[style*="white"],
.pcg-color[style*="#fff"],
.pcg-color[style*="#FFF"],
.pcg-color[style*="#ffffff"],
.pcg-color[style*="#FFFFFF"] {
  border: 1px solid #cfcfcf;
}

/* ==========================================================
   Quick Product Card
========================================================== */

.pcg-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f5f5f5;
}

.pcg-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pcg-card-button {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: calc(100% - 24px);
  padding: 12px;
  border: none;
  border-radius: 50px;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
  z-index: 2;
  line-height: 1.5;
  font-family: "Inter";
}

.pcg-card-button:hover {
  background: #000;
  color: #fff;
}

.pcg-card-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.pcg-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  display: none;
  animation: pcg-spin 0.7s linear infinite;
}

.pcg-card-button:hover .pcg-loader {
  border-top-color: #fff;
}

.pcg-loader.show {
  display: inline-block;
}

@keyframes pcg-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================
   Responsive
========================================================== */

@media (max-width: 767px) {
  .pcg-selector {
    gap: 8px;
  }

  .pcg-color {
    width: 20px;
    height: 20px;
  }
}
