.cp-container h2,
.cp-container p,
.cp-search {
  text-align: center;
}

.cp-search {
  margin: 1em 0 2em;
}

.cp-input {
  border: 1px solid #ddd;
  border-radius: 100px;
  max-width: 500px;
  padding: 5px 40px 7px 20px;
  width: 500px;
}

.cp-narrow .cp-input {
  max-width: 400px;
  width: 400px;
}

.modal-dialog .cp-input {
  max-width: 300px;
  width: 300px;
}

.cp-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cp-clear {
  color: #777;
  left: -38px;
  position: relative;
}

.cp-color-list {
  display: flex;
  flex-wrap: wrap;
}

.cp-color,
.cp-combinations {
  font-size: .85em;
}

.cp-color {
  cursor: pointer;
  max-width: 16.66%;
  padding: 3px 10px 10px;
  text-align: center;
  width: 16.66%;
}

.cp-preview {
  align-items: center;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 100px;
  border: 1px solid rgba(0,0,0,.1);
  display: flex;
  height: 40px;
  justify-content: center;
  margin-bottom: 5px;
  width: 100%;
}

.cp-narrow .cp-preview {
  border-radius: 50%;
  height: 40px;
  margin: 0 auto 5px;
  width: 40px;
}

.cp-preview i {
  color: #fff;
  display: none;
}

.cp-preview.cp-white i {
  color: #555;
}

.cp-active .cp-preview i {
  display: inline;
}

.cp-combinations {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 10px 10px 20px;
  max-width: 100%;
  padding: 20px;
  position: relative;
  width: 100%;
}

.cp-combinations .cp-close {
  position: absolute;
  right: 10px;
  top: 10px;
}

.cp-combinations h3 {
  margin-bottom: 20px;
}

.cp-combinations-container {
  display: flex;
}

.cp-combinations .cp-color-preview {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 25px;
  border: 1px solid rgba(0,0,0,.1);
  display: inline-block;
  margin-right: 20px;
  height: 160px;
  width: 160px;
}

.cp-combinations .cp-table {
  flex: 1;
}

.cp-combinations table {
  width: 100%;
}

.cp-combinations th,
.cp-combinations td {
  padding: 6px;
}

.cp-combinations tbody tr {
  border-top: 1px solid #ddd;
}

.cp-old-price {
  color: #777;
  margin-right: 6px;
  text-decoration: line-through;
}

.cp-add-to-cart {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.cp-quantity {
  margin-right: 10px;
}

.cp-quantity input {
  -moz-appearance: textfield;
  height: 40px;
  padding: 2px 2px 2px 6px;
  width: 60px;
}

.cp-quantity input::-webkit-outer-spin-button,
.cp-quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.cp-narrow table {
  table-layout: fixed;
}

.cp-narrow .cp-add-to-cart-column {
  width: 160px;
}

.cp-narrow .cp-add i {
  margin: 0;
}

.cp-narrow .cp-color-preview,
.cp-narrow .cp-add span {
  display: none;
}

@media (max-width: 1199px) {
  .add-to-cart {
    font-size: 0;
    text-align: center;
  }

  .btn-primary .shopping-cart {
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 991px) {
  .cp-combinations {
    padding: 20px 0 0;
  }

  .cp-combinations .cp-color-preview {
    display: block;
    margin: 0;
  }

  .cp-combinations-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .cp-combinations h3 {
    margin-top: 19px;
    text-align: center;
  }

  .cp-quantity {
    justify-content: center;
    margin: 0 auto;
    text-align: center;
  }

  .cp-combinations th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .cp-search {
    display: flex;
    margin: 1em auto 2em;
    max-width: 500px;
    position: relative;
    text-align: center;
    width: 100%;
  }

  .cp-input {
    width: 100%;
  }

  .cp-clear {
    left: auto;
    position: absolute;
    right: 10px;
    top: 5px;
  }

  .cp-color-list {
    justify-content: center;
    margin: auto;
    text-align: center;
  }

  .cp-color {
    width: auto;
    max-width: none;
  }

  .cp-preview {
    width: 40px;
  }

  .cp-combinations-container {
    flex-direction: column;
  }

  .cp-combinations {
    margin: 10px auto 20px;
    padding: 20px 0 0;
  }

  .cp-combinations .cp-color-preview {
    display: block;
    margin: 0 auto 20px;
  }

  .cp-combinations .cp-table {
    display: block;
    width: 100%;
  }

  .cp-combinations table {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: auto;
  }

  .cp-combinations thead,
  .cp-combinations th {
    margin: auto;
    text-align: center;
  }

  .cp-combinations tbody tr {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    padding: 20px;
    text-align: center;
  }

  .cp-combinations th,
  .cp-combinations td {
    display: block;
    max-width: 100%;
  }

  .cp-combinations td:last-child {
    display: flex;
    margin: auto;
    text-align: center;
  }

  .cp-quantity {
    margin-bottom: 15px;
    margin-right: 0;
  }

  .cp-add-to-cart {
    flex-direction: column;
  }
}
