.bundle-products {
    position: relative;
    width: 100%;
}

.bundle-products h2,
.bundle-products h3 {
    font-size: 50px;
}

.bundle-products h2,
.bundle-products h3,
.bundle-products h4,
.bundle-products p,
.bundle-products span,
.bundle-products a {
    font-family: "Amatic SC", Sans-serif;
    font-weight: 700;
}

.bundle-products.invert h2,
.bundle-products.invert h3,
.bundle-products.invert h4,
.bundle-products.invert p,
.bundle-products.invert span,
.bundle-products.invert a {
    color: #fff;
}

.bundle-products.invert .bundle-product .quantity a {
    color: #fff;
    border-color: #fff;
}

.bundle-products.invert .bundle-product:hover img,
.bundle-products.invert .bundle-product.active img {
    background: #fff;
}

.bundle-products.invert .bundle-product .quantity a {
    color: #fff;
    border-color: #fff;
}

.bundle-products.invert .bundle-product:hover img,
.bundle-products.invert .bundle-product.active img {
    background: #fff;
}

.bundle-products-inner,
.admin-bundle-products {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    margin: 50px auto;
    padding: 0 0 50px;
    max-width: 1170px;
}

.admin-bundle-products {
    max-width: 100%;
}

.bundle-product {
    width: 100%;
    max-width: 25%;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: center;
    margin: 0 0 30px;
    padding: 0 5px;
    box-sizing: border-box;
}

.admin-bundle-products .bundle-product {
    max-width: 150px;
    margin: 0 0 15px;
    opacity: 0.3;
}

.admin-bundle-products .bundle-product.disabled {
    display: none;
}

.admin-bundle-products .bundle-product.disabled.active {
    display: block;
}

.admin-bundle-products .bundle-product:hover {
    opacity: 0.7;
}

.admin-bundle-products .bundle-product.active,
.admin-bundle-products .bundle-product.active:hover{
    opacity: 1;
}

.admin-bundle-products .bundle-product h3 {
    font-size: 14px;
}

.admin-bundle-products .bundle-product input {
    width: 100%;
}

@media all and (max-width: 1400px) {

    .admin-bundle-products .bundle-product {
        max-width: 12.5%;
    }

}

@media all and (max-width: 1200px) {

    .admin-bundle-products .bundle-product {
        max-width: 20%;
    }

}

@media all and (max-width: 800px) {

    .admin-bundle-products .bundle-product {
        max-width: 25%;
    }

}

@media all and (max-width: 500px) {

    .admin-bundle-products .bundle-product {
        max-width: 50%;
    }

}

.bundle-product h3 {
    font-size: 26px;
}

.bundle-product h3,
.bundle-product p {
    margin: 10px 0;
}

.bundle-product img {
    background: transparent;
    border-radius: 5px !important;
    padding: 2px;
    width: calc(100% - 20px);
    height: auto;
    margin: 0 10px;
    transition: 250ms;
}

.bundle-product input[type="checkbox"] {
    display: none;
}

.bundle-product:hover img,
.bundle-product.active img {
    background: #000;
    cursor: pointer;
}

.bundle-product .quantity {
    display: none;
}

.bundle-product.active .quantity {
    display: block;
}

.bundle-product .quantity span {
    font-family: Montserrat, serif;
    line-height: 40px;
    padding: 0 10px;
    font-weight: 500;
    display: inline-block;
}

