/**
 * VC Logo Customizer v2.0.0 - Estilos del configurador
 */

/* ========== CONTAINER ========== */
.vc-logo-customizer {
    margin: 20px 0;
    padding: 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vc-customizer__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vc-customizer__title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #D4AF37;
    border-radius: 2px;
}

/* ========== PREVIEW ========== */
.vc-preview {
    margin-bottom: 24px;
}

.vc-preview__box {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 24px 24px 36px;
}

.vc-preview__surface {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vc-preview__surface::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(128,128,128,0.15) 3px,
        rgba(128,128,128,0.15) 4px
    );
    z-index: 1;
    pointer-events: none;
}

.vc-preview__bleed {
    position: absolute;
    border: 1px dashed rgba(128,128,128,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: inherit;
    z-index: 2;
}

.vc-preview__logo-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vc-preview__logo-wrapper.vc-draggable {
    cursor: move;
}

.vc-preview__logo-foil {
    width: 100%;
    height: 100%;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    display: none;
}

.vc-preview__logo-jpg {
    width: 100%;
    height: 100%;
    position: relative;
    display: none;
    border-radius: 4px;
    overflow: hidden;
}

.vc-preview__logo-jpg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.vc-preview__color-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    display: none;
}

.vc-preview__placeholder {
    color: rgba(0,0,0,0.25);
    text-align: center;
    font-style: italic;
    font-size: 13px;
    user-select: none;
}

/* Medidas */
.vc-preview__measure {
    position: absolute;
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

.vc-preview__measure--width {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.vc-preview__measure--height {
    right: -4px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
}

.vc-preview__bleed-info {
    text-align: center;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.vc-preview__bleed-info strong {
    color: #555;
    font-weight: 600;
}

/* ========== STEPS ========== */
.vc-step {
    margin-bottom: 20px;
}

.vc-step__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.vc-step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.vc-step__label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* ========== PRINT TOGGLE ========== */
.vc-print-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vc-print-toggle__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    transition: all 0.2s ease;
}

.vc-print-toggle__btn:hover {
    border-color: #bbb;
}

.vc-print-toggle__btn.active {
    border-color: #333;
    background: #fafafa;
    color: #333;
}

.vc-check-icon {
    width: 18px;
    height: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}

.vc-print-toggle__btn.active .vc-check-icon {
    opacity: 1;
}

/* ========== OPTIONS CONTAINER ========== */
.vc-options {
    display: none;
}

.vc-options.vc-visible {
    display: block;
    animation: vcFadeIn 0.3s ease;
}

@keyframes vcFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== UPLOAD ZONE ========== */
.vc-upload-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
}

.vc-upload-zone:hover {
    border-color: #aaa;
    background: #fafafa;
}

.vc-upload-zone.vc-dragover {
    border-color: #D4AF37;
    background: #fffdf5;
}

.vc-upload-zone input[type="file"] {
    display: none;
}

.vc-upload-zone__icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    color: #bbb;
    display: block;
}

.vc-upload-zone__text {
    font-size: 14px;
    color: #555;
    margin-bottom: 4px;
}

.vc-upload-zone__formats {
    font-size: 12px;
    color: #999;
}

