.wd29-configurator {
    margin: 2em 0;
    padding: 2em;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Shape Selection */
.configurator-shapes {
    margin-bottom: 2.5em;
}

.shape-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
    margin-top: 1.5em;
}

.shape-option {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.shape-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
    transform: translateY(-2px);
}

.shape-option.selected {
    border-color: #2271b1;
    background: #f0f6fc;
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.25);
}

.shape-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}

body.home {
    background-color: red !important;
}


.shape-option input[type="radio"]:checked + .shape-option {
    border-color: #2271b1;
    background: #f0f6fc;
    transform: translateY(-2px);
}

.shape-option input[type="radio"]:checked + .shape-option::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #2271b1;
    border-radius: 9px;
    pointer-events: none;
}

.shape-option input[type="radio"]:focus + .shape-option {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.25);
}

.shape-option label {
    position: relative;
    display: block;
    cursor: pointer;
    font-weight: 500;
    z-index: 2;
}

.shape-option input[type="radio"]:checked + label {
    color: #2271b1;
}

.shape-option img {
    position: relative;
    max-width: 100%;
    height: auto;
    margin-bottom: 1em;
    border-radius: 4px;
    z-index: 2;
}


.woocommerce button.button.add-socket {
    float: unset !important;
    margin: auto;
    display: flex;
}


/* Dimensions */
.configurator-dimensions {
    margin-bottom: 2.5em;
}

