.iphone-price-calculator {
    max-width: 900px;
    margin: 40px auto;
    padding: 35px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #eaeaea;
}

.iphone-price-calculator h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 35px;
    font-size: 32px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
}

.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #34495e;
    font-size: 17px;
}

.form-group select {
    width: 100%;
    padding: 16px 40px 16px 16px;
    border: 1px solid #dce1e6;
    border-radius: 10px;
    background-color: #fff;
    font-size: 16px;
    transition: all 0.3s;
    color: #2c3e50;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23757575"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

.form-group select:focus {
    border-color: #d90429;
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.2);
    outline: none;
}

.battery-slider {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: #e0e7ff;
    outline: none;
    margin-top: 10px;
    -webkit-appearance: none;
    direction: ltr;
}

.battery-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d90429;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(217, 4, 41, 0.4);
    border: 2px solid white;
}

.battery-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d90429;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(217, 4, 41, 0.4);
    border: 2px solid white;
}

.battery-value {
    font-weight: bold;
    color: #d90429;
    font-size: 19px;
    margin-left: 5px;
}

.battery-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #7f8c8d;
    font-size: 14px;
    direction: ltr;
}

.calculate-btn {
    grid-column: span 2;
    background: linear-gradient(to right, #d90429, #b00321);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 19px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3);
    position: relative;
    overflow: hidden;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(217, 4, 41, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.result-container {
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-left: 5px solid #d90429;
    margin-top: 20px;
    transition: all 0.5s ease;
}

.result-container h3 {
    margin-top: 0;
    color: #2c3e50;
    padding-bottom: 15px;
    font-size: 22px;
    border-bottom: 1px solid #eaeaea;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.result-details p {
    margin: 0 0 12px;
    padding: 10px;
    background: #edf2f7;
    border-radius: 8px;
    font-size: 16px;
}

.price-result {
    text-align: center;
    padding: 20px;
    background: #ffe5e9;
    border-radius: 10px;
    margin: 20px 0;
}

.result-price {
    color: #d90429;
    font-size: 32px;
    font-weight: 800;
    display: inline-block;
    margin-top: 5px;
}

.contact-btn {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 16px 35px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    display: block;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* طراحی واکنش‌گرا */
@media (max-width: 991px) {
    .calculator-form {
        grid-template-columns: 1fr;
    }
    
    .calculate-btn {
        grid-column: span 1;
    }
    
    .iphone-price-calculator {
        padding: 25px;
        margin: 20px;
    }
    
    .iphone-price-calculator h2 {
        font-size: 26px;
    }
}

@media (max-width: 576px) {
    .iphone-price-calculator {
        padding: 20px 15px;
    }
    
    .result-container {
        padding: 20px;
    }
    
    .result-price {
        font-size: 26px;
    }
    
    .calculate-btn, .contact-btn {
        padding: 15px;
        font-size: 16px;
    }
}

/* استایل‌های مدیریت */
.model-table-wrapper {
    margin-bottom: 30px;
    overflow-x: auto;
}

.model-table-wrapper h3 {
    background: #f1f1f1;
    padding: 10px;
    border-radius: 5px;
}

.widefat.fixed {
    width: 100%;
    border-collapse: collapse;
}

.widefat.fixed th {
    background: #e5e5e5;
    padding: 10px;
    text-align: right;
    border: 1px solid #ddd;
}

.widefat.fixed td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.widefat.fixed input[type="number"] {
    width: 100%;
    padding: 8px;
    text-align: center;
    font-size: 14px;
}

/* استایل برای اسپینر لودینگ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* استایل‌های کارت در پنل مدیریت */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    margin-top: 0;
    color: #2c3e50;
}

/* استایل‌های جدید برای صفحه آپلود */
.file-name {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    background: #f3f4f5;
    border-radius: 4px;
    font-size: 14px;
}

.form-table input[type="file"] {
    padding: 8px;
    border: 1px solid #dce1e6;
    border-radius: 4px;
    background: #fff;
}

/* استایل برای Select2 */
.select2-container--default .select2-selection--single {
    height: 50px;
    padding: 5px;
    border: 1px solid #dce1e6;
    border-radius: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    font-size: 16px;
    text-align: right;
    padding-right: 10px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #dce1e6;
    border-radius: 5px;
    padding: 8px;
}

.select2-results__option {
    text-align: right;
    padding: 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #d90429;
}