/* ========== LOGO UPLOADED ========== */
.vc-logo-uploaded {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.vc-logo-uploaded.vc-visible {
    display: flex;
}

.vc-logo-uploaded__preview {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 4px;
    background: #f5f5f5;
}

.vc-logo-uploaded__info {
    flex: 1;
    min-width: 0;
}

.vc-logo-uploaded__name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-logo-uploaded__change {
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.vc-logo-uploaded__change:hover {
    color: #333;
    text-decoration: underline;
}

.vc-logo-uploaded__remove {
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    transition: all 0.15s;
}

.vc-logo-uploaded__remove:hover {
    background: #fee;
    color: #dc3545;
}

/* ========== STANDARD LOGOS ========== */
.vc-standard-logos {
    margin-top: 16px;
}

.vc-standard-logos__title {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.vc-standard-logos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.vc-standard-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.vc-standard-logo:hover {
    border-color: #bbb;
}

.vc-standard-logo.active {
    border-color: #333;
    background: #fafafa;
}

.vc-standard-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 6px;
}

.vc-standard-logo__name {
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

/* ========== LOCATION SELECTOR ========== */
.vc-location-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vc-location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    transition: all 0.2s;
}

.vc-location-btn:hover {
    border-color: #bbb;
}

.vc-location-btn.active {
    border-color: #333;
    background: #fafafa;
    color: #333;
}

/* ========== PLACEMENT SELECTOR ========== */
.vc-placement-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vc-placement-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    transition: all 0.2s;
}

.vc-placement-btn:hover {
    border-color: #bbb;
}

.vc-placement-btn.active {
    border-color: #333;
    background: #fafafa;
    color: #333;
}

.vc-placement-coords {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: #555;
    text-align: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.vc-placement-coords__label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.vc-placement-coords__value {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #333;
}

.vc-placement-coords__hint {
    display: block;
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

/* ========== CUSTOMIZE TOGGLE (Solo logo / Personalizar) ========== */
.vc-customize-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.vc-customize-toggle__label {
    grid-column: 1 / -1;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.vc-customize-toggle__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    transition: all 0.2s ease;
}

.vc-customize-toggle__btn .vc-check-icon {
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.vc-customize-toggle__btn:hover {
    border-color: #bbb;
}

.vc-customize-toggle__btn.active {
    border-color: #333;
    background: #fafafa;
    color: #333;
}

.vc-customize-toggle__btn.active .vc-check-icon {
    opacity: 1;
}

/* ========== SIZE CONTROL ========== */
.vc-size-control {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vc-size-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #dee2e6;
    border-radius: 3px;
    outline: none;
}

.vc-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.vc-size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.vc-size-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.vc-size-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    color: #333;
}

.vc-size-input:focus {
    border-color: #333;
    outline: none;
}

.vc-size-unit {
    font-size: 13px;
    color: #888;
}

.vc-size-range-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    padding: 0 2px;
}

/* ========== FOIL COLOR SELECTOR ========== */
.vc-foil-category {
    margin-bottom: 16px;
}

.vc-foil-category:last-child {
    margin-bottom: 0;
}

.vc-foil-category__title {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.vc-foil-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 8px;
}

.vc-foil-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px 6px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.vc-foil-swatch:hover {
    border-color: #ccc;
}

.vc-foil-swatch.active {
    border-color: #333;
    background: #fafafa;
}

.vc-foil-swatch__texture {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 4px;
    border: 1px solid rgba(0,0,0,0.08);
}

.vc-foil-swatch__color {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    margin-bottom: 4px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.vc-foil-swatch__name {
    font-size: 10px;
    color: #777;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vc-foil-swatch.active .vc-foil-swatch__name {
    color: #333;
    font-weight: 600;
}

/* ========== INFO NOTE ========== */
.vc-info-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 14px;
    background: #fff8e1;
    border-radius: 6px;
    font-size: 12px;
    color: #856404;
}

.vc-info-note svg {
    flex-shrink: 0;
    color: #d4a017;
}

/* ========== LOADING STATE ========== */
.vc-logo-customizer.vc-loading {
    position: relative;
    pointer-events: none;
}

.vc-logo-customizer.vc-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    z-index: 10;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .vc-logo-customizer {
        padding: 16px;
    }

    .vc-preview__box {
        max-width: 300px;
        padding: 16px 16px 28px;
    }

    .vc-foil-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }

    .vc-foil-swatch__texture,
    .vc-foil-swatch__color {
        width: 34px;
        height: 34px;
    }

    .vc-size-control {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .vc-size-input-wrapper {
        justify-content: center;
    }

    .vc-standard-logos__grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* ========== PRESTASHOP INTEGRATION ========== */
.vc-logo-customizer + .product-add-to-cart {
    margin-top: 20px;
}
