/**
 * Archivo: assets/css/configurator.css
 *
 * Estilos básicos del configurador.
 * Se mantienen deliberadamente sencillos para facilitar su adaptación
 * al tema de WordPress/WooCommerce utilizado por la tienda.
 */

.f3d-configurator {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.f3d-configured-product .ast-shipping-text {
    display: none !important;
}

.f3d-configurator h3 {
    margin-top: 0;
    line-height: 1.3;
}

.f3d-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.f3d-configurator label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.f3d-field-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.f3d-help {
    display: block;
    margin-top: 5px;
    color: #646970;
    font-size: 0.9em;
    line-height: 1.4;
}

.f3d-image-remove {
    margin-top: 8px;
    padding: 6px 10px;
    border: 1px solid #c7cbd1;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    cursor: pointer;
}

.f3d-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.f3d-configurator input.f3d-visually-hidden {
    display: none !important;
}

.f3d-image-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 16px;
    border: 2px dashed #c7cbd1;
    border-radius: 8px;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
}

.f3d-ai-source-tabs,
.f3d-image-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
    padding: 4px;
    border: 1px solid #d7dfe7;
    border-radius: 10px;
    background: #f3f6fa;
    width: fit-content;
    max-width: 100%;
}

.f3d-ai-source-tab,
.f3d-image-tab {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #3c3c3c;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.f3d-ai-source-tab:hover,
.f3d-image-tab:hover {
    border-color: #c5d4e5;
    background: #eef5ff;
}

.f3d-ai-source-tab.is-active,
.f3d-image-tab.is-active {
    border-color: #2271b1;
    background: #fff;
    color: #0d3d5c;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.f3d-image-panel {
    display: none;
}

.f3d-image-panel.is-active {
    display: block;
}

.f3d-ai-actions,
form.cart .f3d-ai-cta,
form.cart .single_add_to_cart_button,
form.cart .f3d-print-3d-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    vertical-align: middle;
}

form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.f3d-ai-credit-link {
    margin-left: 0;
}

.f3d-image-panel.is-active {
    display: block;
}

.f3d-view-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.f3d-single-view-grid {
    grid-template-columns: minmax(0, 1fr);
}

.f3d-single-reference-view {
    display: flex;
    width: 230px;
    height: 190px;
    margin: 0 auto;
}

.f3d-single-reference-upload {
    position: relative;
    display: flex !important;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    background: #1E2D40;
    color: #fff !important;
    cursor: pointer;
    overflow: hidden;
}

.f3d-single-reference-upload .preview {
    display: block;
    width: 92%;
    height: auto;
    max-height: 135px;
    aspect-ratio: 1.4;
    margin-bottom: 8px;
    object-fit: contain;
}

