.monument-calculator {
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f8ff 100%);
    border: 2px solid #1A2F3D;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 4px 12px rgba(26, 47, 61, 0.08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 300px;
    box-sizing: border-box;
    word-wrap: break-word;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.calc-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.calc-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.calc-section h4 {
    margin: 0 0 12px 0;
    color: #1A2F3D;
    font-size: 16px;
    font-weight: 600;
    padding-left: 10px;
    border-left: 3px solid #1A2F3D;
    text-transform: none;
    letter-spacing: 0.3px;
    word-break: break-word;
    font-family: 'Inter', sans-serif;
}

.polish-section {
    margin-bottom: 20px;
}

.polish-container {
    margin-bottom: 10px;
}

.polish-main-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    word-break: break-word;
    min-height: 44px;
    flex-direction: column;
}

.polish-main-checkbox-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.polish-main-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #1A2F3D;
    cursor: pointer;
    flex-shrink: 0;
    float: left;
    margin-top: 1px;
}

.polish-main-checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.polish-main-checkbox span {
    color: #1A2F3D;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    font-family: 'Inter', sans-serif;
}

.polish-main-checkbox .polish-main-price {
    color: #1A2F3D;
    font-style: normal;
    font-size: 13px;
    margin-top: 3px;
    padding-left: 28px;
    line-height: 1.3;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    opacity: 0.9;
}

.polish-variants {
    display: none;
    margin-top: 8px;
    margin-left: 28px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(26, 47, 61, 0.05);
}

.polish-variants.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.polish-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.polish-option {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    word-break: break-word;
    min-height: 46px;
    flex-direction: column;
}

.polish-option:hover {
    border-color: #1A2F3D;
    background: #f7fafc;
    box-shadow: 0 1px 3px rgba(26, 47, 61, 0.1);
}

.polish-option input[type="radio"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #1A2F3D;
    cursor: pointer;
    flex-shrink: 0;
    float: left;
    margin-top: 1px;
}

.polish-option-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.polish-option-text {
    flex: 1;
    line-height: 1.3;
}

.polish-option span {
    color: #1A2F3D;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.3;
    display: block;
    font-family: 'Inter', sans-serif;
}

.polish-option .option-price {
    color: #1A2F3D;
    font-style: normal;
    font-size: 12px;
    margin-top: 2px;
    padding-left: 26px;
    line-height: 1.2;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    opacity: 0.9;
}

.service-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    padding-left: 0;
    word-break: break-word;
    min-height: 44px;
    flex-direction: column;
}

.service-checkbox:hover {
    background: rgba(26, 47, 61, 0.03);
}

.service-checkbox-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.service-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #1A2F3D;
    cursor: pointer;
    flex-shrink: 0;
    float: left;
    margin-top: 1px;
}

.service-checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.service-checkbox span {
    color: #1A2F3D;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    font-family: 'Inter', sans-serif;
}

.service-checkbox .service-price {
    color: #1A2F3D;
    font-style: normal;
    font-size: 13px;
    margin-top: 3px;
    padding-left: 28px;
    line-height: 1.3;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    opacity: 0.9;
}

