* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.product-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-group .hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add {
    background: #28a745;
    color: white;
    width: 100%;
}

.btn-add:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-generate {
    background: #667eea;
    color: white;
    width: 100%;
    margin-bottom: 15px;
    font-size: 18px;
    padding: 15px;
}

.btn-generate:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-generate:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-save {
    background: #17a2b8;
    color: white;
    width: 100%;
    margin-bottom: 15px;
    font-size: 16px;
    padding: 12px;
}

.btn-save:hover:not(:disabled) {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.btn-save:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-load {
    background: #ffc107;
    color: #333;
    width: 100%;
    margin-bottom: 15px;
    font-size: 16px;
    padding: 12px;
}

.btn-load:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-clear {
    background: #dc3545;
    color: white;
    width: 100%;
}

.btn-clear:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.products-list {
    margin-bottom: 30px;
}

#productsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.product-code {
    font-size: 11px;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.empty-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
    grid-column: 1 / -1;
}

.actions {
    margin-top: 30px;
}

/* Şablon Sistemi */
.template-section {
    margin-top: 40px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.template-section h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.template-section h3 {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.template-save-form {
    margin-bottom: 30px;
}

.template-save-form .form-group {
    display: flex;
    gap: 10px;
}

.template-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.template-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-save-small {
    background: #17a2b8;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save-small:hover:not(:disabled) {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.btn-save-small:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.template-list {
    margin-top: 20px;
}

#templatesContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.template-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.template-item:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.template-info {
    flex: 1;
}

.template-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.template-meta {
    font-size: 12px;
    color: #999;
}

.template-actions {
    display: flex;
    gap: 10px;
}

.btn-template {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-template-load {
    background: #28a745;
    color: white;
}

.btn-template-load:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-template-delete {
    background: #dc3545;
    color: white;
}

.btn-template-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-template-export {
    background: #ffc107;
    color: #333;
}

.btn-template-export:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

#productCount {
    color: #667eea;
    font-weight: bold;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #productsContainer {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