.f3d-single-reference-upload > span:not(.f3d-single-preview) {
    width: 100%;
    margin-top: auto;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.f3d-single-reference-upload .f3d-single-preview:empty {
    display: none;
}

.f3d-single-reference-upload .f3d-single-preview:not(:empty) {
    position: absolute;
    top: 12px;
    right: 4%;
    bottom: 42px;
    left: 4%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f3d-single-reference-upload .f3d-view-preview-item {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.f3d-single-reference-upload .f3d-view-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.f3d-view-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    font-size: 0.85em;
    padding: 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.f3d-multi-view-upload {
    align-items: center;
    justify-content: flex-start;
    min-height: 170px;
    padding: 8px 8px 10px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.f3d-multi-view-upload:hover,
.f3d-multi-view-upload:focus-within {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.12);
}

.f3d-view-thumbnail {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 4px;
    background: #f6f7f7;
}

.f3d-upload-plus {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #2271b1;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.f3d-multi-view-upload .f3d-view-label {
    margin-top: 6px;
    font-size: 0.9em;
    font-weight: 600;
}

.f3d-multi-view-upload .f3d-view-preview {
    position: absolute;
    inset: 8px 8px 34px;
    min-height: 0;
    margin: 0;
}

.f3d-multi-view-upload .f3d-view-preview-item {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 4px;
}

/* Disposición visual de las ocho vistas multiimagen. */
.f3d-image-panel[data-image-panel="multi"] > .contenedor-vistas-multiimagen {
    position: relative;
    display: block;
    width: 100%;
    max-width: 1100px;
    height: 1020px;
    margin: 0 auto;
    padding: 0;
    background: #1E2D40;
    box-sizing: border-box;
}

.f3d-image-panel[data-image-panel="multi"] .contenedor-vistas-multiimagen .vista {
    position: absolute;
    width: min(230px, 30%);
    height: auto;
    aspect-ratio: 23 / 19;
    box-sizing: border-box;
}

.f3d-image-panel[data-image-panel="multi"] .vista-superior {
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.f3d-image-panel[data-image-panel="multi"] .vista-izquierda {
    top: 250px;
    left: 30px;
}

.f3d-image-panel[data-image-panel="multi"] .vista-trasera {
    top: 250px;
    left: 50%;
    transform: translateX(-50%);
}

.f3d-image-panel[data-image-panel="multi"] .vista-derecha {
    top: 250px;
    right: 30px;
}

.f3d-image-panel[data-image-panel="multi"] .vista-frontal-izq {
    top: 520px;
    left: 30px;
}

.f3d-image-panel[data-image-panel="multi"] .vista-frontal-der {
    top: 520px;
    right: 30px;
}

.f3d-image-panel[data-image-panel="multi"] .vista-frontal {
    top: 520px;
    left: 50%;
    transform: translateX(-50%);
}

.f3d-image-panel[data-image-panel="multi"] .vista-inferior {
    top: 800px;
    left: 50%;
    transform: translateX(-50%);
}

.f3d-image-panel[data-image-panel="multi"] .zona-subida {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.08);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s;
}

.f3d-image-panel[data-image-panel="multi"] .zona-subida:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

.f3d-image-panel[data-image-panel="multi"] .preview {
    display: block;
    width: 92%;
    height: auto;
    max-height: 135px;
    aspect-ratio: 1.4;
    margin-bottom: 8px;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
}

.f3d-image-panel[data-image-panel="multi"] .zona-subida.has-upload > img.preview {
    display: none !important;
}

.f3d-image-panel[data-image-panel="multi"] .zona-subida:has(.f3d-view-preview:not(:empty)) > img.preview {
    display: none !important;
}

.f3d-image-panel[data-image-panel="multi"] .zona-subida > span:not(.f3d-view-preview) {
    width: 100%;
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff !important;
    text-align: center;
    overflow-wrap: anywhere;
}

.f3d-image-panel[data-image-panel="multi"] .f3d-view-preview:empty {
    display: none;
}

.f3d-image-panel[data-image-panel="multi"] .f3d-view-preview:not(:empty) {
    position: absolute;
    top: 12px;
    right: 4%;
    bottom: 42px;
    left: 4%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 0;
}

.f3d-image-panel[data-image-panel="multi"] .f3d-view-preview-item {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.f3d-image-panel[data-image-panel="multi"] .f3d-view-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.f3d-view-upload input {
    width: 100%;
}

.f3d-upload-button {
    display: inline-block;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 4px;
    background: #2271b1;
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
}

.f3d-view-upload:hover .f3d-upload-button,
.f3d-image-dropzone:hover .f3d-upload-icon {
    opacity: 0.88;
}

.f3d-view-preview {
    display: block;
    min-height: 76px;
    margin-top: 4px;
}

.f3d-single-preview {
    display: block;
    min-height: 76px;
    margin-top: 4px;
}

.f3d-view-preview-item {
    position: relative;
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.f3d-view-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f3d-view-preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 18px;
    line-height: 20px;
    cursor: pointer;
}

.f3d-image-dropzone:hover,
.f3d-image-dropzone.is-dragging {
    border-color: #2271b1;
    background: #f0f6fc;
}

.f3d-upload-icon {
    display: block;
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    background: url("../images/upload-icon.svg") center / contain no-repeat;
    font-size: 0;
}

.f3d-image-dropzone small {
    margin-top: 4px;
    color: #646970;
    font-weight: 400;
}

.f3d-image-preview {
    display: grid;
    grid-template-columns: repeat(5, 76px);
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    justify-content: center;
}

.f3d-image-preview-item {
    position: relative;
    display: block;
    width: 76px !important;
    height: 76px !important;
    overflow: hidden;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}

.f3d-image-preview-item img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
}

.f3d-image-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0;
    line-height: 1;
}

.f3d-image-remove::before {
    content: "\00d7";
    font-size: 18px;
}

.f3d-image-order {
    position: absolute;
    bottom: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.f3d-image-role {
    position: absolute;
    right: 2px;
    bottom: 2px;
    max-width: 70px;
    min-height: 18px !important;
    padding: 1px 2px !important;
    border: 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    font-size: 9px !important;
}

.f3d-configurator input[type="number"],
.f3d-configurator input[type="text"],
.f3d-configurator input[type="password"],
.f3d-configurator input[type="file"],
.f3d-configurator select,
.f3d-configurator textarea {
    width: 100%;
    box-sizing: border-box;
}

.f3d-configurator p {
    margin: 0 0 16px;
}

.f3d-configurator input,
.f3d-configurator select,
.f3d-configurator textarea {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #c7cbd1;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.f3d-configurator textarea {
    min-height: 100px;
    resize: vertical;
}

.f3d-configurator input[type="radio"],
.f3d-configurator input[type="checkbox"] {
    min-height: 0;
    width: auto;
    padding: 0;
}

.f3d-configurator input:focus,
.f3d-configurator select:focus,
.f3d-configurator textarea:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

.f3d-ai-configurator {
    overflow: hidden;
}

.f3d-configurator input[type="radio"] {
    width: auto;
    margin-right: 5px;
}

.f3d-price-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#f3d_live_price {
    font-size: 1.35em;
}

@media (max-width: 700px) {
    .f3d-configurator {
        margin: 16px 0;
        padding: 16px;
    }

    .f3d-grid {
        grid-template-columns: 1fr;
    }

    .f3d-price-box {
        display: block;
    }

    .f3d-image-preview {
        grid-template-columns: repeat(3, 76px);
    }

    .f3d-view-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .f3d-view-grid {
        grid-template-columns: 1fr;
    }

    .f3d-view-upload {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .f3d-image-preview {
        grid-template-columns: repeat(2, 76px);
    }
}
.f3d-editor-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: #3f3f46;
}

.f3d-editor {
    float: left;
    width: 48%;
    margin-bottom: 2em;
}

.f3d-editor-loader.is-hidden {
    display: none;
}

.f3d-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(17, 24, 39, 0.15);
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: f3d-spin 0.8s linear infinite;
}

@keyframes f3d-spin {
    to {
        transform: rotate(360deg);
    }
}

.f3d-editor-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.f3d-editor-canvas {
    width: 100%;
    min-height: 480px;
    background: #f4f4f4;
    position: relative;
}

.f3d-editor-canvas canvas {
    display: block;
    width: 100%;
    height: 480px;
}

.f3d-editor-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: 0;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
}

.f3d-editor-download img {
    display: block;
}

.f3d-editor-upload {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    padding: 10px 14px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.f3d-editor-upload input {
    max-width: 220px;
}

.f3d-ai-source-tabs {
    display: flex;
    gap: 8px;
    margin: 1rem 0;
}

.f3d-ai-source-tab.is-active,
.f3d-image-tab.is-active {
    font-weight: 700;
}

@media (max-width: 700px) {
    .f3d-editor {
        float: none;
        width: 100%;
    }

    .f3d-ai-source-tabs,
    .f3d-image-tabs {
        width: 100%;
    }

    .f3d-ai-source-tab,
    .f3d-image-tab {
        flex: 1 1 45%;
        text-align: center;
    }
}
weight: 700;
}

@media (max-width: 700px) {
    .f3d-editor {
        float: none;
        width: 100%;
    }

    .f3d-ai-source-tabs,
    .f3d-image-tabs {
        width: 100%;
    }

    .f3d-ai-source-tab,
    .f3d-image-tab {
        flex: 1 1 45%;
        text-align: center;
    }
}
