#masthead {
    opacity: 1 !important;
}

/*
html.admin-mode {
    padding-top: 0;
    margin-top: 32px;
}
*/

/* Custom Product */
div.product .custom-product {
    gap: 36px;
    display: flex;
    margin-top: 36px;
    margin-bottom: 200px;
    align-items: flex-start;
    justify-content: space-between;
}

/* Custom Product - Image */
.custom-product-image {
    width: 100%;
}

/* Custom Product - Image - Bracelet Preview */
.custom-product-image .bracelet-preview {
    position: relative;
    text-align: center;
}

.custom-product-image .bracelet-preview .bracelet-label {
    position: absolute;
    border-radius: 0;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
    color: #010101;
    font-size: 0.7rem;
    left: 0;
    top: -13px;
}

.custom-product-image .bracelet-preview .bracelet-image {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
}

.custom-product-image .bracelet-preview .charm-preview-container {
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    position: absolute;
}

.custom-product-image .bracelet-preview .charm-preview-container .charm-preview {
    width: 50px;
    height: 50px;
    overflow: hidden;
    position: absolute;
    border-radius: 50%;
    border: 1px solid #b8a2e6;
    background-color: #ffffff;
    transform: translateX(-50%);
    /* Charms - 1 */
    top: 87%;
    left: 50%;
}

.custom-product-image .bracelet-preview .charm-preview-container .charm-preview.hovered {
    border-color: #b8a2e6;
    background-color: #d1c5ff;
    transition: all .2s ease-out;
}

.custom-product-image .bracelet-preview .charm-preview-container .charm-preview.highlighted {
    border: 2px solid rgba(184, 162, 230, 1);
    background-color: rgba(184, 162, 230, 0.2);
    animation: pulse 1.5s infinite alternate;
}

/* Custom Product - Image - Selected Images Grid */
.custom-product-image .selected-images-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.custom-product-image .selected-images-grid .image-cell {
    height: auto;
    display: flex;
    position: relative;
    min-height: 61.88px;
    align-items: center;
    border: 1px solid #ccc;
    justify-content: center;
    flex: 0 0 calc( 100% / 9);
    transition: all .2s ease-out;
}

.custom-product-image .selected-images-grid .image-cell.hovered {
    border-color: #b8a2e6;
    background-color: #d1c5ff;
    transition: all .2s ease-out;
}

.custom-product-image .selected-images-grid .image-cell img {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
}

.custom-product-image .selected-images-grid .image-cell:hover .remove-image {
    display: block;
}

.custom-product-image .selected-images-grid .remove-image {
    top: -2px;
    right: 2px;
    display: none;
    color: #FF3B3F;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    position: absolute;
}

.custom-product-image .selected-images-grid .empty-cell {
    background-color: #f5f5f5;
}

.custom-product-image .selected-images-grid .empty-cell:hover .remove-image {
    display: none;
}

/* Custom Product - Image - Charm Selection Grid */
.custom-product-image .charm-selection-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.custom-product-image .charm-selection-grid.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.custom-product-image .charm-selection-grid .charm-image-cell {
    height: auto;
    display: flex;
    cursor: pointer;
    align-items: center;
    border: 1px solid #ccc;
    justify-content: center;
    flex: 0 0 calc( 100% / 9);
}

.custom-product-image .charm-selection-grid .charm-image-cell img {
    width: 100%;
    max-width: 100px;
    max-height: 100px;
}

/* Custom Product - Image - Reset Button */
.custom-product-image .reset-button {
    border: none;
    display: none;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 12px;
    margin-top: 20px;
    font-weight: 500;
    border: 1px solid;
    padding: 13px 31px;
    background-color: #000000;
    font-family: 'Work Sans' !important;
}

.custom-product-image .reset-button:hover {
    color: #000000;
    border-color: #000000;
    background-color: transparent;
}

/* Custom Product - Config */
.custom-product-config {
    width: 100%;
    position: relative;
}

.custom-product-config h3 {
    margin-top: 0;
}

/* Custom Product - Config - Variations */
.custom-product-config .variations {
    margin-top: 20px;
}

.custom-product-config .variations .variation {
    margin-bottom: 20px;
}

.custom-product-config .variations .variation label + select {
    margin-top: 0;
}

