/* ==================================================
   CUSTOM VARIANTS SWATCH — FRONTEND STYLES
================================================== */

.cvsFrontendSwatchWrapper {
  margin-top: 35px !important;
  padding: 0;
}

.cvsFrontendAttributeTitle {
  margin: 0 0 14px 19px;
  padding: 0;

  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;

  color: #9b004b;

  letter-spacing: 0.01em;
}

.cvsFrontendSwatchGroup {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

/* ==================================================
   HIDE NATIVE VARIATION UI
================================================== */

.product-purchase .custom-variation-select,
.product-purchase table.variations th.label {
  display: none !important;
}

/* ==================================================
   VERTICAL LAYOUT
================================================== */

.cvsFrontendSwatchGroup[data-layout="vertical"] {
  flex-direction: column !important;
}

/* ==================================================
   SWATCH ITEM
================================================== */

.cvsFrontendSwatchItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin: 0;
  padding: 0;
}

.cvsFrontendSwatchItem p {
  display: none;
  margin: 0;
  padding: 0;
}

.cvsFrontendSwatchItem:hover {
  transform: translateY(-1px);
}

/* ==================================================
   SWATCH CIRCLE
================================================== */

.cvsFrontendSwatchCircle {
  position: relative;

  display: block;

  width: 56px;
  min-width: 56px;

  height: 56px;
  min-height: 56px;

  border-radius: 999px;

  overflow: hidden;

  background-color: #f6f1ed;

  background-repeat: no-repeat;

  border: 2px solid rgba(155, 0, 75, 0.16);

  box-shadow: 0 6px 18px rgba(155, 0, 75, 0.06);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* ==================================================
   HOVER STATE
================================================== */

.cvsFrontendSwatchItem:hover .cvsFrontendSwatchCircle {
  border-color: #9b004b;

  box-shadow: 0 8px 20px rgba(155, 0, 75, 0.1);

  transform: scale(1.03);
}

/* ==================================================
   ACTIVE STATE
================================================== */

.cvsFrontendSwatchItem.isActive .cvsFrontendSwatchCircle {
  border-color: #9b004b;

  box-shadow:
    0 0 0 3px rgba(155, 0, 75, 0.1),
    0 10px 22px rgba(155, 0, 75, 0.12);

  transform: scale(1.04);
}

/* ==================================================
   SWATCH LABEL
================================================== */

.cvsFrontendSwatchLabel {
  font-size: 14px;

  font-weight: 500;

  line-height: 1.2;

  text-align: center;

  color: #9b004b;

  letter-spacing: 0.01em;

  margin: 0;
  padding: 0;
}

/* ==================================================
   CUSTOM VARIANTS SWATCH — ADMIN STYLES
================================================== */

.cvsVariationSwatchGroup {
  padding: 16px 0;
  border-top: 1px solid #ddd;
  margin-top: 16px;
}

.cvsVariationSwatchTitle {
  margin-bottom: 12px;
}

.cvsVariationSwatchLayout {
  display: flex;
  gap: 24px;
  align-items: center;
}

.cvsVariationSwatchLayout > div {
  display: grid;
  grid-template-columns: 120px auto;
  grid-template-rows: 120px auto;
  column-gap: 24px;
  row-gap: 12px;
  align-items: center;
}

.cvsSwatchEditor {
  grid-column: 1;
  grid-row: 1;

  width: 120px;
  height: 120px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid #ccc;
  cursor: grab;
  background: #f3f3f3;
}

.cvsSwatchEditor.isDragging {
  cursor: grabbing;
}

.cvsSwatchImage {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

.cvsSwatchZoomControls {
  grid-column: 1;
  grid-row: 2;

  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;

  margin: 0;
}

.cvsSwatchUploadGroup {
  grid-column: 2;
  grid-row: 1 / 3;

  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;

  margin: 0;
}
