/* Admin-specific styles */
.admin-container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 20px;
}

.admin-readonly-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e67e22;
}

.admin-header h1 {
    color: #2c3e50;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin: 0;
}

.add-product-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-product-btn:hover {
    background: #218838;
}

.admin-welcome {
    color: white;
    margin-right: 15px;
    font-weight: 500;
}

/* Products Table */
.products-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.products-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.products-table tr:hover {
    background: #f8f9fa;
}

.product-image-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

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

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.edit-btn:disabled,
.delete-btn:disabled,
.toggle-status-btn:disabled,
.add-product-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.edit-btn {
    background: #007bff;
    color: white;
}

.edit-btn:hover {
    background: #0056b3;
}

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

.delete-btn:hover {
    background: #c82333;
}

/* Product Form Modal */
.product-form-modal {
    max-width: 600px;
    padding: 30px;
}

.product-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-family: 'Playfair Display', serif;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

/* Multiple Image Input Styles */
.image-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.product-image-url {
    flex: 1;
}

.remove-image-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-image-btn:hover {
    background: #c82333;
}

.add-image-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.add-image-btn:hover {
    background: #218838;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e67e22;
}

.form-group small {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.save-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.save-btn:hover {
    background: #218838;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cancel-btn:hover {
    background: #545b62;
}

/* Status Controls */
.status-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.sold {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.toggle-status-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.toggle-status-btn:hover {
    background: #5a6268;
}

.toggle-status-btn i {
    font-size: 0.9rem;
}

/* Delete Confirmation Modal */
.delete-confirm-modal {
    max-width: 400px;
    padding: 30px;
    text-align: center;
}

.delete-confirm-modal h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.delete-confirm-modal p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .products-table-container {
        overflow-x: auto;
    }

    .products-table {
        min-width: 600px;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.empty-state p {
    margin-bottom: 20px;
}