.bundle-product .quantity a {
    font-family: Montserrat, serif;
    line-height: 40px;
    width: 40px;
    text-align: center;
    border-radius: 50px;
    border: solid 1px #666;
    color: #666;
    font-size: 18px;
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

.bundle-item {
    display: block;
    justify-content: center;
    justify-items: center;
    position: relative;
}

.bundle-item.to-top {
    position: absolute;
    left: 0;
    top: 0;
}

.bundle-item > div {
    opacity: 1;
    transition: opacity 250ms;
}

.bundle-item.active > div {
    opacity: 1;
}

.bundle-item + .bundle-item {
    margin: 10px 0 0;
}

.bundle-item-dropdown {
    display: inline-block;
}

.bundle-item-notifier,
.bundle-item-incorrect-amount {
    background: none;
    position: relative;
    height: 100%;
    width: 100%;
    padding: 14px 0 0 63px;
    text-align: left;
    color: red;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -1px;
    display: none;
    z-index: 1;
}

.woocommerce div.product .out-of-stock .bundle-item-dropdown-title span,
.woocommerce div.product .out-of-stock {
    color: red;
}

.bundle-item.out-of-stock .bundle-item-notifier,
.bundle-item.incorrect-amount .bundle-item-incorrect-amount {
    display: block;
}

.bundle-item-image {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
}

.bundle-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.bundle-item-quantity {
    position: absolute;
    right: 0;
    top: 0;
}

.bundle-item-quantity a {
    line-height: 48px;
    width: 48px;
    text-align: center;
    border-radius: 5px;
    border: solid 1px #666;
    color: #666;
    font-size: 18px;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    vertical-align: top;
}

.bundle-item-quantity a.decrease {
    border-right: none;
    border-radius: 5px 0 0 5px;
}

.bundle-item-quantity a.increase {
    border-left: none;
    border-radius: 0 5px 5px 0;
}

.bundle-item-quantity span {
    line-height: 48px;
    font-weight: 500;
    display: inline-block;
    border: solid 1px #666;
    vertical-align: top;
    width: 48px;
    text-align: center;
}

.bundle-item-dropdown {
    border-radius: 5px;
    border: solid 1px #666;
    vertical-align: middle;
    position: relative;
    width: calc(100% - 216px);
    margin: 0 156px 0 60px;
}

.bundle-item-dropdown-title {
    padding: 10px 15px;
    margin: 3px 0 0;
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 100%;
}

.bundle-item-dropdown-title span {
    width: calc(100% - 25px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: top;
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px !important;
    font-weight: 400 !important;
    letter-spacing: -1px;
}

.bundle-item-dropdown-title span i {
    display: inline-block;
    vertical-align: top;
}

.bundle-item-dropdown-items {
    display: none;
    position: absolute;
    background: #fff;
    border-radius: 0 0 5px 5px;
    width: 300px;
    border: solid 1px #000;
    top: 48px;
    left: -1px;
    z-index: 2;
    max-height: 300px;
    overflow: auto;
    padding: 4px 0;
}

.bundle-item-dropdown-title.active + .bundle-item-dropdown-items {
    display: block;
    opacity: 1;
}

.bundle-item-dropdown-title.active + .bundle-item-dropdown-items.has-to-top {
    padding: 48px 0 0;
}

.bundle-item-dropdown-item {
    width: 100%;
    display: inline-block;
    vertical-align: top;
    height: auto;
    padding: 4px 8px;
    margin: 0;
    cursor: pointer;
    transition: background-color 250ms;
}

.bundle-item-dropdown-item.to-top.out-of-stock {
    background: rgba(252, 215, 215, 0.53);
}

.bundle-item-dropdown-item.out-of-stock span {
    color: red;
}

.bundle-item-dropdown-item.to-top {
    position: absolute;
    left: 0;
    top: 0;
    background: #ddd;
}

.bundle-item-dropdown-item:hover {
    background: #efefef;
}

.bundle-item-dropdown-item img {
    height: 40px;
    width: 40px;
    border-radius: 5px;
    margin: 0 10px 0 0;
    display: inline-block;
    vertical-align: top;
}

.bundle-item-dropdown-item span {
    display: inline-block;
    vertical-align: top;
    width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 8px 0 0;
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px !important;
    font-weight: 400 !important;
    letter-spacing: -1px;
}

.bundle-form-button {
    width: 100%;
    background: #000;
    padding: 15px;
    display: flex;
    border-radius: 5px;
    color: #fff;
    margin: 10px 0 0;
    justify-content: center;
    justify-items: center;
    font-weight: 600;
    font-size: 20px;
    transition: background-color 250ms;
    cursor: pointer;
}

.bundle-form-button:hover {
    background: #666;
    color: #fff;
}

.bundle-form-button.disabled {
    opacity: 0.5;
}

.bundle-form-button.loading {
    position: relative;
    pointer-events: none;
}

.bundle-form-button.loading::before {
    content: '';
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    -webkit-animation: spin 500ms linear infinite;
    animation: spin 500ms linear infinite;
    margin: 0 10px 0 0;
    vertical-align: middle;
}

.bundle-form-overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: rgba(0,0,0,0.2);
}

.active .bundle-form-overlay {
    display: block;
}

.bundle-form-title {
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 18px !important;
    font-weight: 500;
    letter-spacing: -1px;
    margin: 10px 0;
}

.arrow {
    border: solid black;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 2px;
    margin: 0 0 4px 15px;
}

.down {
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
}

.bundle-products,
.bundle-categories {
    display: none;
}

.bundle-products.active {
    display: flex;
}

.bundle-categories.active {
    display: block;
}

.bundle-categories label {
    margin: 0 10px 10px 0;
    display: inline-block;
}

.bundle-categories input {
    height: 22px;
    width: 22px;
    margin: -3px 5px 0 0;
}

.front-bundle-products.active {
    display: block;
}

.bundle-switch-dropdown {
    padding: 10px 25px;
    background: #efefef;
    border: solid 1px #fff;
    border-radius: 5px;
    margin: 0 0 10px;
}

.bundle-price,
.bundle-price span{
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0;
    margin: 20px 0;
}

.bundle-price span {
    font-size: 26px;
    font-weight: 400;
    margin: 0 0 0 3px;
}

.bundle-error {
    color: red;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    margin: 20px 0 0;
    display: none;
}

.bundle-error.active {
    display: block;
}

.colors-form {
    width: 100%;
}

.colors-form h2 {
    color: #000000;
    font-family: "Baskervville", Sans-serif;
    font-size: 35px;
    font-weight: 500;
    letter-spacing: -1px;
}

.color-items {
    display: grid;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    grid-template-columns: repeat(10,1fr);
}

@media all and (max-width: 1200px) {

    .color-items {
        grid-template-columns: repeat(8,1fr);
    }

}

@media all and (max-width: 1000px) {

    .color-items {
        grid-template-columns: repeat(7,1fr);
    }

}

@media all and (max-width: 800px) {

    .color-items {
        grid-template-columns: repeat(6,1fr);
    }
}

@media all and (max-width: 700px) {

    .color-items {
        grid-template-columns: repeat(5,1fr);
    }

}

@media all and (max-width: 600px) {

    .color-items {
        grid-template-columns: repeat(4,1fr);
    }

}

@media all and (max-width: 500px) {

    .color-items {
        grid-template-columns: repeat(3,1fr);
    }

}

@media all and (max-width: 400px) {

    .color-items {
        grid-template-columns: repeat(2,1fr);
    }

}

.color-item {
    display: flex;
    flex-direction: column;
    transition: opacity 250ms;
}

.color-item.out-of-stock img {
    opacity: 0.3;
}

.color-item:hover {
    opacity: 0.8;
}

.color-item-image {
    cursor: pointer;
    position: relative;
}

.color-item-image img {
    width: 100%;
    border-radius: 5px !important;
    height: 80px !important;
    object-fit: cover;
    display: inline-block;
    vertical-align: top;
}

.color-item-notifier {
    background: rgba(255,255,255,0.5);
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    padding: 18px 0;
    text-align: center;
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -1px;
    display: none;
}

.color-item-notifier strong {
    font-size: 16px;
}

.color-item.out-of-stock.active .color-item-notifier {
    display: block;
}

.color-item-title h6 {
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px !important;
    font-weight: 500;
    letter-spacing: -1px;
    margin: 10px 0;
}

.color-item-alert {
    color: #b81c23;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px !important;
    font-weight: 500;
    letter-spacing: -1px;
    display: none;
}

.color-item.active .color-item-alert.active {
    margin: -10px 0 10px;
    display: block;
}

.color-item-quantity {
    display: none;
    margin: 0 0 10px;
}

.color-item-quantity span {
    line-height: 18px;
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px !important;
    font-weight: 500;
    letter-spacing: -1px;
    display: inline-block;
    border: solid 1px #666;
    vertical-align: top;
    width: 22px;
    text-align: center;
    padding: 4px 0 0;
}

.color-item-quantity a {
    line-height: 22px;
    width: 22px;
    text-align: center;
    border-radius: 5px;
    border: solid 1px #666;
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px !important;
    font-weight: 500;
    letter-spacing: -1px;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    vertical-align: top;
}

.color-item-quantity a.decrease {
    border-right: none;
    border-radius: 5px 0 0 5px;
}

.color-item-quantity a.increase {
    border-left: none;
    border-radius: 0 5px 5px 0;
}

.color-item-button {
    width: 100%;
    border: solid 1px #000;
    padding: 5px 5px 2px;
    border-radius: 3px;
    color: #000;
    justify-content: center;
    justify-items: center;
    transition: background-color 250ms, color 250ms;
    cursor: pointer;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -1px;
    display: none;
}

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

.color-item.active .color-item-quantity,
.color-item.active .color-item-button{
    display: flex;
    justify-content: center;
}

.color-item.out-of-stock.active .color-item-quantity,
.color-item.out-of-stock.active .color-item-button{
    display: none;
}

.color-item-sku {
    background: rgba(255,255,255,0.5);
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: #000000;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 24px !important;
    font-weight: 500;
    letter-spacing: -1px;
    padding: 10px 0;
}

#bundle_products .postbox-header h2.with-loader {
    justify-content: flex-start;
}

.with-loader::before{
    content: '';
    z-index: 1000;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 2px solid #000;
    width: 18px;
    height: 18px;
    -webkit-animation: spin 500ms linear infinite;
    animation: spin 500ms linear infinite;
    opacity: 1;
    transition: opacity 250ms;
    margin: 0 10px 0 0;
}

.button.with-loader::before {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-color: #fff;
}

@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AJAX Loading Styles */
.bundle-products-form-ajax-container {
    min-height: 100px;
    position: relative;
}

.bundle-products-form-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px;
}

.bundle-products-form-loading::before {
    content: '';
    display: inline-block;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid #000;
    width: 30px;
    height: 30px;
    -webkit-animation: spin 500ms linear infinite;
    animation: spin 500ms linear infinite;
    margin: 0 10px 0 0;
    vertical-align: middle;
}

.bundle-form-error {
    color: #b81c23;
    font-family: "Josefin Sans", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 20px;
    text-align: center;
    background: rgba(184, 28, 35, 0.1);
    border-radius: 5px;
    margin: 20px 0;
}