.dimensions-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
    margin-top: 1.5em;
    
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.dimension-field {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.dimension-field label {
    font-weight: 600;
    color: #333;
}

.dimension-field input {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.dimension-field input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.dimension-field input.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 1px #dc3232;
}

.dimension-field .unit {
    color: #666;
    font-size: 0.9em;
    margin-top: 0.25em;
}

.dimension-info {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #555;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    margin-left: 5px;
    font-size: 12px;
    cursor: help;
    position: relative;
}

.dimension-info:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.dimension-info .tooltip {
    visibility: hidden;
    width: 150px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 12px;
    line-height: 1.4;
}

.dimension-info .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Additional Options */
.configurator-options {
    margin-bottom: 2.5em;
}

.option-group {
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.option-group h4 {
    margin: 0 0 1.5em;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

/* Polished Joint */
.polished-joint {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.2em;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.polished-joint:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.polished-joint label {
    display: flex;
    align-items: center;
    gap: 0.8em;
    cursor: pointer;
    font-size: 1.1em;
    color: #333;
    transition: color 0.3s ease;
    width: 100%;
    margin: 0;
}

.polished-joint input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.polished-joint input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.polished-joint input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.polished-joint input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.polished-joint-option h4 {
    margin-bottom: 0.8em;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

/* Drilling */
.drilling-options {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.drilling-options select {
    width: 100%;
    max-width: 300px;
}

.drilling-image {
    margin-top: 1em;
}

.drilling-image img {
    max-width: 200px;
    height: auto;
}
.summary-details .price .label {
    font-weight: 700 ;
    color: black;
}

/* Rounded Corners */
.rounded-corners-option {
    display: none;
}

.rounded-corners-type .radio-options {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
    flex-wrap: wrap;
}

.radio-rounded-corners {
    display: flex !important;
    align-items: center;
    gap: 0.75em;
    cursor: pointer;
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    flex: 1;
    transition: all 0.3s ease;
}

.radio-rounded-corners:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.option-price {
    margin-left: auto;
    color: #2271b1;
    font-weight: 500;
}


.corner-selection {
    margin-top: 1.5em;
}

/* Rounded Corners Selection */
.corner-selection-grid {
    margin: 15px 0;
}

.corner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
    max-width: 300px;
    margin: 1em 0;
}


.corner {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    background: #fff;
}

.corner:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.corner.selected {
    border-color: #2271b1;
    background: #f0f6fc;
    color: #2271b1;
}

.corner-angle-input {
    margin-top: 1.5em;
}

.corner-angle-input input {
    width: 120px;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.corner-angle-input input.error {
    border-color: #dc3232;
}

/* Custom Options */
.custom-option {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1em;
    padding: 1em;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.custom-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.custom-option label {
    flex: 1;
    cursor: pointer;
}

.custom-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Summary */
.configurator-summary {
    margin-top: 2.5em;
    padding: 2em;
    background: #f0f6fc;
    border: 1px solid #2271b1;
    border-radius: 8px;
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
    margin-top: 1.5em;
}

.summary-details > div {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 1em;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.summary-details .label {
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
}

.summary-details .value {
    font-size: 1.2em;
    font-weight: 600;
    color: #2271b1;
}

/* Drilling Section */
.drilling-section {
    margin-top: 20px;
}

.drilling-options {
    margin-top: 15px;
}

.drilling-list {
    margin-bottom: 15px;
}

.drilling-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.drilling-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.drilling-header h4 {
    margin: 0;
    font-size: 16px;
}

.remove-drilling {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

.drilling-type {
    margin-bottom: 15px;
}

.drilling-type select {
    width: 100%;
    max-width: 300px;
}

.drilling-image {
    margin: 15px 0;
    text-align: center;
}

.drilling-image img {
    max-width: 200px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.drilling-dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.drilling-dimensions .form-field {
    margin: 0;
}

.drilling-dimensions label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.drilling-dimensions input {
    width: 100%;
    max-width: 150px;
}

.add-drilling {
    margin-top: 10px;
}

.add-drilling:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Custom Options Section */
.custom-options-section {
    margin-top: 20px;
}

.custom-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.custom-option {
    display: flex;
    align-items: center;
}

.custom-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    flex-wrap: wrap;
    gap: 4px;
}

.custom-option input[type="checkbox"] {
    margin-right: 8px;
}
/* Option label */
.option-item .option-label {
    font-size: 0.8em;
}
/* Option details */
.option-item .option-details {
    font-size: 0.7em;
    color: #666;    
}

/* Option Prices */
.option-item .option-price { 
    color: #666;
    font-size: 0.7em;
    margin-left: 8px;
    font-style: italic;
}

/* Options détails */
.woocommerce-cart .wc-block-components-product-details__options-details span.wc-block-components-product-details__name {
    color: #666 !important;
}
/* Responsive Design */
@media (max-width: 768px) {
    .wd29-configurator {
        padding: 1.5em;
    }

    .shape-options {
        grid-template-columns: 1fr;
    }

    .dimensions-fields {
        grid-template-columns: 1fr;
    }

    .custom-option {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-details {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 782px) {
    .corner-grid {
        max-width: 250px;
    }
    
    .corner {
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    .drilling-dimensions {
        grid-template-columns: 1fr;
    }

    .custom-options {
        grid-template-columns: 1fr;
    }

    .option-price {
        display: block;
        margin-left: 24px;
        margin-top: 4px;
    }
}

/* Socket Drilling Styles */
.drilling-option {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.drilling-option h4 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.socket-container {
    /* background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5em; */
    margin-bottom: 1.5em;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.05); */
}

.socket-main-container {
    margin-bottom: 1.5em;
}

.socket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid #e0e0e0;
}

.socket-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.remove-socket {
    background: #dc3545 !important;
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.remove-socket:hover {
    background: #c82333;
}

.socket-content {
    display: grid;
    gap: 1.5em;
}

.socket-diameter,
.socket-type,
.socket-position {
    background: #f8f9fa;
    padding: 1.5em;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.socket-diameter label,
.socket-type label {
    display: block;
    margin-bottom: 1em;
    font-weight: 500;
    color: #333;
}

.drilling-diameter-select {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
}

.drilling-type-options {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
    flex-wrap: wrap;
}

.drilling-type {
    display: flex !important;
    align-items: center;
    gap: 0.75em;
    cursor: pointer;
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    flex: 1;
    transition: all 0.3s ease;
}

.drilling-type:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.drilling-type input[type="radio"] {
    margin: 0;
}

/* .drilling-type .option-price {
    margin-left: auto;
    font-weight: 500;
} */

.drilling-type-image {
    margin-top: 1em;
    text-align: center;
}

.drilling-type-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.socket-position {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
}

.position-input {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.position-input label {
    font-size: 0.9em;
    color: #666;
}

.position-input input {
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
}

.position-input .unit {
    font-size: 0.8em;
    color: #666;
    margin-top: 0.25em;
}

/* Add Socket button container */
.add-socket-container {
    margin-top: 1.5em;
    text-align: right;
}

.add-socket {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75em 1.5em;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;

    display: block !important;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.add-socket:hover {
    background: #218838;
}

.add-socket:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Hide drilling option by default and show only for rectangle shape */
/* .drilling-option {
    display: none;
} */

/* .shape-rectangle .drilling-option {
    display: block;
} */

/* Cart Weight Display */
.cart-weight th,
.cart-weight td {
    padding-top: 15px !important;
    border-top: 1px solid #e2e2e2 !important;
}

.weight-amount {
    font-weight: 600;
    color: #333;
}

.weight-details-toggle {
    color: #2271b1;
    font-size: 0.8em;
    transition: color 0.2s;
}

.weight-details-toggle:hover {
    color: #135e96;
    text-decoration: underline !important;
}

.weight-details-popup {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
    z-index: 999 !important;
    width: 320px !important;
    max-width: 100%;
}

.weight-details-popup h4 {
    color: #333;
    margin-bottom: 12px !important;
}

.weight-details-popup div[style*="overflow-y: auto"] {
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 #f8f8f8;
}

.weight-details-popup div[style*="overflow-y: auto"]::-webkit-scrollbar {
    width: 6px;
}

.weight-details-popup div[style*="overflow-y: auto"]::-webkit-scrollbar-track {
    background: #f8f8f8;
}

.weight-details-popup div[style*="overflow-y: auto"]::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 3px;
}

/* Prix Configurateur Shortcode */
.prix-configurateur,
.prix-standard {
    font-size: 1.2em;
    color: #333;
    font-weight: 500;
}

.prix-configurateur strong,
.prix-standard strong {
    color: #2271b1;
    font-weight: 700;
}

.elementor-shortcode .prix-configurateur,
.elementor-shortcode .prix-standard {
    display: inline-block;
    padding: 0.5em 1em;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .weight-details-popup {
        width: 280px !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-height: 80vh !important;
    }

    .prix-configurateur,
    .prix-standard {
        font-size: 1.1em;
    }
}

/* Checkout Product Details Styling */
.woocommerce-checkout .wc-block-components-product-metadata span.wc-block-components-product-details__value,
.woocommerce-checkout .wc-block-components-product-metadata .wc-block-components-product-details__value,
.wc-block-components-product-details__value {
    font-size: 0.8rem !important;
}

.woocommerce-checkout .wc-block-components-product-metadata span.wc-block-components-product-details__name,
.woocommerce-checkout .wc-block-components-product-metadata .wc-block-components-product-details__name,
.wc-block-components-product-details__name {
    font-weight: 600 !important;
} 