/* Alerts */
.alert {
    padding: 12px 20px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    animation: fadeIn 0.4s ease-in-out;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Request Card */
.request-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 20px;
    align-items: flex-start;
    animation: fadeInUp 0.4s ease;
}
.request-details {
    flex: 1 1 300px;
}
.request-image img {
    max-width: 120px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease;
}
.request-image img:hover {
    transform: scale(1.03);
}

/* Buttons */
.btn,
.download-btn {
    display: inline-block;
    margin-top: 10px;
    background: #007bff;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}
.btn:hover,
.download-btn:hover {
    background: #0056b3;
}
.btn-danger {
    background: #dc3545;
}
.btn-danger:hover {
    background: #bd2130;
}
.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    background: #565e64;
}

/* Badge */
.badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #333;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Container & Headings */


h1, h2, h3 {
    color: #222;
    margin-top: 20px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}
label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

/* Part Cards */
.part-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}
.part-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 15px;
    width: calc(33.333% - 20px);
    min-width: 260px;
    cursor: pointer;
    transition: transform 0.2s;
}
.part-card:hover {
    transform: translateY(-5px);
}
.part-card img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}
.part-card h3 {
    font-size: 18px;
    margin: 10px 0 5px;
}
/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}
.modal-content img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

/* Header */
.app-header {
    background: #1d3557;
    color: white;
    padding: 10px 0;
}
.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    gap: 10px;
}
.site-title {
    font-size: 18px;
    font-weight: bold;
}

/* Navigation Menu */
.main-menu {
    background: #f1f1f1;
    padding: 10px 0;
}
.main-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
    margin: 0;
}
.main-menu li a {
    color: #1d3557;
    font-weight: bold;
    text-decoration: none;
}
.main-menu li a:hover {
    text-decoration: underline;
}

/* Custom Distributor Button */
.distributor-btn {
    margin-top: 10px;
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
}
.distributor-btn:hover {
    background-color: #218838;
}

/* Titlu individual dacă e diferit de grup */
h1 {
    margin-bottom: 25px;
    color: #333;
}

/* Part card în format de listă cu imagine la stânga */
.part-card.list-view {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.part-card.list-view img {
    width: 120px;
    height: auto;
    border-radius: 6px;
    margin-right: 20px;
    object-fit: cover;
    border: 1px solid #ccc;
}

.part-info {
    flex: 1;
}

.part-info h3 {
    margin: 0 0 8px;
    color: #007bff;
}

.part-info p {
    margin: 3px 0;
    color: #555;
}

a.back-link {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #007bff;
}
a.back-link:hover {
    text-decoration: underline;
}

/* Alertă alternativă de eroare */
.alert-error {
    background: #f8d7da;
    padding: 12px;
    border-left: 5px solid #dc3545;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Category tree */
.category-list {
    list-style: none;
    padding-left: 20px;
}
.category-item {
    cursor: pointer;
    padding: 5px 0;
    font-size: 16px;
    color: #333;
}
.category-item > ul {
    display: none;
    margin-top: 5px;
    padding-left: 15px;
    border-left: 2px dashed #ccc;
}

/* Form inputs inside modals */
.modal textarea,
.modal input[type="url"] {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.modal button {
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}
.modal button:hover {
    background-color: #0056b3;
}

/* Request form design */
.part-card form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.part-card .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.part-card .form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.part-card form input[type="text"],
.part-card form input[type="file"],
.part-card form textarea {
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}
.part-card form button {
    background-color: #28a745;
    color: #fff;
    padding: 10px 18px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-start;
}
.part-card form button:hover {
    background-color: #218838;
}

/* Preferences form */
.prefs-container {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
}
.prefs-container h1 {
    text-align: center;
    margin-bottom: 20px;
}
.prefs-container a {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
}
.prefs-container label {
    font-size: 16px;
    display: block;
    margin-bottom: 15px;
}
.prefs-container button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.prefs-container button:hover {
    background: #0056b3;
}

/* Success message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Header right info */
.header-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
}
.header-right .welcome {
    font-size: 14px;
    color: #ddd;
}
.header-right a {
    color: #ffc107;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
}
.header-right a:hover {
    color: #fff;
}

/* Responsive layout */
@media (max-width: 767px) {
    .container {
        padding: 20px 10px;
    }
    .part-cards {
        flex-direction: column;
        gap: 15px;
    }
    .part-card {
        width: 100% !important;
    }
    .request-card {
        flex-direction: column;
    }
    .request-image img {
        max-width: 100%;
        margin-top: 10px;
    }
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    .app-header .container,
    .main-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .reply-form textarea {
        font-size: 14px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 30px 20px;
    }
    .part-card {
        width: calc(50% - 20px) !important;
    }
    .request-card {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .modal-content {
        width: 90%;
    }
}

@media (min-width: 1025px) {
    .part-card {
        width: calc(33.333% - 20px) !important;
    }
    .modal-content {
        max-width: 600px;
    }
}