/* Custom Product - Config - Project Name */
.custom-product-config .project_name {
    margin-top: 18px;
    margin-bottom: 18px;
}

.custom-product-config .project_name label {
    font-size: 14px;
    line-height: 1.75;
    margin: 0px 0px 9px 0px;
    display: inline-block;
    color: #000000;
    font-weight: bold;
}

.custom-product-config .project_name label + input {
    width: 100%;
    margin-top: 0;
}

.custom-product-config .project_name label + input::placeholder {
    color: #666;
}

div.product .custom-product form.cart .variations .reset_variations {
    padding: 0;
    margin-top: 18px;
}

div.product .custom-product form.cart .single_variation .price {
    margin: 0;
}

div.product .custom-product form.cart .single_variation .woocommerce-variation-price {
    margin-top: 18px;
}

div.product .custom-product form.cart .woocommerce-variation-add-to-cart.variations_button {
    margin-top: 36px;
}

div.product .custom-product form.variations_form .swatch-type-image {
    height: 85.83px;
    background-size: contain;
    width: calc( calc( 100% / 6 ) - 4px );
}

.swatch-zoom-preview {
    position: absolute;
    z-index: 9999;
    width: 250px;
    height: 250px;
    /* border: 2px solid #ccc; */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    display: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    top: 175px; /* Posizionato sopra la miniatura */
    left: -57.5px; /* Centrare rispetto alla miniatura */
}

.main-container .woocommerce-notices-wrapper .row-container .double-top-padding {
    padding: 0;
    margin-bottom: 30px;
}

.ui-draggable-dragging {
    z-index: 9999 !important;
    pointer-events: none !important;
}

/* Media queries */
@media ( max-width: 480px ) {

    .menu-wrapper {
        height: 132px !important;
    }

    .custom-product-image .selected-images-grid .image-cell {
        margin: 1px;
        flex: 0 0 60px;
        min-height: 60px;
    }

    .custom-product-image .charm-selection-grid .charm-image-cell {
        flex: 0 0 60px;
    }

    div.product .custom-product {
        margin-top: 12px;
    }

}

@media ( min-width: 481px ) and ( max-width: 767px ) {

    .menu-wrapper {
        height: 120px !important;
    }

    .custom-product-image .selected-images-grid .image-cell {
        margin: 1px;
        flex: 0 0 80px;
        min-height: 80px;
    }

    .custom-product-image .charm-selection-grid .charm-image-cell {
        flex: 0 0 80px;
    }

    div.product .custom-product {
        margin-top: 15px;
    }

}

@media ( max-width: 767px ) {

    div.product .vc_custom_heading_wrap {
        opacity: 0;
        display: none;
        visibility: hidden;
    }

    div.product .custom-product {
        margin-bottom: 0px;
        flex-direction: column;
    }

    .custom-product-image .charm-selection-grid {
        flex-wrap: nowrap;
    }

    .custom-product-image .charms-grid {
        margin-right: -36px;
        overflow-x: auto; /* oppure scroll */
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch; /* per iOS */
        touch-action: pan-x;
    }

    .custom-product-image .charms-grid .charm-selection-grid {
        white-space: nowrap;
        display: inline-flex;
    }

    .custom-product-image .charms-grid .charm-selection-grid .ui-draggable-handle {
        touch-action: auto;
        -ms-touch-action: auto;
    }

    div.product .custom-product .woocommerce-variation-add-to-cart {
        display: flex;
        align-items: center;
    }

    div.product .custom-product form.cart .button {
        width: 100%;
        height: 46px;
        transform: inherit;
        padding: 13px 11px !important;
    }

    div.product .custom-product form.variations_form .swatch-type-image {
        height: 106.27px;
        width: calc( calc( 100% / 3 ) - 4px );
    }

    .swatch-zoom-preview {
        display: none !important;
    }

}

@media ( min-width: 768px ) {

    .menu-wrapper {
        height: 186px !important;
    }

}

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px rgba(184, 162, 230, 0.8);
    }
    50% {
        box-shadow: 0 0 15px rgba(184, 162, 230, 1);
    }
    100% {
        box-shadow: 0 0 5px rgba(184, 162, 230, 0.8);
    }
}