/* Custom Product Variation Options Styling */

/* For large screens (1025px and above) - Display 3 options per row */
@media (min-width: 1025px) {
  .wd-swatches-product {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }

  /* Make each option have EXACTLY equal width */
  .wd-swatch {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Ensure consistent sizing for color/image swatches */
  .wd-swatch.wd-bg {
    min-height: 80px;
  }

  /* Text swatches styling - EQUAL width container */
  .wd-swatch.wd-text {
    padding: 10px 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .wd-swatch.wd-text:hover {
    border-color: #333;
    background-color: #f5f5f5;
  }

  .wd-swatch.wd-text.wd-active {
    border-color: #0073aa;
    background-color: #e8f4f8;
  }

  /* Color swatches styling */
  .wd-swatch.wd-bg .wd-swatch-bg {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .wd-swatch.wd-bg:hover .wd-swatch-bg {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .wd-swatch.wd-bg.wd-active .wd-swatch-bg {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
  }

  /* Swatch image styling */
  .wd-swatch.wd-bg .wd-swatch-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Swatch text label */
  .wd-swatch-text {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
  }

  /* Swatch divider (for \"show more\" options) */
  .wd-swatch-divider {
    grid-column: 1 / -1;
    text-align: center;
    padding: 12px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
  }

  .wd-swatch-divider:hover {
    background-color: #f0f0f0;
    color: #333;
  }

  /* Hidden swatches styling */
  .wd-swatch.wd-hidden {
    display: none;
  }

  .wd-swatch.wd-hidden.wd-show {
    display: flex;
  }

  /* Disabled state */
  .wd-swatch.wd-disabled {
    opacity: 0.5;
    pointer-events: none;
  }

  .wd-swatch.wd-enabled {
    opacity: 1;
  }
}

/* Mobile and Tablet adjustments */
@media (max-width: 1024px) {
  .wd-swatches-product {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .wd-swatch.wd-bg .wd-swatch-bg {
    width: 60px;
    height: 60px;
  }

  .wd-swatch-text {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .wd-swatches-product {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 8px;
  }

  .wd-swatch.wd-bg .wd-swatch-bg {
    width: 50px;
    height: 50px;
  }

  .wd-swatch-text {
    font-size: 10px;
  }
}

/* Price display for variant selection */
.variations_form.wd-price-outside .single_variation_wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.variations_form.wd-price-outside .woocommerce-variation-price {
  display: block !important;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: bold;
}

/* Ensure proper spacing in variation form */
.variations_form table.variations {
  width: 100%;
  margin-bottom: 20px;
}

.variations_form table.variations tr {
  display: block;
  margin-bottom: 20px;
}

.variations_form table.variations th.label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.variations_form table.variations td.value {
  display: block;
  width: 100%;
}

@media (min-width: 768px) {
  .variations_form table.variations tr {
    display: table-row;
  }

  .variations_form table.variations th.label {
    display: table-cell;
    width: 30%;
    padding-right: 20px;
    text-align: left;
    vertical-align: top;
  }

  .variations_form table.variations td.value {
    display: table-cell;
    width: 70%;
  }
}

/* Reset and Clear button styling */
.wd-reset-var {
  margin-top: 15px;
}

.reset_variations {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset_variations:hover {
  background-color: #ddd;
  color: #333;
}<0x0AEOF

head -50 css/custom-variation-options.css
pwd
cat > css/custom-variation-options.css << 'EOF'
/* Custom Product Variation Options Styling */

/* For large screens (1025px and above) - Display 3 options per row */
@media (min-width: 1025px) {
  .wd-swatches-product {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }

  /* Make each option have EXACTLY equal width */
  .wd-swatch {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Ensure consistent sizing for color/image swatches */
  .wd-swatch.wd-bg {
    min-height: 80px;
  }

  /* Text swatches styling - EQUAL width container */
  .wd-swatch.wd-text {
    padding: 10px 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .wd-swatch.wd-text:hover {
    border-color: #333;
    background-color: #f5f5f5;
  }

  .wd-swatch.wd-text.wd-active {
    border-color: #0073aa;
    background-color: #e8f4f8;
  }

  /* Color swatches styling */
  .wd-swatch.wd-bg .wd-swatch-bg {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .wd-swatch.wd-bg:hover .wd-swatch-bg {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .wd-swatch.wd-bg.wd-active .wd-swatch-bg {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
  }

  /* Swatch image styling */
  .wd-swatch.wd-bg .wd-swatch-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Swatch text label */
  .wd-swatch-text {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
  }

  /* Swatch divider (for "show more" options) */
  .wd-swatch-divider {
    grid-column: 1 / -1;
    text-align: center;
    padding: 12px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
  }

  .wd-swatch-divider:hover {
    background-color: #f0f0f0;
    color: #333;
  }

  /* Hidden swatches styling */
  .wd-swatch.wd-hidden {
    display: none;
  }

  .wd-swatch.wd-hidden.wd-show {
    display: flex;
  }

  /* Disabled state */
  .wd-swatch.wd-disabled {
    opacity: 0.5;
    pointer-events: none;
  }

  .wd-swatch.wd-enabled {
    opacity: 1;
  }
}

/* Mobile and Tablet adjustments */
@media (max-width: 1024px) {
  .wd-swatches-product {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .wd-swatch.wd-bg .wd-swatch-bg {
    width: 60px;
    height: 60px;
  }

  .wd-swatch-text {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .wd-swatches-product {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 8px;
  }

  .wd-swatch.wd-bg .wd-swatch-bg {
    width: 50px;
    height: 50px;
  }

  .wd-swatch-text {
    font-size: 10px;
  }
}

/* Price display for variant selection */
.variations_form.wd-price-outside .single_variation_wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.variations_form.wd-price-outside .woocommerce-variation-price {
  display: block !important;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: bold;
}

/* Ensure proper spacing in variation form */
.variations_form table.variations {
  width: 100%;
  margin-bottom: 20px;
}

.variations_form table.variations tr {
  display: block;
  margin-bottom: 20px;
}

.variations_form table.variations th.label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.variations_form table.variations td.value {
  display: block;
  width: 100%;
}

@media (min-width: 768px) {
  .variations_form table.variations tr {
    display: table-row;
  }

  .variations_form table.variations th.label {
    display: table-cell;
    width: 30%;
    padding-right: 20px;
    text-align: left;
    vertical-align: top;
  }

  .variations_form table.variations td.value {
    display: table-cell;
    width: 70%;
  }
}

/* Reset and Clear button styling */
.wd-reset-var {
  margin-top: 15px;
}

.reset_variations {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset_variations:hover {
  background-color: #ddd;
  color: #333;
}
