/* Стили конфигуратора — префикс #bottle-configurator-widget */
/* Жёсткие параметры шрифтов (!important) — перекрывают тему WordPress */
#bottle-configurator-widget * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#bottle-configurator-widget,
#bottle-configurator-widget * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
}

#bottle-configurator-widget {
    background: #ffffff;
    width: 100%;
}

#bottle-configurator-widget .container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: visible; /* чтобы выпадающие списки не обрезались темой/контейнером */
}

#bottle-configurator-widget h1 {
    text-align: center;
    padding: 40px 30px;
    background: #ffffff;
    color: #FA4937 !important;
    font-size: 2.5em !important;
    margin: 0;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    line-height: 1.2 !important;
}

#bottle-configurator-widget .configurator {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    padding: 40px;
}

#bottle-configurator-widget .controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#bottle-configurator-widget .progress-container {
    margin-bottom: 30px;
}

#bottle-configurator-widget .progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#bottle-configurator-widget .progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#bottle-configurator-widget .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FA4937 0%, #FF7A62 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

#bottle-configurator-widget .progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
}

#bottle-configurator-widget #progressPercent {
    font-weight: 600 !important;
    color: #FA4937 !important;
    font-size: 1em !important;
}

#bottle-configurator-widget #progressStep {
    color: #6b7280 !important;
    font-size: 0.9em !important;
    font-weight: 400 !important;
}

#bottle-configurator-widget .steps-container {
    min-height: 400px;
    position: relative;
}

#bottle-configurator-widget .step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

#bottle-configurator-widget .step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#bottle-configurator-widget .step-content h3 {
    margin-bottom: 25px;
    color: #1f2937 !important;
    font-size: 1.5em !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

#bottle-configurator-widget .options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

#bottle-configurator-widget .option-btn {
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    text-align: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#bottle-configurator-widget .option-btn:hover {
    border-color: #FA4937;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

#bottle-configurator-widget .option-btn.selected {
    border-color: #FA4937;
    background: #FA4937;
    color: white !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

#bottle-configurator-widget .option-btn.small {
    padding: 15px;
    font-size: 1em !important;
}

#bottle-configurator-widget .print-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

#bottle-configurator-widget .control-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#bottle-configurator-widget .control-group label {
    font-weight: 600 !important;
    color: #1f2937 !important;
    font-size: 1.1em !important;
}

#bottle-configurator-widget .control-group select {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em !important;
    background: #f9fafb;
    cursor: not-allowed;
    color: #6b7280 !important;
    font-weight: 400 !important;
    height: 60px !important;
}

#bottle-configurator-widget .navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

#bottle-configurator-widget .nav-btn {
    padding: 14px 35px;
    border: none;
    border-radius: 8px;
    background: #FA4937;
    color: white !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(250, 73, 55, 0.2);
}

#bottle-configurator-widget .nav-btn:hover {
    background: #C53A2C;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(250, 73, 55, 0.35);
}

#bottle-configurator-widget .nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#bottle-configurator-widget .preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#bottle-configurator-widget .image-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    border: 1px solid #e5e7eb;
}

#bottle-configurator-widget #productImage {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

#bottle-configurator-widget #productImage.loading {
    opacity: 0.5;
}

#bottle-configurator-widget .form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#bottle-configurator-widget .file-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#bottle-configurator-widget .file-upload-btn {
    padding: 15px 25px;
    border: 2px dashed #FA4937;
    border-radius: 8px;
    background: #FFF3F0;
    color: #FA4937 !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500 !important;
    font-size: 1em !important;
}

#bottle-configurator-widget .file-upload-btn:hover {
    background: #FFE0D9;
    border-color: #C53A2C;
}

#bottle-configurator-widget .file-name {
    color: #6b7280 !important;
    font-size: 0.9em !important;
    padding: 5px 0;
}

#bottle-configurator-widget .field-hint {
    margin-top: 6px;
    font-size: 0.9em !important;
    color: #6b7280 !important;
    line-height: 1.35;
}

#bottle-configurator-widget .price-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px 16px;
}

#bottle-configurator-widget .price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

#bottle-configurator-widget .price-row:last-of-type {
    border-bottom: none;
}

#bottle-configurator-widget .price-row-strong .price-label,
#bottle-configurator-widget .price-row-strong .price-value {
    font-weight: 700 !important;
}

#bottle-configurator-widget .price-label {
    color: #1f2937 !important;
    font-size: 0.98em !important;
}

#bottle-configurator-widget .price-value {
    color: #111827 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 0.98em !important;
}

#bottle-configurator-widget .price-meta {
    margin-top: 10px;
    font-size: 0.9em !important;
    color: #6b7280 !important;
    line-height: 1.35;
}

#bottle-configurator-widget .logo-preview {
    margin-top: 10px;
}

#bottle-configurator-widget .logo-preview img {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#bottle-configurator-widget .form-input,
#bottle-configurator-widget .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em !important;
    font-weight: 400 !important;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937 !important;
}

#bottle-configurator-widget .form-input:focus,
#bottle-configurator-widget .form-textarea:focus {
    outline: none;
    border-color: #FA4937;
    box-shadow: 0 0 0 3px rgba(250, 73, 55, 0.1);
}

#bottle-configurator-widget .form-textarea {
    resize: vertical;
    min-height: 100px;
}

#bottle-configurator-widget .submit-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 8px;
    background: #FA4937;
    color: white !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(250, 73, 55, 0.2);
    width: 100%;
    margin-top: 10px;
}

#bottle-configurator-widget .submit-btn:hover:not(:disabled) {
    background: #C53A2C;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(250, 73, 55, 0.35);
}

#bottle-configurator-widget .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#bottle-configurator-widget .submit-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500 !important;
    font-size: 1em !important;
    text-align: center;
}

#bottle-configurator-widget .submit-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

#bottle-configurator-widget .submit-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@media (max-width: 1024px) {
    #bottle-configurator-widget .configurator {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    #bottle-configurator-widget h1 {
        padding: 30px 20px;
        font-size: 1.8em;
    }
    #bottle-configurator-widget .configurator {
        gap: 20px;
        padding: 20px 15px;
    }
    #bottle-configurator-widget .progress-container {
        margin-bottom: 20px;
    }
    #bottle-configurator-widget .progress-bar { height: 6px; }
    #bottle-configurator-widget .progress-text { font-size: 0.85em; }
    #bottle-configurator-widget .options-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    #bottle-configurator-widget .option-btn {
        padding: 18px 15px;
        font-size: 1em;
        min-height: 50px;
    }
    #bottle-configurator-widget .image-container {
        min-height: 300px;
        padding: 15px;
    }
    #bottle-configurator-widget #productImage {
        max-height: 350px;
    }
    #bottle-configurator-widget .nav-btn {
        padding: 14px 25px;
        font-size: 0.95em;
        flex: 1;
        min-height: 48px;
    }
}
