/* ==========================================
   KromMetal - Profil Kesim Optimizasyonu
   (Ağırlık Hesaplama sayfası ile aynı görünüm)
   ========================================== */

.kesim-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.kesim-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 968px) {
    .kesim-container {
        grid-template-columns: 1fr;
    }
}

/* Form Bölümü */
.kesim-form-wrapper {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    min-width: 0;
}

.kesim-form-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f5;
}

.kesim-form-title {
    font-size: 1.5em;
    color: #212529;
    margin-bottom: 5px;
    font-weight: 700;
}

.kesim-form-subtitle {
    color: #6c757d;
    font-size: 0.95em;
    margin: 0;
}

.kesim-alert {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.kesim-group {
    margin-bottom: 25px;
}

.kesim-group-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    font-size: 0.95em;
}

/* Satırlar */
.kesim-row {
    display: grid;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
}

.kesim-row-stock {
    grid-template-columns: 1fr 80px auto;
}

.kesim-row-piece {
    grid-template-columns: 1fr 100px 70px auto;
}

@media (max-width: 480px) {
    .kesim-row-piece {
        grid-template-columns: 1fr 1fr auto;
    }

    .kesim-row-piece .kesim-field:first-child {
        grid-column: 1 / -1;
    }
}

.kesim-field {
    display: block;
    min-width: 0;
}

.kesim-field span {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kesim-input {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1em;
    font-family: inherit;
    color: #212529;
    background: white;
    transition: all 0.3s ease;
}

.kesim-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.kesim-input-group {
    display: flex;
    align-items: stretch;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kesim-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.kesim-input-group .kesim-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    padding: 12px 15px;
    box-shadow: none;
}

.kesim-input-unit {
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9em;
    border-left: 1px solid #e9ecef;
}

.kesim-remove {
    padding: 10px 14px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.6;
    background: white;
    color: #991b1b;
    border: 2px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kesim-remove:hover {
    background: #fee2e2;
}

.kesim-add {
    padding: 10px 18px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: #495057;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kesim-add:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hesapla Butonu */
.kesim-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #1a4a8d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kesim-button:hover {
    transform: translateY(-2px);
}

.kesim-button:active {
    transform: translateY(0);
}

.kesim-button svg {
    width: 20px;
    height: 20px;
}

/* Sonuç Bölümü */
.kesim-result-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-width: 0;
    scroll-margin-top: 84px;
}

.kesim-result-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1a4a8d 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.kesim-result-header h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
    opacity: 0.9;
}

.kesim-result-header p {
    opacity: 0.8;
    font-size: 0.9em;
    margin: 0;
}

.kesim-result-body {
    padding: 30px;
}

.kesim-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.kesim-stat {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.kesim-stat span {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
}

.kesim-stat strong {
    display: block;
    font-size: 1.5em;
    font-weight: 800;
    color: var(--primary);
    margin-top: 4px;
}

/* Kesim Planı */
.kesim-cut {
    border: 2px solid #f1f3f5;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.kesim-cut-title {
    font-weight: 700;
    color: #212529;
}

.kesim-bar {
    display: flex;
    height: 34px;
    background: #f1f3f5;
    border-radius: 6px;
    overflow: hidden;
    margin: 10px 0;
}

.kesim-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    background: var(--primary);
    color: white;
    border-right: 2px solid white;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}

.kesim-seg:last-child {
    border-right: none;
}

.kesim-seg-rest {
    background: #fee2e2;
    color: #991b1b;
}

.kesim-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kesim-tag {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75em;
    color: #495057;
}

.kesim-cut-info {
    font-size: 0.85em;
    color: #6c757d;
    line-height: 1.6;
    margin-top: 10px;
}

.kesim-cut-info strong {
    color: #212529;
}

.kesim-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.kesim-details h4,
.kesim-warn h4 {
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kesim-details h4 {
    color: #495057;
}

.kesim-details .kesim-tag {
    background: white;
}

.kesim-warn {
    margin-top: 20px;
    padding: 20px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    font-size: 0.9em;
    line-height: 1.6;
}

.kesim-warn ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 10px;
}

.kesim-warn p {
    margin: 0;
}

.kesim-result-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.kesim-btn-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: #212529;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.kesim-btn-offer:hover {
    background: #000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.kesim-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: transparent;
    color: #6c757d;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.kesim-btn-reset:hover {
    border-color: #adb5bd;
    color: #495057;
}

/* Boş Durum */
.kesim-empty {
    padding: 60px 40px;
    text-align: center;
    color: #adb5bd;
}

.kesim-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.kesim-empty h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

.kesim-empty p {
    font-size: 0.95em;
    margin: 0;
}

/* Bilgi Kartları */
.kesim-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.kesim-info-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.kesim-info-card h4 {
    color: #212529;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.kesim-info-card p {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .kesim-form-wrapper,
    .kesim-result-body {
        padding: 20px;
    }
}