.graving-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.graving-options {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.graving-category {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.graving-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.graving-category-title {
    display: block;
    color: #1A2F3D;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.graving-category-title:hover {
    background: rgba(26, 47, 61, 0.05);
}

.graving-items {
    margin-top: 10px;
    padding-left: 15px;
}

.graving-upload {
    margin-top: 15px;
}

.graving-upload button {
    background: #5bc0de;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.graving-upload button:hover {
    background: #1A2F3D;
}

.upload-preview {
    display: none;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-top: 10px;
}

.upload-preview img {
    display: block;
    max-width: 150px;
    max-height: 150px;
    margin-bottom: 10px;
}

.remove-upload-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-upload-btn:hover {
    background: #c53030;
}

.calc-total {
    background: transparent;
    padding: 18px 0;
    margin-top: 18px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    border: none !important;
    box-shadow: none !important;
}

.calc-total > div {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 15px;
    border-bottom: none;
    align-items: center;
    min-height: 34px;
    font-family: 'Inter', sans-serif;
}

.base-price, .options-price {
    color: #1A2F3D;
}

.base-price span:first-child, 
.options-price span:first-child,
.final-price strong:first-child {
    color: #1A2F3D;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
    font-family: 'Inter', sans-serif;
    opacity: 0.9;
}

.base-price-value, 
.options-price-value,
.final-price-value {
    font-weight: 600;
    color: #1A2F3D;
    font-size: 15px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

.base-price-value:not(:empty)::after,
.options-price-value:not(:empty)::after,
.final-price-value:not(:empty)::after {
    content: ' ₽';
    color: #1A2F3D;
    font-weight: 500;
    margin-left: 3px;
    opacity: 0.8;
}

.final-price {
    border-top: 2px solid #e2e8f0;
    margin-top: 10px;
    padding-top: 12px;
    font-size: 16px;
    color: #1A2F3D;
    min-height: 42px;
}

.final-price strong:first-child {
    font-weight: 600;
    color: #1A2F3D;
}

.final-price-value {
    font-size: 18px;
    color: #1A2F3D;
    font-weight: 700;
}

.add-to-cart-calculated {
    background: linear-gradient(135deg, #5bc0de 0%, #2c6975 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
    font-family: 'Inter', sans-serif;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-calculated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.4s;
}

.add-to-cart-calculated:hover:not(:disabled) {
    background: #1A2F3D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 47, 61, 0.2);
}

.add-to-cart-calculated:hover::before {
    left: 100%;
}

.add-to-cart-calculated:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

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


.graving-text-input {
    margin-top: 10px;
    padding-left: 15px;
}

.graving-text-input textarea {
    width: 100%;
    max-width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.graving-text-input textarea:focus {
    outline: none;
    border-color: #1A2F3D;
    box-shadow: 0 0 0 2px rgba(26, 47, 61, 0.1);
}

.text-counter {
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
    text-align: right;
    font-family: 'Inter', sans-serif;
}

.text-counter .current-chars {
    color: #1A2F3D;
    font-weight: 500;
}

.graving-category-sub {
    margin-bottom: 8px;
    padding-left: 10px;
}

.art-elements-subcategories {
    border-left: 2px solid #e2e8f0;
    margin-top: 10px;
}

.graving-text-input textarea {
    max-width: 100%;
    min-height: 60px;
    max-height: 120px;
}

.vase-products-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
}

.vase-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.vase-product-item {
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: white;
}

.vase-product-item:hover {
    border-color: #1A2F3D;
    transform: translateY(-2px);
}

.vase-product-item.selected {
    border-color: #5bc0de;
    background-color: #f0f8ff;
}

.vase-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 5px;
}

.vase-product-title {
    font-size: 11px;
    color: #1A2F3D;
    font-weight: 500;
    margin-bottom: 3px;
    word-break: break-word;
}

/* Стили для калькулятора в виджетах */
.widget .monument-calculator {
    padding: 15px;
    margin: 10px 0;
}

.widget .monument-calculator .calc-section h4 {
    font-size: 14px;
}

.widget .monument-calculator .polish-main-checkbox span,
.widget .monument-calculator .service-checkbox span {
    font-size: 13px;
}

.widget .monument-calculator .polish-option span {
    font-size: 12px;
}

.widget .monument-calculator .graving-category-title {
    font-size: 13px;
}

.widget .monument-calculator .add-to-cart-calculated {
    padding: 10px 15px;
    font-size: 14px;
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .monument-calculator {
        padding: 15px;
    }
    
    .polish-main-checkbox-content,
    .service-checkbox-content,
    .polish-option-content {
        flex-wrap: wrap;
    }
    
    .vase-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .vase-product-image {
        width: 60px;
        height: 60px;
    }
}y.vase-product-price {
    font-size: 10px;
    color: #64748b;
}

